Documentation
¶
Index ¶
- Constants
- func Bool(b bool) param.Opt[bool]
- func BoolPtr(v bool) *bool
- func DefaultClientOptions() []option.RequestOption
- func File(rdr io.Reader, filename string, contentType string) file
- func Float(f float64) param.Opt[float64]
- func FloatPtr(v float64) *float64
- func Int(i int64) param.Opt[int64]
- func IntPtr(v int64) *int64
- func Opt[T comparable](v T) param.Opt[T]
- func Ptr[T any](v T) *T
- func String(s string) param.Opt[string]
- func StringPtr(v string) *string
- func Time(t time.Time) param.Opt[time.Time]
- func TimePtr(v time.Time) *time.Time
- type APIError
- type Account
- type AccountBridge
- type AccountBridgeProvider
- type AccountContactListParams
- type AccountContactListParamsDirection
- type AccountContactSearchParams
- type AccountContactSearchResponse
- type AccountContactService
- func (r *AccountContactService) List(ctx context.Context, accountID string, query AccountContactListParams, ...) (res *pagination.CursorSearch[shared.User], err error)
- func (r *AccountContactService) ListAutoPaging(ctx context.Context, accountID string, query AccountContactListParams, ...) *pagination.CursorSearchAutoPager[shared.User]
- func (r *AccountContactService) Search(ctx context.Context, accountID string, query AccountContactSearchParams, ...) (res *AccountContactSearchResponse, err error)
- type AccountGetResponse
- type AccountGetResponseStatus
- type AccountService
- type AccountStatus
- type AppService
- type AppSetupEmailParams
- type AppSetupGetResponse
- type AppSetupGetResponseE2EE
- type AppSetupGetResponseE2EESecrets
- type AppSetupGetResponseMatrix
- type AppSetupGetResponseState
- type AppSetupGetResponseVerification
- type AppSetupGetResponseVerificationError
- type AppSetupGetResponseVerificationOtherDevice
- type AppSetupGetResponseVerificationQR
- type AppSetupGetResponseVerificationSAS
- type AppSetupRecoveryKeyResetConfirmParams
- type AppSetupRecoveryKeyResetConfirmResponse
- type AppSetupRecoveryKeyResetConfirmResponseSession
- type AppSetupRecoveryKeyResetConfirmResponseSessionE2EE
- type AppSetupRecoveryKeyResetConfirmResponseSessionE2EESecrets
- type AppSetupRecoveryKeyResetConfirmResponseSessionMatrix
- type AppSetupRecoveryKeyResetConfirmResponseSessionVerification
- type AppSetupRecoveryKeyResetConfirmResponseSessionVerificationError
- type AppSetupRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice
- type AppSetupRecoveryKeyResetConfirmResponseSessionVerificationQR
- type AppSetupRecoveryKeyResetConfirmResponseSessionVerificationSAS
- type AppSetupRecoveryKeyResetNewParams
- type AppSetupRecoveryKeyResetNewResponse
- type AppSetupRecoveryKeyResetNewResponseSession
- type AppSetupRecoveryKeyResetNewResponseSessionE2EE
- type AppSetupRecoveryKeyResetNewResponseSessionE2EESecrets
- type AppSetupRecoveryKeyResetNewResponseSessionMatrix
- type AppSetupRecoveryKeyResetNewResponseSessionVerification
- type AppSetupRecoveryKeyResetNewResponseSessionVerificationError
- type AppSetupRecoveryKeyResetNewResponseSessionVerificationOtherDevice
- type AppSetupRecoveryKeyResetNewResponseSessionVerificationQR
- type AppSetupRecoveryKeyResetNewResponseSessionVerificationSAS
- type AppSetupRecoveryKeyResetService
- func (r *AppSetupRecoveryKeyResetService) Confirm(ctx context.Context, body AppSetupRecoveryKeyResetConfirmParams, ...) (res *AppSetupRecoveryKeyResetConfirmResponse, err error)
- func (r *AppSetupRecoveryKeyResetService) New(ctx context.Context, body AppSetupRecoveryKeyResetNewParams, ...) (res *AppSetupRecoveryKeyResetNewResponse, err error)
- type AppSetupRecoveryKeyService
- type AppSetupRecoveryKeyVerifyParams
- type AppSetupRecoveryKeyVerifyResponse
- type AppSetupRecoveryKeyVerifyResponseSession
- type AppSetupRecoveryKeyVerifyResponseSessionE2EE
- type AppSetupRecoveryKeyVerifyResponseSessionE2EESecrets
- type AppSetupRecoveryKeyVerifyResponseSessionMatrix
- type AppSetupRecoveryKeyVerifyResponseSessionVerification
- type AppSetupRecoveryKeyVerifyResponseSessionVerificationError
- type AppSetupRecoveryKeyVerifyResponseSessionVerificationOtherDevice
- type AppSetupRecoveryKeyVerifyResponseSessionVerificationQR
- type AppSetupRecoveryKeyVerifyResponseSessionVerificationSAS
- type AppSetupRegisterParams
- type AppSetupRegisterResponse
- type AppSetupRegisterResponseMatrix
- type AppSetupRegisterResponseSession
- type AppSetupRegisterResponseSessionE2EE
- type AppSetupRegisterResponseSessionE2EESecrets
- type AppSetupRegisterResponseSessionMatrix
- type AppSetupRegisterResponseSessionVerification
- type AppSetupRegisterResponseSessionVerificationError
- type AppSetupRegisterResponseSessionVerificationOtherDevice
- type AppSetupRegisterResponseSessionVerificationQR
- type AppSetupRegisterResponseSessionVerificationSAS
- type AppSetupResponseParams
- type AppSetupResponseResponseRegistrationRequired
- type AppSetupResponseResponseRegistrationRequiredCopy
- type AppSetupResponseResponseSuccess
- type AppSetupResponseResponseSuccessMatrix
- type AppSetupResponseResponseSuccessSession
- type AppSetupResponseResponseSuccessSessionE2EE
- type AppSetupResponseResponseSuccessSessionE2EESecrets
- type AppSetupResponseResponseSuccessSessionMatrix
- type AppSetupResponseResponseSuccessSessionVerification
- type AppSetupResponseResponseSuccessSessionVerificationError
- type AppSetupResponseResponseSuccessSessionVerificationOtherDevice
- type AppSetupResponseResponseSuccessSessionVerificationQR
- type AppSetupResponseResponseSuccessSessionVerificationSAS
- type AppSetupResponseResponseUnion
- func (u AppSetupResponseResponseUnion) AsRegistrationRequired() (v AppSetupResponseResponseRegistrationRequired)
- func (u AppSetupResponseResponseUnion) AsSuccess() (v AppSetupResponseResponseSuccess)
- func (u AppSetupResponseResponseUnion) RawJSON() string
- func (r *AppSetupResponseResponseUnion) UnmarshalJSON(data []byte) error
- type AppSetupService
- func (r *AppSetupService) Email(ctx context.Context, body AppSetupEmailParams, opts ...option.RequestOption) (err error)
- func (r *AppSetupService) Get(ctx context.Context, opts ...option.RequestOption) (res *AppSetupGetResponse, err error)
- func (r *AppSetupService) Register(ctx context.Context, body AppSetupRegisterParams, opts ...option.RequestOption) (res *AppSetupRegisterResponse, err error)
- func (r *AppSetupService) Response(ctx context.Context, body AppSetupResponseParams, opts ...option.RequestOption) (res *AppSetupResponseResponseUnion, err error)
- func (r *AppSetupService) Start(ctx context.Context, opts ...option.RequestOption) (res *AppSetupStartResponse, err error)
- type AppSetupStartResponse
- type AppSetupVerificationAcceptResponse
- type AppSetupVerificationAcceptResponseSession
- type AppSetupVerificationAcceptResponseSessionE2EE
- type AppSetupVerificationAcceptResponseSessionE2EESecrets
- type AppSetupVerificationAcceptResponseSessionMatrix
- type AppSetupVerificationAcceptResponseSessionVerification
- type AppSetupVerificationAcceptResponseSessionVerificationError
- type AppSetupVerificationAcceptResponseSessionVerificationOtherDevice
- type AppSetupVerificationAcceptResponseSessionVerificationQR
- type AppSetupVerificationAcceptResponseSessionVerificationSAS
- type AppSetupVerificationAcceptResponseVerification
- type AppSetupVerificationAcceptResponseVerificationError
- type AppSetupVerificationAcceptResponseVerificationOtherDevice
- type AppSetupVerificationAcceptResponseVerificationQR
- type AppSetupVerificationAcceptResponseVerificationSAS
- type AppSetupVerificationCancelParams
- type AppSetupVerificationCancelResponse
- type AppSetupVerificationCancelResponseSession
- type AppSetupVerificationCancelResponseSessionE2EE
- type AppSetupVerificationCancelResponseSessionE2EESecrets
- type AppSetupVerificationCancelResponseSessionMatrix
- type AppSetupVerificationCancelResponseSessionVerification
- type AppSetupVerificationCancelResponseSessionVerificationError
- type AppSetupVerificationCancelResponseSessionVerificationOtherDevice
- type AppSetupVerificationCancelResponseSessionVerificationQR
- type AppSetupVerificationCancelResponseSessionVerificationSAS
- type AppSetupVerificationCancelResponseVerification
- type AppSetupVerificationCancelResponseVerificationError
- type AppSetupVerificationCancelResponseVerificationOtherDevice
- type AppSetupVerificationCancelResponseVerificationQR
- type AppSetupVerificationCancelResponseVerificationSAS
- type AppSetupVerificationGetResponse
- type AppSetupVerificationGetResponseSession
- type AppSetupVerificationGetResponseSessionE2EE
- type AppSetupVerificationGetResponseSessionE2EESecrets
- type AppSetupVerificationGetResponseSessionMatrix
- type AppSetupVerificationGetResponseSessionVerification
- type AppSetupVerificationGetResponseSessionVerificationError
- type AppSetupVerificationGetResponseSessionVerificationOtherDevice
- type AppSetupVerificationGetResponseSessionVerificationQR
- type AppSetupVerificationGetResponseSessionVerificationSAS
- type AppSetupVerificationGetResponseVerification
- type AppSetupVerificationGetResponseVerificationError
- type AppSetupVerificationGetResponseVerificationOtherDevice
- type AppSetupVerificationGetResponseVerificationQR
- type AppSetupVerificationGetResponseVerificationSAS
- type AppSetupVerificationListResponse
- type AppSetupVerificationListResponseItem
- type AppSetupVerificationListResponseItemError
- type AppSetupVerificationListResponseItemOtherDevice
- type AppSetupVerificationListResponseItemQR
- type AppSetupVerificationListResponseItemSAS
- type AppSetupVerificationNewParams
- type AppSetupVerificationNewParamsPurpose
- type AppSetupVerificationNewResponse
- type AppSetupVerificationNewResponseSession
- type AppSetupVerificationNewResponseSessionE2EE
- type AppSetupVerificationNewResponseSessionE2EESecrets
- type AppSetupVerificationNewResponseSessionMatrix
- type AppSetupVerificationNewResponseSessionVerification
- type AppSetupVerificationNewResponseSessionVerificationError
- type AppSetupVerificationNewResponseSessionVerificationOtherDevice
- type AppSetupVerificationNewResponseSessionVerificationQR
- type AppSetupVerificationNewResponseSessionVerificationSAS
- type AppSetupVerificationNewResponseVerification
- type AppSetupVerificationNewResponseVerificationError
- type AppSetupVerificationNewResponseVerificationOtherDevice
- type AppSetupVerificationNewResponseVerificationQR
- type AppSetupVerificationNewResponseVerificationSAS
- type AppSetupVerificationQRConfirmScannedResponse
- type AppSetupVerificationQRConfirmScannedResponseSession
- type AppSetupVerificationQRConfirmScannedResponseSessionE2EE
- type AppSetupVerificationQRConfirmScannedResponseSessionE2EESecrets
- type AppSetupVerificationQRConfirmScannedResponseSessionMatrix
- type AppSetupVerificationQRConfirmScannedResponseSessionVerification
- type AppSetupVerificationQRConfirmScannedResponseSessionVerificationError
- type AppSetupVerificationQRConfirmScannedResponseSessionVerificationOtherDevice
- type AppSetupVerificationQRConfirmScannedResponseSessionVerificationQR
- type AppSetupVerificationQRConfirmScannedResponseSessionVerificationSAS
- type AppSetupVerificationQRConfirmScannedResponseVerification
- type AppSetupVerificationQRConfirmScannedResponseVerificationError
- type AppSetupVerificationQRConfirmScannedResponseVerificationOtherDevice
- type AppSetupVerificationQRConfirmScannedResponseVerificationQR
- type AppSetupVerificationQRConfirmScannedResponseVerificationSAS
- type AppSetupVerificationQRScanParams
- type AppSetupVerificationQRScanResponse
- type AppSetupVerificationQRScanResponseSession
- type AppSetupVerificationQRScanResponseSessionE2EE
- type AppSetupVerificationQRScanResponseSessionE2EESecrets
- type AppSetupVerificationQRScanResponseSessionMatrix
- type AppSetupVerificationQRScanResponseSessionVerification
- type AppSetupVerificationQRScanResponseSessionVerificationError
- type AppSetupVerificationQRScanResponseSessionVerificationOtherDevice
- type AppSetupVerificationQRScanResponseSessionVerificationQR
- type AppSetupVerificationQRScanResponseSessionVerificationSAS
- type AppSetupVerificationQRScanResponseVerification
- type AppSetupVerificationQRScanResponseVerificationError
- type AppSetupVerificationQRScanResponseVerificationOtherDevice
- type AppSetupVerificationQRScanResponseVerificationQR
- type AppSetupVerificationQRScanResponseVerificationSAS
- type AppSetupVerificationQRService
- func (r *AppSetupVerificationQRService) ConfirmScanned(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppSetupVerificationQRConfirmScannedResponse, err error)
- func (r *AppSetupVerificationQRService) Scan(ctx context.Context, body AppSetupVerificationQRScanParams, ...) (res *AppSetupVerificationQRScanResponse, err error)
- type AppSetupVerificationSASConfirmResponse
- type AppSetupVerificationSASConfirmResponseSession
- type AppSetupVerificationSASConfirmResponseSessionE2EE
- type AppSetupVerificationSASConfirmResponseSessionE2EESecrets
- type AppSetupVerificationSASConfirmResponseSessionMatrix
- type AppSetupVerificationSASConfirmResponseSessionVerification
- type AppSetupVerificationSASConfirmResponseSessionVerificationError
- type AppSetupVerificationSASConfirmResponseSessionVerificationOtherDevice
- type AppSetupVerificationSASConfirmResponseSessionVerificationQR
- type AppSetupVerificationSASConfirmResponseSessionVerificationSAS
- type AppSetupVerificationSASConfirmResponseVerification
- type AppSetupVerificationSASConfirmResponseVerificationError
- type AppSetupVerificationSASConfirmResponseVerificationOtherDevice
- type AppSetupVerificationSASConfirmResponseVerificationQR
- type AppSetupVerificationSASConfirmResponseVerificationSAS
- type AppSetupVerificationSASService
- func (r *AppSetupVerificationSASService) Confirm(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppSetupVerificationSASConfirmResponse, err error)
- func (r *AppSetupVerificationSASService) Start(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppSetupVerificationSASStartResponse, err error)
- type AppSetupVerificationSASStartResponse
- type AppSetupVerificationSASStartResponseSession
- type AppSetupVerificationSASStartResponseSessionE2EE
- type AppSetupVerificationSASStartResponseSessionE2EESecrets
- type AppSetupVerificationSASStartResponseSessionMatrix
- type AppSetupVerificationSASStartResponseSessionVerification
- type AppSetupVerificationSASStartResponseSessionVerificationError
- type AppSetupVerificationSASStartResponseSessionVerificationOtherDevice
- type AppSetupVerificationSASStartResponseSessionVerificationQR
- type AppSetupVerificationSASStartResponseSessionVerificationSAS
- type AppSetupVerificationSASStartResponseVerification
- type AppSetupVerificationSASStartResponseVerificationError
- type AppSetupVerificationSASStartResponseVerificationOtherDevice
- type AppSetupVerificationSASStartResponseVerificationQR
- type AppSetupVerificationSASStartResponseVerificationSAS
- type AppSetupVerificationService
- func (r *AppSetupVerificationService) Accept(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppSetupVerificationAcceptResponse, err error)
- func (r *AppSetupVerificationService) Cancel(ctx context.Context, verificationID string, ...) (res *AppSetupVerificationCancelResponse, err error)
- func (r *AppSetupVerificationService) Get(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppSetupVerificationGetResponse, err error)
- func (r *AppSetupVerificationService) List(ctx context.Context, opts ...option.RequestOption) (res *AppSetupVerificationListResponse, err error)
- func (r *AppSetupVerificationService) New(ctx context.Context, body AppSetupVerificationNewParams, ...) (res *AppSetupVerificationNewResponse, err error)
- type AssetDownloadParams
- type AssetDownloadResponse
- type AssetServeParams
- type AssetService
- func (r *AssetService) Download(ctx context.Context, body AssetDownloadParams, opts ...option.RequestOption) (res *AssetDownloadResponse, err error)
- func (r *AssetService) Serve(ctx context.Context, query AssetServeParams, opts ...option.RequestOption) (res *http.Response, err error)
- func (r *AssetService) Upload(ctx context.Context, body AssetUploadParams, opts ...option.RequestOption) (res *AssetUploadResponse, err error)
- func (r *AssetService) UploadBase64(ctx context.Context, body AssetUploadBase64Params, ...) (res *AssetUploadBase64Response, err error)
- type AssetUploadBase64Params
- type AssetUploadBase64Response
- type AssetUploadParams
- type AssetUploadResponse
- type Attachment
- type AttachmentCapabilities
- type AttachmentSize
- type AttachmentTranscription
- type AttachmentType
- type Bridge
- type BridgeGetResponse
- type BridgeGetResponseProvider
- type BridgeGetResponseStatus
- type BridgeListResponse
- type BridgeLogin
- type BridgeLoginFlowListResponse
- type BridgeLoginFlowService
- type BridgeLoginGetParams
- type BridgeLoginListResponse
- type BridgeLoginRemoveParams
- type BridgeLoginRemoveParamsScope
- type BridgeLoginRemoveResponse
- type BridgeLoginRemoveResponseScope
- type BridgeLoginService
- func (r *BridgeLoginService) Get(ctx context.Context, loginID string, query BridgeLoginGetParams, ...) (res *BridgeLogin, err error)
- func (r *BridgeLoginService) List(ctx context.Context, bridgeID string, opts ...option.RequestOption) (res *BridgeLoginListResponse, err error)
- func (r *BridgeLoginService) Remove(ctx context.Context, loginID string, params BridgeLoginRemoveParams, ...) (res *BridgeLoginRemoveResponse, err error)
- type BridgeLoginSessionCancelParams
- type BridgeLoginSessionCancelResponse
- type BridgeLoginSessionGetParams
- type BridgeLoginSessionNewParams
- type BridgeLoginSessionService
- func (r *BridgeLoginSessionService) Cancel(ctx context.Context, loginSessionID string, ...) (res *BridgeLoginSessionCancelResponse, err error)
- func (r *BridgeLoginSessionService) Get(ctx context.Context, loginSessionID string, query BridgeLoginSessionGetParams, ...) (res *LoginSession, err error)
- func (r *BridgeLoginSessionService) New(ctx context.Context, bridgeID string, body BridgeLoginSessionNewParams, ...) (res *LoginSession, err error)
- type BridgeLoginSessionStepService
- type BridgeLoginSessionStepSubmitParams
- type BridgeLoginSessionStepSubmitParamsSource
- type BridgeLoginSessionStepSubmitParamsType
- type BridgeLoginStatus
- type BridgeProvider
- type BridgeService
- func (r *BridgeService) Get(ctx context.Context, bridgeID string, opts ...option.RequestOption) (res *BridgeGetResponse, err error)
- func (r *BridgeService) GetCapabilities(ctx context.Context, bridgeID string, opts ...option.RequestOption) (res *ProvisioningCapabilities, err error)
- func (r *BridgeService) List(ctx context.Context, opts ...option.RequestOption) (res *BridgeListResponse, err error)
- type BridgeStatus
- type Chat
- type ChatArchiveParams
- type ChatCapabilities
- type ChatCapabilitiesDisappearingTimer
- type ChatCapabilitiesMessageRequest
- type ChatCapabilitiesParticipantActions
- type ChatDraft
- type ChatGetParams
- type ChatListParams
- type ChatListParamsDirection
- type ChatListResponse
- type ChatMarkReadParams
- type ChatMarkUnreadParams
- type ChatMerge
- type ChatMessageReactionAddParams
- type ChatMessageReactionAddResponse
- type ChatMessageReactionDeleteParams
- type ChatMessageReactionDeleteResponse
- type ChatMessageReactionService
- func (r *ChatMessageReactionService) Add(ctx context.Context, messageID string, params ChatMessageReactionAddParams, ...) (res *ChatMessageReactionAddResponse, err error)
- func (r *ChatMessageReactionService) Delete(ctx context.Context, reactionKey string, body ChatMessageReactionDeleteParams, ...) (res *ChatMessageReactionDeleteResponse, err error)
- type ChatMessageService
- type ChatNewParams
- type ChatNewParamsType
- type ChatNewResponse
- type ChatNotifyAnywayParams
- type ChatParticipants
- type ChatParticipantsItem
- type ChatReminder
- type ChatReminderNewParams
- type ChatReminderNewParamsReminder
- type ChatReminderService
- type ChatSearchParams
- type ChatSearchParamsDirection
- type ChatSearchParamsInbox
- type ChatSearchParamsScope
- type ChatSearchParamsType
- type ChatService
- func (r *ChatService) Archive(ctx context.Context, chatID string, body ChatArchiveParams, ...) (err error)
- func (r *ChatService) Get(ctx context.Context, chatID string, query ChatGetParams, ...) (res *Chat, err error)
- func (r *ChatService) List(ctx context.Context, query ChatListParams, opts ...option.RequestOption) (res *pagination.CursorNoLimit[ChatListResponse], err error)
- func (r *ChatService) ListAutoPaging(ctx context.Context, query ChatListParams, opts ...option.RequestOption) *pagination.CursorNoLimitAutoPager[ChatListResponse]
- func (r *ChatService) MarkRead(ctx context.Context, chatID string, body ChatMarkReadParams, ...) (res *Chat, err error)
- func (r *ChatService) MarkUnread(ctx context.Context, chatID string, body ChatMarkUnreadParams, ...) (res *Chat, err error)
- func (r *ChatService) New(ctx context.Context, body ChatNewParams, opts ...option.RequestOption) (res *ChatNewResponse, err error)
- func (r *ChatService) NotifyAnyway(ctx context.Context, chatID string, body ChatNotifyAnywayParams, ...) (res *Chat, err error)
- func (r *ChatService) Search(ctx context.Context, query ChatSearchParams, opts ...option.RequestOption) (res *pagination.CursorSearch[Chat], err error)
- func (r *ChatService) SearchAutoPaging(ctx context.Context, query ChatSearchParams, opts ...option.RequestOption) *pagination.CursorSearchAutoPager[Chat]
- func (r *ChatService) Start(ctx context.Context, body ChatStartParams, opts ...option.RequestOption) (res *ChatStartResponse, err error)
- func (r *ChatService) Update(ctx context.Context, chatID string, body ChatUpdateParams, ...) (res *Chat, err error)
- type ChatSnooze
- type ChatStartParams
- type ChatStartParamsUser
- type ChatStartResponse
- type ChatStateCapabilities
- type ChatStateCapabilitiesAvatar
- type ChatStateCapabilitiesDescription
- type ChatStateCapabilitiesDisappearingTimer
- type ChatStateCapabilitiesTitle
- type ChatType
- type ChatUpdateParams
- type ChatUpdateParamsDraft
- type ChatUpdateParamsDraftAttachment
- type ChatUpdateParamsDraftAttachmentSize
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, ...) error
- func (r *Client) Focus(ctx context.Context, body FocusParams, opts ...option.RequestOption) (res *FocusResponse, err error)
- func (r *Client) Get(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Post(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Put(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Search(ctx context.Context, query SearchParams, opts ...option.RequestOption) (res *SearchResponse, err error)
- type CookieField
- type CookieFieldType
- type DisappearingTimerCapability
- type DraftAttachment
- type DraftAttachmentSize
- type DraftAttachmentType
- type Error
- type FocusParams
- type FocusResponse
- type GroupFieldCapability
- type GroupTypeCapabilities
- type InfoGetResponse
- type InfoGetResponseApp
- type InfoGetResponseEndpoints
- type InfoGetResponseEndpointsOAuth
- type InfoGetResponsePlatform
- type InfoGetResponseServer
- type InfoService
- type Label
- type LabelService
- type LinkPreview
- type LinkPreviewImgSize
- type LoginFlow
- type LoginInputField
- type LoginSession
- type LoginSessionCurrentStepComplete
- type LoginSessionCurrentStepCookies
- type LoginSessionCurrentStepDisplayAndWait
- type LoginSessionCurrentStepDisplayAndWaitDisplayCode
- type LoginSessionCurrentStepDisplayAndWaitDisplayEmoji
- type LoginSessionCurrentStepDisplayAndWaitDisplayEmpty
- type LoginSessionCurrentStepDisplayAndWaitDisplayQRCode
- type LoginSessionCurrentStepDisplayAndWaitDisplayUnion
- func (u LoginSessionCurrentStepDisplayAndWaitDisplayUnion) AsCode() (v LoginSessionCurrentStepDisplayAndWaitDisplayCode)
- func (u LoginSessionCurrentStepDisplayAndWaitDisplayUnion) AsEmoji() (v LoginSessionCurrentStepDisplayAndWaitDisplayEmoji)
- func (u LoginSessionCurrentStepDisplayAndWaitDisplayUnion) AsEmpty() (v LoginSessionCurrentStepDisplayAndWaitDisplayEmpty)
- func (u LoginSessionCurrentStepDisplayAndWaitDisplayUnion) AsQRCode() (v LoginSessionCurrentStepDisplayAndWaitDisplayQRCode)
- func (u LoginSessionCurrentStepDisplayAndWaitDisplayUnion) RawJSON() string
- func (r *LoginSessionCurrentStepDisplayAndWaitDisplayUnion) UnmarshalJSON(data []byte) error
- type LoginSessionCurrentStepUnion
- func (u LoginSessionCurrentStepUnion) AsComplete() (v LoginSessionCurrentStepComplete)
- func (u LoginSessionCurrentStepUnion) AsCookies() (v LoginSessionCurrentStepCookies)
- func (u LoginSessionCurrentStepUnion) AsDisplayAndWait() (v LoginSessionCurrentStepDisplayAndWait)
- func (u LoginSessionCurrentStepUnion) AsUserInput() (v LoginSessionCurrentStepUserInput)
- func (u LoginSessionCurrentStepUnion) RawJSON() string
- func (r *LoginSessionCurrentStepUnion) UnmarshalJSON(data []byte) error
- type LoginSessionCurrentStepUnionFields
- type LoginSessionCurrentStepUserInput
- type LoginSessionStatus
- type Message
- type MessageDeleteParams
- type MessageGetParams
- type MessageListParams
- type MessageListParamsDirection
- type MessageSearchParams
- type MessageSearchParamsChatType
- type MessageSearchParamsDirection
- type MessageSeenByParticipantItemUnion
- type MessageSeenUnion
- type MessageSendParams
- type MessageSendParamsAttachment
- type MessageSendParamsAttachmentSize
- type MessageSendResponse
- type MessageService
- func (r *MessageService) Delete(ctx context.Context, messageID string, params MessageDeleteParams, ...) (err error)
- func (r *MessageService) Get(ctx context.Context, messageID string, query MessageGetParams, ...) (res *shared.Message, err error)
- func (r *MessageService) List(ctx context.Context, chatID string, query MessageListParams, ...) (res *pagination.CursorNoLimit[shared.Message], err error)
- func (r *MessageService) ListAutoPaging(ctx context.Context, chatID string, query MessageListParams, ...) *pagination.CursorNoLimitAutoPager[shared.Message]
- func (r *MessageService) Search(ctx context.Context, query MessageSearchParams, opts ...option.RequestOption) (res *pagination.CursorSearch[shared.Message], err error)
- func (r *MessageService) SearchAutoPaging(ctx context.Context, query MessageSearchParams, opts ...option.RequestOption) *pagination.CursorSearchAutoPager[shared.Message]
- func (r *MessageService) Send(ctx context.Context, chatID string, body MessageSendParams, ...) (res *MessageSendResponse, err error)
- func (r *MessageService) Update(ctx context.Context, messageID string, params MessageUpdateParams, ...) (res *MessageUpdateResponse, err error)
- type MessageType
- type MessageUpdateParams
- type MessageUpdateResponse
- type ProvisioningCapabilities
- type Reaction
- type ResolveIdentifierCapabilities
- type SearchParams
- type SearchResponse
- type SearchResponseResults
- type SearchResponseResultsMessages
- type SendStatus
- type SendStatusStatus
- type User
Constants ¶
const AttachmentTypeAudio = shared.AttachmentTypeAudio
Equals "audio"
const AttachmentTypeImg = shared.AttachmentTypeImg
Equals "img"
const AttachmentTypeUnknown = shared.AttachmentTypeUnknown
Equals "unknown"
const AttachmentTypeVideo = shared.AttachmentTypeVideo
Equals "video"
const DraftAttachmentTypeFile = shared.DraftAttachmentTypeFile
Equals "file"
const DraftAttachmentTypeGif = shared.DraftAttachmentTypeGif
Equals "gif"
const DraftAttachmentTypeRecordedAudio = shared.DraftAttachmentTypeRecordedAudio
Equals "recorded_audio"
const MessageTypeAudio = shared.MessageTypeAudio
Equals "AUDIO"
const MessageTypeFile = shared.MessageTypeFile
Equals "FILE"
const MessageTypeImage = shared.MessageTypeImage
Equals "IMAGE"
const MessageTypeLocation = shared.MessageTypeLocation
Equals "LOCATION"
const MessageTypeNotice = shared.MessageTypeNotice
Equals "NOTICE"
const MessageTypeReaction = shared.MessageTypeReaction
Equals "REACTION"
const MessageTypeSticker = shared.MessageTypeSticker
Equals "STICKER"
const MessageTypeText = shared.MessageTypeText
Equals "TEXT"
const MessageTypeVideo = shared.MessageTypeVideo
Equals "VIDEO"
const MessageTypeVoice = shared.MessageTypeVoice
Equals "VOICE"
const SendStatusStatusFailPermanent = shared.SendStatusStatusFailPermanent
Equals "FAIL_PERMANENT"
const SendStatusStatusFailRetriable = shared.SendStatusStatusFailRetriable
Equals "FAIL_RETRIABLE"
const SendStatusStatusPending = shared.SendStatusStatusPending
Equals "PENDING"
const SendStatusStatusSuccess = shared.SendStatusStatusSuccess
Equals "SUCCESS"
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (BEEPER_ACCESS_TOKEN, BEEPER_BASE_URL). This should be used to initialize new clients.
func Opt ¶
func Opt[T comparable](v T) param.Opt[T]
Types ¶
type Account ¶
type Account struct {
// Chat account added to Beeper. Use this to route account-scoped actions. Examples
// include matrix for Beeper/Matrix, discordgo for a cloud bridge,
// slackgo.TEAM-USER for workspace-scoped cloud bridges, and local-whatsapp*ba*...
// for local bridges.
AccountID string `json:"accountID" api:"required"`
// Bridge metadata for the account. Available in Beeper Desktop v4.2.785+.
Bridge AccountBridge `json:"bridge" api:"required"`
// Current connection status for this account.
//
// Any of "connected", "connecting", "backfilling", "connection_required",
// "reconnect_required", "attention_required", "disconnected", "disabled".
Status AccountStatus `json:"status" api:"required"`
// User the account belongs to.
User shared.User `json:"user" api:"required"`
// Runtime chat/message capabilities for this connected account, when available.
Capabilities map[string]any `json:"capabilities"`
// Bridge login ID for this account, when known. One bridge login can contain
// multiple chat accounts.
LoginID string `json:"loginID"`
// Human-friendly network name for the account. Omitted when the network is
// unknown.
Network string `json:"network"`
// Human-friendly account status text.
StatusText string `json:"statusText"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AccountID respjson.Field
Bridge respjson.Field
Status respjson.Field
User respjson.Field
Capabilities respjson.Field
LoginID respjson.Field
Network respjson.Field
StatusText respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A chat account added to Beeper.
func (*Account) UnmarshalJSON ¶
type AccountBridge ¶
type AccountBridge struct {
// Bridge identifier. Beeper Cloud accounts often use the network type (for example
// matrix or discordgo); on-device accounts use a local bridge ID (for example
// local-whatsapp). Available in Beeper Desktop v4.2.785+.
ID string `json:"id" api:"required"`
// Where this account runs: on this device or in Beeper Cloud. Available in Beeper
// Desktop v4.2.785+.
//
// Any of "cloud", "self-hosted", "local", "platform-sdk".
Provider AccountBridgeProvider `json:"provider" api:"required"`
// Bridge type, such as matrix, discordgo, slackgo, whatsapp, telegram, or twitter.
// Available in Beeper Desktop v4.2.785+.
Type string `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Provider respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Bridge metadata for the account. Available in Beeper Desktop v4.2.785+.
func (AccountBridge) RawJSON ¶
func (r AccountBridge) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountBridge) UnmarshalJSON ¶
func (r *AccountBridge) UnmarshalJSON(data []byte) error
type AccountBridgeProvider ¶
type AccountBridgeProvider string
Where this account runs: on this device or in Beeper Cloud. Available in Beeper Desktop v4.2.785+.
const ( AccountBridgeProviderCloud AccountBridgeProvider = "cloud" AccountBridgeProviderSelfHosted AccountBridgeProvider = "self-hosted" AccountBridgeProviderLocal AccountBridgeProvider = "local" AccountBridgeProviderPlatformSDK AccountBridgeProvider = "platform-sdk" )
type AccountContactListParams ¶
type AccountContactListParams struct {
// Opaque pagination cursor; do not inspect. Use together with 'direction'.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum contacts to return per page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Optional search query for contact lookup.
Query param.Opt[string] `query:"query,omitzero" json:"-"`
// Pagination direction used with 'cursor': 'before' fetches older results, 'after'
// fetches newer results. Defaults to 'before' when only 'cursor' is provided.
//
// Any of "after", "before".
Direction AccountContactListParamsDirection `query:"direction,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AccountContactListParams) URLQuery ¶
func (r AccountContactListParams) URLQuery() (v url.Values, err error)
URLQuery serializes AccountContactListParams's query parameters as `url.Values`.
type AccountContactListParamsDirection ¶
type AccountContactListParamsDirection string
Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided.
const ( AccountContactListParamsDirectionAfter AccountContactListParamsDirection = "after" AccountContactListParamsDirectionBefore AccountContactListParamsDirection = "before" )
type AccountContactSearchParams ¶
type AccountContactSearchParams struct {
// Text to search contacts by. A phone number, email address, or username written
// with a leading @ is additionally looked up as an exact identifier on the
// network; any other text, such as a bare handle or a person or business name,
// searches existing contacts only. Matching behavior depends on the network.
Query string `query:"query" api:"required" json:"-"`
// contains filtered or unexported fields
}
func (AccountContactSearchParams) URLQuery ¶
func (r AccountContactSearchParams) URLQuery() (v url.Values, err error)
URLQuery serializes AccountContactSearchParams's query parameters as `url.Values`.
type AccountContactSearchResponse ¶
type AccountContactSearchResponse struct {
Items []shared.User `json:"items" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountContactSearchResponse) RawJSON ¶
func (r AccountContactSearchResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountContactSearchResponse) UnmarshalJSON ¶
func (r *AccountContactSearchResponse) UnmarshalJSON(data []byte) error
type AccountContactService ¶
type AccountContactService struct {
Options []option.RequestOption
}
Manage contacts on a specific account
AccountContactService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountContactService method instead.
func NewAccountContactService ¶
func NewAccountContactService(opts ...option.RequestOption) (r AccountContactService)
NewAccountContactService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountContactService) List ¶
func (r *AccountContactService) List(ctx context.Context, accountID string, query AccountContactListParams, opts ...option.RequestOption) (res *pagination.CursorSearch[shared.User], err error)
List merged contacts for a specific account with cursor-based pagination.
func (*AccountContactService) ListAutoPaging ¶
func (r *AccountContactService) ListAutoPaging(ctx context.Context, accountID string, query AccountContactListParams, opts ...option.RequestOption) *pagination.CursorSearchAutoPager[shared.User]
List merged contacts for a specific account with cursor-based pagination.
func (*AccountContactService) Search ¶
func (r *AccountContactService) Search(ctx context.Context, accountID string, query AccountContactSearchParams, opts ...option.RequestOption) (res *AccountContactSearchResponse, err error)
Search contacts on a specific account using merged account contacts, network search, and exact identifier lookup. The exact lookup only runs when the query is a phone number, email address, or username; pass one of those to resolve a specific person.
type AccountGetResponse ¶
type AccountGetResponse struct {
// Chat account added to Beeper. Use this to route account-scoped actions. Examples
// include matrix for Beeper/Matrix, discordgo for a cloud bridge,
// slackgo.TEAM-USER for workspace-scoped cloud bridges, and local-whatsapp*ba*...
// for local bridges.
AccountID string `json:"accountID" api:"required"`
// Bridge metadata for the account. Available in Beeper Desktop v4.2.785+.
Bridge AccountBridge `json:"bridge" api:"required"`
// Current connection status for this account.
//
// Any of "connected", "connecting", "backfilling", "connection_required",
// "reconnect_required", "attention_required", "disconnected", "disabled".
Status AccountGetResponseStatus `json:"status" api:"required"`
// User the account belongs to.
User shared.User `json:"user" api:"required"`
// Runtime chat/message capabilities for this connected account, when available.
Capabilities map[string]any `json:"capabilities"`
// Bridge login ID for this account, when known. One bridge login can contain
// multiple chat accounts.
LoginID string `json:"loginID"`
// Human-friendly network name for the account. Omitted when the network is
// unknown.
Network string `json:"network"`
// Human-friendly account status text.
StatusText string `json:"statusText"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AccountID respjson.Field
Bridge respjson.Field
Status respjson.Field
User respjson.Field
Capabilities respjson.Field
LoginID respjson.Field
Network respjson.Field
StatusText respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A chat account added to Beeper.
func (AccountGetResponse) RawJSON ¶
func (r AccountGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountGetResponse) UnmarshalJSON ¶
func (r *AccountGetResponse) UnmarshalJSON(data []byte) error
type AccountGetResponseStatus ¶
type AccountGetResponseStatus string
Current connection status for this account.
const ( AccountGetResponseStatusConnected AccountGetResponseStatus = "connected" AccountGetResponseStatusConnecting AccountGetResponseStatus = "connecting" AccountGetResponseStatusBackfilling AccountGetResponseStatus = "backfilling" AccountGetResponseStatusConnectionRequired AccountGetResponseStatus = "connection_required" AccountGetResponseStatusReconnectRequired AccountGetResponseStatus = "reconnect_required" AccountGetResponseStatusAttentionRequired AccountGetResponseStatus = "attention_required" AccountGetResponseStatusDisconnected AccountGetResponseStatus = "disconnected" AccountGetResponseStatusDisabled AccountGetResponseStatus = "disabled" )
type AccountService ¶
type AccountService struct {
Options []option.RequestOption
// Manage contacts on a specific account
Contacts AccountContactService
}
Manage connected chat accounts
AccountService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountService method instead.
func NewAccountService ¶
func NewAccountService(opts ...option.RequestOption) (r AccountService)
NewAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountService) Get ¶
func (r *AccountService) Get(ctx context.Context, accountID string, opts ...option.RequestOption) (res *AccountGetResponse, err error)
Get one chat account connected to this Beeper Client API server.
func (*AccountService) List ¶
func (r *AccountService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Account, err error)
List chat accounts connected to this Beeper Client API server, including bridge, network, user identity, and connection status.
type AccountStatus ¶
type AccountStatus string
Current connection status for this account.
const ( AccountStatusConnected AccountStatus = "connected" AccountStatusConnecting AccountStatus = "connecting" AccountStatusBackfilling AccountStatus = "backfilling" AccountStatusConnectionRequired AccountStatus = "connection_required" AccountStatusReconnectRequired AccountStatus = "reconnect_required" AccountStatusAttentionRequired AccountStatus = "attention_required" AccountStatusDisconnected AccountStatus = "disconnected" AccountStatusDisabled AccountStatus = "disabled" )
type AppService ¶
type AppService struct {
Options []option.RequestOption
// Complete first-party Beeper app setup
Setup AppSetupService
}
Manage Beeper account setup and encrypted messaging setup
AppService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAppService method instead.
func NewAppService ¶
func NewAppService(opts ...option.RequestOption) (r AppService)
NewAppService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type AppSetupEmailParams ¶
type AppSetupEmailParams struct {
// Email address to send the sign-in code to.
Email string `json:"email" api:"required" format:"email"`
// Setup request ID returned by the start step.
SetupRequestID string `json:"setupRequestID" api:"required"`
// contains filtered or unexported fields
}
func (AppSetupEmailParams) MarshalJSON ¶
func (r AppSetupEmailParams) MarshalJSON() (data []byte, err error)
func (*AppSetupEmailParams) UnmarshalJSON ¶
func (r *AppSetupEmailParams) UnmarshalJSON(data []byte) error
type AppSetupGetResponse ¶
type AppSetupGetResponse struct {
// Encrypted messaging setup status.
E2EE AppSetupGetResponseE2EE `json:"e2ee" api:"required"`
// Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper
// Server.
//
// Any of "needs-login", "initializing", "needs-cross-signing-setup",
// "needs-verification", "needs-secrets", "needs-first-sync", "ready".
State AppSetupGetResponseState `json:"state" api:"required"`
// Signed-in account details. Omitted until sign-in is complete.
Matrix AppSetupGetResponseMatrix `json:"matrix"`
// Trusted device verification progress.
Verification AppSetupGetResponseVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
E2EE respjson.Field
State respjson.Field
Matrix respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupGetResponse) RawJSON ¶
func (r AppSetupGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupGetResponse) UnmarshalJSON ¶
func (r *AppSetupGetResponse) UnmarshalJSON(data []byte) error
type AppSetupGetResponseE2EE ¶
type AppSetupGetResponseE2EE struct {
// Whether this account can verify trusted devices.
CrossSigning bool `json:"crossSigning" api:"required"`
// Whether the first encrypted message sync is complete.
FirstSyncDone bool `json:"firstSyncDone" api:"required"`
// Whether the user confirmed that they saved their recovery key.
HasBackedUpRecoveryKey bool `json:"hasBackedUpRecoveryKey" api:"required"`
// Whether encrypted messaging setup has started.
Initialized bool `json:"initialized" api:"required"`
// Whether encrypted message backup is available.
KeyBackup bool `json:"keyBackup" api:"required"`
// Encrypted messaging keys available on this device.
Secrets AppSetupGetResponseE2EESecrets `json:"secrets" api:"required"`
// Whether secure key storage is available.
SecretStorage bool `json:"secretStorage" api:"required"`
// Whether this device is trusted for encrypted messages.
Verified bool `json:"verified" api:"required"`
// Unix timestamp for when the recovery key was created.
RecoveryKeyGeneratedAt float64 `json:"recoveryKeyGeneratedAt"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossSigning respjson.Field
FirstSyncDone respjson.Field
HasBackedUpRecoveryKey respjson.Field
Initialized respjson.Field
KeyBackup respjson.Field
Secrets respjson.Field
SecretStorage respjson.Field
Verified respjson.Field
RecoveryKeyGeneratedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging setup status.
func (AppSetupGetResponseE2EE) RawJSON ¶
func (r AppSetupGetResponseE2EE) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupGetResponseE2EE) UnmarshalJSON ¶
func (r *AppSetupGetResponseE2EE) UnmarshalJSON(data []byte) error
type AppSetupGetResponseE2EESecrets ¶
type AppSetupGetResponseE2EESecrets struct {
// Whether the account identity key is available.
MasterKey bool `json:"masterKey" api:"required"`
// Whether the encrypted message backup key is available.
MegolmBackupKey bool `json:"megolmBackupKey" api:"required"`
// Whether a recovery key is available.
RecoveryKey bool `json:"recoveryKey" api:"required"`
// Whether the device trust key is available.
SelfSigningKey bool `json:"selfSigningKey" api:"required"`
// Whether the user trust key is available.
UserSigningKey bool `json:"userSigningKey" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MasterKey respjson.Field
MegolmBackupKey respjson.Field
RecoveryKey respjson.Field
SelfSigningKey respjson.Field
UserSigningKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging keys available on this device.
func (AppSetupGetResponseE2EESecrets) RawJSON ¶
func (r AppSetupGetResponseE2EESecrets) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupGetResponseE2EESecrets) UnmarshalJSON ¶
func (r *AppSetupGetResponseE2EESecrets) UnmarshalJSON(data []byte) error
type AppSetupGetResponseMatrix ¶
type AppSetupGetResponseMatrix struct {
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in account details. Omitted until sign-in is complete.
func (AppSetupGetResponseMatrix) RawJSON ¶
func (r AppSetupGetResponseMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupGetResponseMatrix) UnmarshalJSON ¶
func (r *AppSetupGetResponseMatrix) UnmarshalJSON(data []byte) error
type AppSetupGetResponseState ¶
type AppSetupGetResponseState string
Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.
const ( AppSetupGetResponseStateNeedsLogin AppSetupGetResponseState = "needs-login" AppSetupGetResponseStateInitializing AppSetupGetResponseState = "initializing" AppSetupGetResponseStateNeedsCrossSigningSetup AppSetupGetResponseState = "needs-cross-signing-setup" AppSetupGetResponseStateNeedsVerification AppSetupGetResponseState = "needs-verification" AppSetupGetResponseStateNeedsSecrets AppSetupGetResponseState = "needs-secrets" AppSetupGetResponseStateNeedsFirstSync AppSetupGetResponseState = "needs-first-sync" AppSetupGetResponseStateReady AppSetupGetResponseState = "ready" )
type AppSetupGetResponseVerification ¶
type AppSetupGetResponseVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupGetResponseVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupGetResponseVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupGetResponseVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupGetResponseVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupGetResponseVerification) RawJSON ¶
func (r AppSetupGetResponseVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupGetResponseVerification) UnmarshalJSON ¶
func (r *AppSetupGetResponseVerification) UnmarshalJSON(data []byte) error
type AppSetupGetResponseVerificationError ¶
type AppSetupGetResponseVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupGetResponseVerificationError) RawJSON ¶
func (r AppSetupGetResponseVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupGetResponseVerificationError) UnmarshalJSON ¶
func (r *AppSetupGetResponseVerificationError) UnmarshalJSON(data []byte) error
type AppSetupGetResponseVerificationOtherDevice ¶
type AppSetupGetResponseVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupGetResponseVerificationOtherDevice) RawJSON ¶
func (r AppSetupGetResponseVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupGetResponseVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupGetResponseVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupGetResponseVerificationQR ¶
type AppSetupGetResponseVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupGetResponseVerificationQR) RawJSON ¶
func (r AppSetupGetResponseVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupGetResponseVerificationQR) UnmarshalJSON ¶
func (r *AppSetupGetResponseVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupGetResponseVerificationSAS ¶
type AppSetupGetResponseVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupGetResponseVerificationSAS) RawJSON ¶
func (r AppSetupGetResponseVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupGetResponseVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupGetResponseVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetConfirmParams ¶
type AppSetupRecoveryKeyResetConfirmParams struct {
// New recovery key returned by the reset step.
RecoveryKey string `json:"recoveryKey" api:"required"`
// contains filtered or unexported fields
}
func (AppSetupRecoveryKeyResetConfirmParams) MarshalJSON ¶
func (r AppSetupRecoveryKeyResetConfirmParams) MarshalJSON() (data []byte, err error)
func (*AppSetupRecoveryKeyResetConfirmParams) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetConfirmParams) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetConfirmResponse ¶
type AppSetupRecoveryKeyResetConfirmResponse struct {
// Current app sign-in and encrypted messaging setup state.
Session AppSetupRecoveryKeyResetConfirmResponseSession `json:"session" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Session respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupRecoveryKeyResetConfirmResponse) RawJSON ¶
func (r AppSetupRecoveryKeyResetConfirmResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetConfirmResponse) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetConfirmResponse) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetConfirmResponseSession ¶
type AppSetupRecoveryKeyResetConfirmResponseSession struct {
// Encrypted messaging setup status.
E2EE AppSetupRecoveryKeyResetConfirmResponseSessionE2EE `json:"e2ee" api:"required"`
// Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper
// Server.
//
// Any of "needs-login", "initializing", "needs-cross-signing-setup",
// "needs-verification", "needs-secrets", "needs-first-sync", "ready".
State string `json:"state" api:"required"`
// Signed-in account details. Omitted until sign-in is complete.
Matrix AppSetupRecoveryKeyResetConfirmResponseSessionMatrix `json:"matrix"`
// Trusted device verification progress.
Verification AppSetupRecoveryKeyResetConfirmResponseSessionVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
E2EE respjson.Field
State respjson.Field
Matrix respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current app sign-in and encrypted messaging setup state.
func (AppSetupRecoveryKeyResetConfirmResponseSession) RawJSON ¶
func (r AppSetupRecoveryKeyResetConfirmResponseSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetConfirmResponseSession) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetConfirmResponseSession) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetConfirmResponseSessionE2EE ¶
type AppSetupRecoveryKeyResetConfirmResponseSessionE2EE struct {
// Whether this account can verify trusted devices.
CrossSigning bool `json:"crossSigning" api:"required"`
// Whether the first encrypted message sync is complete.
FirstSyncDone bool `json:"firstSyncDone" api:"required"`
// Whether the user confirmed that they saved their recovery key.
HasBackedUpRecoveryKey bool `json:"hasBackedUpRecoveryKey" api:"required"`
// Whether encrypted messaging setup has started.
Initialized bool `json:"initialized" api:"required"`
// Whether encrypted message backup is available.
KeyBackup bool `json:"keyBackup" api:"required"`
// Encrypted messaging keys available on this device.
Secrets AppSetupRecoveryKeyResetConfirmResponseSessionE2EESecrets `json:"secrets" api:"required"`
// Whether secure key storage is available.
SecretStorage bool `json:"secretStorage" api:"required"`
// Whether this device is trusted for encrypted messages.
Verified bool `json:"verified" api:"required"`
// Unix timestamp for when the recovery key was created.
RecoveryKeyGeneratedAt float64 `json:"recoveryKeyGeneratedAt"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossSigning respjson.Field
FirstSyncDone respjson.Field
HasBackedUpRecoveryKey respjson.Field
Initialized respjson.Field
KeyBackup respjson.Field
Secrets respjson.Field
SecretStorage respjson.Field
Verified respjson.Field
RecoveryKeyGeneratedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging setup status.
func (AppSetupRecoveryKeyResetConfirmResponseSessionE2EE) RawJSON ¶
func (r AppSetupRecoveryKeyResetConfirmResponseSessionE2EE) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetConfirmResponseSessionE2EE) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetConfirmResponseSessionE2EE) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetConfirmResponseSessionE2EESecrets ¶
type AppSetupRecoveryKeyResetConfirmResponseSessionE2EESecrets struct {
// Whether the account identity key is available.
MasterKey bool `json:"masterKey" api:"required"`
// Whether the encrypted message backup key is available.
MegolmBackupKey bool `json:"megolmBackupKey" api:"required"`
// Whether a recovery key is available.
RecoveryKey bool `json:"recoveryKey" api:"required"`
// Whether the device trust key is available.
SelfSigningKey bool `json:"selfSigningKey" api:"required"`
// Whether the user trust key is available.
UserSigningKey bool `json:"userSigningKey" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MasterKey respjson.Field
MegolmBackupKey respjson.Field
RecoveryKey respjson.Field
SelfSigningKey respjson.Field
UserSigningKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging keys available on this device.
func (AppSetupRecoveryKeyResetConfirmResponseSessionE2EESecrets) RawJSON ¶
func (r AppSetupRecoveryKeyResetConfirmResponseSessionE2EESecrets) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetConfirmResponseSessionE2EESecrets) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetConfirmResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetConfirmResponseSessionMatrix ¶
type AppSetupRecoveryKeyResetConfirmResponseSessionMatrix struct {
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in account details. Omitted until sign-in is complete.
func (AppSetupRecoveryKeyResetConfirmResponseSessionMatrix) RawJSON ¶
func (r AppSetupRecoveryKeyResetConfirmResponseSessionMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetConfirmResponseSessionMatrix) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetConfirmResponseSessionMatrix) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetConfirmResponseSessionVerification ¶
type AppSetupRecoveryKeyResetConfirmResponseSessionVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupRecoveryKeyResetConfirmResponseSessionVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupRecoveryKeyResetConfirmResponseSessionVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupRecoveryKeyResetConfirmResponseSessionVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupRecoveryKeyResetConfirmResponseSessionVerification) RawJSON ¶
func (r AppSetupRecoveryKeyResetConfirmResponseSessionVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetConfirmResponseSessionVerification) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetConfirmResponseSessionVerification) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetConfirmResponseSessionVerificationError ¶
type AppSetupRecoveryKeyResetConfirmResponseSessionVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupRecoveryKeyResetConfirmResponseSessionVerificationError) RawJSON ¶
func (r AppSetupRecoveryKeyResetConfirmResponseSessionVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetConfirmResponseSessionVerificationError) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetConfirmResponseSessionVerificationError) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice ¶
type AppSetupRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice) RawJSON ¶
func (r AppSetupRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetConfirmResponseSessionVerificationQR ¶
type AppSetupRecoveryKeyResetConfirmResponseSessionVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupRecoveryKeyResetConfirmResponseSessionVerificationQR) RawJSON ¶
func (r AppSetupRecoveryKeyResetConfirmResponseSessionVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetConfirmResponseSessionVerificationQR) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetConfirmResponseSessionVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetConfirmResponseSessionVerificationSAS ¶
type AppSetupRecoveryKeyResetConfirmResponseSessionVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupRecoveryKeyResetConfirmResponseSessionVerificationSAS) RawJSON ¶
func (r AppSetupRecoveryKeyResetConfirmResponseSessionVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetConfirmResponseSessionVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetConfirmResponseSessionVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetNewParams ¶
type AppSetupRecoveryKeyResetNewParams struct {
// Existing recovery key, if the user has it.
ExistingRecoveryKey param.Opt[string] `json:"existingRecoveryKey,omitzero"`
// contains filtered or unexported fields
}
func (AppSetupRecoveryKeyResetNewParams) MarshalJSON ¶
func (r AppSetupRecoveryKeyResetNewParams) MarshalJSON() (data []byte, err error)
func (*AppSetupRecoveryKeyResetNewParams) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetNewParams) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetNewResponse ¶
type AppSetupRecoveryKeyResetNewResponse struct {
// New recovery key. Show it once and ask the user to save it.
RecoveryKey string `json:"recoveryKey" api:"required"`
// Current app sign-in and encrypted messaging setup state after creating the new
// recovery key.
Session AppSetupRecoveryKeyResetNewResponseSession `json:"session" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
RecoveryKey respjson.Field
Session respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupRecoveryKeyResetNewResponse) RawJSON ¶
func (r AppSetupRecoveryKeyResetNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetNewResponse) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetNewResponse) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetNewResponseSession ¶
type AppSetupRecoveryKeyResetNewResponseSession struct {
// Encrypted messaging setup status.
E2EE AppSetupRecoveryKeyResetNewResponseSessionE2EE `json:"e2ee" api:"required"`
// Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper
// Server.
//
// Any of "needs-login", "initializing", "needs-cross-signing-setup",
// "needs-verification", "needs-secrets", "needs-first-sync", "ready".
State string `json:"state" api:"required"`
// Signed-in account details. Omitted until sign-in is complete.
Matrix AppSetupRecoveryKeyResetNewResponseSessionMatrix `json:"matrix"`
// Trusted device verification progress.
Verification AppSetupRecoveryKeyResetNewResponseSessionVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
E2EE respjson.Field
State respjson.Field
Matrix respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current app sign-in and encrypted messaging setup state after creating the new recovery key.
func (AppSetupRecoveryKeyResetNewResponseSession) RawJSON ¶
func (r AppSetupRecoveryKeyResetNewResponseSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetNewResponseSession) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetNewResponseSession) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetNewResponseSessionE2EE ¶
type AppSetupRecoveryKeyResetNewResponseSessionE2EE struct {
// Whether this account can verify trusted devices.
CrossSigning bool `json:"crossSigning" api:"required"`
// Whether the first encrypted message sync is complete.
FirstSyncDone bool `json:"firstSyncDone" api:"required"`
// Whether the user confirmed that they saved their recovery key.
HasBackedUpRecoveryKey bool `json:"hasBackedUpRecoveryKey" api:"required"`
// Whether encrypted messaging setup has started.
Initialized bool `json:"initialized" api:"required"`
// Whether encrypted message backup is available.
KeyBackup bool `json:"keyBackup" api:"required"`
// Encrypted messaging keys available on this device.
Secrets AppSetupRecoveryKeyResetNewResponseSessionE2EESecrets `json:"secrets" api:"required"`
// Whether secure key storage is available.
SecretStorage bool `json:"secretStorage" api:"required"`
// Whether this device is trusted for encrypted messages.
Verified bool `json:"verified" api:"required"`
// Unix timestamp for when the recovery key was created.
RecoveryKeyGeneratedAt float64 `json:"recoveryKeyGeneratedAt"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossSigning respjson.Field
FirstSyncDone respjson.Field
HasBackedUpRecoveryKey respjson.Field
Initialized respjson.Field
KeyBackup respjson.Field
Secrets respjson.Field
SecretStorage respjson.Field
Verified respjson.Field
RecoveryKeyGeneratedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging setup status.
func (AppSetupRecoveryKeyResetNewResponseSessionE2EE) RawJSON ¶
func (r AppSetupRecoveryKeyResetNewResponseSessionE2EE) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetNewResponseSessionE2EE) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetNewResponseSessionE2EE) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetNewResponseSessionE2EESecrets ¶
type AppSetupRecoveryKeyResetNewResponseSessionE2EESecrets struct {
// Whether the account identity key is available.
MasterKey bool `json:"masterKey" api:"required"`
// Whether the encrypted message backup key is available.
MegolmBackupKey bool `json:"megolmBackupKey" api:"required"`
// Whether a recovery key is available.
RecoveryKey bool `json:"recoveryKey" api:"required"`
// Whether the device trust key is available.
SelfSigningKey bool `json:"selfSigningKey" api:"required"`
// Whether the user trust key is available.
UserSigningKey bool `json:"userSigningKey" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MasterKey respjson.Field
MegolmBackupKey respjson.Field
RecoveryKey respjson.Field
SelfSigningKey respjson.Field
UserSigningKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging keys available on this device.
func (AppSetupRecoveryKeyResetNewResponseSessionE2EESecrets) RawJSON ¶
func (r AppSetupRecoveryKeyResetNewResponseSessionE2EESecrets) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetNewResponseSessionE2EESecrets) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetNewResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetNewResponseSessionMatrix ¶
type AppSetupRecoveryKeyResetNewResponseSessionMatrix struct {
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in account details. Omitted until sign-in is complete.
func (AppSetupRecoveryKeyResetNewResponseSessionMatrix) RawJSON ¶
func (r AppSetupRecoveryKeyResetNewResponseSessionMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetNewResponseSessionMatrix) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetNewResponseSessionMatrix) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetNewResponseSessionVerification ¶
type AppSetupRecoveryKeyResetNewResponseSessionVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupRecoveryKeyResetNewResponseSessionVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupRecoveryKeyResetNewResponseSessionVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupRecoveryKeyResetNewResponseSessionVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupRecoveryKeyResetNewResponseSessionVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupRecoveryKeyResetNewResponseSessionVerification) RawJSON ¶
func (r AppSetupRecoveryKeyResetNewResponseSessionVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetNewResponseSessionVerification) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetNewResponseSessionVerification) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetNewResponseSessionVerificationError ¶
type AppSetupRecoveryKeyResetNewResponseSessionVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupRecoveryKeyResetNewResponseSessionVerificationError) RawJSON ¶
func (r AppSetupRecoveryKeyResetNewResponseSessionVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetNewResponseSessionVerificationError) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetNewResponseSessionVerificationError) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetNewResponseSessionVerificationOtherDevice ¶
type AppSetupRecoveryKeyResetNewResponseSessionVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupRecoveryKeyResetNewResponseSessionVerificationOtherDevice) RawJSON ¶
func (r AppSetupRecoveryKeyResetNewResponseSessionVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetNewResponseSessionVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetNewResponseSessionVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetNewResponseSessionVerificationQR ¶
type AppSetupRecoveryKeyResetNewResponseSessionVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupRecoveryKeyResetNewResponseSessionVerificationQR) RawJSON ¶
func (r AppSetupRecoveryKeyResetNewResponseSessionVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetNewResponseSessionVerificationQR) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetNewResponseSessionVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetNewResponseSessionVerificationSAS ¶
type AppSetupRecoveryKeyResetNewResponseSessionVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupRecoveryKeyResetNewResponseSessionVerificationSAS) RawJSON ¶
func (r AppSetupRecoveryKeyResetNewResponseSessionVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyResetNewResponseSessionVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyResetNewResponseSessionVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyResetService ¶
type AppSetupRecoveryKeyResetService struct {
Options []option.RequestOption
}
First-party sign-in and encrypted messaging setup for Beeper Desktop and Beeper Server.
AppSetupRecoveryKeyResetService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAppSetupRecoveryKeyResetService method instead.
func NewAppSetupRecoveryKeyResetService ¶
func NewAppSetupRecoveryKeyResetService(opts ...option.RequestOption) (r AppSetupRecoveryKeyResetService)
NewAppSetupRecoveryKeyResetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AppSetupRecoveryKeyResetService) Confirm ¶
func (r *AppSetupRecoveryKeyResetService) Confirm(ctx context.Context, body AppSetupRecoveryKeyResetConfirmParams, opts ...option.RequestOption) (res *AppSetupRecoveryKeyResetConfirmResponse, err error)
Confirm that the new recovery key should be used for this account.
func (*AppSetupRecoveryKeyResetService) New ¶
func (r *AppSetupRecoveryKeyResetService) New(ctx context.Context, body AppSetupRecoveryKeyResetNewParams, opts ...option.RequestOption) (res *AppSetupRecoveryKeyResetNewResponse, err error)
Create a new recovery key when the user cannot use the existing one.
type AppSetupRecoveryKeyService ¶
type AppSetupRecoveryKeyService struct {
Options []option.RequestOption
// First-party sign-in and encrypted messaging setup for Beeper Desktop and Beeper
// Server.
Reset AppSetupRecoveryKeyResetService
}
Manage recovery-key setup for encrypted messages
AppSetupRecoveryKeyService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAppSetupRecoveryKeyService method instead.
func NewAppSetupRecoveryKeyService ¶
func NewAppSetupRecoveryKeyService(opts ...option.RequestOption) (r AppSetupRecoveryKeyService)
NewAppSetupRecoveryKeyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AppSetupRecoveryKeyService) Verify ¶
func (r *AppSetupRecoveryKeyService) Verify(ctx context.Context, body AppSetupRecoveryKeyVerifyParams, opts ...option.RequestOption) (res *AppSetupRecoveryKeyVerifyResponse, err error)
Unlock encrypted messages with the user recovery key.
type AppSetupRecoveryKeyVerifyParams ¶
type AppSetupRecoveryKeyVerifyParams struct {
// Recovery key saved by the user.
RecoveryKey string `json:"recoveryKey" api:"required"`
// contains filtered or unexported fields
}
func (AppSetupRecoveryKeyVerifyParams) MarshalJSON ¶
func (r AppSetupRecoveryKeyVerifyParams) MarshalJSON() (data []byte, err error)
func (*AppSetupRecoveryKeyVerifyParams) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyVerifyParams) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyVerifyResponse ¶
type AppSetupRecoveryKeyVerifyResponse struct {
// Current app sign-in and encrypted messaging setup state.
Session AppSetupRecoveryKeyVerifyResponseSession `json:"session" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Session respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupRecoveryKeyVerifyResponse) RawJSON ¶
func (r AppSetupRecoveryKeyVerifyResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyVerifyResponse) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyVerifyResponse) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyVerifyResponseSession ¶
type AppSetupRecoveryKeyVerifyResponseSession struct {
// Encrypted messaging setup status.
E2EE AppSetupRecoveryKeyVerifyResponseSessionE2EE `json:"e2ee" api:"required"`
// Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper
// Server.
//
// Any of "needs-login", "initializing", "needs-cross-signing-setup",
// "needs-verification", "needs-secrets", "needs-first-sync", "ready".
State string `json:"state" api:"required"`
// Signed-in account details. Omitted until sign-in is complete.
Matrix AppSetupRecoveryKeyVerifyResponseSessionMatrix `json:"matrix"`
// Trusted device verification progress.
Verification AppSetupRecoveryKeyVerifyResponseSessionVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
E2EE respjson.Field
State respjson.Field
Matrix respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current app sign-in and encrypted messaging setup state.
func (AppSetupRecoveryKeyVerifyResponseSession) RawJSON ¶
func (r AppSetupRecoveryKeyVerifyResponseSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyVerifyResponseSession) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyVerifyResponseSession) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyVerifyResponseSessionE2EE ¶
type AppSetupRecoveryKeyVerifyResponseSessionE2EE struct {
// Whether this account can verify trusted devices.
CrossSigning bool `json:"crossSigning" api:"required"`
// Whether the first encrypted message sync is complete.
FirstSyncDone bool `json:"firstSyncDone" api:"required"`
// Whether the user confirmed that they saved their recovery key.
HasBackedUpRecoveryKey bool `json:"hasBackedUpRecoveryKey" api:"required"`
// Whether encrypted messaging setup has started.
Initialized bool `json:"initialized" api:"required"`
// Whether encrypted message backup is available.
KeyBackup bool `json:"keyBackup" api:"required"`
// Encrypted messaging keys available on this device.
Secrets AppSetupRecoveryKeyVerifyResponseSessionE2EESecrets `json:"secrets" api:"required"`
// Whether secure key storage is available.
SecretStorage bool `json:"secretStorage" api:"required"`
// Whether this device is trusted for encrypted messages.
Verified bool `json:"verified" api:"required"`
// Unix timestamp for when the recovery key was created.
RecoveryKeyGeneratedAt float64 `json:"recoveryKeyGeneratedAt"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossSigning respjson.Field
FirstSyncDone respjson.Field
HasBackedUpRecoveryKey respjson.Field
Initialized respjson.Field
KeyBackup respjson.Field
Secrets respjson.Field
SecretStorage respjson.Field
Verified respjson.Field
RecoveryKeyGeneratedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging setup status.
func (AppSetupRecoveryKeyVerifyResponseSessionE2EE) RawJSON ¶
func (r AppSetupRecoveryKeyVerifyResponseSessionE2EE) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyVerifyResponseSessionE2EE) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyVerifyResponseSessionE2EE) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyVerifyResponseSessionE2EESecrets ¶
type AppSetupRecoveryKeyVerifyResponseSessionE2EESecrets struct {
// Whether the account identity key is available.
MasterKey bool `json:"masterKey" api:"required"`
// Whether the encrypted message backup key is available.
MegolmBackupKey bool `json:"megolmBackupKey" api:"required"`
// Whether a recovery key is available.
RecoveryKey bool `json:"recoveryKey" api:"required"`
// Whether the device trust key is available.
SelfSigningKey bool `json:"selfSigningKey" api:"required"`
// Whether the user trust key is available.
UserSigningKey bool `json:"userSigningKey" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MasterKey respjson.Field
MegolmBackupKey respjson.Field
RecoveryKey respjson.Field
SelfSigningKey respjson.Field
UserSigningKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging keys available on this device.
func (AppSetupRecoveryKeyVerifyResponseSessionE2EESecrets) RawJSON ¶
func (r AppSetupRecoveryKeyVerifyResponseSessionE2EESecrets) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyVerifyResponseSessionE2EESecrets) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyVerifyResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyVerifyResponseSessionMatrix ¶
type AppSetupRecoveryKeyVerifyResponseSessionMatrix struct {
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in account details. Omitted until sign-in is complete.
func (AppSetupRecoveryKeyVerifyResponseSessionMatrix) RawJSON ¶
func (r AppSetupRecoveryKeyVerifyResponseSessionMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyVerifyResponseSessionMatrix) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyVerifyResponseSessionMatrix) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyVerifyResponseSessionVerification ¶
type AppSetupRecoveryKeyVerifyResponseSessionVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupRecoveryKeyVerifyResponseSessionVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupRecoveryKeyVerifyResponseSessionVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupRecoveryKeyVerifyResponseSessionVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupRecoveryKeyVerifyResponseSessionVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupRecoveryKeyVerifyResponseSessionVerification) RawJSON ¶
func (r AppSetupRecoveryKeyVerifyResponseSessionVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyVerifyResponseSessionVerification) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyVerifyResponseSessionVerification) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyVerifyResponseSessionVerificationError ¶
type AppSetupRecoveryKeyVerifyResponseSessionVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupRecoveryKeyVerifyResponseSessionVerificationError) RawJSON ¶
func (r AppSetupRecoveryKeyVerifyResponseSessionVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyVerifyResponseSessionVerificationError) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyVerifyResponseSessionVerificationError) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyVerifyResponseSessionVerificationOtherDevice ¶
type AppSetupRecoveryKeyVerifyResponseSessionVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupRecoveryKeyVerifyResponseSessionVerificationOtherDevice) RawJSON ¶
func (r AppSetupRecoveryKeyVerifyResponseSessionVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyVerifyResponseSessionVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyVerifyResponseSessionVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyVerifyResponseSessionVerificationQR ¶
type AppSetupRecoveryKeyVerifyResponseSessionVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupRecoveryKeyVerifyResponseSessionVerificationQR) RawJSON ¶
func (r AppSetupRecoveryKeyVerifyResponseSessionVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyVerifyResponseSessionVerificationQR) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyVerifyResponseSessionVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupRecoveryKeyVerifyResponseSessionVerificationSAS ¶
type AppSetupRecoveryKeyVerifyResponseSessionVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupRecoveryKeyVerifyResponseSessionVerificationSAS) RawJSON ¶
func (r AppSetupRecoveryKeyVerifyResponseSessionVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRecoveryKeyVerifyResponseSessionVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupRecoveryKeyVerifyResponseSessionVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupRegisterParams ¶
type AppSetupRegisterParams struct {
// Registration token returned by Beeper.
LeadToken string `json:"leadToken" api:"required"`
// Setup request ID returned by the start step.
SetupRequestID string `json:"setupRequestID" api:"required"`
// Username selected by the user.
Username string `json:"username" api:"required"`
// Confirms that the user agreed to our
// [terms of use](https://www.beeper.com/terms-onboarding) and has read our
// [privacy policy](https://www.beeper.com/privacy).
//
// This field can be elided, and will marshal its zero value as true.
AcceptTerms bool `json:"acceptTerms,omitzero" api:"required"`
// contains filtered or unexported fields
}
func (AppSetupRegisterParams) MarshalJSON ¶
func (r AppSetupRegisterParams) MarshalJSON() (data []byte, err error)
func (*AppSetupRegisterParams) UnmarshalJSON ¶
func (r *AppSetupRegisterParams) UnmarshalJSON(data []byte) error
type AppSetupRegisterResponse ¶
type AppSetupRegisterResponse struct {
// Account credentials for first-party app setup.
Matrix AppSetupRegisterResponseMatrix `json:"matrix" api:"required"`
// Current app sign-in and encrypted messaging setup state after sign-in.
Session AppSetupRegisterResponseSession `json:"session" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Matrix respjson.Field
Session respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupRegisterResponse) RawJSON ¶
func (r AppSetupRegisterResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRegisterResponse) UnmarshalJSON ¶
func (r *AppSetupRegisterResponse) UnmarshalJSON(data []byte) error
type AppSetupRegisterResponseMatrix ¶
type AppSetupRegisterResponseMatrix struct {
// Beeper account access token. Returned once for first-party app setup.
AccessToken string `json:"accessToken" api:"required"`
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AccessToken respjson.Field
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Account credentials for first-party app setup.
func (AppSetupRegisterResponseMatrix) RawJSON ¶
func (r AppSetupRegisterResponseMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRegisterResponseMatrix) UnmarshalJSON ¶
func (r *AppSetupRegisterResponseMatrix) UnmarshalJSON(data []byte) error
type AppSetupRegisterResponseSession ¶
type AppSetupRegisterResponseSession struct {
// Encrypted messaging setup status.
E2EE AppSetupRegisterResponseSessionE2EE `json:"e2ee" api:"required"`
// Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper
// Server.
//
// Any of "needs-login", "initializing", "needs-cross-signing-setup",
// "needs-verification", "needs-secrets", "needs-first-sync", "ready".
State string `json:"state" api:"required"`
// Signed-in account details. Omitted until sign-in is complete.
Matrix AppSetupRegisterResponseSessionMatrix `json:"matrix"`
// Trusted device verification progress.
Verification AppSetupRegisterResponseSessionVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
E2EE respjson.Field
State respjson.Field
Matrix respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current app sign-in and encrypted messaging setup state after sign-in.
func (AppSetupRegisterResponseSession) RawJSON ¶
func (r AppSetupRegisterResponseSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRegisterResponseSession) UnmarshalJSON ¶
func (r *AppSetupRegisterResponseSession) UnmarshalJSON(data []byte) error
type AppSetupRegisterResponseSessionE2EE ¶
type AppSetupRegisterResponseSessionE2EE struct {
// Whether this account can verify trusted devices.
CrossSigning bool `json:"crossSigning" api:"required"`
// Whether the first encrypted message sync is complete.
FirstSyncDone bool `json:"firstSyncDone" api:"required"`
// Whether the user confirmed that they saved their recovery key.
HasBackedUpRecoveryKey bool `json:"hasBackedUpRecoveryKey" api:"required"`
// Whether encrypted messaging setup has started.
Initialized bool `json:"initialized" api:"required"`
// Whether encrypted message backup is available.
KeyBackup bool `json:"keyBackup" api:"required"`
// Encrypted messaging keys available on this device.
Secrets AppSetupRegisterResponseSessionE2EESecrets `json:"secrets" api:"required"`
// Whether secure key storage is available.
SecretStorage bool `json:"secretStorage" api:"required"`
// Whether this device is trusted for encrypted messages.
Verified bool `json:"verified" api:"required"`
// Unix timestamp for when the recovery key was created.
RecoveryKeyGeneratedAt float64 `json:"recoveryKeyGeneratedAt"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossSigning respjson.Field
FirstSyncDone respjson.Field
HasBackedUpRecoveryKey respjson.Field
Initialized respjson.Field
KeyBackup respjson.Field
Secrets respjson.Field
SecretStorage respjson.Field
Verified respjson.Field
RecoveryKeyGeneratedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging setup status.
func (AppSetupRegisterResponseSessionE2EE) RawJSON ¶
func (r AppSetupRegisterResponseSessionE2EE) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRegisterResponseSessionE2EE) UnmarshalJSON ¶
func (r *AppSetupRegisterResponseSessionE2EE) UnmarshalJSON(data []byte) error
type AppSetupRegisterResponseSessionE2EESecrets ¶
type AppSetupRegisterResponseSessionE2EESecrets struct {
// Whether the account identity key is available.
MasterKey bool `json:"masterKey" api:"required"`
// Whether the encrypted message backup key is available.
MegolmBackupKey bool `json:"megolmBackupKey" api:"required"`
// Whether a recovery key is available.
RecoveryKey bool `json:"recoveryKey" api:"required"`
// Whether the device trust key is available.
SelfSigningKey bool `json:"selfSigningKey" api:"required"`
// Whether the user trust key is available.
UserSigningKey bool `json:"userSigningKey" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MasterKey respjson.Field
MegolmBackupKey respjson.Field
RecoveryKey respjson.Field
SelfSigningKey respjson.Field
UserSigningKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging keys available on this device.
func (AppSetupRegisterResponseSessionE2EESecrets) RawJSON ¶
func (r AppSetupRegisterResponseSessionE2EESecrets) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRegisterResponseSessionE2EESecrets) UnmarshalJSON ¶
func (r *AppSetupRegisterResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error
type AppSetupRegisterResponseSessionMatrix ¶
type AppSetupRegisterResponseSessionMatrix struct {
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in account details. Omitted until sign-in is complete.
func (AppSetupRegisterResponseSessionMatrix) RawJSON ¶
func (r AppSetupRegisterResponseSessionMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRegisterResponseSessionMatrix) UnmarshalJSON ¶
func (r *AppSetupRegisterResponseSessionMatrix) UnmarshalJSON(data []byte) error
type AppSetupRegisterResponseSessionVerification ¶
type AppSetupRegisterResponseSessionVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupRegisterResponseSessionVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupRegisterResponseSessionVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupRegisterResponseSessionVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupRegisterResponseSessionVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupRegisterResponseSessionVerification) RawJSON ¶
func (r AppSetupRegisterResponseSessionVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRegisterResponseSessionVerification) UnmarshalJSON ¶
func (r *AppSetupRegisterResponseSessionVerification) UnmarshalJSON(data []byte) error
type AppSetupRegisterResponseSessionVerificationError ¶
type AppSetupRegisterResponseSessionVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupRegisterResponseSessionVerificationError) RawJSON ¶
func (r AppSetupRegisterResponseSessionVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRegisterResponseSessionVerificationError) UnmarshalJSON ¶
func (r *AppSetupRegisterResponseSessionVerificationError) UnmarshalJSON(data []byte) error
type AppSetupRegisterResponseSessionVerificationOtherDevice ¶
type AppSetupRegisterResponseSessionVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupRegisterResponseSessionVerificationOtherDevice) RawJSON ¶
func (r AppSetupRegisterResponseSessionVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRegisterResponseSessionVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupRegisterResponseSessionVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupRegisterResponseSessionVerificationQR ¶
type AppSetupRegisterResponseSessionVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupRegisterResponseSessionVerificationQR) RawJSON ¶
func (r AppSetupRegisterResponseSessionVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRegisterResponseSessionVerificationQR) UnmarshalJSON ¶
func (r *AppSetupRegisterResponseSessionVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupRegisterResponseSessionVerificationSAS ¶
type AppSetupRegisterResponseSessionVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupRegisterResponseSessionVerificationSAS) RawJSON ¶
func (r AppSetupRegisterResponseSessionVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupRegisterResponseSessionVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupRegisterResponseSessionVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupResponseParams ¶
type AppSetupResponseParams struct {
// Sign-in code from the user email.
Response string `json:"response" api:"required"`
// Setup request ID returned by the start step.
SetupRequestID string `json:"setupRequestID" api:"required"`
// contains filtered or unexported fields
}
func (AppSetupResponseParams) MarshalJSON ¶
func (r AppSetupResponseParams) MarshalJSON() (data []byte, err error)
func (*AppSetupResponseParams) UnmarshalJSON ¶
func (r *AppSetupResponseParams) UnmarshalJSON(data []byte) error
type AppSetupResponseResponseRegistrationRequired ¶
type AppSetupResponseResponseRegistrationRequired struct {
// Copy to display during account creation.
Copy AppSetupResponseResponseRegistrationRequiredCopy `json:"copy" api:"required"`
// Registration token returned by Beeper.
LeadToken string `json:"leadToken" api:"required"`
// Indicates that the user needs to create a Beeper account.
RegistrationRequired bool `json:"registrationRequired" api:"required"`
// Setup request ID to use when creating the account.
SetupRequestID string `json:"setupRequestID" api:"required"`
// Suggested usernames for the new account.
UsernameSuggestions []string `json:"usernameSuggestions"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Copy respjson.Field
LeadToken respjson.Field
RegistrationRequired respjson.Field
SetupRequestID respjson.Field
UsernameSuggestions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupResponseResponseRegistrationRequired) RawJSON ¶
func (r AppSetupResponseResponseRegistrationRequired) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupResponseResponseRegistrationRequired) UnmarshalJSON ¶
func (r *AppSetupResponseResponseRegistrationRequired) UnmarshalJSON(data []byte) error
type AppSetupResponseResponseRegistrationRequiredCopy ¶
type AppSetupResponseResponseRegistrationRequiredCopy struct {
// Submit button label.
Submit constant.Continue `json:"submit" default:"Continue"`
// Terms and privacy notice to show before account creation.
Terms constant.ByContinuingYouAgreeToTheTermsOfUseAndAcknowledgeThePrivacyPolicy `json:"terms" default:"By continuing, you agree to the Terms of Use and acknowledge the Privacy Policy."`
// Title for the username step.
Title constant.ChooseYourUsername `json:"title" default:"Choose your username"`
// Placeholder for the username field.
UsernamePlaceholder constant.Username `json:"usernamePlaceholder" default:"Username"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Submit respjson.Field
Terms respjson.Field
Title respjson.Field
UsernamePlaceholder respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Copy to display during account creation.
func (AppSetupResponseResponseRegistrationRequiredCopy) RawJSON ¶
func (r AppSetupResponseResponseRegistrationRequiredCopy) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupResponseResponseRegistrationRequiredCopy) UnmarshalJSON ¶
func (r *AppSetupResponseResponseRegistrationRequiredCopy) UnmarshalJSON(data []byte) error
type AppSetupResponseResponseSuccess ¶
type AppSetupResponseResponseSuccess struct {
// Account credentials for first-party app setup.
Matrix AppSetupResponseResponseSuccessMatrix `json:"matrix" api:"required"`
// Current app sign-in and encrypted messaging setup state after sign-in.
Session AppSetupResponseResponseSuccessSession `json:"session" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Matrix respjson.Field
Session respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupResponseResponseSuccess) RawJSON ¶
func (r AppSetupResponseResponseSuccess) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupResponseResponseSuccess) UnmarshalJSON ¶
func (r *AppSetupResponseResponseSuccess) UnmarshalJSON(data []byte) error
type AppSetupResponseResponseSuccessMatrix ¶
type AppSetupResponseResponseSuccessMatrix struct {
// Beeper account access token. Returned once for first-party app setup.
AccessToken string `json:"accessToken" api:"required"`
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AccessToken respjson.Field
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Account credentials for first-party app setup.
func (AppSetupResponseResponseSuccessMatrix) RawJSON ¶
func (r AppSetupResponseResponseSuccessMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupResponseResponseSuccessMatrix) UnmarshalJSON ¶
func (r *AppSetupResponseResponseSuccessMatrix) UnmarshalJSON(data []byte) error
type AppSetupResponseResponseSuccessSession ¶
type AppSetupResponseResponseSuccessSession struct {
// Encrypted messaging setup status.
E2EE AppSetupResponseResponseSuccessSessionE2EE `json:"e2ee" api:"required"`
// Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper
// Server.
//
// Any of "needs-login", "initializing", "needs-cross-signing-setup",
// "needs-verification", "needs-secrets", "needs-first-sync", "ready".
State string `json:"state" api:"required"`
// Signed-in account details. Omitted until sign-in is complete.
Matrix AppSetupResponseResponseSuccessSessionMatrix `json:"matrix"`
// Trusted device verification progress.
Verification AppSetupResponseResponseSuccessSessionVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
E2EE respjson.Field
State respjson.Field
Matrix respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current app sign-in and encrypted messaging setup state after sign-in.
func (AppSetupResponseResponseSuccessSession) RawJSON ¶
func (r AppSetupResponseResponseSuccessSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupResponseResponseSuccessSession) UnmarshalJSON ¶
func (r *AppSetupResponseResponseSuccessSession) UnmarshalJSON(data []byte) error
type AppSetupResponseResponseSuccessSessionE2EE ¶
type AppSetupResponseResponseSuccessSessionE2EE struct {
// Whether this account can verify trusted devices.
CrossSigning bool `json:"crossSigning" api:"required"`
// Whether the first encrypted message sync is complete.
FirstSyncDone bool `json:"firstSyncDone" api:"required"`
// Whether the user confirmed that they saved their recovery key.
HasBackedUpRecoveryKey bool `json:"hasBackedUpRecoveryKey" api:"required"`
// Whether encrypted messaging setup has started.
Initialized bool `json:"initialized" api:"required"`
// Whether encrypted message backup is available.
KeyBackup bool `json:"keyBackup" api:"required"`
// Encrypted messaging keys available on this device.
Secrets AppSetupResponseResponseSuccessSessionE2EESecrets `json:"secrets" api:"required"`
// Whether secure key storage is available.
SecretStorage bool `json:"secretStorage" api:"required"`
// Whether this device is trusted for encrypted messages.
Verified bool `json:"verified" api:"required"`
// Unix timestamp for when the recovery key was created.
RecoveryKeyGeneratedAt float64 `json:"recoveryKeyGeneratedAt"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossSigning respjson.Field
FirstSyncDone respjson.Field
HasBackedUpRecoveryKey respjson.Field
Initialized respjson.Field
KeyBackup respjson.Field
Secrets respjson.Field
SecretStorage respjson.Field
Verified respjson.Field
RecoveryKeyGeneratedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging setup status.
func (AppSetupResponseResponseSuccessSessionE2EE) RawJSON ¶
func (r AppSetupResponseResponseSuccessSessionE2EE) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupResponseResponseSuccessSessionE2EE) UnmarshalJSON ¶
func (r *AppSetupResponseResponseSuccessSessionE2EE) UnmarshalJSON(data []byte) error
type AppSetupResponseResponseSuccessSessionE2EESecrets ¶
type AppSetupResponseResponseSuccessSessionE2EESecrets struct {
// Whether the account identity key is available.
MasterKey bool `json:"masterKey" api:"required"`
// Whether the encrypted message backup key is available.
MegolmBackupKey bool `json:"megolmBackupKey" api:"required"`
// Whether a recovery key is available.
RecoveryKey bool `json:"recoveryKey" api:"required"`
// Whether the device trust key is available.
SelfSigningKey bool `json:"selfSigningKey" api:"required"`
// Whether the user trust key is available.
UserSigningKey bool `json:"userSigningKey" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MasterKey respjson.Field
MegolmBackupKey respjson.Field
RecoveryKey respjson.Field
SelfSigningKey respjson.Field
UserSigningKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging keys available on this device.
func (AppSetupResponseResponseSuccessSessionE2EESecrets) RawJSON ¶
func (r AppSetupResponseResponseSuccessSessionE2EESecrets) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupResponseResponseSuccessSessionE2EESecrets) UnmarshalJSON ¶
func (r *AppSetupResponseResponseSuccessSessionE2EESecrets) UnmarshalJSON(data []byte) error
type AppSetupResponseResponseSuccessSessionMatrix ¶
type AppSetupResponseResponseSuccessSessionMatrix struct {
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in account details. Omitted until sign-in is complete.
func (AppSetupResponseResponseSuccessSessionMatrix) RawJSON ¶
func (r AppSetupResponseResponseSuccessSessionMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupResponseResponseSuccessSessionMatrix) UnmarshalJSON ¶
func (r *AppSetupResponseResponseSuccessSessionMatrix) UnmarshalJSON(data []byte) error
type AppSetupResponseResponseSuccessSessionVerification ¶
type AppSetupResponseResponseSuccessSessionVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupResponseResponseSuccessSessionVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupResponseResponseSuccessSessionVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupResponseResponseSuccessSessionVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupResponseResponseSuccessSessionVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupResponseResponseSuccessSessionVerification) RawJSON ¶
func (r AppSetupResponseResponseSuccessSessionVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupResponseResponseSuccessSessionVerification) UnmarshalJSON ¶
func (r *AppSetupResponseResponseSuccessSessionVerification) UnmarshalJSON(data []byte) error
type AppSetupResponseResponseSuccessSessionVerificationError ¶
type AppSetupResponseResponseSuccessSessionVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupResponseResponseSuccessSessionVerificationError) RawJSON ¶
func (r AppSetupResponseResponseSuccessSessionVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupResponseResponseSuccessSessionVerificationError) UnmarshalJSON ¶
func (r *AppSetupResponseResponseSuccessSessionVerificationError) UnmarshalJSON(data []byte) error
type AppSetupResponseResponseSuccessSessionVerificationOtherDevice ¶
type AppSetupResponseResponseSuccessSessionVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupResponseResponseSuccessSessionVerificationOtherDevice) RawJSON ¶
func (r AppSetupResponseResponseSuccessSessionVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupResponseResponseSuccessSessionVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupResponseResponseSuccessSessionVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupResponseResponseSuccessSessionVerificationQR ¶
type AppSetupResponseResponseSuccessSessionVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupResponseResponseSuccessSessionVerificationQR) RawJSON ¶
func (r AppSetupResponseResponseSuccessSessionVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupResponseResponseSuccessSessionVerificationQR) UnmarshalJSON ¶
func (r *AppSetupResponseResponseSuccessSessionVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupResponseResponseSuccessSessionVerificationSAS ¶
type AppSetupResponseResponseSuccessSessionVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupResponseResponseSuccessSessionVerificationSAS) RawJSON ¶
func (r AppSetupResponseResponseSuccessSessionVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupResponseResponseSuccessSessionVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupResponseResponseSuccessSessionVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupResponseResponseUnion ¶
type AppSetupResponseResponseUnion struct {
// This field is from variant [AppSetupResponseResponseSuccess].
Matrix AppSetupResponseResponseSuccessMatrix `json:"matrix"`
// This field is from variant [AppSetupResponseResponseSuccess].
Session AppSetupResponseResponseSuccessSession `json:"session"`
// This field is from variant [AppSetupResponseResponseRegistrationRequired].
Copy AppSetupResponseResponseRegistrationRequiredCopy `json:"copy"`
// This field is from variant [AppSetupResponseResponseRegistrationRequired].
LeadToken string `json:"leadToken"`
// This field is from variant [AppSetupResponseResponseRegistrationRequired].
RegistrationRequired bool `json:"registrationRequired"`
// This field is from variant [AppSetupResponseResponseRegistrationRequired].
SetupRequestID string `json:"setupRequestID"`
// This field is from variant [AppSetupResponseResponseRegistrationRequired].
UsernameSuggestions []string `json:"usernameSuggestions"`
JSON struct {
Matrix respjson.Field
Session respjson.Field
Copy respjson.Field
LeadToken respjson.Field
RegistrationRequired respjson.Field
SetupRequestID respjson.Field
UsernameSuggestions respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
AppSetupResponseResponseUnion contains all possible properties and values from AppSetupResponseResponseSuccess, AppSetupResponseResponseRegistrationRequired.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (AppSetupResponseResponseUnion) AsRegistrationRequired ¶
func (u AppSetupResponseResponseUnion) AsRegistrationRequired() (v AppSetupResponseResponseRegistrationRequired)
func (AppSetupResponseResponseUnion) AsSuccess ¶
func (u AppSetupResponseResponseUnion) AsSuccess() (v AppSetupResponseResponseSuccess)
func (AppSetupResponseResponseUnion) RawJSON ¶
func (u AppSetupResponseResponseUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupResponseResponseUnion) UnmarshalJSON ¶
func (r *AppSetupResponseResponseUnion) UnmarshalJSON(data []byte) error
type AppSetupService ¶
type AppSetupService struct {
Options []option.RequestOption
// Manage recovery-key setup for encrypted messages
RecoveryKey AppSetupRecoveryKeyService
// Manage device verification transactions
Verifications AppSetupVerificationService
}
Complete first-party Beeper app setup
AppSetupService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAppSetupService method instead.
func NewAppSetupService ¶
func NewAppSetupService(opts ...option.RequestOption) (r AppSetupService)
NewAppSetupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AppSetupService) Email ¶
func (r *AppSetupService) Email(ctx context.Context, body AppSetupEmailParams, opts ...option.RequestOption) (err error)
Send a sign-in code to the user email address for app setup.
func (*AppSetupService) Get ¶
func (r *AppSetupService) Get(ctx context.Context, opts ...option.RequestOption) (res *AppSetupGetResponse, err error)
Return the current Beeper Desktop or Beeper Server sign-in and encrypted messaging setup state. This endpoint is public before sign-in so apps can discover that sign-in is needed; after sign-in, pass a read token.
func (*AppSetupService) Register ¶
func (r *AppSetupService) Register(ctx context.Context, body AppSetupRegisterParams, opts ...option.RequestOption) (res *AppSetupRegisterResponse, err error)
Create a Beeper account after the user chooses a username and accepts the Terms of Use.
func (*AppSetupService) Response ¶
func (r *AppSetupService) Response(ctx context.Context, body AppSetupResponseParams, opts ...option.RequestOption) (res *AppSetupResponseResponseUnion, err error)
Finish setup sign-in with the code sent to the user email address. If the user needs a new account, the response includes account creation copy and username suggestions.
func (*AppSetupService) Start ¶
func (r *AppSetupService) Start(ctx context.Context, opts ...option.RequestOption) (res *AppSetupStartResponse, err error)
Start setting up Beeper Desktop or Beeper Server. The flow supports existing Beeper accounts and new account creation.
type AppSetupStartResponse ¶
type AppSetupStartResponse struct {
// Setup request ID to use in the next sign-in step.
SetupRequestID string `json:"setupRequestID" api:"required"`
// Available sign-in methods for this setup request.
SignInMethods []string `json:"signInMethods" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
SetupRequestID respjson.Field
SignInMethods respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupStartResponse) RawJSON ¶
func (r AppSetupStartResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupStartResponse) UnmarshalJSON ¶
func (r *AppSetupStartResponse) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponse ¶
type AppSetupVerificationAcceptResponse struct {
// Current app sign-in and encrypted messaging setup state.
Session AppSetupVerificationAcceptResponseSession `json:"session" api:"required"`
// Trusted device verification progress.
Verification AppSetupVerificationAcceptResponseVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Session respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupVerificationAcceptResponse) RawJSON ¶
func (r AppSetupVerificationAcceptResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponse) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponse) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponseSession ¶
type AppSetupVerificationAcceptResponseSession struct {
// Encrypted messaging setup status.
E2EE AppSetupVerificationAcceptResponseSessionE2EE `json:"e2ee" api:"required"`
// Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper
// Server.
//
// Any of "needs-login", "initializing", "needs-cross-signing-setup",
// "needs-verification", "needs-secrets", "needs-first-sync", "ready".
State string `json:"state" api:"required"`
// Signed-in account details. Omitted until sign-in is complete.
Matrix AppSetupVerificationAcceptResponseSessionMatrix `json:"matrix"`
// Trusted device verification progress.
Verification AppSetupVerificationAcceptResponseSessionVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
E2EE respjson.Field
State respjson.Field
Matrix respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current app sign-in and encrypted messaging setup state.
func (AppSetupVerificationAcceptResponseSession) RawJSON ¶
func (r AppSetupVerificationAcceptResponseSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponseSession) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponseSession) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponseSessionE2EE ¶
type AppSetupVerificationAcceptResponseSessionE2EE struct {
// Whether this account can verify trusted devices.
CrossSigning bool `json:"crossSigning" api:"required"`
// Whether the first encrypted message sync is complete.
FirstSyncDone bool `json:"firstSyncDone" api:"required"`
// Whether the user confirmed that they saved their recovery key.
HasBackedUpRecoveryKey bool `json:"hasBackedUpRecoveryKey" api:"required"`
// Whether encrypted messaging setup has started.
Initialized bool `json:"initialized" api:"required"`
// Whether encrypted message backup is available.
KeyBackup bool `json:"keyBackup" api:"required"`
// Encrypted messaging keys available on this device.
Secrets AppSetupVerificationAcceptResponseSessionE2EESecrets `json:"secrets" api:"required"`
// Whether secure key storage is available.
SecretStorage bool `json:"secretStorage" api:"required"`
// Whether this device is trusted for encrypted messages.
Verified bool `json:"verified" api:"required"`
// Unix timestamp for when the recovery key was created.
RecoveryKeyGeneratedAt float64 `json:"recoveryKeyGeneratedAt"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossSigning respjson.Field
FirstSyncDone respjson.Field
HasBackedUpRecoveryKey respjson.Field
Initialized respjson.Field
KeyBackup respjson.Field
Secrets respjson.Field
SecretStorage respjson.Field
Verified respjson.Field
RecoveryKeyGeneratedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging setup status.
func (AppSetupVerificationAcceptResponseSessionE2EE) RawJSON ¶
func (r AppSetupVerificationAcceptResponseSessionE2EE) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponseSessionE2EE) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponseSessionE2EE) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponseSessionE2EESecrets ¶
type AppSetupVerificationAcceptResponseSessionE2EESecrets struct {
// Whether the account identity key is available.
MasterKey bool `json:"masterKey" api:"required"`
// Whether the encrypted message backup key is available.
MegolmBackupKey bool `json:"megolmBackupKey" api:"required"`
// Whether a recovery key is available.
RecoveryKey bool `json:"recoveryKey" api:"required"`
// Whether the device trust key is available.
SelfSigningKey bool `json:"selfSigningKey" api:"required"`
// Whether the user trust key is available.
UserSigningKey bool `json:"userSigningKey" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MasterKey respjson.Field
MegolmBackupKey respjson.Field
RecoveryKey respjson.Field
SelfSigningKey respjson.Field
UserSigningKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging keys available on this device.
func (AppSetupVerificationAcceptResponseSessionE2EESecrets) RawJSON ¶
func (r AppSetupVerificationAcceptResponseSessionE2EESecrets) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponseSessionE2EESecrets) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponseSessionMatrix ¶
type AppSetupVerificationAcceptResponseSessionMatrix struct {
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in account details. Omitted until sign-in is complete.
func (AppSetupVerificationAcceptResponseSessionMatrix) RawJSON ¶
func (r AppSetupVerificationAcceptResponseSessionMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponseSessionMatrix) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponseSessionMatrix) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponseSessionVerification ¶
type AppSetupVerificationAcceptResponseSessionVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationAcceptResponseSessionVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationAcceptResponseSessionVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationAcceptResponseSessionVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationAcceptResponseSessionVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationAcceptResponseSessionVerification) RawJSON ¶
func (r AppSetupVerificationAcceptResponseSessionVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponseSessionVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponseSessionVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponseSessionVerificationError ¶
type AppSetupVerificationAcceptResponseSessionVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationAcceptResponseSessionVerificationError) RawJSON ¶
func (r AppSetupVerificationAcceptResponseSessionVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponseSessionVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponseSessionVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponseSessionVerificationOtherDevice ¶
type AppSetupVerificationAcceptResponseSessionVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationAcceptResponseSessionVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationAcceptResponseSessionVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponseSessionVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponseSessionVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponseSessionVerificationQR ¶
type AppSetupVerificationAcceptResponseSessionVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationAcceptResponseSessionVerificationQR) RawJSON ¶
func (r AppSetupVerificationAcceptResponseSessionVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponseSessionVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponseSessionVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponseSessionVerificationSAS ¶
type AppSetupVerificationAcceptResponseSessionVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationAcceptResponseSessionVerificationSAS) RawJSON ¶
func (r AppSetupVerificationAcceptResponseSessionVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponseSessionVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponseSessionVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponseVerification ¶
type AppSetupVerificationAcceptResponseVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationAcceptResponseVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationAcceptResponseVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationAcceptResponseVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationAcceptResponseVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationAcceptResponseVerification) RawJSON ¶
func (r AppSetupVerificationAcceptResponseVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponseVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponseVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponseVerificationError ¶
type AppSetupVerificationAcceptResponseVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationAcceptResponseVerificationError) RawJSON ¶
func (r AppSetupVerificationAcceptResponseVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponseVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponseVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponseVerificationOtherDevice ¶
type AppSetupVerificationAcceptResponseVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationAcceptResponseVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationAcceptResponseVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponseVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponseVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponseVerificationQR ¶
type AppSetupVerificationAcceptResponseVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationAcceptResponseVerificationQR) RawJSON ¶
func (r AppSetupVerificationAcceptResponseVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponseVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponseVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationAcceptResponseVerificationSAS ¶
type AppSetupVerificationAcceptResponseVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationAcceptResponseVerificationSAS) RawJSON ¶
func (r AppSetupVerificationAcceptResponseVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationAcceptResponseVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationAcceptResponseVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelParams ¶
type AppSetupVerificationCancelParams struct {
// Optional cancellation code.
Code param.Opt[string] `json:"code,omitzero"`
// Optional user-facing cancellation reason.
Reason param.Opt[string] `json:"reason,omitzero"`
// contains filtered or unexported fields
}
func (AppSetupVerificationCancelParams) MarshalJSON ¶
func (r AppSetupVerificationCancelParams) MarshalJSON() (data []byte, err error)
func (*AppSetupVerificationCancelParams) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelParams) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponse ¶
type AppSetupVerificationCancelResponse struct {
// Current app sign-in and encrypted messaging setup state.
Session AppSetupVerificationCancelResponseSession `json:"session" api:"required"`
// Trusted device verification progress.
Verification AppSetupVerificationCancelResponseVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Session respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupVerificationCancelResponse) RawJSON ¶
func (r AppSetupVerificationCancelResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponse) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponse) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponseSession ¶
type AppSetupVerificationCancelResponseSession struct {
// Encrypted messaging setup status.
E2EE AppSetupVerificationCancelResponseSessionE2EE `json:"e2ee" api:"required"`
// Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper
// Server.
//
// Any of "needs-login", "initializing", "needs-cross-signing-setup",
// "needs-verification", "needs-secrets", "needs-first-sync", "ready".
State string `json:"state" api:"required"`
// Signed-in account details. Omitted until sign-in is complete.
Matrix AppSetupVerificationCancelResponseSessionMatrix `json:"matrix"`
// Trusted device verification progress.
Verification AppSetupVerificationCancelResponseSessionVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
E2EE respjson.Field
State respjson.Field
Matrix respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current app sign-in and encrypted messaging setup state.
func (AppSetupVerificationCancelResponseSession) RawJSON ¶
func (r AppSetupVerificationCancelResponseSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponseSession) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponseSession) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponseSessionE2EE ¶
type AppSetupVerificationCancelResponseSessionE2EE struct {
// Whether this account can verify trusted devices.
CrossSigning bool `json:"crossSigning" api:"required"`
// Whether the first encrypted message sync is complete.
FirstSyncDone bool `json:"firstSyncDone" api:"required"`
// Whether the user confirmed that they saved their recovery key.
HasBackedUpRecoveryKey bool `json:"hasBackedUpRecoveryKey" api:"required"`
// Whether encrypted messaging setup has started.
Initialized bool `json:"initialized" api:"required"`
// Whether encrypted message backup is available.
KeyBackup bool `json:"keyBackup" api:"required"`
// Encrypted messaging keys available on this device.
Secrets AppSetupVerificationCancelResponseSessionE2EESecrets `json:"secrets" api:"required"`
// Whether secure key storage is available.
SecretStorage bool `json:"secretStorage" api:"required"`
// Whether this device is trusted for encrypted messages.
Verified bool `json:"verified" api:"required"`
// Unix timestamp for when the recovery key was created.
RecoveryKeyGeneratedAt float64 `json:"recoveryKeyGeneratedAt"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossSigning respjson.Field
FirstSyncDone respjson.Field
HasBackedUpRecoveryKey respjson.Field
Initialized respjson.Field
KeyBackup respjson.Field
Secrets respjson.Field
SecretStorage respjson.Field
Verified respjson.Field
RecoveryKeyGeneratedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging setup status.
func (AppSetupVerificationCancelResponseSessionE2EE) RawJSON ¶
func (r AppSetupVerificationCancelResponseSessionE2EE) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponseSessionE2EE) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponseSessionE2EE) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponseSessionE2EESecrets ¶
type AppSetupVerificationCancelResponseSessionE2EESecrets struct {
// Whether the account identity key is available.
MasterKey bool `json:"masterKey" api:"required"`
// Whether the encrypted message backup key is available.
MegolmBackupKey bool `json:"megolmBackupKey" api:"required"`
// Whether a recovery key is available.
RecoveryKey bool `json:"recoveryKey" api:"required"`
// Whether the device trust key is available.
SelfSigningKey bool `json:"selfSigningKey" api:"required"`
// Whether the user trust key is available.
UserSigningKey bool `json:"userSigningKey" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MasterKey respjson.Field
MegolmBackupKey respjson.Field
RecoveryKey respjson.Field
SelfSigningKey respjson.Field
UserSigningKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging keys available on this device.
func (AppSetupVerificationCancelResponseSessionE2EESecrets) RawJSON ¶
func (r AppSetupVerificationCancelResponseSessionE2EESecrets) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponseSessionE2EESecrets) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponseSessionMatrix ¶
type AppSetupVerificationCancelResponseSessionMatrix struct {
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in account details. Omitted until sign-in is complete.
func (AppSetupVerificationCancelResponseSessionMatrix) RawJSON ¶
func (r AppSetupVerificationCancelResponseSessionMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponseSessionMatrix) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponseSessionMatrix) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponseSessionVerification ¶
type AppSetupVerificationCancelResponseSessionVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationCancelResponseSessionVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationCancelResponseSessionVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationCancelResponseSessionVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationCancelResponseSessionVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationCancelResponseSessionVerification) RawJSON ¶
func (r AppSetupVerificationCancelResponseSessionVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponseSessionVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponseSessionVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponseSessionVerificationError ¶
type AppSetupVerificationCancelResponseSessionVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationCancelResponseSessionVerificationError) RawJSON ¶
func (r AppSetupVerificationCancelResponseSessionVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponseSessionVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponseSessionVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponseSessionVerificationOtherDevice ¶
type AppSetupVerificationCancelResponseSessionVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationCancelResponseSessionVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationCancelResponseSessionVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponseSessionVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponseSessionVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponseSessionVerificationQR ¶
type AppSetupVerificationCancelResponseSessionVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationCancelResponseSessionVerificationQR) RawJSON ¶
func (r AppSetupVerificationCancelResponseSessionVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponseSessionVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponseSessionVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponseSessionVerificationSAS ¶
type AppSetupVerificationCancelResponseSessionVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationCancelResponseSessionVerificationSAS) RawJSON ¶
func (r AppSetupVerificationCancelResponseSessionVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponseSessionVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponseSessionVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponseVerification ¶
type AppSetupVerificationCancelResponseVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationCancelResponseVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationCancelResponseVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationCancelResponseVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationCancelResponseVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationCancelResponseVerification) RawJSON ¶
func (r AppSetupVerificationCancelResponseVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponseVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponseVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponseVerificationError ¶
type AppSetupVerificationCancelResponseVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationCancelResponseVerificationError) RawJSON ¶
func (r AppSetupVerificationCancelResponseVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponseVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponseVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponseVerificationOtherDevice ¶
type AppSetupVerificationCancelResponseVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationCancelResponseVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationCancelResponseVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponseVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponseVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponseVerificationQR ¶
type AppSetupVerificationCancelResponseVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationCancelResponseVerificationQR) RawJSON ¶
func (r AppSetupVerificationCancelResponseVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponseVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponseVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationCancelResponseVerificationSAS ¶
type AppSetupVerificationCancelResponseVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationCancelResponseVerificationSAS) RawJSON ¶
func (r AppSetupVerificationCancelResponseVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationCancelResponseVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationCancelResponseVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponse ¶
type AppSetupVerificationGetResponse struct {
// Current app sign-in and encrypted messaging setup state.
Session AppSetupVerificationGetResponseSession `json:"session" api:"required"`
// Trusted device verification progress.
Verification AppSetupVerificationGetResponseVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Session respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupVerificationGetResponse) RawJSON ¶
func (r AppSetupVerificationGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponse) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponse) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponseSession ¶
type AppSetupVerificationGetResponseSession struct {
// Encrypted messaging setup status.
E2EE AppSetupVerificationGetResponseSessionE2EE `json:"e2ee" api:"required"`
// Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper
// Server.
//
// Any of "needs-login", "initializing", "needs-cross-signing-setup",
// "needs-verification", "needs-secrets", "needs-first-sync", "ready".
State string `json:"state" api:"required"`
// Signed-in account details. Omitted until sign-in is complete.
Matrix AppSetupVerificationGetResponseSessionMatrix `json:"matrix"`
// Trusted device verification progress.
Verification AppSetupVerificationGetResponseSessionVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
E2EE respjson.Field
State respjson.Field
Matrix respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current app sign-in and encrypted messaging setup state.
func (AppSetupVerificationGetResponseSession) RawJSON ¶
func (r AppSetupVerificationGetResponseSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponseSession) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponseSession) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponseSessionE2EE ¶
type AppSetupVerificationGetResponseSessionE2EE struct {
// Whether this account can verify trusted devices.
CrossSigning bool `json:"crossSigning" api:"required"`
// Whether the first encrypted message sync is complete.
FirstSyncDone bool `json:"firstSyncDone" api:"required"`
// Whether the user confirmed that they saved their recovery key.
HasBackedUpRecoveryKey bool `json:"hasBackedUpRecoveryKey" api:"required"`
// Whether encrypted messaging setup has started.
Initialized bool `json:"initialized" api:"required"`
// Whether encrypted message backup is available.
KeyBackup bool `json:"keyBackup" api:"required"`
// Encrypted messaging keys available on this device.
Secrets AppSetupVerificationGetResponseSessionE2EESecrets `json:"secrets" api:"required"`
// Whether secure key storage is available.
SecretStorage bool `json:"secretStorage" api:"required"`
// Whether this device is trusted for encrypted messages.
Verified bool `json:"verified" api:"required"`
// Unix timestamp for when the recovery key was created.
RecoveryKeyGeneratedAt float64 `json:"recoveryKeyGeneratedAt"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossSigning respjson.Field
FirstSyncDone respjson.Field
HasBackedUpRecoveryKey respjson.Field
Initialized respjson.Field
KeyBackup respjson.Field
Secrets respjson.Field
SecretStorage respjson.Field
Verified respjson.Field
RecoveryKeyGeneratedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging setup status.
func (AppSetupVerificationGetResponseSessionE2EE) RawJSON ¶
func (r AppSetupVerificationGetResponseSessionE2EE) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponseSessionE2EE) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponseSessionE2EE) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponseSessionE2EESecrets ¶
type AppSetupVerificationGetResponseSessionE2EESecrets struct {
// Whether the account identity key is available.
MasterKey bool `json:"masterKey" api:"required"`
// Whether the encrypted message backup key is available.
MegolmBackupKey bool `json:"megolmBackupKey" api:"required"`
// Whether a recovery key is available.
RecoveryKey bool `json:"recoveryKey" api:"required"`
// Whether the device trust key is available.
SelfSigningKey bool `json:"selfSigningKey" api:"required"`
// Whether the user trust key is available.
UserSigningKey bool `json:"userSigningKey" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MasterKey respjson.Field
MegolmBackupKey respjson.Field
RecoveryKey respjson.Field
SelfSigningKey respjson.Field
UserSigningKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging keys available on this device.
func (AppSetupVerificationGetResponseSessionE2EESecrets) RawJSON ¶
func (r AppSetupVerificationGetResponseSessionE2EESecrets) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponseSessionE2EESecrets) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponseSessionMatrix ¶
type AppSetupVerificationGetResponseSessionMatrix struct {
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in account details. Omitted until sign-in is complete.
func (AppSetupVerificationGetResponseSessionMatrix) RawJSON ¶
func (r AppSetupVerificationGetResponseSessionMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponseSessionMatrix) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponseSessionMatrix) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponseSessionVerification ¶
type AppSetupVerificationGetResponseSessionVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationGetResponseSessionVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationGetResponseSessionVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationGetResponseSessionVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationGetResponseSessionVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationGetResponseSessionVerification) RawJSON ¶
func (r AppSetupVerificationGetResponseSessionVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponseSessionVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponseSessionVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponseSessionVerificationError ¶
type AppSetupVerificationGetResponseSessionVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationGetResponseSessionVerificationError) RawJSON ¶
func (r AppSetupVerificationGetResponseSessionVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponseSessionVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponseSessionVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponseSessionVerificationOtherDevice ¶
type AppSetupVerificationGetResponseSessionVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationGetResponseSessionVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationGetResponseSessionVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponseSessionVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponseSessionVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponseSessionVerificationQR ¶
type AppSetupVerificationGetResponseSessionVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationGetResponseSessionVerificationQR) RawJSON ¶
func (r AppSetupVerificationGetResponseSessionVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponseSessionVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponseSessionVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponseSessionVerificationSAS ¶
type AppSetupVerificationGetResponseSessionVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationGetResponseSessionVerificationSAS) RawJSON ¶
func (r AppSetupVerificationGetResponseSessionVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponseSessionVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponseSessionVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponseVerification ¶
type AppSetupVerificationGetResponseVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationGetResponseVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationGetResponseVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationGetResponseVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationGetResponseVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationGetResponseVerification) RawJSON ¶
func (r AppSetupVerificationGetResponseVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponseVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponseVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponseVerificationError ¶
type AppSetupVerificationGetResponseVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationGetResponseVerificationError) RawJSON ¶
func (r AppSetupVerificationGetResponseVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponseVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponseVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponseVerificationOtherDevice ¶
type AppSetupVerificationGetResponseVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationGetResponseVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationGetResponseVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponseVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponseVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponseVerificationQR ¶
type AppSetupVerificationGetResponseVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationGetResponseVerificationQR) RawJSON ¶
func (r AppSetupVerificationGetResponseVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponseVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponseVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationGetResponseVerificationSAS ¶
type AppSetupVerificationGetResponseVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationGetResponseVerificationSAS) RawJSON ¶
func (r AppSetupVerificationGetResponseVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationGetResponseVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationGetResponseVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationListResponse ¶
type AppSetupVerificationListResponse struct {
Items []AppSetupVerificationListResponseItem `json:"items" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupVerificationListResponse) RawJSON ¶
func (r AppSetupVerificationListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationListResponse) UnmarshalJSON ¶
func (r *AppSetupVerificationListResponse) UnmarshalJSON(data []byte) error
type AppSetupVerificationListResponseItem ¶
type AppSetupVerificationListResponseItem struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationListResponseItemError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationListResponseItemOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationListResponseItemQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationListResponseItemSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationListResponseItem) RawJSON ¶
func (r AppSetupVerificationListResponseItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationListResponseItem) UnmarshalJSON ¶
func (r *AppSetupVerificationListResponseItem) UnmarshalJSON(data []byte) error
type AppSetupVerificationListResponseItemError ¶
type AppSetupVerificationListResponseItemError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationListResponseItemError) RawJSON ¶
func (r AppSetupVerificationListResponseItemError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationListResponseItemError) UnmarshalJSON ¶
func (r *AppSetupVerificationListResponseItemError) UnmarshalJSON(data []byte) error
type AppSetupVerificationListResponseItemOtherDevice ¶
type AppSetupVerificationListResponseItemOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationListResponseItemOtherDevice) RawJSON ¶
func (r AppSetupVerificationListResponseItemOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationListResponseItemOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationListResponseItemOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationListResponseItemQR ¶
type AppSetupVerificationListResponseItemQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationListResponseItemQR) RawJSON ¶
func (r AppSetupVerificationListResponseItemQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationListResponseItemQR) UnmarshalJSON ¶
func (r *AppSetupVerificationListResponseItemQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationListResponseItemSAS ¶
type AppSetupVerificationListResponseItemSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationListResponseItemSAS) RawJSON ¶
func (r AppSetupVerificationListResponseItemSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationListResponseItemSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationListResponseItemSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewParams ¶
type AppSetupVerificationNewParams struct {
// Beeper user ID to verify. Defaults to the signed-in user.
UserID param.Opt[string] `json:"userID,omitzero"`
// Why this verification is being started.
//
// Any of "login", "device".
Purpose AppSetupVerificationNewParamsPurpose `json:"purpose,omitzero"`
// contains filtered or unexported fields
}
func (AppSetupVerificationNewParams) MarshalJSON ¶
func (r AppSetupVerificationNewParams) MarshalJSON() (data []byte, err error)
func (*AppSetupVerificationNewParams) UnmarshalJSON ¶
func (r *AppSetupVerificationNewParams) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewParamsPurpose ¶
type AppSetupVerificationNewParamsPurpose string
Why this verification is being started.
const ( AppSetupVerificationNewParamsPurposeLogin AppSetupVerificationNewParamsPurpose = "login" AppSetupVerificationNewParamsPurposeDevice AppSetupVerificationNewParamsPurpose = "device" )
type AppSetupVerificationNewResponse ¶
type AppSetupVerificationNewResponse struct {
// Current app sign-in and encrypted messaging setup state.
Session AppSetupVerificationNewResponseSession `json:"session" api:"required"`
// Trusted device verification progress.
Verification AppSetupVerificationNewResponseVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Session respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupVerificationNewResponse) RawJSON ¶
func (r AppSetupVerificationNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponse) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponse) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewResponseSession ¶
type AppSetupVerificationNewResponseSession struct {
// Encrypted messaging setup status.
E2EE AppSetupVerificationNewResponseSessionE2EE `json:"e2ee" api:"required"`
// Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper
// Server.
//
// Any of "needs-login", "initializing", "needs-cross-signing-setup",
// "needs-verification", "needs-secrets", "needs-first-sync", "ready".
State string `json:"state" api:"required"`
// Signed-in account details. Omitted until sign-in is complete.
Matrix AppSetupVerificationNewResponseSessionMatrix `json:"matrix"`
// Trusted device verification progress.
Verification AppSetupVerificationNewResponseSessionVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
E2EE respjson.Field
State respjson.Field
Matrix respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current app sign-in and encrypted messaging setup state.
func (AppSetupVerificationNewResponseSession) RawJSON ¶
func (r AppSetupVerificationNewResponseSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponseSession) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponseSession) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewResponseSessionE2EE ¶
type AppSetupVerificationNewResponseSessionE2EE struct {
// Whether this account can verify trusted devices.
CrossSigning bool `json:"crossSigning" api:"required"`
// Whether the first encrypted message sync is complete.
FirstSyncDone bool `json:"firstSyncDone" api:"required"`
// Whether the user confirmed that they saved their recovery key.
HasBackedUpRecoveryKey bool `json:"hasBackedUpRecoveryKey" api:"required"`
// Whether encrypted messaging setup has started.
Initialized bool `json:"initialized" api:"required"`
// Whether encrypted message backup is available.
KeyBackup bool `json:"keyBackup" api:"required"`
// Encrypted messaging keys available on this device.
Secrets AppSetupVerificationNewResponseSessionE2EESecrets `json:"secrets" api:"required"`
// Whether secure key storage is available.
SecretStorage bool `json:"secretStorage" api:"required"`
// Whether this device is trusted for encrypted messages.
Verified bool `json:"verified" api:"required"`
// Unix timestamp for when the recovery key was created.
RecoveryKeyGeneratedAt float64 `json:"recoveryKeyGeneratedAt"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossSigning respjson.Field
FirstSyncDone respjson.Field
HasBackedUpRecoveryKey respjson.Field
Initialized respjson.Field
KeyBackup respjson.Field
Secrets respjson.Field
SecretStorage respjson.Field
Verified respjson.Field
RecoveryKeyGeneratedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging setup status.
func (AppSetupVerificationNewResponseSessionE2EE) RawJSON ¶
func (r AppSetupVerificationNewResponseSessionE2EE) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponseSessionE2EE) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponseSessionE2EE) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewResponseSessionE2EESecrets ¶
type AppSetupVerificationNewResponseSessionE2EESecrets struct {
// Whether the account identity key is available.
MasterKey bool `json:"masterKey" api:"required"`
// Whether the encrypted message backup key is available.
MegolmBackupKey bool `json:"megolmBackupKey" api:"required"`
// Whether a recovery key is available.
RecoveryKey bool `json:"recoveryKey" api:"required"`
// Whether the device trust key is available.
SelfSigningKey bool `json:"selfSigningKey" api:"required"`
// Whether the user trust key is available.
UserSigningKey bool `json:"userSigningKey" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MasterKey respjson.Field
MegolmBackupKey respjson.Field
RecoveryKey respjson.Field
SelfSigningKey respjson.Field
UserSigningKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging keys available on this device.
func (AppSetupVerificationNewResponseSessionE2EESecrets) RawJSON ¶
func (r AppSetupVerificationNewResponseSessionE2EESecrets) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponseSessionE2EESecrets) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewResponseSessionMatrix ¶
type AppSetupVerificationNewResponseSessionMatrix struct {
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in account details. Omitted until sign-in is complete.
func (AppSetupVerificationNewResponseSessionMatrix) RawJSON ¶
func (r AppSetupVerificationNewResponseSessionMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponseSessionMatrix) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponseSessionMatrix) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewResponseSessionVerification ¶
type AppSetupVerificationNewResponseSessionVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationNewResponseSessionVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationNewResponseSessionVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationNewResponseSessionVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationNewResponseSessionVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationNewResponseSessionVerification) RawJSON ¶
func (r AppSetupVerificationNewResponseSessionVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponseSessionVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponseSessionVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewResponseSessionVerificationError ¶
type AppSetupVerificationNewResponseSessionVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationNewResponseSessionVerificationError) RawJSON ¶
func (r AppSetupVerificationNewResponseSessionVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponseSessionVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponseSessionVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewResponseSessionVerificationOtherDevice ¶
type AppSetupVerificationNewResponseSessionVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationNewResponseSessionVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationNewResponseSessionVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponseSessionVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponseSessionVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewResponseSessionVerificationQR ¶
type AppSetupVerificationNewResponseSessionVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationNewResponseSessionVerificationQR) RawJSON ¶
func (r AppSetupVerificationNewResponseSessionVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponseSessionVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponseSessionVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewResponseSessionVerificationSAS ¶
type AppSetupVerificationNewResponseSessionVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationNewResponseSessionVerificationSAS) RawJSON ¶
func (r AppSetupVerificationNewResponseSessionVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponseSessionVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponseSessionVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewResponseVerification ¶
type AppSetupVerificationNewResponseVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationNewResponseVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationNewResponseVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationNewResponseVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationNewResponseVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationNewResponseVerification) RawJSON ¶
func (r AppSetupVerificationNewResponseVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponseVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponseVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewResponseVerificationError ¶
type AppSetupVerificationNewResponseVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationNewResponseVerificationError) RawJSON ¶
func (r AppSetupVerificationNewResponseVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponseVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponseVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewResponseVerificationOtherDevice ¶
type AppSetupVerificationNewResponseVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationNewResponseVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationNewResponseVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponseVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponseVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewResponseVerificationQR ¶
type AppSetupVerificationNewResponseVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationNewResponseVerificationQR) RawJSON ¶
func (r AppSetupVerificationNewResponseVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponseVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponseVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationNewResponseVerificationSAS ¶
type AppSetupVerificationNewResponseVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationNewResponseVerificationSAS) RawJSON ¶
func (r AppSetupVerificationNewResponseVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationNewResponseVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationNewResponseVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponse ¶
type AppSetupVerificationQRConfirmScannedResponse struct {
// Current app sign-in and encrypted messaging setup state.
Session AppSetupVerificationQRConfirmScannedResponseSession `json:"session" api:"required"`
// Trusted device verification progress.
Verification AppSetupVerificationQRConfirmScannedResponseVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Session respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupVerificationQRConfirmScannedResponse) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponse) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponse) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponseSession ¶
type AppSetupVerificationQRConfirmScannedResponseSession struct {
// Encrypted messaging setup status.
E2EE AppSetupVerificationQRConfirmScannedResponseSessionE2EE `json:"e2ee" api:"required"`
// Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper
// Server.
//
// Any of "needs-login", "initializing", "needs-cross-signing-setup",
// "needs-verification", "needs-secrets", "needs-first-sync", "ready".
State string `json:"state" api:"required"`
// Signed-in account details. Omitted until sign-in is complete.
Matrix AppSetupVerificationQRConfirmScannedResponseSessionMatrix `json:"matrix"`
// Trusted device verification progress.
Verification AppSetupVerificationQRConfirmScannedResponseSessionVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
E2EE respjson.Field
State respjson.Field
Matrix respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current app sign-in and encrypted messaging setup state.
func (AppSetupVerificationQRConfirmScannedResponseSession) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponseSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponseSession) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponseSession) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponseSessionE2EE ¶
type AppSetupVerificationQRConfirmScannedResponseSessionE2EE struct {
// Whether this account can verify trusted devices.
CrossSigning bool `json:"crossSigning" api:"required"`
// Whether the first encrypted message sync is complete.
FirstSyncDone bool `json:"firstSyncDone" api:"required"`
// Whether the user confirmed that they saved their recovery key.
HasBackedUpRecoveryKey bool `json:"hasBackedUpRecoveryKey" api:"required"`
// Whether encrypted messaging setup has started.
Initialized bool `json:"initialized" api:"required"`
// Whether encrypted message backup is available.
KeyBackup bool `json:"keyBackup" api:"required"`
// Encrypted messaging keys available on this device.
Secrets AppSetupVerificationQRConfirmScannedResponseSessionE2EESecrets `json:"secrets" api:"required"`
// Whether secure key storage is available.
SecretStorage bool `json:"secretStorage" api:"required"`
// Whether this device is trusted for encrypted messages.
Verified bool `json:"verified" api:"required"`
// Unix timestamp for when the recovery key was created.
RecoveryKeyGeneratedAt float64 `json:"recoveryKeyGeneratedAt"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossSigning respjson.Field
FirstSyncDone respjson.Field
HasBackedUpRecoveryKey respjson.Field
Initialized respjson.Field
KeyBackup respjson.Field
Secrets respjson.Field
SecretStorage respjson.Field
Verified respjson.Field
RecoveryKeyGeneratedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging setup status.
func (AppSetupVerificationQRConfirmScannedResponseSessionE2EE) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponseSessionE2EE) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponseSessionE2EE) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponseSessionE2EE) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponseSessionE2EESecrets ¶
type AppSetupVerificationQRConfirmScannedResponseSessionE2EESecrets struct {
// Whether the account identity key is available.
MasterKey bool `json:"masterKey" api:"required"`
// Whether the encrypted message backup key is available.
MegolmBackupKey bool `json:"megolmBackupKey" api:"required"`
// Whether a recovery key is available.
RecoveryKey bool `json:"recoveryKey" api:"required"`
// Whether the device trust key is available.
SelfSigningKey bool `json:"selfSigningKey" api:"required"`
// Whether the user trust key is available.
UserSigningKey bool `json:"userSigningKey" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MasterKey respjson.Field
MegolmBackupKey respjson.Field
RecoveryKey respjson.Field
SelfSigningKey respjson.Field
UserSigningKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging keys available on this device.
func (AppSetupVerificationQRConfirmScannedResponseSessionE2EESecrets) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponseSessionE2EESecrets) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponseSessionE2EESecrets) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponseSessionMatrix ¶
type AppSetupVerificationQRConfirmScannedResponseSessionMatrix struct {
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in account details. Omitted until sign-in is complete.
func (AppSetupVerificationQRConfirmScannedResponseSessionMatrix) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponseSessionMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponseSessionMatrix) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponseSessionMatrix) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponseSessionVerification ¶
type AppSetupVerificationQRConfirmScannedResponseSessionVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationQRConfirmScannedResponseSessionVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationQRConfirmScannedResponseSessionVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationQRConfirmScannedResponseSessionVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationQRConfirmScannedResponseSessionVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationQRConfirmScannedResponseSessionVerification) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponseSessionVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponseSessionVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponseSessionVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponseSessionVerificationError ¶
type AppSetupVerificationQRConfirmScannedResponseSessionVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationQRConfirmScannedResponseSessionVerificationError) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponseSessionVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponseSessionVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponseSessionVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponseSessionVerificationOtherDevice ¶
type AppSetupVerificationQRConfirmScannedResponseSessionVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationQRConfirmScannedResponseSessionVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponseSessionVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponseSessionVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponseSessionVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponseSessionVerificationQR ¶
type AppSetupVerificationQRConfirmScannedResponseSessionVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationQRConfirmScannedResponseSessionVerificationQR) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponseSessionVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponseSessionVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponseSessionVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponseSessionVerificationSAS ¶
type AppSetupVerificationQRConfirmScannedResponseSessionVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationQRConfirmScannedResponseSessionVerificationSAS) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponseSessionVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponseSessionVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponseSessionVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponseVerification ¶
type AppSetupVerificationQRConfirmScannedResponseVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationQRConfirmScannedResponseVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationQRConfirmScannedResponseVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationQRConfirmScannedResponseVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationQRConfirmScannedResponseVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationQRConfirmScannedResponseVerification) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponseVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponseVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponseVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponseVerificationError ¶
type AppSetupVerificationQRConfirmScannedResponseVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationQRConfirmScannedResponseVerificationError) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponseVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponseVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponseVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponseVerificationOtherDevice ¶
type AppSetupVerificationQRConfirmScannedResponseVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationQRConfirmScannedResponseVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponseVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponseVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponseVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponseVerificationQR ¶
type AppSetupVerificationQRConfirmScannedResponseVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationQRConfirmScannedResponseVerificationQR) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponseVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponseVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponseVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRConfirmScannedResponseVerificationSAS ¶
type AppSetupVerificationQRConfirmScannedResponseVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationQRConfirmScannedResponseVerificationSAS) RawJSON ¶
func (r AppSetupVerificationQRConfirmScannedResponseVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRConfirmScannedResponseVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationQRConfirmScannedResponseVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanParams ¶
type AppSetupVerificationQRScanParams struct {
// QR code payload scanned from the other device.
Data string `json:"data" api:"required"`
// contains filtered or unexported fields
}
func (AppSetupVerificationQRScanParams) MarshalJSON ¶
func (r AppSetupVerificationQRScanParams) MarshalJSON() (data []byte, err error)
func (*AppSetupVerificationQRScanParams) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanParams) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponse ¶
type AppSetupVerificationQRScanResponse struct {
// Current app sign-in and encrypted messaging setup state.
Session AppSetupVerificationQRScanResponseSession `json:"session" api:"required"`
// Trusted device verification progress.
Verification AppSetupVerificationQRScanResponseVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Session respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupVerificationQRScanResponse) RawJSON ¶
func (r AppSetupVerificationQRScanResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponse) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponse) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponseSession ¶
type AppSetupVerificationQRScanResponseSession struct {
// Encrypted messaging setup status.
E2EE AppSetupVerificationQRScanResponseSessionE2EE `json:"e2ee" api:"required"`
// Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper
// Server.
//
// Any of "needs-login", "initializing", "needs-cross-signing-setup",
// "needs-verification", "needs-secrets", "needs-first-sync", "ready".
State string `json:"state" api:"required"`
// Signed-in account details. Omitted until sign-in is complete.
Matrix AppSetupVerificationQRScanResponseSessionMatrix `json:"matrix"`
// Trusted device verification progress.
Verification AppSetupVerificationQRScanResponseSessionVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
E2EE respjson.Field
State respjson.Field
Matrix respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current app sign-in and encrypted messaging setup state.
func (AppSetupVerificationQRScanResponseSession) RawJSON ¶
func (r AppSetupVerificationQRScanResponseSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponseSession) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponseSession) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponseSessionE2EE ¶
type AppSetupVerificationQRScanResponseSessionE2EE struct {
// Whether this account can verify trusted devices.
CrossSigning bool `json:"crossSigning" api:"required"`
// Whether the first encrypted message sync is complete.
FirstSyncDone bool `json:"firstSyncDone" api:"required"`
// Whether the user confirmed that they saved their recovery key.
HasBackedUpRecoveryKey bool `json:"hasBackedUpRecoveryKey" api:"required"`
// Whether encrypted messaging setup has started.
Initialized bool `json:"initialized" api:"required"`
// Whether encrypted message backup is available.
KeyBackup bool `json:"keyBackup" api:"required"`
// Encrypted messaging keys available on this device.
Secrets AppSetupVerificationQRScanResponseSessionE2EESecrets `json:"secrets" api:"required"`
// Whether secure key storage is available.
SecretStorage bool `json:"secretStorage" api:"required"`
// Whether this device is trusted for encrypted messages.
Verified bool `json:"verified" api:"required"`
// Unix timestamp for when the recovery key was created.
RecoveryKeyGeneratedAt float64 `json:"recoveryKeyGeneratedAt"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossSigning respjson.Field
FirstSyncDone respjson.Field
HasBackedUpRecoveryKey respjson.Field
Initialized respjson.Field
KeyBackup respjson.Field
Secrets respjson.Field
SecretStorage respjson.Field
Verified respjson.Field
RecoveryKeyGeneratedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging setup status.
func (AppSetupVerificationQRScanResponseSessionE2EE) RawJSON ¶
func (r AppSetupVerificationQRScanResponseSessionE2EE) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponseSessionE2EE) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponseSessionE2EE) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponseSessionE2EESecrets ¶
type AppSetupVerificationQRScanResponseSessionE2EESecrets struct {
// Whether the account identity key is available.
MasterKey bool `json:"masterKey" api:"required"`
// Whether the encrypted message backup key is available.
MegolmBackupKey bool `json:"megolmBackupKey" api:"required"`
// Whether a recovery key is available.
RecoveryKey bool `json:"recoveryKey" api:"required"`
// Whether the device trust key is available.
SelfSigningKey bool `json:"selfSigningKey" api:"required"`
// Whether the user trust key is available.
UserSigningKey bool `json:"userSigningKey" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MasterKey respjson.Field
MegolmBackupKey respjson.Field
RecoveryKey respjson.Field
SelfSigningKey respjson.Field
UserSigningKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging keys available on this device.
func (AppSetupVerificationQRScanResponseSessionE2EESecrets) RawJSON ¶
func (r AppSetupVerificationQRScanResponseSessionE2EESecrets) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponseSessionE2EESecrets) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponseSessionMatrix ¶
type AppSetupVerificationQRScanResponseSessionMatrix struct {
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in account details. Omitted until sign-in is complete.
func (AppSetupVerificationQRScanResponseSessionMatrix) RawJSON ¶
func (r AppSetupVerificationQRScanResponseSessionMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponseSessionMatrix) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponseSessionMatrix) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponseSessionVerification ¶
type AppSetupVerificationQRScanResponseSessionVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationQRScanResponseSessionVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationQRScanResponseSessionVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationQRScanResponseSessionVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationQRScanResponseSessionVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationQRScanResponseSessionVerification) RawJSON ¶
func (r AppSetupVerificationQRScanResponseSessionVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponseSessionVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponseSessionVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponseSessionVerificationError ¶
type AppSetupVerificationQRScanResponseSessionVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationQRScanResponseSessionVerificationError) RawJSON ¶
func (r AppSetupVerificationQRScanResponseSessionVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponseSessionVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponseSessionVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponseSessionVerificationOtherDevice ¶
type AppSetupVerificationQRScanResponseSessionVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationQRScanResponseSessionVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationQRScanResponseSessionVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponseSessionVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponseSessionVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponseSessionVerificationQR ¶
type AppSetupVerificationQRScanResponseSessionVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationQRScanResponseSessionVerificationQR) RawJSON ¶
func (r AppSetupVerificationQRScanResponseSessionVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponseSessionVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponseSessionVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponseSessionVerificationSAS ¶
type AppSetupVerificationQRScanResponseSessionVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationQRScanResponseSessionVerificationSAS) RawJSON ¶
func (r AppSetupVerificationQRScanResponseSessionVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponseSessionVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponseSessionVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponseVerification ¶
type AppSetupVerificationQRScanResponseVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationQRScanResponseVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationQRScanResponseVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationQRScanResponseVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationQRScanResponseVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationQRScanResponseVerification) RawJSON ¶
func (r AppSetupVerificationQRScanResponseVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponseVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponseVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponseVerificationError ¶
type AppSetupVerificationQRScanResponseVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationQRScanResponseVerificationError) RawJSON ¶
func (r AppSetupVerificationQRScanResponseVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponseVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponseVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponseVerificationOtherDevice ¶
type AppSetupVerificationQRScanResponseVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationQRScanResponseVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationQRScanResponseVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponseVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponseVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponseVerificationQR ¶
type AppSetupVerificationQRScanResponseVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationQRScanResponseVerificationQR) RawJSON ¶
func (r AppSetupVerificationQRScanResponseVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponseVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponseVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRScanResponseVerificationSAS ¶
type AppSetupVerificationQRScanResponseVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationQRScanResponseVerificationSAS) RawJSON ¶
func (r AppSetupVerificationQRScanResponseVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationQRScanResponseVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationQRScanResponseVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationQRService ¶
type AppSetupVerificationQRService struct {
Options []option.RequestOption
}
First-party sign-in and encrypted messaging setup for Beeper Desktop and Beeper Server.
AppSetupVerificationQRService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAppSetupVerificationQRService method instead.
func NewAppSetupVerificationQRService ¶
func NewAppSetupVerificationQRService(opts ...option.RequestOption) (r AppSetupVerificationQRService)
NewAppSetupVerificationQRService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AppSetupVerificationQRService) ConfirmScanned ¶
func (r *AppSetupVerificationQRService) ConfirmScanned(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppSetupVerificationQRConfirmScannedResponse, err error)
Confirm that another device scanned this device QR code.
func (*AppSetupVerificationQRService) Scan ¶
func (r *AppSetupVerificationQRService) Scan(ctx context.Context, body AppSetupVerificationQRScanParams, opts ...option.RequestOption) (res *AppSetupVerificationQRScanResponse, err error)
Submit the QR code scanned from another signed-in device.
type AppSetupVerificationSASConfirmResponse ¶
type AppSetupVerificationSASConfirmResponse struct {
// Current app sign-in and encrypted messaging setup state.
Session AppSetupVerificationSASConfirmResponseSession `json:"session" api:"required"`
// Trusted device verification progress.
Verification AppSetupVerificationSASConfirmResponseVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Session respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupVerificationSASConfirmResponse) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponse) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponse) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASConfirmResponseSession ¶
type AppSetupVerificationSASConfirmResponseSession struct {
// Encrypted messaging setup status.
E2EE AppSetupVerificationSASConfirmResponseSessionE2EE `json:"e2ee" api:"required"`
// Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper
// Server.
//
// Any of "needs-login", "initializing", "needs-cross-signing-setup",
// "needs-verification", "needs-secrets", "needs-first-sync", "ready".
State string `json:"state" api:"required"`
// Signed-in account details. Omitted until sign-in is complete.
Matrix AppSetupVerificationSASConfirmResponseSessionMatrix `json:"matrix"`
// Trusted device verification progress.
Verification AppSetupVerificationSASConfirmResponseSessionVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
E2EE respjson.Field
State respjson.Field
Matrix respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current app sign-in and encrypted messaging setup state.
func (AppSetupVerificationSASConfirmResponseSession) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponseSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponseSession) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponseSession) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASConfirmResponseSessionE2EE ¶
type AppSetupVerificationSASConfirmResponseSessionE2EE struct {
// Whether this account can verify trusted devices.
CrossSigning bool `json:"crossSigning" api:"required"`
// Whether the first encrypted message sync is complete.
FirstSyncDone bool `json:"firstSyncDone" api:"required"`
// Whether the user confirmed that they saved their recovery key.
HasBackedUpRecoveryKey bool `json:"hasBackedUpRecoveryKey" api:"required"`
// Whether encrypted messaging setup has started.
Initialized bool `json:"initialized" api:"required"`
// Whether encrypted message backup is available.
KeyBackup bool `json:"keyBackup" api:"required"`
// Encrypted messaging keys available on this device.
Secrets AppSetupVerificationSASConfirmResponseSessionE2EESecrets `json:"secrets" api:"required"`
// Whether secure key storage is available.
SecretStorage bool `json:"secretStorage" api:"required"`
// Whether this device is trusted for encrypted messages.
Verified bool `json:"verified" api:"required"`
// Unix timestamp for when the recovery key was created.
RecoveryKeyGeneratedAt float64 `json:"recoveryKeyGeneratedAt"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossSigning respjson.Field
FirstSyncDone respjson.Field
HasBackedUpRecoveryKey respjson.Field
Initialized respjson.Field
KeyBackup respjson.Field
Secrets respjson.Field
SecretStorage respjson.Field
Verified respjson.Field
RecoveryKeyGeneratedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging setup status.
func (AppSetupVerificationSASConfirmResponseSessionE2EE) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponseSessionE2EE) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponseSessionE2EE) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponseSessionE2EE) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASConfirmResponseSessionE2EESecrets ¶
type AppSetupVerificationSASConfirmResponseSessionE2EESecrets struct {
// Whether the account identity key is available.
MasterKey bool `json:"masterKey" api:"required"`
// Whether the encrypted message backup key is available.
MegolmBackupKey bool `json:"megolmBackupKey" api:"required"`
// Whether a recovery key is available.
RecoveryKey bool `json:"recoveryKey" api:"required"`
// Whether the device trust key is available.
SelfSigningKey bool `json:"selfSigningKey" api:"required"`
// Whether the user trust key is available.
UserSigningKey bool `json:"userSigningKey" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MasterKey respjson.Field
MegolmBackupKey respjson.Field
RecoveryKey respjson.Field
SelfSigningKey respjson.Field
UserSigningKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging keys available on this device.
func (AppSetupVerificationSASConfirmResponseSessionE2EESecrets) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponseSessionE2EESecrets) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponseSessionE2EESecrets) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASConfirmResponseSessionMatrix ¶
type AppSetupVerificationSASConfirmResponseSessionMatrix struct {
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in account details. Omitted until sign-in is complete.
func (AppSetupVerificationSASConfirmResponseSessionMatrix) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponseSessionMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponseSessionMatrix) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponseSessionMatrix) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASConfirmResponseSessionVerification ¶
type AppSetupVerificationSASConfirmResponseSessionVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationSASConfirmResponseSessionVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationSASConfirmResponseSessionVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationSASConfirmResponseSessionVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationSASConfirmResponseSessionVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationSASConfirmResponseSessionVerification) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponseSessionVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponseSessionVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponseSessionVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASConfirmResponseSessionVerificationError ¶
type AppSetupVerificationSASConfirmResponseSessionVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationSASConfirmResponseSessionVerificationError) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponseSessionVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponseSessionVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponseSessionVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASConfirmResponseSessionVerificationOtherDevice ¶
type AppSetupVerificationSASConfirmResponseSessionVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationSASConfirmResponseSessionVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponseSessionVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponseSessionVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponseSessionVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASConfirmResponseSessionVerificationQR ¶
type AppSetupVerificationSASConfirmResponseSessionVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationSASConfirmResponseSessionVerificationQR) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponseSessionVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponseSessionVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponseSessionVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASConfirmResponseSessionVerificationSAS ¶
type AppSetupVerificationSASConfirmResponseSessionVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationSASConfirmResponseSessionVerificationSAS) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponseSessionVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponseSessionVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponseSessionVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASConfirmResponseVerification ¶
type AppSetupVerificationSASConfirmResponseVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationSASConfirmResponseVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationSASConfirmResponseVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationSASConfirmResponseVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationSASConfirmResponseVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationSASConfirmResponseVerification) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponseVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponseVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponseVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASConfirmResponseVerificationError ¶
type AppSetupVerificationSASConfirmResponseVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationSASConfirmResponseVerificationError) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponseVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponseVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponseVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASConfirmResponseVerificationOtherDevice ¶
type AppSetupVerificationSASConfirmResponseVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationSASConfirmResponseVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponseVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponseVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponseVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASConfirmResponseVerificationQR ¶
type AppSetupVerificationSASConfirmResponseVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationSASConfirmResponseVerificationQR) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponseVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponseVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponseVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASConfirmResponseVerificationSAS ¶
type AppSetupVerificationSASConfirmResponseVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationSASConfirmResponseVerificationSAS) RawJSON ¶
func (r AppSetupVerificationSASConfirmResponseVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASConfirmResponseVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationSASConfirmResponseVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASService ¶
type AppSetupVerificationSASService struct {
Options []option.RequestOption
}
First-party sign-in and encrypted messaging setup for Beeper Desktop and Beeper Server.
AppSetupVerificationSASService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAppSetupVerificationSASService method instead.
func NewAppSetupVerificationSASService ¶
func NewAppSetupVerificationSASService(opts ...option.RequestOption) (r AppSetupVerificationSASService)
NewAppSetupVerificationSASService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AppSetupVerificationSASService) Confirm ¶
func (r *AppSetupVerificationSASService) Confirm(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppSetupVerificationSASConfirmResponse, err error)
Confirm that the emoji or number sequence matches on both devices.
func (*AppSetupVerificationSASService) Start ¶
func (r *AppSetupVerificationSASService) Start(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppSetupVerificationSASStartResponse, err error)
Start emoji comparison for device verification.
type AppSetupVerificationSASStartResponse ¶
type AppSetupVerificationSASStartResponse struct {
// Current app sign-in and encrypted messaging setup state.
Session AppSetupVerificationSASStartResponseSession `json:"session" api:"required"`
// Trusted device verification progress.
Verification AppSetupVerificationSASStartResponseVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Session respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AppSetupVerificationSASStartResponse) RawJSON ¶
func (r AppSetupVerificationSASStartResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponse) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponse) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASStartResponseSession ¶
type AppSetupVerificationSASStartResponseSession struct {
// Encrypted messaging setup status.
E2EE AppSetupVerificationSASStartResponseSessionE2EE `json:"e2ee" api:"required"`
// Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper
// Server.
//
// Any of "needs-login", "initializing", "needs-cross-signing-setup",
// "needs-verification", "needs-secrets", "needs-first-sync", "ready".
State string `json:"state" api:"required"`
// Signed-in account details. Omitted until sign-in is complete.
Matrix AppSetupVerificationSASStartResponseSessionMatrix `json:"matrix"`
// Trusted device verification progress.
Verification AppSetupVerificationSASStartResponseSessionVerification `json:"verification"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
E2EE respjson.Field
State respjson.Field
Matrix respjson.Field
Verification respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current app sign-in and encrypted messaging setup state.
func (AppSetupVerificationSASStartResponseSession) RawJSON ¶
func (r AppSetupVerificationSASStartResponseSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponseSession) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponseSession) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASStartResponseSessionE2EE ¶
type AppSetupVerificationSASStartResponseSessionE2EE struct {
// Whether this account can verify trusted devices.
CrossSigning bool `json:"crossSigning" api:"required"`
// Whether the first encrypted message sync is complete.
FirstSyncDone bool `json:"firstSyncDone" api:"required"`
// Whether the user confirmed that they saved their recovery key.
HasBackedUpRecoveryKey bool `json:"hasBackedUpRecoveryKey" api:"required"`
// Whether encrypted messaging setup has started.
Initialized bool `json:"initialized" api:"required"`
// Whether encrypted message backup is available.
KeyBackup bool `json:"keyBackup" api:"required"`
// Encrypted messaging keys available on this device.
Secrets AppSetupVerificationSASStartResponseSessionE2EESecrets `json:"secrets" api:"required"`
// Whether secure key storage is available.
SecretStorage bool `json:"secretStorage" api:"required"`
// Whether this device is trusted for encrypted messages.
Verified bool `json:"verified" api:"required"`
// Unix timestamp for when the recovery key was created.
RecoveryKeyGeneratedAt float64 `json:"recoveryKeyGeneratedAt"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossSigning respjson.Field
FirstSyncDone respjson.Field
HasBackedUpRecoveryKey respjson.Field
Initialized respjson.Field
KeyBackup respjson.Field
Secrets respjson.Field
SecretStorage respjson.Field
Verified respjson.Field
RecoveryKeyGeneratedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging setup status.
func (AppSetupVerificationSASStartResponseSessionE2EE) RawJSON ¶
func (r AppSetupVerificationSASStartResponseSessionE2EE) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponseSessionE2EE) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponseSessionE2EE) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASStartResponseSessionE2EESecrets ¶
type AppSetupVerificationSASStartResponseSessionE2EESecrets struct {
// Whether the account identity key is available.
MasterKey bool `json:"masterKey" api:"required"`
// Whether the encrypted message backup key is available.
MegolmBackupKey bool `json:"megolmBackupKey" api:"required"`
// Whether a recovery key is available.
RecoveryKey bool `json:"recoveryKey" api:"required"`
// Whether the device trust key is available.
SelfSigningKey bool `json:"selfSigningKey" api:"required"`
// Whether the user trust key is available.
UserSigningKey bool `json:"userSigningKey" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MasterKey respjson.Field
MegolmBackupKey respjson.Field
RecoveryKey respjson.Field
SelfSigningKey respjson.Field
UserSigningKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Encrypted messaging keys available on this device.
func (AppSetupVerificationSASStartResponseSessionE2EESecrets) RawJSON ¶
func (r AppSetupVerificationSASStartResponseSessionE2EESecrets) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponseSessionE2EESecrets) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASStartResponseSessionMatrix ¶
type AppSetupVerificationSASStartResponseSessionMatrix struct {
// Current device ID.
DeviceID string `json:"deviceID" api:"required"`
// Beeper homeserver URL for this account.
Homeserver string `json:"homeserver" api:"required"`
// Signed-in Beeper user ID.
UserID string `json:"userID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeviceID respjson.Field
Homeserver respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in account details. Omitted until sign-in is complete.
func (AppSetupVerificationSASStartResponseSessionMatrix) RawJSON ¶
func (r AppSetupVerificationSASStartResponseSessionMatrix) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponseSessionMatrix) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponseSessionMatrix) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASStartResponseSessionVerification ¶
type AppSetupVerificationSASStartResponseSessionVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationSASStartResponseSessionVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationSASStartResponseSessionVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationSASStartResponseSessionVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationSASStartResponseSessionVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationSASStartResponseSessionVerification) RawJSON ¶
func (r AppSetupVerificationSASStartResponseSessionVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponseSessionVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponseSessionVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASStartResponseSessionVerificationError ¶
type AppSetupVerificationSASStartResponseSessionVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationSASStartResponseSessionVerificationError) RawJSON ¶
func (r AppSetupVerificationSASStartResponseSessionVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponseSessionVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponseSessionVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASStartResponseSessionVerificationOtherDevice ¶
type AppSetupVerificationSASStartResponseSessionVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationSASStartResponseSessionVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationSASStartResponseSessionVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponseSessionVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponseSessionVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASStartResponseSessionVerificationQR ¶
type AppSetupVerificationSASStartResponseSessionVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationSASStartResponseSessionVerificationQR) RawJSON ¶
func (r AppSetupVerificationSASStartResponseSessionVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponseSessionVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponseSessionVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASStartResponseSessionVerificationSAS ¶
type AppSetupVerificationSASStartResponseSessionVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationSASStartResponseSessionVerificationSAS) RawJSON ¶
func (r AppSetupVerificationSASStartResponseSessionVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponseSessionVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponseSessionVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASStartResponseVerification ¶
type AppSetupVerificationSASStartResponseVerification struct {
// Verification ID to pass in verification action paths.
ID string `json:"id" api:"required"`
// Verification actions that are valid for the current state.
//
// Any of "accept", "cancel", "qr.confirmScanned", "sas.start", "sas.confirm".
AvailableActions []string `json:"availableActions" api:"required"`
// Whether this device started or received the verification.
//
// Any of "incoming", "outgoing".
Direction string `json:"direction" api:"required"`
// Verification methods supported for this transaction.
//
// Any of "qr", "sas".
Methods []string `json:"methods" api:"required"`
// Why this verification exists.
//
// Any of "login", "device".
Purpose string `json:"purpose" api:"required"`
// Current trusted-device verification state.
//
// Any of "requested", "ready", "sas_ready", "qr_scanned", "done", "cancelled",
// "error".
State string `json:"state" api:"required"`
// Verification error details, if verification stopped.
Error AppSetupVerificationSASStartResponseVerificationError `json:"error"`
// Other device participating in verification.
OtherDevice AppSetupVerificationSASStartResponseVerificationOtherDevice `json:"otherDevice"`
// Other Beeper user participating in verification.
OtherUserID string `json:"otherUserID"`
// QR verification data.
QR AppSetupVerificationSASStartResponseVerificationQR `json:"qr"`
// Emoji or number comparison data for verification.
SAS AppSetupVerificationSASStartResponseVerificationSAS `json:"sas"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvailableActions respjson.Field
Direction respjson.Field
Methods respjson.Field
Purpose respjson.Field
State respjson.Field
Error respjson.Field
OtherDevice respjson.Field
OtherUserID respjson.Field
QR respjson.Field
SAS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trusted device verification progress.
func (AppSetupVerificationSASStartResponseVerification) RawJSON ¶
func (r AppSetupVerificationSASStartResponseVerification) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponseVerification) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponseVerification) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASStartResponseVerificationError ¶
type AppSetupVerificationSASStartResponseVerificationError struct {
// Verification error code.
Code string `json:"code" api:"required"`
// User-facing verification error message.
Reason string `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Verification error details, if verification stopped.
func (AppSetupVerificationSASStartResponseVerificationError) RawJSON ¶
func (r AppSetupVerificationSASStartResponseVerificationError) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponseVerificationError) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponseVerificationError) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASStartResponseVerificationOtherDevice ¶
type AppSetupVerificationSASStartResponseVerificationOtherDevice struct {
// Other device ID.
ID string `json:"id" api:"required"`
// Other device display name, if known.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Other device participating in verification.
func (AppSetupVerificationSASStartResponseVerificationOtherDevice) RawJSON ¶
func (r AppSetupVerificationSASStartResponseVerificationOtherDevice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponseVerificationOtherDevice) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponseVerificationOtherDevice) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASStartResponseVerificationQR ¶
type AppSetupVerificationSASStartResponseVerificationQR struct {
// QR code payload to display for verification.
Data string `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QR verification data.
func (AppSetupVerificationSASStartResponseVerificationQR) RawJSON ¶
func (r AppSetupVerificationSASStartResponseVerificationQR) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponseVerificationQR) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponseVerificationQR) UnmarshalJSON(data []byte) error
type AppSetupVerificationSASStartResponseVerificationSAS ¶
type AppSetupVerificationSASStartResponseVerificationSAS struct {
// Emoji sequence to compare on both devices.
Emojis string `json:"emojis" api:"required"`
// Number sequence to compare on both devices.
Decimals string `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Emojis respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Emoji or number comparison data for verification.
func (AppSetupVerificationSASStartResponseVerificationSAS) RawJSON ¶
func (r AppSetupVerificationSASStartResponseVerificationSAS) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppSetupVerificationSASStartResponseVerificationSAS) UnmarshalJSON ¶
func (r *AppSetupVerificationSASStartResponseVerificationSAS) UnmarshalJSON(data []byte) error
type AppSetupVerificationService ¶
type AppSetupVerificationService struct {
Options []option.RequestOption
// First-party sign-in and encrypted messaging setup for Beeper Desktop and Beeper
// Server.
QR AppSetupVerificationQRService
// First-party sign-in and encrypted messaging setup for Beeper Desktop and Beeper
// Server.
SAS AppSetupVerificationSASService
}
Manage device verification transactions
AppSetupVerificationService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAppSetupVerificationService method instead.
func NewAppSetupVerificationService ¶
func NewAppSetupVerificationService(opts ...option.RequestOption) (r AppSetupVerificationService)
NewAppSetupVerificationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AppSetupVerificationService) Accept ¶
func (r *AppSetupVerificationService) Accept(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppSetupVerificationAcceptResponse, err error)
Accept an incoming device verification request.
func (*AppSetupVerificationService) Cancel ¶
func (r *AppSetupVerificationService) Cancel(ctx context.Context, verificationID string, body AppSetupVerificationCancelParams, opts ...option.RequestOption) (res *AppSetupVerificationCancelResponse, err error)
Cancel an active device verification request.
func (*AppSetupVerificationService) Get ¶
func (r *AppSetupVerificationService) Get(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppSetupVerificationGetResponse, err error)
Get the current state of a device verification transaction.
func (*AppSetupVerificationService) List ¶
func (r *AppSetupVerificationService) List(ctx context.Context, opts ...option.RequestOption) (res *AppSetupVerificationListResponse, err error)
List pending and active device verifications. Use this to recover state without a WebSocket connection.
func (*AppSetupVerificationService) New ¶
func (r *AppSetupVerificationService) New(ctx context.Context, body AppSetupVerificationNewParams, opts ...option.RequestOption) (res *AppSetupVerificationNewResponse, err error)
Start verifying this device from another signed-in device.
type AssetDownloadParams ¶
type AssetDownloadParams struct {
// Beeper media URL (mxc:// or localmxc://) for the file to download.
URL string `json:"url" api:"required"`
// contains filtered or unexported fields
}
func (AssetDownloadParams) MarshalJSON ¶
func (r AssetDownloadParams) MarshalJSON() (data []byte, err error)
func (*AssetDownloadParams) UnmarshalJSON ¶
func (r *AssetDownloadParams) UnmarshalJSON(data []byte) error
type AssetDownloadResponse ¶
type AssetDownloadResponse struct {
// Error message if the download failed.
Error string `json:"error"`
// Local file URL to the downloaded file.
SrcURL string `json:"srcURL"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Error respjson.Field
SrcURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AssetDownloadResponse) RawJSON ¶
func (r AssetDownloadResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AssetDownloadResponse) UnmarshalJSON ¶
func (r *AssetDownloadResponse) UnmarshalJSON(data []byte) error
type AssetServeParams ¶
type AssetServeParams struct {
// File URL to serve. Accepts mxc://, localmxc://, or file:// URLs.
URL string `query:"url" api:"required" json:"-"`
// contains filtered or unexported fields
}
func (AssetServeParams) URLQuery ¶
func (r AssetServeParams) URLQuery() (v url.Values, err error)
URLQuery serializes AssetServeParams's query parameters as `url.Values`.
type AssetService ¶
type AssetService struct {
Options []option.RequestOption
}
Manage files for message attachments
AssetService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAssetService method instead.
func NewAssetService ¶
func NewAssetService(opts ...option.RequestOption) (r AssetService)
NewAssetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AssetService) Download ¶
func (r *AssetService) Download(ctx context.Context, body AssetDownloadParams, opts ...option.RequestOption) (res *AssetDownloadResponse, err error)
Download a file from an mxc:// or localmxc:// URL to the device running the Beeper Client API and return the local file URL.
func (*AssetService) Serve ¶
func (r *AssetService) Serve(ctx context.Context, query AssetServeParams, opts ...option.RequestOption) (res *http.Response, err error)
Stream a file given an mxc://, localmxc://, or file:// URL. Downloads first if not cached. Supports Range requests for seeking in large files.
func (*AssetService) Upload ¶
func (r *AssetService) Upload(ctx context.Context, body AssetUploadParams, opts ...option.RequestOption) (res *AssetUploadResponse, err error)
Upload a file to a temporary location using multipart/form-data. Returns an uploadID that can be referenced when sending a message or creating a draft attachment.
func (*AssetService) UploadBase64 ¶
func (r *AssetService) UploadBase64(ctx context.Context, body AssetUploadBase64Params, opts ...option.RequestOption) (res *AssetUploadBase64Response, err error)
Upload a file using a JSON body with base64-encoded content. Returns an uploadID that can be referenced when sending a message or creating a draft attachment. Alternative to the multipart upload endpoint.
type AssetUploadBase64Params ¶
type AssetUploadBase64Params struct {
// Base64-encoded file content (max ~500MB decoded)
Content string `json:"content" api:"required"`
// Original filename. Generated if omitted
FileName param.Opt[string] `json:"fileName,omitzero"`
// MIME type. Auto-detected from magic bytes if omitted
MimeType param.Opt[string] `json:"mimeType,omitzero"`
// contains filtered or unexported fields
}
func (AssetUploadBase64Params) MarshalJSON ¶
func (r AssetUploadBase64Params) MarshalJSON() (data []byte, err error)
func (*AssetUploadBase64Params) UnmarshalJSON ¶
func (r *AssetUploadBase64Params) UnmarshalJSON(data []byte) error
type AssetUploadBase64Response ¶
type AssetUploadBase64Response struct {
// Duration in seconds (audio/videos)
Duration float64 `json:"duration"`
// Error message if upload failed
Error string `json:"error"`
// Resolved filename
FileName string `json:"fileName"`
// File size in bytes
FileSize float64 `json:"fileSize"`
// Height in pixels (images/videos)
Height float64 `json:"height"`
// Detected or provided MIME type
MimeType string `json:"mimeType"`
// Local file URL (file://) for the uploaded file
SrcURL string `json:"srcURL"`
// Unique upload ID for this temporary file
UploadID string `json:"uploadID"`
// Width in pixels (images/videos)
Width float64 `json:"width"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Duration respjson.Field
Error respjson.Field
FileName respjson.Field
FileSize respjson.Field
Height respjson.Field
MimeType respjson.Field
SrcURL respjson.Field
UploadID respjson.Field
Width respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AssetUploadBase64Response) RawJSON ¶
func (r AssetUploadBase64Response) RawJSON() string
Returns the unmodified JSON received from the API
func (*AssetUploadBase64Response) UnmarshalJSON ¶
func (r *AssetUploadBase64Response) UnmarshalJSON(data []byte) error
type AssetUploadParams ¶
type AssetUploadParams struct {
// The file to upload (max 500 MB).
File io.Reader `json:"file,omitzero" api:"required" format:"binary"`
// Original filename. Defaults to the uploaded file name if omitted
FileName param.Opt[string] `json:"fileName,omitzero"`
// MIME type. Auto-detected from magic bytes if omitted
MimeType param.Opt[string] `json:"mimeType,omitzero"`
// contains filtered or unexported fields
}
func (AssetUploadParams) MarshalMultipart ¶
func (r AssetUploadParams) MarshalMultipart() (data []byte, contentType string, err error)
type AssetUploadResponse ¶
type AssetUploadResponse struct {
// Duration in seconds (audio/videos)
Duration float64 `json:"duration"`
// Error message if upload failed
Error string `json:"error"`
// Resolved filename
FileName string `json:"fileName"`
// File size in bytes
FileSize float64 `json:"fileSize"`
// Height in pixels (images/videos)
Height float64 `json:"height"`
// Detected or provided MIME type
MimeType string `json:"mimeType"`
// Local file URL (file://) for the uploaded file
SrcURL string `json:"srcURL"`
// Unique upload ID for this temporary file
UploadID string `json:"uploadID"`
// Width in pixels (images/videos)
Width float64 `json:"width"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Duration respjson.Field
Error respjson.Field
FileName respjson.Field
FileSize respjson.Field
Height respjson.Field
MimeType respjson.Field
SrcURL respjson.Field
UploadID respjson.Field
Width respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AssetUploadResponse) RawJSON ¶
func (r AssetUploadResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AssetUploadResponse) UnmarshalJSON ¶
func (r *AssetUploadResponse) UnmarshalJSON(data []byte) error
type AttachmentCapabilities ¶
type AttachmentCapabilities = shared.AttachmentCapabilities
Capabilities for one attachment message type.
This is an alias to an internal type.
type AttachmentSize ¶
type AttachmentSize = shared.AttachmentSize
Pixel dimensions of the attachment: width/height in px.
This is an alias to an internal type.
type AttachmentTranscription ¶
type AttachmentTranscription = shared.AttachmentTranscription
Attachment transcription if available.
This is an alias to an internal type.
type AttachmentType ¶
type AttachmentType = shared.AttachmentType
Attachment type.
This is an alias to an internal type.
type Bridge ¶
type Bridge struct {
// Bridge ID. Use with bridge endpoints.
ID string `json:"id" api:"required"`
// Connected accounts for this bridge. Uses the same Account schema as GET
// /v1/accounts.
Accounts []Account `json:"accounts" api:"required"`
// Number of active accounts for this network on this device.
ActiveAccountCount int64 `json:"activeAccountCount" api:"required"`
// Human-friendly bridge name shown in Beeper.
DisplayName string `json:"displayName" api:"required"`
// Where accounts for this bridge run: on this device or in Beeper Cloud.
//
// Any of "cloud", "self-hosted", "local", "platform-sdk".
Provider BridgeProvider `json:"provider" api:"required"`
// Whether this bridge can currently be used to connect new accounts.
//
// Any of "available", "connected", "limit_reached", "temporarily_unavailable",
// "disabled".
Status BridgeStatus `json:"status" api:"required"`
// Whether this bridge can have multiple active accounts for the same network.
SupportsMultipleAccounts bool `json:"supportsMultipleAccounts" api:"required"`
// Underlying bridge type, such as matrix, discordgo, slackgo, whatsapp, telegram,
// or twitter.
Type string `json:"type" api:"required"`
// Network grouping used for account counts and limits.
Network string `json:"network"`
// Human-friendly status text matching Beeper account management language.
StatusText string `json:"statusText"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Accounts respjson.Field
ActiveAccountCount respjson.Field
DisplayName respjson.Field
Provider respjson.Field
Status respjson.Field
SupportsMultipleAccounts respjson.Field
Type respjson.Field
Network respjson.Field
StatusText respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Available bridge that can connect or reconnect chat accounts.
func (*Bridge) UnmarshalJSON ¶
type BridgeGetResponse ¶
type BridgeGetResponse struct {
// Bridge ID. Use with bridge endpoints.
ID string `json:"id" api:"required"`
// Connected accounts for this bridge. Uses the same Account schema as GET
// /v1/accounts.
Accounts []Account `json:"accounts" api:"required"`
// Number of active accounts for this network on this device.
ActiveAccountCount int64 `json:"activeAccountCount" api:"required"`
// Human-friendly bridge name shown in Beeper.
DisplayName string `json:"displayName" api:"required"`
// Where accounts for this bridge run: on this device or in Beeper Cloud.
//
// Any of "cloud", "self-hosted", "local", "platform-sdk".
Provider BridgeGetResponseProvider `json:"provider" api:"required"`
// Whether this bridge can currently be used to connect new accounts.
//
// Any of "available", "connected", "limit_reached", "temporarily_unavailable",
// "disabled".
Status BridgeGetResponseStatus `json:"status" api:"required"`
// Whether this bridge can have multiple active accounts for the same network.
SupportsMultipleAccounts bool `json:"supportsMultipleAccounts" api:"required"`
// Underlying bridge type, such as matrix, discordgo, slackgo, whatsapp, telegram,
// or twitter.
Type string `json:"type" api:"required"`
// Network grouping used for account counts and limits.
Network string `json:"network"`
// Human-friendly status text matching Beeper account management language.
StatusText string `json:"statusText"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Accounts respjson.Field
ActiveAccountCount respjson.Field
DisplayName respjson.Field
Provider respjson.Field
Status respjson.Field
SupportsMultipleAccounts respjson.Field
Type respjson.Field
Network respjson.Field
StatusText respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Available bridge that can connect or reconnect chat accounts.
func (BridgeGetResponse) RawJSON ¶
func (r BridgeGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeGetResponse) UnmarshalJSON ¶
func (r *BridgeGetResponse) UnmarshalJSON(data []byte) error
type BridgeGetResponseProvider ¶
type BridgeGetResponseProvider string
Where accounts for this bridge run: on this device or in Beeper Cloud.
const ( BridgeGetResponseProviderCloud BridgeGetResponseProvider = "cloud" BridgeGetResponseProviderSelfHosted BridgeGetResponseProvider = "self-hosted" BridgeGetResponseProviderLocal BridgeGetResponseProvider = "local" BridgeGetResponseProviderPlatformSDK BridgeGetResponseProvider = "platform-sdk" )
type BridgeGetResponseStatus ¶
type BridgeGetResponseStatus string
Whether this bridge can currently be used to connect new accounts.
const ( BridgeGetResponseStatusAvailable BridgeGetResponseStatus = "available" BridgeGetResponseStatusConnected BridgeGetResponseStatus = "connected" BridgeGetResponseStatusLimitReached BridgeGetResponseStatus = "limit_reached" BridgeGetResponseStatusDisabled BridgeGetResponseStatus = "disabled" )
type BridgeListResponse ¶
type BridgeListResponse struct {
Items []Bridge `json:"items" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Available bridges and their connected accounts.
func (BridgeListResponse) RawJSON ¶
func (r BridgeListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeListResponse) UnmarshalJSON ¶
func (r *BridgeListResponse) UnmarshalJSON(data []byte) error
type BridgeLogin ¶
type BridgeLogin struct {
// Bridge ID.
BridgeID string `json:"bridgeID" api:"required"`
// Bridge login ID.
LoginID string `json:"loginID" api:"required"`
// Any of "current-device", "all-devices".
RemoveScopes []string `json:"removeScopes" api:"required"`
// Any of "connected", "connecting", "needs_login", "logged_out", "unknown".
Status BridgeLoginStatus `json:"status" api:"required"`
// Chat accounts that belong to this bridge login, when known.
AccountIDs []string `json:"accountIDs"`
// Human-friendly bridge login status text.
StatusText string `json:"statusText"`
// User the account belongs to.
User shared.User `json:"user"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BridgeID respjson.Field
LoginID respjson.Field
RemoveScopes respjson.Field
Status respjson.Field
AccountIDs respjson.Field
StatusText respjson.Field
User respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signed-in identity for a bridge. One bridge login can contain multiple chat accounts.
func (BridgeLogin) RawJSON ¶
func (r BridgeLogin) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeLogin) UnmarshalJSON ¶
func (r *BridgeLogin) UnmarshalJSON(data []byte) error
type BridgeLoginFlowListResponse ¶
type BridgeLoginFlowListResponse struct {
Items []LoginFlow `json:"items" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BridgeLoginFlowListResponse) RawJSON ¶
func (r BridgeLoginFlowListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeLoginFlowListResponse) UnmarshalJSON ¶
func (r *BridgeLoginFlowListResponse) UnmarshalJSON(data []byte) error
type BridgeLoginFlowService ¶
type BridgeLoginFlowService struct {
Options []option.RequestOption
}
Available bridges, bridge logins, login sessions for connect and reconnect flows, and advanced network capabilities.
BridgeLoginFlowService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBridgeLoginFlowService method instead.
func NewBridgeLoginFlowService ¶
func NewBridgeLoginFlowService(opts ...option.RequestOption) (r BridgeLoginFlowService)
NewBridgeLoginFlowService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BridgeLoginFlowService) List ¶
func (r *BridgeLoginFlowService) List(ctx context.Context, bridgeID string, opts ...option.RequestOption) (res *BridgeLoginFlowListResponse, err error)
List connect and reconnect flow options for a bridge. Use a flowID when creating a bridge login session.
type BridgeLoginGetParams ¶
type BridgeLoginGetParams struct {
// Bridge ID.
BridgeID string `path:"bridgeID" api:"required" json:"-"`
// contains filtered or unexported fields
}
type BridgeLoginListResponse ¶
type BridgeLoginListResponse struct {
Items []BridgeLogin `json:"items" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BridgeLoginListResponse) RawJSON ¶
func (r BridgeLoginListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeLoginListResponse) UnmarshalJSON ¶
func (r *BridgeLoginListResponse) UnmarshalJSON(data []byte) error
type BridgeLoginRemoveParams ¶
type BridgeLoginRemoveParams struct {
// Bridge ID.
BridgeID string `path:"bridgeID" api:"required" json:"-"`
// Where this bridge login should be removed.
//
// Any of "current-device", "all-devices".
Scope BridgeLoginRemoveParamsScope `json:"scope,omitzero" api:"required"`
// contains filtered or unexported fields
}
func (BridgeLoginRemoveParams) MarshalJSON ¶
func (r BridgeLoginRemoveParams) MarshalJSON() (data []byte, err error)
func (*BridgeLoginRemoveParams) UnmarshalJSON ¶
func (r *BridgeLoginRemoveParams) UnmarshalJSON(data []byte) error
type BridgeLoginRemoveParamsScope ¶
type BridgeLoginRemoveParamsScope string
Where this bridge login should be removed.
const ( BridgeLoginRemoveParamsScopeCurrentDevice BridgeLoginRemoveParamsScope = "current-device" BridgeLoginRemoveParamsScopeAllDevices BridgeLoginRemoveParamsScope = "all-devices" )
type BridgeLoginRemoveResponse ¶
type BridgeLoginRemoveResponse struct {
BridgeID string `json:"bridgeID" api:"required"`
LoginID string `json:"loginID" api:"required"`
// Where this bridge login should be removed.
//
// Any of "current-device", "all-devices".
Scope BridgeLoginRemoveResponseScope `json:"scope" api:"required"`
Status constant.Removed `json:"status" default:"removed"`
AffectedAccountIDs []string `json:"affectedAccountIDs"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BridgeID respjson.Field
LoginID respjson.Field
Scope respjson.Field
Status respjson.Field
AffectedAccountIDs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BridgeLoginRemoveResponse) RawJSON ¶
func (r BridgeLoginRemoveResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeLoginRemoveResponse) UnmarshalJSON ¶
func (r *BridgeLoginRemoveResponse) UnmarshalJSON(data []byte) error
type BridgeLoginRemoveResponseScope ¶
type BridgeLoginRemoveResponseScope string
Where this bridge login should be removed.
const ( BridgeLoginRemoveResponseScopeCurrentDevice BridgeLoginRemoveResponseScope = "current-device" BridgeLoginRemoveResponseScopeAllDevices BridgeLoginRemoveResponseScope = "all-devices" )
type BridgeLoginService ¶
type BridgeLoginService struct {
Options []option.RequestOption
}
Available bridges, bridge logins, login sessions for connect and reconnect flows, and advanced network capabilities.
BridgeLoginService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBridgeLoginService method instead.
func NewBridgeLoginService ¶
func NewBridgeLoginService(opts ...option.RequestOption) (r BridgeLoginService)
NewBridgeLoginService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BridgeLoginService) Get ¶
func (r *BridgeLoginService) Get(ctx context.Context, loginID string, query BridgeLoginGetParams, opts ...option.RequestOption) (res *BridgeLogin, err error)
Get one bridge login.
func (*BridgeLoginService) List ¶
func (r *BridgeLoginService) List(ctx context.Context, bridgeID string, opts ...option.RequestOption) (res *BridgeLoginListResponse, err error)
List bridge logins. A bridge login is a signed-in identity for a bridge and can contain one or more chat accounts.
func (*BridgeLoginService) Remove ¶
func (r *BridgeLoginService) Remove(ctx context.Context, loginID string, params BridgeLoginRemoveParams, opts ...option.RequestOption) (res *BridgeLoginRemoveResponse, err error)
Remove a bridge login from this device or, when supported by the bridge, from all devices.
type BridgeLoginSessionCancelParams ¶
type BridgeLoginSessionCancelParams struct {
// Bridge ID.
BridgeID string `path:"bridgeID" api:"required" json:"-"`
// contains filtered or unexported fields
}
type BridgeLoginSessionCancelResponse ¶
type BridgeLoginSessionCancelResponse struct {
BridgeID string `json:"bridgeID" api:"required"`
LoginSessionID string `json:"loginSessionID" api:"required"`
Status constant.Cancelled `json:"status" default:"cancelled"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BridgeID respjson.Field
LoginSessionID respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BridgeLoginSessionCancelResponse) RawJSON ¶
func (r BridgeLoginSessionCancelResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeLoginSessionCancelResponse) UnmarshalJSON ¶
func (r *BridgeLoginSessionCancelResponse) UnmarshalJSON(data []byte) error
type BridgeLoginSessionGetParams ¶
type BridgeLoginSessionGetParams struct {
// Bridge ID.
BridgeID string `path:"bridgeID" api:"required" json:"-"`
// contains filtered or unexported fields
}
type BridgeLoginSessionNewParams ¶
type BridgeLoginSessionNewParams struct {
// Existing chat account ID to reconnect. Omit to connect a new account.
AccountID param.Opt[string] `json:"accountID,omitzero"`
// Optional flow ID returned by the list login flows endpoint. If omitted, Beeper
// chooses the default flow.
FlowID param.Opt[string] `json:"flowID,omitzero"`
// Existing bridge login ID to reconnect. Omit to connect a new account.
LoginID param.Opt[string] `json:"loginID,omitzero"`
// contains filtered or unexported fields
}
func (BridgeLoginSessionNewParams) MarshalJSON ¶
func (r BridgeLoginSessionNewParams) MarshalJSON() (data []byte, err error)
func (*BridgeLoginSessionNewParams) UnmarshalJSON ¶
func (r *BridgeLoginSessionNewParams) UnmarshalJSON(data []byte) error
type BridgeLoginSessionService ¶
type BridgeLoginSessionService struct {
Options []option.RequestOption
// Available bridges, bridge logins, login sessions for connect and reconnect
// flows, and advanced network capabilities.
Steps BridgeLoginSessionStepService
}
Available bridges, bridge logins, login sessions for connect and reconnect flows, and advanced network capabilities.
BridgeLoginSessionService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBridgeLoginSessionService method instead.
func NewBridgeLoginSessionService ¶
func NewBridgeLoginSessionService(opts ...option.RequestOption) (r BridgeLoginSessionService)
NewBridgeLoginSessionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BridgeLoginSessionService) Cancel ¶
func (r *BridgeLoginSessionService) Cancel(ctx context.Context, loginSessionID string, body BridgeLoginSessionCancelParams, opts ...option.RequestOption) (res *BridgeLoginSessionCancelResponse, err error)
Cancel a temporary bridge login session.
func (*BridgeLoginSessionService) Get ¶
func (r *BridgeLoginSessionService) Get(ctx context.Context, loginSessionID string, query BridgeLoginSessionGetParams, opts ...option.RequestOption) (res *LoginSession, err error)
Get the current state of a temporary bridge login session.
func (*BridgeLoginSessionService) New ¶
func (r *BridgeLoginSessionService) New(ctx context.Context, bridgeID string, body BridgeLoginSessionNewParams, opts ...option.RequestOption) (res *LoginSession, err error)
Start a temporary bridge login session to connect a new chat account or reconnect an existing bridge login. Omit loginID and accountID to connect a new account.
type BridgeLoginSessionStepService ¶
type BridgeLoginSessionStepService struct {
Options []option.RequestOption
}
Available bridges, bridge logins, login sessions for connect and reconnect flows, and advanced network capabilities.
BridgeLoginSessionStepService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBridgeLoginSessionStepService method instead.
func NewBridgeLoginSessionStepService ¶
func NewBridgeLoginSessionStepService(opts ...option.RequestOption) (r BridgeLoginSessionStepService)
NewBridgeLoginSessionStepService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BridgeLoginSessionStepService) Submit ¶
func (r *BridgeLoginSessionStepService) Submit(ctx context.Context, stepID string, params BridgeLoginSessionStepSubmitParams, opts ...option.RequestOption) (res *LoginSession, err error)
Submit input for the current step of a bridge login session.
type BridgeLoginSessionStepSubmitParams ¶
type BridgeLoginSessionStepSubmitParams struct {
// Bridge ID.
BridgeID string `path:"bridgeID" api:"required" json:"-"`
// Temporary bridge login session ID.
LoginSessionID string `path:"loginSessionID" api:"required" json:"-"`
// Any of "user_input", "cookies", "display_and_wait".
Type BridgeLoginSessionStepSubmitParamsType `json:"type,omitzero" api:"required"`
// Last browser URL reached during a cookies step, if available.
LastURL param.Opt[string] `json:"lastURL,omitzero"`
// Field values keyed by the field IDs from the current step.
Fields map[string]string `json:"fields,omitzero"`
// How the step was completed. Omit unless the client needs to distinguish an
// embedded webview or browser extension.
//
// Any of "api", "webview", "browser_extension".
Source BridgeLoginSessionStepSubmitParamsSource `json:"source,omitzero"`
// contains filtered or unexported fields
}
func (BridgeLoginSessionStepSubmitParams) MarshalJSON ¶
func (r BridgeLoginSessionStepSubmitParams) MarshalJSON() (data []byte, err error)
func (*BridgeLoginSessionStepSubmitParams) UnmarshalJSON ¶
func (r *BridgeLoginSessionStepSubmitParams) UnmarshalJSON(data []byte) error
type BridgeLoginSessionStepSubmitParamsSource ¶
type BridgeLoginSessionStepSubmitParamsSource string
How the step was completed. Omit unless the client needs to distinguish an embedded webview or browser extension.
const ( BridgeLoginSessionStepSubmitParamsSourceAPI BridgeLoginSessionStepSubmitParamsSource = "api" BridgeLoginSessionStepSubmitParamsSourceWebview BridgeLoginSessionStepSubmitParamsSource = "webview" BridgeLoginSessionStepSubmitParamsSourceBrowserExtension BridgeLoginSessionStepSubmitParamsSource = "browser_extension" )
type BridgeLoginSessionStepSubmitParamsType ¶
type BridgeLoginSessionStepSubmitParamsType string
const ( BridgeLoginSessionStepSubmitParamsTypeUserInput BridgeLoginSessionStepSubmitParamsType = "user_input" BridgeLoginSessionStepSubmitParamsTypeCookies BridgeLoginSessionStepSubmitParamsType = "cookies" BridgeLoginSessionStepSubmitParamsTypeDisplayAndWait BridgeLoginSessionStepSubmitParamsType = "display_and_wait" )
type BridgeLoginStatus ¶
type BridgeLoginStatus string
const ( BridgeLoginStatusConnected BridgeLoginStatus = "connected" BridgeLoginStatusConnecting BridgeLoginStatus = "connecting" BridgeLoginStatusNeedsLogin BridgeLoginStatus = "needs_login" BridgeLoginStatusLoggedOut BridgeLoginStatus = "logged_out" BridgeLoginStatusUnknown BridgeLoginStatus = "unknown" )
type BridgeProvider ¶
type BridgeProvider string
Where accounts for this bridge run: on this device or in Beeper Cloud.
const ( BridgeProviderCloud BridgeProvider = "cloud" BridgeProviderSelfHosted BridgeProvider = "self-hosted" BridgeProviderLocal BridgeProvider = "local" BridgeProviderPlatformSDK BridgeProvider = "platform-sdk" )
type BridgeService ¶
type BridgeService struct {
Options []option.RequestOption
// Available bridges, bridge logins, login sessions for connect and reconnect
// flows, and advanced network capabilities.
LoginFlows BridgeLoginFlowService
// Available bridges, bridge logins, login sessions for connect and reconnect
// flows, and advanced network capabilities.
Logins BridgeLoginService
// Available bridges, bridge logins, login sessions for connect and reconnect
// flows, and advanced network capabilities.
LoginSessions BridgeLoginSessionService
}
Manage available bridges, connect or reconnect chat accounts
BridgeService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBridgeService method instead.
func NewBridgeService ¶
func NewBridgeService(opts ...option.RequestOption) (r BridgeService)
NewBridgeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BridgeService) Get ¶
func (r *BridgeService) Get(ctx context.Context, bridgeID string, opts ...option.RequestOption) (res *BridgeGetResponse, err error)
Get one bridge, including the chat accounts connected through it.
func (*BridgeService) GetCapabilities ¶
func (r *BridgeService) GetCapabilities(ctx context.Context, bridgeID string, opts ...option.RequestOption) (res *ProvisioningCapabilities, err error)
Get advanced network capabilities for a bridge. This endpoint is intended for clients that build custom connect or chat-creation flows.
func (*BridgeService) List ¶
func (r *BridgeService) List(ctx context.Context, opts ...option.RequestOption) (res *BridgeListResponse, err error)
List available bridges. A bridge is a chat-network connector that can connect or reconnect chat accounts. Connected accounts use the same Account schema as GET /v1/accounts.
type BridgeStatus ¶
type BridgeStatus string
Whether this bridge can currently be used to connect new accounts.
const ( BridgeStatusAvailable BridgeStatus = "available" BridgeStatusConnected BridgeStatus = "connected" BridgeStatusLimitReached BridgeStatus = "limit_reached" BridgeStatusDisabled BridgeStatus = "disabled" )
type Chat ¶
type Chat struct {
// Unique identifier of the chat across Beeper.
ID string `json:"id" api:"required"`
// Account ID this chat belongs to.
AccountID string `json:"accountID" api:"required"`
// Display-only human-readable account/network name.
Network string `json:"network" api:"required"`
// Chat participants information.
Participants ChatParticipants `json:"participants" api:"required"`
// Display title of the chat as computed by the client/server.
Title string `json:"title" api:"required"`
// Chat type: 'single' for direct messages, 'group' for group chats.
//
// Any of "single", "group".
Type ChatType `json:"type" api:"required"`
// Number of unread messages.
UnreadCount int64 `json:"unreadCount" api:"required"`
// Chat capabilities reported by the platform.
Capabilities shared.ChatCapabilities `json:"capabilities"`
// Group chat description/topic when available.
Description string `json:"description" api:"nullable"`
// Current draft object for this chat, or null when no draft is set.
Draft shared.ChatDraft `json:"draft" api:"nullable"`
// Local filesystem path to the chat avatar image when available.
ImgURL string `json:"imgURL" api:"nullable"`
// True if chat is archived.
IsArchived bool `json:"isArchived"`
// True if chat is marked low priority.
IsLowPriority bool `json:"isLowPriority"`
// True if the chat was explicitly marked unread by the authenticated user.
IsMarkedUnread bool `json:"isMarkedUnread"`
// True if chat notifications are muted.
IsMuted bool `json:"isMuted"`
// True if chat is pinned.
IsPinned bool `json:"isPinned"`
// True if messages cannot be sent in this chat.
IsReadOnly bool `json:"isReadOnly"`
// Labels applied to this chat. Absent when the chat has none, or when labels are
// not enabled for this user.
Labels []Label `json:"labels"`
// Timestamp of last activity.
LastActivity time.Time `json:"lastActivity" format:"date-time"`
// Last read message sortKey.
LastReadMessageSortKey string `json:"lastReadMessageSortKey"`
// Local chat ID specific to this installation.
LocalChatID string `json:"localChatID" api:"nullable"`
// Present when this chat is a merged chat: one person whose conversations across
// networks (or across accounts on the same network) are grouped into a single
// chat. A merged chat holds no messages of its own - read messages from the member
// chats, and send either to a member directly or to the merged chat ID to route
// automatically.
Merge ChatMerge `json:"merge"`
// When this chat is a member of a merged chat, the ID of that merged chat. Clients
// that render merged chats as one conversation should list the merged chat and
// hide chats carrying this field.
MergedIntoChatID string `json:"mergedIntoChatID"`
// Disappearing-message timer in seconds when available.
MessageExpirySeconds int64 `json:"messageExpirySeconds" api:"nullable"`
// Current reminder for this chat, or null when no reminder is set.
Reminder ChatReminder `json:"reminder" api:"nullable"`
// Current snooze state for this chat, or null when no snooze is set.
Snooze ChatSnooze `json:"snooze" api:"nullable"`
// Number of unread messages that mention the authenticated user or @room.
UnreadMentionsCount int64 `json:"unreadMentionsCount"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AccountID respjson.Field
Network respjson.Field
Participants respjson.Field
Title respjson.Field
Type respjson.Field
UnreadCount respjson.Field
Capabilities respjson.Field
Description respjson.Field
Draft respjson.Field
ImgURL respjson.Field
IsArchived respjson.Field
IsLowPriority respjson.Field
IsMarkedUnread respjson.Field
IsMuted respjson.Field
IsPinned respjson.Field
IsReadOnly respjson.Field
Labels respjson.Field
LastActivity respjson.Field
LastReadMessageSortKey respjson.Field
LocalChatID respjson.Field
Merge respjson.Field
MergedIntoChatID respjson.Field
MessageExpirySeconds respjson.Field
Reminder respjson.Field
Snooze respjson.Field
UnreadMentionsCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Chat) UnmarshalJSON ¶
type ChatArchiveParams ¶
type ChatArchiveParams struct {
// True to archive, false to unarchive
Archived param.Opt[bool] `json:"archived,omitzero"`
// contains filtered or unexported fields
}
func (ChatArchiveParams) MarshalJSON ¶
func (r ChatArchiveParams) MarshalJSON() (data []byte, err error)
func (*ChatArchiveParams) UnmarshalJSON ¶
func (r *ChatArchiveParams) UnmarshalJSON(data []byte) error
type ChatCapabilities ¶
type ChatCapabilities = shared.ChatCapabilities
Chat capabilities reported by the platform.
This is an alias to an internal type.
type ChatCapabilitiesDisappearingTimer ¶
type ChatCapabilitiesDisappearingTimer = shared.ChatCapabilitiesDisappearingTimer
Disappearing-message timer capabilities.
This is an alias to an internal type.
type ChatCapabilitiesMessageRequest ¶
type ChatCapabilitiesMessageRequest = shared.ChatCapabilitiesMessageRequest
Message request capabilities.
This is an alias to an internal type.
type ChatCapabilitiesParticipantActions ¶
type ChatCapabilitiesParticipantActions = shared.ChatCapabilitiesParticipantActions
Participant management capabilities.
This is an alias to an internal type.
type ChatDraft ¶
Current draft object for this chat, or null when no draft is set.
This is an alias to an internal type.
type ChatGetParams ¶
type ChatGetParams struct {
// Maximum number of participants to return. Use -1 for all; otherwise 0-500.
// Defaults to 100. List and search endpoints return up to 20 participants per
// chat.
MaxParticipantCount param.Opt[int64] `query:"maxParticipantCount,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ChatGetParams) URLQuery ¶
func (r ChatGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes ChatGetParams's query parameters as `url.Values`.
type ChatListParams ¶
type ChatListParams struct {
// Opaque pagination cursor; do not inspect. Use together with 'direction'.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Set the maximum number of chats to retrieve. Valid range: 1-200, default is 25
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Limit to specific account IDs. If omitted, fetches from all accounts.
AccountIDs []string `query:"accountIDs,omitzero" json:"-"`
// Pagination direction used with 'cursor': 'before' fetches older results, 'after'
// fetches newer results. Defaults to 'before' when only 'cursor' is provided.
//
// Any of "after", "before".
Direction ChatListParamsDirection `query:"direction,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ChatListParams) URLQuery ¶
func (r ChatListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ChatListParams's query parameters as `url.Values`.
type ChatListParamsDirection ¶
type ChatListParamsDirection string
Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided.
const ( ChatListParamsDirectionAfter ChatListParamsDirection = "after" ChatListParamsDirectionBefore ChatListParamsDirection = "before" )
type ChatListResponse ¶
type ChatListResponse struct {
// Last message preview for this chat, if available.
Preview shared.Message `json:"preview"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Preview respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
Chat
}
Chat with optional last message preview.
func (ChatListResponse) RawJSON ¶
func (r ChatListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatListResponse) UnmarshalJSON ¶
func (r *ChatListResponse) UnmarshalJSON(data []byte) error
type ChatMarkReadParams ¶
type ChatMarkReadParams struct {
// Optional message ID to mark read through.
MessageID param.Opt[string] `json:"messageID,omitzero"`
// contains filtered or unexported fields
}
func (ChatMarkReadParams) MarshalJSON ¶
func (r ChatMarkReadParams) MarshalJSON() (data []byte, err error)
func (*ChatMarkReadParams) UnmarshalJSON ¶
func (r *ChatMarkReadParams) UnmarshalJSON(data []byte) error
type ChatMarkUnreadParams ¶
type ChatMarkUnreadParams struct {
// Optional message ID to mark unread from.
MessageID param.Opt[string] `json:"messageID,omitzero"`
// contains filtered or unexported fields
}
func (ChatMarkUnreadParams) MarshalJSON ¶
func (r ChatMarkUnreadParams) MarshalJSON() (data []byte, err error)
func (*ChatMarkUnreadParams) UnmarshalJSON ¶
func (r *ChatMarkUnreadParams) UnmarshalJSON(data []byte) error
type ChatMerge ¶
type ChatMerge struct {
// Chat IDs of the member chats grouped by this merged chat.
ChatIDs []string `json:"chatIDs" api:"required"`
// Member chat that receives messages sent to the merged chat, when the user has
// picked one. This preference is per-device; when absent, sends route to the most
// recently active member.
DefaultChatID string `json:"defaultChatID"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChatIDs respjson.Field
DefaultChatID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Present when this chat is a merged chat: one person whose conversations across networks (or across accounts on the same network) are grouped into a single chat. A merged chat holds no messages of its own - read messages from the member chats, and send either to a member directly or to the merged chat ID to route automatically.
func (*ChatMerge) UnmarshalJSON ¶
type ChatMessageReactionAddParams ¶
type ChatMessageReactionAddParams struct {
// Chat ID. Input routes also accept the local chat ID from this installation when
// available.
ChatID string `path:"chatID" api:"required" json:"-"`
// Reaction key to add (emoji, shortcode, or custom emoji key)
ReactionKey string `json:"reactionKey" api:"required"`
// Optional transaction ID for deduplication and send tracking
TransactionID param.Opt[string] `json:"transactionID,omitzero"`
// contains filtered or unexported fields
}
func (ChatMessageReactionAddParams) MarshalJSON ¶
func (r ChatMessageReactionAddParams) MarshalJSON() (data []byte, err error)
func (*ChatMessageReactionAddParams) UnmarshalJSON ¶
func (r *ChatMessageReactionAddParams) UnmarshalJSON(data []byte) error
type ChatMessageReactionAddResponse ¶
type ChatMessageReactionAddResponse struct {
// Chat ID. Input routes also accept the local chat ID from this installation when
// available.
ChatID string `json:"chatID" api:"required"`
// Message ID.
MessageID string `json:"messageID" api:"required"`
// Reaction key that was added.
ReactionKey string `json:"reactionKey" api:"required"`
// Always true. Indicates the reaction was queued; failures return an error
// response.
Success bool `json:"success" api:"required"`
// Transaction ID used for send tracking.
TransactionID string `json:"transactionID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChatID respjson.Field
MessageID respjson.Field
ReactionKey respjson.Field
Success respjson.Field
TransactionID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ChatMessageReactionAddResponse) RawJSON ¶
func (r ChatMessageReactionAddResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatMessageReactionAddResponse) UnmarshalJSON ¶
func (r *ChatMessageReactionAddResponse) UnmarshalJSON(data []byte) error
type ChatMessageReactionDeleteParams ¶
type ChatMessageReactionDeleteParams struct {
// Chat ID. Input routes also accept the local chat ID from this installation when
// available.
ChatID string `path:"chatID" api:"required" json:"-"`
// Message ID.
MessageID string `path:"messageID" api:"required" json:"-"`
// contains filtered or unexported fields
}
type ChatMessageReactionDeleteResponse ¶
type ChatMessageReactionDeleteResponse struct {
// Chat ID. Input routes also accept the local chat ID from this installation when
// available.
ChatID string `json:"chatID" api:"required"`
// Message ID.
MessageID string `json:"messageID" api:"required"`
// Reaction key that was removed.
ReactionKey string `json:"reactionKey" api:"required"`
// Always true. Indicates the reaction removal was queued; failures return an error
// response.
Success bool `json:"success" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChatID respjson.Field
MessageID respjson.Field
ReactionKey respjson.Field
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ChatMessageReactionDeleteResponse) RawJSON ¶
func (r ChatMessageReactionDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatMessageReactionDeleteResponse) UnmarshalJSON ¶
func (r *ChatMessageReactionDeleteResponse) UnmarshalJSON(data []byte) error
type ChatMessageReactionService ¶
type ChatMessageReactionService struct {
Options []option.RequestOption
}
Manage message reactions
ChatMessageReactionService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewChatMessageReactionService method instead.
func NewChatMessageReactionService ¶
func NewChatMessageReactionService(opts ...option.RequestOption) (r ChatMessageReactionService)
NewChatMessageReactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ChatMessageReactionService) Add ¶
func (r *ChatMessageReactionService) Add(ctx context.Context, messageID string, params ChatMessageReactionAddParams, opts ...option.RequestOption) (res *ChatMessageReactionAddResponse, err error)
Add a reaction to an existing message.
func (*ChatMessageReactionService) Delete ¶
func (r *ChatMessageReactionService) Delete(ctx context.Context, reactionKey string, body ChatMessageReactionDeleteParams, opts ...option.RequestOption) (res *ChatMessageReactionDeleteResponse, err error)
Remove the reaction added by the authenticated user from an existing message.
type ChatMessageService ¶
type ChatMessageService struct {
Options []option.RequestOption
// Manage message reactions
Reactions ChatMessageReactionService
}
Manage chat messages
ChatMessageService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewChatMessageService method instead.
func NewChatMessageService ¶
func NewChatMessageService(opts ...option.RequestOption) (r ChatMessageService)
NewChatMessageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ChatNewParams ¶
type ChatNewParams struct {
// Account to create or start the chat on.
AccountID string `json:"accountID" api:"required"`
// User IDs to include in the new chat.
ParticipantIDs []string `json:"participantIDs,omitzero" api:"required"`
// 'single' requires exactly one participantID; 'group' supports multiple
// participants and optional title.
//
// Any of "single", "group".
Type ChatNewParamsType `json:"type,omitzero" api:"required"`
// Optional first message content if the platform requires it to create the chat.
MessageText param.Opt[string] `json:"messageText,omitzero"`
// Optional title for group chats; ignored for single chats on most networks.
Title param.Opt[string] `json:"title,omitzero"`
// contains filtered or unexported fields
}
func (ChatNewParams) MarshalJSON ¶
func (r ChatNewParams) MarshalJSON() (data []byte, err error)
func (*ChatNewParams) UnmarshalJSON ¶
func (r *ChatNewParams) UnmarshalJSON(data []byte) error
type ChatNewParamsType ¶
type ChatNewParamsType string
'single' requires exactly one participantID; 'group' supports multiple participants and optional title.
const ( ChatNewParamsTypeSingle ChatNewParamsType = "single" ChatNewParamsTypeGroup ChatNewParamsType = "group" )
type ChatNewResponse ¶
type ChatNewResponse struct {
// DEPRECATED - use id instead. Compatibility alias for older clients.
//
// Deprecated: Use id instead.
ChatID string `json:"chatID" api:"required"`
// DEPRECATED - legacy start-chat status for older clients. New clients should
// inspect the returned Chat instead.
//
// Any of "existing", "created".
//
// Deprecated: Inspect the returned Chat instead.
Status string `json:"status"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChatID respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
Chat
}
func (ChatNewResponse) RawJSON ¶
func (r ChatNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatNewResponse) UnmarshalJSON ¶
func (r *ChatNewResponse) UnmarshalJSON(data []byte) error
type ChatNotifyAnywayParams ¶
type ChatNotifyAnywayParams struct {
// contains filtered or unexported fields
}
func (ChatNotifyAnywayParams) MarshalJSON ¶
func (r ChatNotifyAnywayParams) MarshalJSON() (data []byte, err error)
func (*ChatNotifyAnywayParams) UnmarshalJSON ¶
func (r *ChatNotifyAnywayParams) UnmarshalJSON(data []byte) error
type ChatParticipants ¶
type ChatParticipants struct {
// True if there are more participants than included in items.
HasMore bool `json:"hasMore" api:"required"`
// Participants returned for this chat (limited by the request; may be a subset).
Items []ChatParticipantsItem `json:"items" api:"required"`
// Total number of participants in the chat.
Total int64 `json:"total" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
HasMore respjson.Field
Items respjson.Field
Total respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Chat participants information.
func (ChatParticipants) RawJSON ¶
func (r ChatParticipants) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatParticipants) UnmarshalJSON ¶
func (r *ChatParticipants) UnmarshalJSON(data []byte) error
type ChatParticipantsItem ¶
type ChatParticipantsItem struct {
// True if this participant has admin privileges in the chat.
IsAdmin bool `json:"isAdmin"`
// True if this participant represents an automated network account.
IsNetworkBot bool `json:"isNetworkBot"`
// True if this participant has been invited but has not joined yet.
IsPending bool `json:"isPending"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IsAdmin respjson.Field
IsNetworkBot respjson.Field
IsPending respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
shared.User
}
A chat participant. Extends User with chat membership metadata.
func (ChatParticipantsItem) RawJSON ¶
func (r ChatParticipantsItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatParticipantsItem) UnmarshalJSON ¶
func (r *ChatParticipantsItem) UnmarshalJSON(data []byte) error
type ChatReminder ¶
type ChatReminder struct {
// Cancel reminder if someone messages in the chat.
DismissOnIncomingMessage bool `json:"dismissOnIncomingMessage"`
// Timestamp when the reminder should trigger.
RemindAt time.Time `json:"remindAt" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DismissOnIncomingMessage respjson.Field
RemindAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current reminder for this chat, or null when no reminder is set.
func (ChatReminder) RawJSON ¶
func (r ChatReminder) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatReminder) UnmarshalJSON ¶
func (r *ChatReminder) UnmarshalJSON(data []byte) error
type ChatReminderNewParams ¶
type ChatReminderNewParams struct {
// Reminder configuration
Reminder ChatReminderNewParamsReminder `json:"reminder,omitzero" api:"required"`
// contains filtered or unexported fields
}
func (ChatReminderNewParams) MarshalJSON ¶
func (r ChatReminderNewParams) MarshalJSON() (data []byte, err error)
func (*ChatReminderNewParams) UnmarshalJSON ¶
func (r *ChatReminderNewParams) UnmarshalJSON(data []byte) error
type ChatReminderNewParamsReminder ¶
type ChatReminderNewParamsReminder struct {
// Timestamp when the reminder should trigger.
RemindAt time.Time `json:"remindAt" api:"required" format:"date-time"`
// Cancel reminder if someone messages in the chat
DismissOnIncomingMessage param.Opt[bool] `json:"dismissOnIncomingMessage,omitzero"`
// contains filtered or unexported fields
}
Reminder configuration
The property RemindAt is required.
func (ChatReminderNewParamsReminder) MarshalJSON ¶
func (r ChatReminderNewParamsReminder) MarshalJSON() (data []byte, err error)
func (*ChatReminderNewParamsReminder) UnmarshalJSON ¶
func (r *ChatReminderNewParamsReminder) UnmarshalJSON(data []byte) error
type ChatReminderService ¶
type ChatReminderService struct {
Options []option.RequestOption
}
Manage reminders for chats
ChatReminderService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewChatReminderService method instead.
func NewChatReminderService ¶
func NewChatReminderService(opts ...option.RequestOption) (r ChatReminderService)
NewChatReminderService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ChatReminderService) Delete ¶
func (r *ChatReminderService) Delete(ctx context.Context, chatID string, opts ...option.RequestOption) (err error)
Clear an existing reminder from a chat.
func (*ChatReminderService) New ¶
func (r *ChatReminderService) New(ctx context.Context, chatID string, body ChatReminderNewParams, opts ...option.RequestOption) (err error)
Set a reminder for a chat at a specific time.
type ChatSearchParams ¶
type ChatSearchParams struct {
// Include chats marked as Muted by the user, which are usually less important.
// Default: true. Set to false if the user wants a more refined search.
IncludeMuted param.Opt[bool] `query:"includeMuted,omitzero" json:"-"`
// Set to true to only retrieve chats that have unread messages
UnreadOnly param.Opt[bool] `query:"unreadOnly,omitzero" json:"-"`
// Opaque pagination cursor; do not inspect. Use together with 'direction'.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Only include chats that carry this label. Label IDs come from GET /v1/labels.
LabelID param.Opt[string] `query:"labelID,omitzero" json:"-"`
// Only include chats with last activity after this ISO 8601 datetime.
LastActivityAfter param.Opt[time.Time] `query:"lastActivityAfter,omitzero" format:"date-time" json:"-"`
// Only include chats with last activity before this ISO 8601 datetime.
LastActivityBefore param.Opt[time.Time] `query:"lastActivityBefore,omitzero" format:"date-time" json:"-"`
// Set the maximum number of chats to retrieve. Valid range: 1-200, default is 50
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Literal chat search. Use words the user typed, such as "dinner". When multiple
// words are provided, all must match. Case-insensitive.
Query param.Opt[string] `query:"query,omitzero" json:"-"`
// Limit results to specific chat accounts.
AccountIDs []string `query:"accountIDs,omitzero" json:"-"`
// Pagination direction used with 'cursor': 'before' fetches older results, 'after'
// fetches newer results. Defaults to 'before' when only 'cursor' is provided.
//
// Any of "after", "before".
Direction ChatSearchParamsDirection `query:"direction,omitzero" json:"-"`
// Filter by inbox type: "primary" (the chats the Beeper inbox shows: non-archived,
// non-low-priority, honoring inbox visibility rules and labels), "low-priority",
// or "archive". If not specified, shows all chats.
//
// Any of "primary", "low-priority", "archive".
Inbox ChatSearchParamsInbox `query:"inbox,omitzero" json:"-"`
// Search scope: 'titles' matches title + network; 'participants' matches
// participant names.
//
// Any of "titles", "participants".
Scope ChatSearchParamsScope `query:"scope,omitzero" json:"-"`
// Specify the type of chats to retrieve: use "single" for direct messages, "group"
// for group chats, or "any" to get all types
//
// Any of "single", "group", "any".
Type ChatSearchParamsType `query:"type,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ChatSearchParams) URLQuery ¶
func (r ChatSearchParams) URLQuery() (v url.Values, err error)
URLQuery serializes ChatSearchParams's query parameters as `url.Values`.
type ChatSearchParamsDirection ¶
type ChatSearchParamsDirection string
Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided.
const ( ChatSearchParamsDirectionAfter ChatSearchParamsDirection = "after" ChatSearchParamsDirectionBefore ChatSearchParamsDirection = "before" )
type ChatSearchParamsInbox ¶
type ChatSearchParamsInbox string
Filter by inbox type: "primary" (the chats the Beeper inbox shows: non-archived, non-low-priority, honoring inbox visibility rules and labels), "low-priority", or "archive". If not specified, shows all chats.
const ( ChatSearchParamsInboxPrimary ChatSearchParamsInbox = "primary" ChatSearchParamsInboxLowPriority ChatSearchParamsInbox = "low-priority" ChatSearchParamsInboxArchive ChatSearchParamsInbox = "archive" )
type ChatSearchParamsScope ¶
type ChatSearchParamsScope string
Search scope: 'titles' matches title + network; 'participants' matches participant names.
const ( ChatSearchParamsScopeTitles ChatSearchParamsScope = "titles" ChatSearchParamsScopeParticipants ChatSearchParamsScope = "participants" )
type ChatSearchParamsType ¶
type ChatSearchParamsType string
Specify the type of chats to retrieve: use "single" for direct messages, "group" for group chats, or "any" to get all types
const ( ChatSearchParamsTypeSingle ChatSearchParamsType = "single" ChatSearchParamsTypeGroup ChatSearchParamsType = "group" ChatSearchParamsTypeAny ChatSearchParamsType = "any" )
type ChatService ¶
type ChatService struct {
Options []option.RequestOption
// Manage reminders for chats
Reminders ChatReminderService
// Manage chat messages
Messages ChatMessageService
}
Manage chats
ChatService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewChatService method instead.
func NewChatService ¶
func NewChatService(opts ...option.RequestOption) (r ChatService)
NewChatService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ChatService) Archive ¶
func (r *ChatService) Archive(ctx context.Context, chatID string, body ChatArchiveParams, opts ...option.RequestOption) (err error)
Archive or unarchive a chat. Set archived=true to move it to Archive, or archived=false to move it back to the inbox.
func (*ChatService) Get ¶
func (r *ChatService) Get(ctx context.Context, chatID string, query ChatGetParams, opts ...option.RequestOption) (res *Chat, err error)
Retrieve chat details, including metadata, participants, and the latest message.
func (*ChatService) List ¶
func (r *ChatService) List(ctx context.Context, query ChatListParams, opts ...option.RequestOption) (res *pagination.CursorNoLimit[ChatListResponse], err error)
List all chats sorted by last activity (most recent first). Combines all accounts into a single paginated list.
func (*ChatService) ListAutoPaging ¶
func (r *ChatService) ListAutoPaging(ctx context.Context, query ChatListParams, opts ...option.RequestOption) *pagination.CursorNoLimitAutoPager[ChatListResponse]
List all chats sorted by last activity (most recent first). Combines all accounts into a single paginated list.
func (*ChatService) MarkRead ¶
func (r *ChatService) MarkRead(ctx context.Context, chatID string, body ChatMarkReadParams, opts ...option.RequestOption) (res *Chat, err error)
Mark a chat as read, optionally through a specific message ID.
func (*ChatService) MarkUnread ¶
func (r *ChatService) MarkUnread(ctx context.Context, chatID string, body ChatMarkUnreadParams, opts ...option.RequestOption) (res *Chat, err error)
Mark a chat as unread, optionally from a specific message ID.
func (*ChatService) New ¶
func (r *ChatService) New(ctx context.Context, body ChatNewParams, opts ...option.RequestOption) (res *ChatNewResponse, err error)
Create a direct or group chat from participant IDs. Returns the created chat.
func (*ChatService) NotifyAnyway ¶
func (r *ChatService) NotifyAnyway(ctx context.Context, chatID string, body ChatNotifyAnywayParams, opts ...option.RequestOption) (res *Chat, err error)
Send a notification despite the recipient focus state when the network supports it. Currently intended for iMessage on macOS; unsupported networks return an error.
func (*ChatService) Search ¶
func (r *ChatService) Search(ctx context.Context, query ChatSearchParams, opts ...option.RequestOption) (res *pagination.CursorSearch[Chat], err error)
Search chats by title, network, or participant names.
func (*ChatService) SearchAutoPaging ¶
func (r *ChatService) SearchAutoPaging(ctx context.Context, query ChatSearchParams, opts ...option.RequestOption) *pagination.CursorSearchAutoPager[Chat]
Search chats by title, network, or participant names.
func (*ChatService) Start ¶
func (r *ChatService) Start(ctx context.Context, body ChatStartParams, opts ...option.RequestOption) (res *ChatStartResponse, err error)
Resolve a user/contact and open a direct chat. Reuses and returns an existing direct chat when one is found. Available in Beeper v4.2.808+.
func (*ChatService) Update ¶
func (r *ChatService) Update(ctx context.Context, chatID string, body ChatUpdateParams, opts ...option.RequestOption) (res *Chat, err error)
Update supported chat fields. Non-empty drafts are accepted only when the current draft is empty. Send draft=null to clear the draft before setting new draft text or attachments.
type ChatSnooze ¶
type ChatSnooze struct {
// Timestamp when the snooze expires.
SnoozeUntil time.Time `json:"snoozeUntil" format:"date-time"`
// Timestamp when the user set the snooze.
UserSnoozedAt time.Time `json:"userSnoozedAt" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
SnoozeUntil respjson.Field
UserSnoozedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Current snooze state for this chat, or null when no snooze is set.
func (ChatSnooze) RawJSON ¶
func (r ChatSnooze) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatSnooze) UnmarshalJSON ¶
func (r *ChatSnooze) UnmarshalJSON(data []byte) error
type ChatStartParams ¶
type ChatStartParams struct {
// Account to create or start the chat on.
AccountID string `json:"accountID" api:"required"`
// Contact-like user payload used to resolve the best identifier.
User ChatStartParamsUser `json:"user,omitzero" api:"required"`
// Whether invite-based DM creation is allowed when required by the platform.
AllowInvite param.Opt[bool] `json:"allowInvite,omitzero"`
// Optional first message content if the platform requires it to create the chat.
MessageText param.Opt[string] `json:"messageText,omitzero"`
// contains filtered or unexported fields
}
func (ChatStartParams) MarshalJSON ¶
func (r ChatStartParams) MarshalJSON() (data []byte, err error)
func (*ChatStartParams) UnmarshalJSON ¶
func (r *ChatStartParams) UnmarshalJSON(data []byte) error
type ChatStartParamsUser ¶
type ChatStartParamsUser struct {
// Known user ID when available.
ID param.Opt[string] `json:"id,omitzero"`
// Email candidate.
Email param.Opt[string] `json:"email,omitzero"`
// Display name hint used for ranking only.
FullName param.Opt[string] `json:"fullName,omitzero"`
// Phone number candidate (E.164 preferred).
PhoneNumber param.Opt[string] `json:"phoneNumber,omitzero"`
// Username/handle candidate.
Username param.Opt[string] `json:"username,omitzero"`
// contains filtered or unexported fields
}
Contact-like user payload used to resolve the best identifier.
func (ChatStartParamsUser) MarshalJSON ¶
func (r ChatStartParamsUser) MarshalJSON() (data []byte, err error)
func (*ChatStartParamsUser) UnmarshalJSON ¶
func (r *ChatStartParamsUser) UnmarshalJSON(data []byte) error
type ChatStartResponse ¶
type ChatStartResponse struct {
// DEPRECATED - use id instead. Compatibility alias for older clients.
//
// Deprecated: Use id instead.
ChatID string `json:"chatID" api:"required"`
// DEPRECATED - legacy start-chat status for older clients. New clients should
// inspect the returned Chat instead.
//
// Any of "existing", "created".
//
// Deprecated: Inspect the returned Chat instead.
Status string `json:"status"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChatID respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
Chat
}
func (ChatStartResponse) RawJSON ¶
func (r ChatStartResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatStartResponse) UnmarshalJSON ¶
func (r *ChatStartResponse) UnmarshalJSON(data []byte) error
type ChatStateCapabilities ¶
type ChatStateCapabilities = shared.ChatStateCapabilities
Chat state update capabilities.
This is an alias to an internal type.
type ChatStateCapabilitiesAvatar ¶
type ChatStateCapabilitiesAvatar = shared.ChatStateCapabilitiesAvatar
Chat avatar state capability.
This is an alias to an internal type.
type ChatStateCapabilitiesDescription ¶
type ChatStateCapabilitiesDescription = shared.ChatStateCapabilitiesDescription
Chat description/topic state capability.
This is an alias to an internal type.
type ChatStateCapabilitiesDisappearingTimer ¶
type ChatStateCapabilitiesDisappearingTimer = shared.ChatStateCapabilitiesDisappearingTimer
Disappearing-message timer state capability.
This is an alias to an internal type.
type ChatStateCapabilitiesTitle ¶
type ChatStateCapabilitiesTitle = shared.ChatStateCapabilitiesTitle
Chat title state capability.
This is an alias to an internal type.
type ChatType ¶
type ChatType string
Chat type: 'single' for direct messages, 'group' for group chats.
type ChatUpdateParams ¶
type ChatUpdateParams struct {
// Group chat description/topic. Support depends on the chat account and chat
// permissions.
Description param.Opt[string] `json:"description,omitzero"`
// Local filesystem path to a group chat avatar image. Support depends on the chat
// account and chat permissions.
ImgURL param.Opt[string] `json:"imgURL,omitzero"`
// Disappearing-message timer in seconds, or null to clear when supported.
MessageExpirySeconds param.Opt[int64] `json:"messageExpirySeconds,omitzero"`
// Custom chat title. Support depends on the chat account and chat permissions.
Title param.Opt[string] `json:"title,omitzero"`
// Archive or unarchive the chat.
IsArchived param.Opt[bool] `json:"isArchived,omitzero"`
// Mark or unmark the chat as low priority when supported by the account.
IsLowPriority param.Opt[bool] `json:"isLowPriority,omitzero"`
// Mute or unmute the chat.
IsMuted param.Opt[bool] `json:"isMuted,omitzero"`
// Pin or unpin the chat when supported by the account.
IsPinned param.Opt[bool] `json:"isPinned,omitzero"`
// Draft object to set or clear. Non-empty drafts are only accepted when the
// current draft is empty. Send draft=null to clear text and attachments together
// before setting a new draft.
Draft ChatUpdateParamsDraft `json:"draft,omitzero"`
// contains filtered or unexported fields
}
func (ChatUpdateParams) MarshalJSON ¶
func (r ChatUpdateParams) MarshalJSON() (data []byte, err error)
func (*ChatUpdateParams) UnmarshalJSON ¶
func (r *ChatUpdateParams) UnmarshalJSON(data []byte) error
type ChatUpdateParamsDraft ¶
type ChatUpdateParamsDraft struct {
// Draft text. Plain text and Markdown are converted to Beeper rich text with the
// same rules used by send and edit.
Text string `json:"text" api:"required"`
// Draft attachments keyed by attachment ID. Each attachment must reference an
// uploadID returned by the upload file endpoint.
Attachments map[string]ChatUpdateParamsDraftAttachment `json:"attachments,omitzero"`
// contains filtered or unexported fields
}
Draft object to set or clear. Non-empty drafts are only accepted when the current draft is empty. Send draft=null to clear text and attachments together before setting a new draft.
The property Text is required.
func (ChatUpdateParamsDraft) MarshalJSON ¶
func (r ChatUpdateParamsDraft) MarshalJSON() (data []byte, err error)
func (*ChatUpdateParamsDraft) UnmarshalJSON ¶
func (r *ChatUpdateParamsDraft) UnmarshalJSON(data []byte) error
type ChatUpdateParamsDraftAttachment ¶
type ChatUpdateParamsDraftAttachment struct {
// Upload ID from uploadAsset endpoint. Required to reference uploaded files.
UploadID string `json:"uploadID" api:"required"`
// Optional draft attachment identifier. If omitted, a new identifier is generated.
ID param.Opt[string] `json:"id,omitzero"`
// Duration in seconds (optional override of cached value)
Duration param.Opt[float64] `json:"duration,omitzero"`
// Filename (optional override of cached value)
FileName param.Opt[string] `json:"fileName,omitzero"`
// MIME type (optional override of cached value)
MimeType param.Opt[string] `json:"mimeType,omitzero"`
// Dimensions (optional override of cached value)
Size ChatUpdateParamsDraftAttachmentSize `json:"size,omitzero"`
// Attachment type hint (image, video, audio, file, gif, voice-note, sticker). If
// omitted, auto-detected from mimeType
//
// Any of "image", "video", "audio", "file", "gif", "voice-note", "sticker".
Type string `json:"type,omitzero"`
// contains filtered or unexported fields
}
The property UploadID is required.
func (ChatUpdateParamsDraftAttachment) MarshalJSON ¶
func (r ChatUpdateParamsDraftAttachment) MarshalJSON() (data []byte, err error)
func (*ChatUpdateParamsDraftAttachment) UnmarshalJSON ¶
func (r *ChatUpdateParamsDraftAttachment) UnmarshalJSON(data []byte) error
type ChatUpdateParamsDraftAttachmentSize ¶
type ChatUpdateParamsDraftAttachmentSize struct {
Height float64 `json:"height" api:"required"`
Width float64 `json:"width" api:"required"`
// contains filtered or unexported fields
}
Dimensions (optional override of cached value)
The properties Height, Width are required.
func (ChatUpdateParamsDraftAttachmentSize) MarshalJSON ¶
func (r ChatUpdateParamsDraftAttachmentSize) MarshalJSON() (data []byte, err error)
func (*ChatUpdateParamsDraftAttachmentSize) UnmarshalJSON ¶
func (r *ChatUpdateParamsDraftAttachmentSize) UnmarshalJSON(data []byte) error
type Client ¶
type Client struct {
Options []option.RequestOption
// Manage connected chat accounts
Accounts AccountService
// Manage available bridges, connect or reconnect chat accounts
Bridges BridgeService
// Manage chats
Chats ChatService
// User-created labels that organize chats
Labels LabelService
// Manage messages in chats
Messages MessageService
// Manage files for message attachments
Assets AssetService
// Server discovery and capability metadata. Use /v1/info before authentication
// setup.
Info InfoService
// Manage Beeper account setup and encrypted messaging setup
App AppService
}
Client creates a struct with services and top level methods that help with interacting with the beeperdesktop API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r Client)
NewClient generates a new client with the default option read from the environment (BEEPER_ACCESS_TOKEN, BEEPER_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Focus ¶
func (r *Client) Focus(ctx context.Context, body FocusParams, opts ...option.RequestOption) (res *FocusResponse, err error)
Focus Beeper Desktop and optionally open a specific chat, jump to a message, or pre-fill text and an image.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Put ¶
func (r *Client) Put(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Put makes a PUT request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Search ¶
func (r *Client) Search(ctx context.Context, query SearchParams, opts ...option.RequestOption) (res *SearchResponse, err error)
Return matching chats, participant matches in group chats, and the first page of message results in one call. Use the dedicated chat and message search endpoints for pagination.
type CookieField ¶
type CookieField struct {
// Field ID to send back in the fields object.
ID string `json:"id" api:"required"`
// Cookie, header, or local storage key to collect.
Name string `json:"name"`
// Browser storage source for this value.
//
// Any of "cookie", "header", "local_storage".
Type CookieFieldType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CookieField) RawJSON ¶
func (r CookieField) RawJSON() string
Returns the unmodified JSON received from the API
func (*CookieField) UnmarshalJSON ¶
func (r *CookieField) UnmarshalJSON(data []byte) error
type CookieFieldType ¶
type CookieFieldType string
Browser storage source for this value.
const ( CookieFieldTypeCookie CookieFieldType = "cookie" CookieFieldTypeHeader CookieFieldType = "header" CookieFieldTypeLocalStorage CookieFieldType = "local_storage" )
type DisappearingTimerCapability ¶
type DisappearingTimerCapability struct {
// Any of "", "after_read", "after_read_by_recipient", "after_send".
Types []string `json:"types" api:"required"`
// Any of true.
OmitEmptyTimer bool `json:"omit_empty_timer"`
Timers []int64 `json:"timers"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Types respjson.Field
OmitEmptyTimer respjson.Field
Timers respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Disappearing-message timer capability.
func (DisappearingTimerCapability) RawJSON ¶
func (r DisappearingTimerCapability) RawJSON() string
Returns the unmodified JSON received from the API
func (*DisappearingTimerCapability) UnmarshalJSON ¶
func (r *DisappearingTimerCapability) UnmarshalJSON(data []byte) error
type DraftAttachment ¶
type DraftAttachment = shared.DraftAttachment
This is an alias to an internal type.
type DraftAttachmentSize ¶
type DraftAttachmentSize = shared.DraftAttachmentSize
Pixel dimensions of the attachment.
This is an alias to an internal type.
type DraftAttachmentType ¶
type DraftAttachmentType = shared.DraftAttachmentType
Draft attachment type. GIF and recorded audio are mutually exclusive types.
This is an alias to an internal type.
type FocusParams ¶
type FocusParams struct {
// Optional Beeper chat ID (or local chat ID) to focus after opening the app. If
// omitted, only opens/focuses the app.
ChatID param.Opt[string] `json:"chatID,omitzero"`
// Optional local image path to populate in the message input field.
DraftAttachmentPath param.Opt[string] `json:"draftAttachmentPath,omitzero"`
// Optional plain text to populate in the message input field.
DraftText param.Opt[string] `json:"draftText,omitzero"`
// Optional message ID. Jumps to that message in the chat when opening.
MessageID param.Opt[string] `json:"messageID,omitzero"`
// contains filtered or unexported fields
}
func (FocusParams) MarshalJSON ¶
func (r FocusParams) MarshalJSON() (data []byte, err error)
func (*FocusParams) UnmarshalJSON ¶
func (r *FocusParams) UnmarshalJSON(data []byte) error
type FocusResponse ¶
type FocusResponse struct {
// Whether the app was successfully opened/focused.
Success bool `json:"success" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response indicating successful app focus action.
func (FocusResponse) RawJSON ¶
func (r FocusResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*FocusResponse) UnmarshalJSON ¶
func (r *FocusResponse) UnmarshalJSON(data []byte) error
type GroupFieldCapability ¶
type GroupFieldCapability struct {
Allowed bool `json:"allowed" api:"required"`
MaxLength int64 `json:"max_length"`
MinLength int64 `json:"min_length"`
Required bool `json:"required"`
// Disappearing-message timer capability.
Settings DisappearingTimerCapability `json:"settings"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Allowed respjson.Field
MaxLength respjson.Field
MinLength respjson.Field
Required respjson.Field
Settings respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Group creation field capability.
func (GroupFieldCapability) RawJSON ¶
func (r GroupFieldCapability) RawJSON() string
Returns the unmodified JSON received from the API
func (*GroupFieldCapability) UnmarshalJSON ¶
func (r *GroupFieldCapability) UnmarshalJSON(data []byte) error
type GroupTypeCapabilities ¶
type GroupTypeCapabilities struct {
TypeDescription string `json:"type_description" api:"required"`
// Group creation field capability.
Avatar GroupFieldCapability `json:"avatar"`
// Group creation field capability.
Disappear GroupFieldCapability `json:"disappear"`
// Group creation field capability.
Name GroupFieldCapability `json:"name"`
// Group creation field capability.
Parent GroupFieldCapability `json:"parent"`
// Group creation field capability.
Participants GroupFieldCapability `json:"participants"`
// Group creation field capability.
Topic GroupFieldCapability `json:"topic"`
// Group creation field capability.
Username GroupFieldCapability `json:"username"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
TypeDescription respjson.Field
Avatar respjson.Field
Disappear respjson.Field
Name respjson.Field
Parent respjson.Field
Participants respjson.Field
Topic respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Group creation capabilities for one group type.
func (GroupTypeCapabilities) RawJSON ¶
func (r GroupTypeCapabilities) RawJSON() string
Returns the unmodified JSON received from the API
func (*GroupTypeCapabilities) UnmarshalJSON ¶
func (r *GroupTypeCapabilities) UnmarshalJSON(data []byte) error
type InfoGetResponse ¶
type InfoGetResponse struct {
App InfoGetResponseApp `json:"app" api:"required"`
Endpoints InfoGetResponseEndpoints `json:"endpoints" api:"required"`
Platform InfoGetResponsePlatform `json:"platform" api:"required"`
Server InfoGetResponseServer `json:"server" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
App respjson.Field
Endpoints respjson.Field
Platform respjson.Field
Server respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InfoGetResponse) RawJSON ¶
func (r InfoGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*InfoGetResponse) UnmarshalJSON ¶
func (r *InfoGetResponse) UnmarshalJSON(data []byte) error
type InfoGetResponseApp ¶
type InfoGetResponseApp struct {
// App bundle identifier
BundleID string `json:"bundle_id" api:"required"`
// App name
Name string `json:"name" api:"required"`
// App version
Version string `json:"version" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BundleID respjson.Field
Name respjson.Field
Version respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InfoGetResponseApp) RawJSON ¶
func (r InfoGetResponseApp) RawJSON() string
Returns the unmodified JSON received from the API
func (*InfoGetResponseApp) UnmarshalJSON ¶
func (r *InfoGetResponseApp) UnmarshalJSON(data []byte) error
type InfoGetResponseEndpoints ¶
type InfoGetResponseEndpoints struct {
// MCP endpoint
Mcp string `json:"mcp" api:"required"`
OAuth InfoGetResponseEndpointsOAuth `json:"oauth" api:"required"`
// OpenAPI spec endpoint
Spec string `json:"spec" api:"required"`
// WebSocket events endpoint
WsEvents string `json:"ws_events" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Mcp respjson.Field
OAuth respjson.Field
Spec respjson.Field
WsEvents respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InfoGetResponseEndpoints) RawJSON ¶
func (r InfoGetResponseEndpoints) RawJSON() string
Returns the unmodified JSON received from the API
func (*InfoGetResponseEndpoints) UnmarshalJSON ¶
func (r *InfoGetResponseEndpoints) UnmarshalJSON(data []byte) error
type InfoGetResponseEndpointsOAuth ¶
type InfoGetResponseEndpointsOAuth struct {
// OAuth authorization endpoint
AuthorizationEndpoint string `json:"authorization_endpoint" api:"required"`
// OAuth introspection endpoint
IntrospectionEndpoint string `json:"introspection_endpoint" api:"required"`
// OAuth dynamic client registration endpoint
RegistrationEndpoint string `json:"registration_endpoint" api:"required"`
// OAuth token revocation endpoint
RevocationEndpoint string `json:"revocation_endpoint" api:"required"`
// OAuth token endpoint
TokenEndpoint string `json:"token_endpoint" api:"required"`
// OAuth userinfo endpoint
UserinfoEndpoint string `json:"userinfo_endpoint" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AuthorizationEndpoint respjson.Field
IntrospectionEndpoint respjson.Field
RegistrationEndpoint respjson.Field
RevocationEndpoint respjson.Field
TokenEndpoint respjson.Field
UserinfoEndpoint respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InfoGetResponseEndpointsOAuth) RawJSON ¶
func (r InfoGetResponseEndpointsOAuth) RawJSON() string
Returns the unmodified JSON received from the API
func (*InfoGetResponseEndpointsOAuth) UnmarshalJSON ¶
func (r *InfoGetResponseEndpointsOAuth) UnmarshalJSON(data []byte) error
type InfoGetResponsePlatform ¶
type InfoGetResponsePlatform struct {
// CPU architecture
Arch string `json:"arch" api:"required"`
// Operating system identifier
Os string `json:"os" api:"required"`
// Runtime release version
Release string `json:"release"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Arch respjson.Field
Os respjson.Field
Release respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InfoGetResponsePlatform) RawJSON ¶
func (r InfoGetResponsePlatform) RawJSON() string
Returns the unmodified JSON received from the API
func (*InfoGetResponsePlatform) UnmarshalJSON ¶
func (r *InfoGetResponsePlatform) UnmarshalJSON(data []byte) error
type InfoGetResponseServer ¶
type InfoGetResponseServer struct {
// Base URL of the Beeper Client API server
BaseURL string `json:"base_url" api:"required"`
// Listening host
Hostname string `json:"hostname" api:"required"`
// Whether MCP endpoint is enabled
McpEnabled bool `json:"mcp_enabled" api:"required"`
// Listening port
Port int64 `json:"port" api:"required"`
// Whether remote access is enabled
RemoteAccess bool `json:"remote_access" api:"required"`
// Server status
Status string `json:"status" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BaseURL respjson.Field
Hostname respjson.Field
McpEnabled respjson.Field
Port respjson.Field
RemoteAccess respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InfoGetResponseServer) RawJSON ¶
func (r InfoGetResponseServer) RawJSON() string
Returns the unmodified JSON received from the API
func (*InfoGetResponseServer) UnmarshalJSON ¶
func (r *InfoGetResponseServer) UnmarshalJSON(data []byte) error
type InfoService ¶
type InfoService struct {
Options []option.RequestOption
}
Server discovery and capability metadata. Use /v1/info before authentication setup.
InfoService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInfoService method instead.
func NewInfoService ¶
func NewInfoService(opts ...option.RequestOption) (r InfoService)
NewInfoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InfoService) Get ¶
func (r *InfoService) Get(ctx context.Context, opts ...option.RequestOption) (res *InfoGetResponse, err error)
Returns app, platform, server, endpoint discovery, OAuth, and WebSocket metadata for this Beeper Client API server.
type Label ¶
type Label struct {
// Unique identifier of the label.
ID string `json:"id" api:"required"`
// Display name of the label.
Name string `json:"name" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A user-created label that organizes chats across accounts.
func (*Label) UnmarshalJSON ¶
type LabelService ¶
type LabelService struct {
Options []option.RequestOption
}
User-created labels that organize chats
LabelService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLabelService method instead.
func NewLabelService ¶
func NewLabelService(opts ...option.RequestOption) (r LabelService)
NewLabelService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LabelService) List ¶
func (r *LabelService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Label, err error)
List the labels the user has created for organizing chats. Filter chats by label via GET /v1/chats/search with labelID.
type LinkPreview ¶
type LinkPreview = shared.LinkPreview
Link preview included with a message.
This is an alias to an internal type.
type LinkPreviewImgSize ¶
type LinkPreviewImgSize = shared.LinkPreviewImgSize
Preview image dimensions.
This is an alias to an internal type.
type LoginFlow ¶
type LoginFlow struct {
// Flow ID to pass when creating a bridge login session.
ID string `json:"id" api:"required"`
// Short explanation for when to use this flow, when provided.
Description string `json:"description"`
// Display name for the flow, when provided.
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Description respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Connect or reconnect flow option for a bridge.
func (*LoginFlow) UnmarshalJSON ¶
type LoginInputField ¶
type LoginInputField struct {
// Field ID to send back in the fields object.
ID string `json:"id" api:"required"`
// Initial field value, when provided by the network.
InitialValue string `json:"initialValue"`
// Field label to show to the user.
Label string `json:"label"`
// True if the user can leave this field empty.
Optional bool `json:"optional"`
// Placeholder text to show when the field is empty.
Placeholder string `json:"placeholder"`
// Suggested input type, such as text, password, or email.
Type string `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
InitialValue respjson.Field
Label respjson.Field
Optional respjson.Field
Placeholder respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoginInputField) RawJSON ¶
func (r LoginInputField) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoginInputField) UnmarshalJSON ¶
func (r *LoginInputField) UnmarshalJSON(data []byte) error
type LoginSession ¶
type LoginSession struct {
// Bridge ID.
BridgeID string `json:"bridgeID" api:"required"`
// Temporary bridge login session ID.
LoginSessionID string `json:"loginSessionID" api:"required"`
// Any of "waiting_for_input", "waiting_for_cookies", "waiting_for_display",
// "complete", "cancelled", "failed".
Status LoginSessionStatus `json:"status" api:"required"`
// A chat account added to Beeper.
Account Account `json:"account"`
// Chat account ID for reconnect flows, when known.
AccountID string `json:"accountID"`
// Step the client should show or complete next. Omitted when the session is
// complete, cancelled, or failed.
CurrentStep LoginSessionCurrentStepUnion `json:"currentStep"`
Error shared.APIError `json:"error"`
// Signed-in identity for a bridge. One bridge login can contain multiple chat
// accounts.
Login BridgeLogin `json:"login"`
// Bridge login ID for reconnect flows, when known.
LoginID string `json:"loginID"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BridgeID respjson.Field
LoginSessionID respjson.Field
Status respjson.Field
Account respjson.Field
AccountID respjson.Field
CurrentStep respjson.Field
Error respjson.Field
Login respjson.Field
LoginID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoginSession) RawJSON ¶
func (r LoginSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoginSession) UnmarshalJSON ¶
func (r *LoginSession) UnmarshalJSON(data []byte) error
type LoginSessionCurrentStepComplete ¶
type LoginSessionCurrentStepComplete struct {
Type constant.Complete `json:"type" default:"complete"`
// A chat account added to Beeper.
Account Account `json:"account"`
// Completion instructions, when provided.
Instructions string `json:"instructions"`
// Signed-in identity for a bridge. One bridge login can contain multiple chat
// accounts.
Login BridgeLogin `json:"login"`
StepID string `json:"stepID"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
Account respjson.Field
Instructions respjson.Field
Login respjson.Field
StepID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoginSessionCurrentStepComplete) RawJSON ¶
func (r LoginSessionCurrentStepComplete) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoginSessionCurrentStepComplete) UnmarshalJSON ¶
func (r *LoginSessionCurrentStepComplete) UnmarshalJSON(data []byte) error
type LoginSessionCurrentStepCookies ¶
type LoginSessionCurrentStepCookies struct {
Fields []CookieField `json:"fields" api:"required"`
StepID string `json:"stepID" api:"required"`
Type constant.Cookies `json:"type" default:"cookies"`
// URL to open for the user.
URL string `json:"url" api:"required"`
// Regular expression that identifies the final URL after sign-in.
ExpectedFinalURLRegex string `json:"expectedFinalURLRegex"`
// Optional extraction script for browser-based sign-in helpers. Treat as an opaque
// helper value.
ExtractJs string `json:"extractJS"`
// User-facing instructions for this browser step.
Instructions string `json:"instructions"`
// Suggested user agent for the browser session.
UserAgent string `json:"userAgent"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Fields respjson.Field
StepID respjson.Field
Type respjson.Field
URL respjson.Field
ExpectedFinalURLRegex respjson.Field
ExtractJs respjson.Field
Instructions respjson.Field
UserAgent respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoginSessionCurrentStepCookies) RawJSON ¶
func (r LoginSessionCurrentStepCookies) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoginSessionCurrentStepCookies) UnmarshalJSON ¶
func (r *LoginSessionCurrentStepCookies) UnmarshalJSON(data []byte) error
type LoginSessionCurrentStepDisplayAndWait ¶
type LoginSessionCurrentStepDisplayAndWait struct {
Display LoginSessionCurrentStepDisplayAndWaitDisplayUnion `json:"display" api:"required"`
StepID string `json:"stepID" api:"required"`
Type constant.DisplayAndWait `json:"type" default:"display_and_wait"`
// User-facing instructions for this step.
Instructions string `json:"instructions"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Display respjson.Field
StepID respjson.Field
Type respjson.Field
Instructions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoginSessionCurrentStepDisplayAndWait) RawJSON ¶
func (r LoginSessionCurrentStepDisplayAndWait) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoginSessionCurrentStepDisplayAndWait) UnmarshalJSON ¶
func (r *LoginSessionCurrentStepDisplayAndWait) UnmarshalJSON(data []byte) error
type LoginSessionCurrentStepDisplayAndWaitDisplayCode ¶
type LoginSessionCurrentStepDisplayAndWaitDisplayCode struct {
Data string `json:"data" api:"required"`
Type constant.Code `json:"type" default:"code"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoginSessionCurrentStepDisplayAndWaitDisplayCode) RawJSON ¶
func (r LoginSessionCurrentStepDisplayAndWaitDisplayCode) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoginSessionCurrentStepDisplayAndWaitDisplayCode) UnmarshalJSON ¶
func (r *LoginSessionCurrentStepDisplayAndWaitDisplayCode) UnmarshalJSON(data []byte) error
type LoginSessionCurrentStepDisplayAndWaitDisplayEmoji ¶
type LoginSessionCurrentStepDisplayAndWaitDisplayEmoji struct {
ImageURL string `json:"imageURL" api:"required"`
Type constant.Emoji `json:"type" default:"emoji"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ImageURL respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoginSessionCurrentStepDisplayAndWaitDisplayEmoji) RawJSON ¶
func (r LoginSessionCurrentStepDisplayAndWaitDisplayEmoji) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoginSessionCurrentStepDisplayAndWaitDisplayEmoji) UnmarshalJSON ¶
func (r *LoginSessionCurrentStepDisplayAndWaitDisplayEmoji) UnmarshalJSON(data []byte) error
type LoginSessionCurrentStepDisplayAndWaitDisplayEmpty ¶
type LoginSessionCurrentStepDisplayAndWaitDisplayEmpty struct {
Type constant.Nothing `json:"type" default:"nothing"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoginSessionCurrentStepDisplayAndWaitDisplayEmpty) RawJSON ¶
func (r LoginSessionCurrentStepDisplayAndWaitDisplayEmpty) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoginSessionCurrentStepDisplayAndWaitDisplayEmpty) UnmarshalJSON ¶
func (r *LoginSessionCurrentStepDisplayAndWaitDisplayEmpty) UnmarshalJSON(data []byte) error
type LoginSessionCurrentStepDisplayAndWaitDisplayQRCode ¶
type LoginSessionCurrentStepDisplayAndWaitDisplayQRCode struct {
Data string `json:"data" api:"required"`
Type constant.QR `json:"type" default:"qr"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoginSessionCurrentStepDisplayAndWaitDisplayQRCode) RawJSON ¶
func (r LoginSessionCurrentStepDisplayAndWaitDisplayQRCode) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoginSessionCurrentStepDisplayAndWaitDisplayQRCode) UnmarshalJSON ¶
func (r *LoginSessionCurrentStepDisplayAndWaitDisplayQRCode) UnmarshalJSON(data []byte) error
type LoginSessionCurrentStepDisplayAndWaitDisplayUnion ¶
type LoginSessionCurrentStepDisplayAndWaitDisplayUnion struct {
Data string `json:"data"`
Type string `json:"type"`
// This field is from variant [LoginSessionCurrentStepDisplayAndWaitDisplayEmoji].
ImageURL string `json:"imageURL"`
JSON struct {
Data respjson.Field
Type respjson.Field
ImageURL respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
LoginSessionCurrentStepDisplayAndWaitDisplayUnion contains all possible properties and values from LoginSessionCurrentStepDisplayAndWaitDisplayQRCode, LoginSessionCurrentStepDisplayAndWaitDisplayEmoji, LoginSessionCurrentStepDisplayAndWaitDisplayCode, LoginSessionCurrentStepDisplayAndWaitDisplayEmpty.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (LoginSessionCurrentStepDisplayAndWaitDisplayUnion) AsQRCode ¶
func (u LoginSessionCurrentStepDisplayAndWaitDisplayUnion) AsQRCode() (v LoginSessionCurrentStepDisplayAndWaitDisplayQRCode)
func (LoginSessionCurrentStepDisplayAndWaitDisplayUnion) RawJSON ¶
func (u LoginSessionCurrentStepDisplayAndWaitDisplayUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoginSessionCurrentStepDisplayAndWaitDisplayUnion) UnmarshalJSON ¶
func (r *LoginSessionCurrentStepDisplayAndWaitDisplayUnion) UnmarshalJSON(data []byte) error
type LoginSessionCurrentStepUnion ¶
type LoginSessionCurrentStepUnion struct {
// This field is a union of [[]LoginInputField], [[]CookieField]
Fields LoginSessionCurrentStepUnionFields `json:"fields"`
StepID string `json:"stepID"`
Type string `json:"type"`
// This field is from variant [LoginSessionCurrentStepUserInput].
Attachments []any `json:"attachments"`
Instructions string `json:"instructions"`
// This field is from variant [LoginSessionCurrentStepCookies].
URL string `json:"url"`
// This field is from variant [LoginSessionCurrentStepCookies].
ExpectedFinalURLRegex string `json:"expectedFinalURLRegex"`
// This field is from variant [LoginSessionCurrentStepCookies].
ExtractJs string `json:"extractJS"`
// This field is from variant [LoginSessionCurrentStepCookies].
UserAgent string `json:"userAgent"`
// This field is from variant [LoginSessionCurrentStepDisplayAndWait].
Display LoginSessionCurrentStepDisplayAndWaitDisplayUnion `json:"display"`
// This field is from variant [LoginSessionCurrentStepComplete].
Account Account `json:"account"`
// This field is from variant [LoginSessionCurrentStepComplete].
Login BridgeLogin `json:"login"`
JSON struct {
Fields respjson.Field
StepID respjson.Field
Type respjson.Field
Attachments respjson.Field
Instructions respjson.Field
URL respjson.Field
ExpectedFinalURLRegex respjson.Field
ExtractJs respjson.Field
UserAgent respjson.Field
Display respjson.Field
Account respjson.Field
Login respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
LoginSessionCurrentStepUnion contains all possible properties and values from LoginSessionCurrentStepUserInput, LoginSessionCurrentStepCookies, LoginSessionCurrentStepDisplayAndWait, LoginSessionCurrentStepComplete.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (LoginSessionCurrentStepUnion) AsComplete ¶
func (u LoginSessionCurrentStepUnion) AsComplete() (v LoginSessionCurrentStepComplete)
func (LoginSessionCurrentStepUnion) AsCookies ¶
func (u LoginSessionCurrentStepUnion) AsCookies() (v LoginSessionCurrentStepCookies)
func (LoginSessionCurrentStepUnion) AsDisplayAndWait ¶
func (u LoginSessionCurrentStepUnion) AsDisplayAndWait() (v LoginSessionCurrentStepDisplayAndWait)
func (LoginSessionCurrentStepUnion) AsUserInput ¶
func (u LoginSessionCurrentStepUnion) AsUserInput() (v LoginSessionCurrentStepUserInput)
func (LoginSessionCurrentStepUnion) RawJSON ¶
func (u LoginSessionCurrentStepUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoginSessionCurrentStepUnion) UnmarshalJSON ¶
func (r *LoginSessionCurrentStepUnion) UnmarshalJSON(data []byte) error
type LoginSessionCurrentStepUnionFields ¶
type LoginSessionCurrentStepUnionFields struct {
// This field will be present if the value is a [[]LoginInputField] instead of an
// object.
OfLoginInputFieldArray []LoginInputField `json:",inline"`
// This field will be present if the value is a [[]CookieField] instead of an
// object.
OfCookieFieldArray []CookieField `json:",inline"`
JSON struct {
OfLoginInputFieldArray respjson.Field
OfCookieFieldArray respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
LoginSessionCurrentStepUnionFields is an implicit subunion of LoginSessionCurrentStepUnion. LoginSessionCurrentStepUnionFields provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the LoginSessionCurrentStepUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfLoginInputFieldArray OfCookieFieldArray]
func (*LoginSessionCurrentStepUnionFields) UnmarshalJSON ¶
func (r *LoginSessionCurrentStepUnionFields) UnmarshalJSON(data []byte) error
type LoginSessionCurrentStepUserInput ¶
type LoginSessionCurrentStepUserInput struct {
Fields []LoginInputField `json:"fields" api:"required"`
StepID string `json:"stepID" api:"required"`
Type constant.UserInput `json:"type" default:"user_input"`
Attachments []any `json:"attachments"`
// User-facing instructions for this step.
Instructions string `json:"instructions"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Fields respjson.Field
StepID respjson.Field
Type respjson.Field
Attachments respjson.Field
Instructions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LoginSessionCurrentStepUserInput) RawJSON ¶
func (r LoginSessionCurrentStepUserInput) RawJSON() string
Returns the unmodified JSON received from the API
func (*LoginSessionCurrentStepUserInput) UnmarshalJSON ¶
func (r *LoginSessionCurrentStepUserInput) UnmarshalJSON(data []byte) error
type LoginSessionStatus ¶
type LoginSessionStatus string
const ( LoginSessionStatusWaitingForInput LoginSessionStatus = "waiting_for_input" LoginSessionStatusWaitingForCookies LoginSessionStatus = "waiting_for_cookies" LoginSessionStatusWaitingForDisplay LoginSessionStatus = "waiting_for_display" LoginSessionStatusComplete LoginSessionStatus = "complete" LoginSessionStatusCancelled LoginSessionStatus = "cancelled" LoginSessionStatusFailed LoginSessionStatus = "failed" )
type MessageDeleteParams ¶
type MessageDeleteParams struct {
// Chat ID. Input routes also accept the local chat ID from this installation when
// available.
ChatID string `path:"chatID" api:"required" json:"-"`
// True to request deletion for everyone when the network supports it; false to
// delete only for the authenticated user when supported.
ForEveryone param.Opt[bool] `query:"forEveryone,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessageDeleteParams) URLQuery ¶
func (r MessageDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessageDeleteParams's query parameters as `url.Values`.
type MessageGetParams ¶
type MessageGetParams struct {
// Chat ID. Input routes also accept the local chat ID from this installation when
// available.
ChatID string `path:"chatID" api:"required" json:"-"`
// contains filtered or unexported fields
}
type MessageListParams ¶
type MessageListParams struct {
// Opaque pagination cursor; do not inspect. Use together with 'direction'.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Pagination direction used with 'cursor': 'before' fetches older results, 'after'
// fetches newer results. Defaults to 'before' when only 'cursor' is provided.
//
// Any of "after", "before".
Direction MessageListParamsDirection `query:"direction,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessageListParams) URLQuery ¶
func (r MessageListParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessageListParams's query parameters as `url.Values`.
type MessageListParamsDirection ¶
type MessageListParamsDirection string
Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided.
const ( MessageListParamsDirectionAfter MessageListParamsDirection = "after" MessageListParamsDirectionBefore MessageListParamsDirection = "before" )
type MessageSearchParams ¶
type MessageSearchParams struct {
// Exclude messages marked Low Priority by the user. Default: true. Set to false to
// include all.
ExcludeLowPriority param.Opt[bool] `query:"excludeLowPriority,omitzero" json:"-"`
// Include messages in chats marked as Muted by the user, which are usually less
// important. Default: true. Set to false if the user wants a more refined search.
IncludeMuted param.Opt[bool] `query:"includeMuted,omitzero" json:"-"`
// Opaque pagination cursor; do not inspect. Use together with 'direction'.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Only include messages with timestamp strictly after this ISO 8601 datetime
// (e.g., '2024-07-01T00:00:00Z' or '2024-07-01T00:00:00+02:00').
DateAfter param.Opt[time.Time] `query:"dateAfter,omitzero" format:"date-time" json:"-"`
// Only include messages with timestamp strictly before this ISO 8601 datetime
// (e.g., '2024-07-31T23:59:59Z' or '2024-07-31T23:59:59+02:00').
DateBefore param.Opt[time.Time] `query:"dateBefore,omitzero" format:"date-time" json:"-"`
// Maximum number of messages to return.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Literal word search. Finds messages containing these words in any order. Use
// words the user actually typed, not inferred concepts. Example: use "dinner"
// rather than "dinner plans". If omitted, returns results filtered only by the
// other parameters.
Query param.Opt[string] `query:"query,omitzero" json:"-"`
// Filter by sender: 'me' (messages sent by the authenticated user), 'others'
// (messages sent by others), or a specific user ID string (user.id).
Sender param.Opt[string] `query:"sender,omitzero" json:"-"`
// Limit search to specific account IDs.
AccountIDs []string `query:"accountIDs,omitzero" json:"-"`
// Limit search to specific chat IDs.
ChatIDs []string `query:"chatIDs,omitzero" json:"-"`
// Filter by chat type: 'group' for group chats, 'single' for 1:1 chats.
//
// Any of "group", "single".
ChatType MessageSearchParamsChatType `query:"chatType,omitzero" json:"-"`
// Pagination direction used with 'cursor': 'before' fetches older results, 'after'
// fetches newer results. Defaults to 'before' when only 'cursor' is provided.
//
// Any of "after", "before".
Direction MessageSearchParamsDirection `query:"direction,omitzero" json:"-"`
// Filter messages by media types. Use ['any'] for any media type, or specify exact
// types like ['video', 'image']. Omit for no media filtering.
//
// Any of "any", "video", "image", "link", "file".
MediaTypes []string `query:"mediaTypes,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessageSearchParams) URLQuery ¶
func (r MessageSearchParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessageSearchParams's query parameters as `url.Values`.
type MessageSearchParamsChatType ¶
type MessageSearchParamsChatType string
Filter by chat type: 'group' for group chats, 'single' for 1:1 chats.
const ( MessageSearchParamsChatTypeGroup MessageSearchParamsChatType = "group" MessageSearchParamsChatTypeSingle MessageSearchParamsChatType = "single" )
type MessageSearchParamsDirection ¶
type MessageSearchParamsDirection string
Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided.
const ( MessageSearchParamsDirectionAfter MessageSearchParamsDirection = "after" MessageSearchParamsDirectionBefore MessageSearchParamsDirection = "before" )
type MessageSeenByParticipantItemUnion ¶
type MessageSeenByParticipantItemUnion = shared.MessageSeenByParticipantItemUnion
ISO 8601 timestamp.
This is an alias to an internal type.
type MessageSeenUnion ¶
type MessageSeenUnion = shared.MessageSeenUnion
Read receipt state for this message, when available.
This is an alias to an internal type.
type MessageSendParams ¶
type MessageSendParams struct {
// Provide a message ID to send this as a reply to an existing message
ReplyToMessageID param.Opt[string] `json:"replyToMessageID,omitzero"`
// Draft text. Plain text and Markdown are converted to Beeper rich text with the
// same rules used by send and edit.
Text param.Opt[string] `json:"text,omitzero"`
// Single attachment to send with the message
Attachment MessageSendParamsAttachment `json:"attachment,omitzero"`
// contains filtered or unexported fields
}
func (MessageSendParams) MarshalJSON ¶
func (r MessageSendParams) MarshalJSON() (data []byte, err error)
func (*MessageSendParams) UnmarshalJSON ¶
func (r *MessageSendParams) UnmarshalJSON(data []byte) error
type MessageSendParamsAttachment ¶
type MessageSendParamsAttachment struct {
// Upload ID from uploadAsset endpoint. Required to reference uploaded files.
UploadID string `json:"uploadID" api:"required"`
// Duration in seconds (optional override of cached value)
Duration param.Opt[float64] `json:"duration,omitzero"`
// Filename (optional override of cached value)
FileName param.Opt[string] `json:"fileName,omitzero"`
// MIME type (optional override of cached value)
MimeType param.Opt[string] `json:"mimeType,omitzero"`
// Dimensions (optional override of cached value)
Size MessageSendParamsAttachmentSize `json:"size,omitzero"`
// Attachment type hint (image, video, audio, file, gif, voice-note, sticker). If
// omitted, auto-detected from mimeType
//
// Any of "image", "video", "audio", "file", "gif", "voice-note", "sticker".
Type string `json:"type,omitzero"`
// contains filtered or unexported fields
}
Single attachment to send with the message
The property UploadID is required.
func (MessageSendParamsAttachment) MarshalJSON ¶
func (r MessageSendParamsAttachment) MarshalJSON() (data []byte, err error)
func (*MessageSendParamsAttachment) UnmarshalJSON ¶
func (r *MessageSendParamsAttachment) UnmarshalJSON(data []byte) error
type MessageSendParamsAttachmentSize ¶
type MessageSendParamsAttachmentSize struct {
Height float64 `json:"height" api:"required"`
Width float64 `json:"width" api:"required"`
// contains filtered or unexported fields
}
Dimensions (optional override of cached value)
The properties Height, Width are required.
func (MessageSendParamsAttachmentSize) MarshalJSON ¶
func (r MessageSendParamsAttachmentSize) MarshalJSON() (data []byte, err error)
func (*MessageSendParamsAttachmentSize) UnmarshalJSON ¶
func (r *MessageSendParamsAttachmentSize) UnmarshalJSON(data []byte) error
type MessageSendResponse ¶
type MessageSendResponse struct {
// Chat the message was actually sent to. When sending to a merged chat, this is
// the member chat the send was routed to.
ChatID string `json:"chatID" api:"required"`
// Pending ID assigned to the message before the network confirms the send. Pass it
// to GET /v1/chats/{chatID}/messages/{messageID} to resolve, or wait for the
// matching message.upserted over the WebSocket.
PendingMessageID string `json:"pendingMessageID" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChatID respjson.Field
PendingMessageID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MessageSendResponse) RawJSON ¶
func (r MessageSendResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MessageSendResponse) UnmarshalJSON ¶
func (r *MessageSendResponse) UnmarshalJSON(data []byte) error
type MessageService ¶
type MessageService struct {
Options []option.RequestOption
}
Manage messages in chats
MessageService contains methods and other services that help with interacting with the beeperdesktop API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMessageService method instead.
func NewMessageService ¶
func NewMessageService(opts ...option.RequestOption) (r MessageService)
NewMessageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*MessageService) Delete ¶
func (r *MessageService) Delete(ctx context.Context, messageID string, params MessageDeleteParams, opts ...option.RequestOption) (err error)
Delete a message by final message ID. Pending message IDs are not accepted because messages cannot be deleted while sending.
func (*MessageService) Get ¶
func (r *MessageService) Get(ctx context.Context, messageID string, query MessageGetParams, opts ...option.RequestOption) (res *shared.Message, err error)
Retrieve a message by final message ID, pendingMessageID, or Matrix event ID. chatID may be a Beeper chat ID or a local chat ID.
func (*MessageService) List ¶
func (r *MessageService) List(ctx context.Context, chatID string, query MessageListParams, opts ...option.RequestOption) (res *pagination.CursorNoLimit[shared.Message], err error)
List all messages in a chat with cursor-based pagination. Sorted by timestamp.
func (*MessageService) ListAutoPaging ¶
func (r *MessageService) ListAutoPaging(ctx context.Context, chatID string, query MessageListParams, opts ...option.RequestOption) *pagination.CursorNoLimitAutoPager[shared.Message]
List all messages in a chat with cursor-based pagination. Sorted by timestamp.
func (*MessageService) Search ¶
func (r *MessageService) Search(ctx context.Context, query MessageSearchParams, opts ...option.RequestOption) (res *pagination.CursorSearch[shared.Message], err error)
Search messages across chats.
func (*MessageService) SearchAutoPaging ¶
func (r *MessageService) SearchAutoPaging(ctx context.Context, query MessageSearchParams, opts ...option.RequestOption) *pagination.CursorSearchAutoPager[shared.Message]
Search messages across chats.
func (*MessageService) Send ¶
func (r *MessageService) Send(ctx context.Context, chatID string, body MessageSendParams, opts ...option.RequestOption) (res *MessageSendResponse, err error)
Send a text message to a specific chat. Supports replying to existing messages. Returns a pending message ID.
func (*MessageService) Update ¶
func (r *MessageService) Update(ctx context.Context, messageID string, params MessageUpdateParams, opts ...option.RequestOption) (res *MessageUpdateResponse, err error)
Edit the text content of an existing message. Messages with attachments cannot be edited.
type MessageType ¶
type MessageType = shared.MessageType
Message content type. Useful for distinguishing reactions, media messages, and state events from regular text messages.
This is an alias to an internal type.
type MessageUpdateParams ¶
type MessageUpdateParams struct {
// Chat ID. Input routes also accept the local chat ID from this installation when
// available.
ChatID string `path:"chatID" api:"required" json:"-"`
// New text content for the message
Text string `json:"text" api:"required"`
// contains filtered or unexported fields
}
func (MessageUpdateParams) MarshalJSON ¶
func (r MessageUpdateParams) MarshalJSON() (data []byte, err error)
func (*MessageUpdateParams) UnmarshalJSON ¶
func (r *MessageUpdateParams) UnmarshalJSON(data []byte) error
type MessageUpdateResponse ¶
type MessageUpdateResponse struct {
// DEPRECATED - use id instead. Compatibility alias for older clients.
//
// Deprecated: Use id instead.
MessageID string `json:"messageID" api:"required"`
// DEPRECATED - compatibility field. Successful responses are already represented
// by the 200 status code.
//
// Deprecated: Use the HTTP 200 response status instead.
Success bool `json:"success" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MessageID respjson.Field
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
shared.Message
}
func (MessageUpdateResponse) RawJSON ¶
func (r MessageUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MessageUpdateResponse) UnmarshalJSON ¶
func (r *MessageUpdateResponse) UnmarshalJSON(data []byte) error
type ProvisioningCapabilities ¶
type ProvisioningCapabilities struct {
GroupCreation map[string]GroupTypeCapabilities `json:"group_creation" api:"required"`
// Identifier lookup capabilities for this bridge.
ResolveIdentifier ResolveIdentifierCapabilities `json:"resolve_identifier" api:"required"`
ImagePackImport bool `json:"image_pack_import"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
GroupCreation respjson.Field
ResolveIdentifier respjson.Field
ImagePackImport respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Advanced network capabilities for account lookup and group creation.
func (ProvisioningCapabilities) RawJSON ¶
func (r ProvisioningCapabilities) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProvisioningCapabilities) UnmarshalJSON ¶
func (r *ProvisioningCapabilities) UnmarshalJSON(data []byte) error
type ResolveIdentifierCapabilities ¶
type ResolveIdentifierCapabilities struct {
AnyPhone bool `json:"any_phone" api:"required"`
ContactList bool `json:"contact_list" api:"required"`
CreateDM bool `json:"create_dm" api:"required"`
LookupEmail bool `json:"lookup_email" api:"required"`
LookupPhone bool `json:"lookup_phone" api:"required"`
LookupUsername bool `json:"lookup_username" api:"required"`
Search bool `json:"search" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AnyPhone respjson.Field
ContactList respjson.Field
CreateDM respjson.Field
LookupEmail respjson.Field
LookupPhone respjson.Field
LookupUsername respjson.Field
Search respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Identifier lookup capabilities for this bridge.
func (ResolveIdentifierCapabilities) RawJSON ¶
func (r ResolveIdentifierCapabilities) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResolveIdentifierCapabilities) UnmarshalJSON ¶
func (r *ResolveIdentifierCapabilities) UnmarshalJSON(data []byte) error
type SearchParams ¶
type SearchParams struct {
// User-typed search text. Uses literal word matching.
Query string `query:"query" api:"required" json:"-"`
// contains filtered or unexported fields
}
func (SearchParams) URLQuery ¶
func (r SearchParams) URLQuery() (v url.Values, err error)
URLQuery serializes SearchParams's query parameters as `url.Values`.
type SearchResponse ¶
type SearchResponse struct {
Results SearchResponseResults `json:"results" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SearchResponse) RawJSON ¶
func (r SearchResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SearchResponse) UnmarshalJSON ¶
func (r *SearchResponse) UnmarshalJSON(data []byte) error
type SearchResponseResults ¶
type SearchResponseResults struct {
// Top chat results.
Chats []Chat `json:"chats" api:"required"`
// Top group results by participant matches.
InGroups []Chat `json:"in_groups" api:"required"`
Messages SearchResponseResultsMessages `json:"messages" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Chats respjson.Field
InGroups respjson.Field
Messages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SearchResponseResults) RawJSON ¶
func (r SearchResponseResults) RawJSON() string
Returns the unmodified JSON received from the API
func (*SearchResponseResults) UnmarshalJSON ¶
func (r *SearchResponseResults) UnmarshalJSON(data []byte) error
type SearchResponseResultsMessages ¶
type SearchResponseResultsMessages struct {
// Map of chatID -> chat details for chats referenced in items.
Chats map[string]Chat `json:"chats" api:"required"`
// True if additional results can be fetched using the provided cursors.
HasMore bool `json:"hasMore" api:"required"`
// Messages matching the query and filters.
Items []shared.Message `json:"items" api:"required"`
// Cursor for fetching newer results (use with direction='after'). Opaque string;
// do not inspect.
NewestCursor string `json:"newestCursor" api:"required"`
// Cursor for fetching older results (use with direction='before'). Opaque string;
// do not inspect.
OldestCursor string `json:"oldestCursor" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Chats respjson.Field
HasMore respjson.Field
Items respjson.Field
NewestCursor respjson.Field
OldestCursor respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SearchResponseResultsMessages) RawJSON ¶
func (r SearchResponseResultsMessages) RawJSON() string
Returns the unmodified JSON received from the API
func (*SearchResponseResultsMessages) UnmarshalJSON ¶
func (r *SearchResponseResultsMessages) UnmarshalJSON(data []byte) error
type SendStatus ¶
type SendStatus = shared.SendStatus
Message send status for this message, when reported by the bridge.
This is an alias to an internal type.
type SendStatusStatus ¶
type SendStatusStatus = shared.SendStatusStatus
Current status of the message send attempt.
This is an alias to an internal type.
Source Files
¶
- account.go
- accountcontact.go
- aliases.go
- app.go
- appsetup.go
- appsetuprecoverykey.go
- appsetuprecoverykeyreset.go
- appsetupverification.go
- appsetupverificationqr.go
- appsetupverificationsas.go
- asset.go
- beeperdesktopapi.go
- bridge.go
- bridgelogin.go
- bridgeloginflow.go
- bridgeloginsession.go
- bridgeloginsessionstep.go
- chat.go
- chatmessage.go
- chatmessagereaction.go
- chatreminder.go
- client.go
- default_http_client.go
- field.go
- info.go
- label.go
- message.go
Directories
¶
| Path | Synopsis |
|---|---|
|
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
|
Package json implements encoding and decoding of JSON as defined in RFC 7159. |
|
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
|
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package. |
|
packages
|
|