beeperdesktopapi

package module
v5.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2026 License: MIT Imports: 24 Imported by: 0

README

Beeper Desktop Go API Library

Go Reference

The Beeper Desktop Go library provides convenient access to the Beeper Desktop REST API from applications written in Go.

MCP Server

Use the Beeper Desktop MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.

Add to Cursor Install in VS Code

Note: You may need to set environment variables in your MCP client.

Installation

import (
	"github.com/beeper/desktop-api-go/v5" // imported as beeperdesktopapi
)

Or to pin the version:

go get -u 'github.com/beeper/desktop-api-go@v5.0.1'

Requirements

This library requires Go 1.22+.

Usage

The full API of this library can be found in api.md.

package main

import (
	"context"
	"fmt"

	"github.com/beeper/desktop-api-go/v5"
	"github.com/beeper/desktop-api-go/v5/option"
)

func main() {
	client := beeperdesktopapi.NewClient(
		option.WithAccessToken("My Access Token"), // defaults to os.LookupEnv("BEEPER_ACCESS_TOKEN")
	)
	page, err := client.Chats.Search(context.TODO(), beeperdesktopapi.ChatSearchParams{
		AccountIDs:   []string{"matrix", "discordgo", "local-whatsapp_ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc"},
		IncludeMuted: beeperdesktopapi.Bool(true),
		Limit:        beeperdesktopapi.Int(3),
		Type:         beeperdesktopapi.ChatSearchParamsTypeSingle,
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", page)
}

Request fields

The beeperdesktopapi library uses the omitzero semantics from the Go 1.24+ encoding/json release for request fields.

Required primitive fields (int64, string, etc.) feature the tag `api:"required"`. These fields are always serialized, even their zero values.

Optional primitive types are wrapped in a param.Opt[T]. These fields can be set with the provided constructors, beeperdesktopapi.String(string), beeperdesktopapi.Int(int64), etc.

Any param.Opt[T], map, slice, struct or string enum uses the tag `json:"...,omitzero"`. Its zero value is considered omitted.

The param.IsOmitted(any) function can confirm the presence of any omitzero field.

p := beeperdesktopapi.ExampleParams{
	ID:   "id_xxx",                       // required property
	Name: beeperdesktopapi.String("..."), // optional property

	Point: beeperdesktopapi.Point{
		X: 0,                       // required field will serialize as 0
		Y: beeperdesktopapi.Int(1), // optional field will serialize as 1
		// ... omitted non-required fields will not be serialized
	},

	Origin: beeperdesktopapi.Origin{}, // the zero value of [Origin] is considered omitted
}

To send null instead of a param.Opt[T], use param.Null[T](). To send null instead of a struct T, use param.NullStruct[T]().

p.Name = param.Null[string]()       // 'null' instead of string
p.Point = param.NullStruct[Point]() // 'null' instead of struct

param.IsNull(p.Name)  // true
param.IsNull(p.Point) // true

Request structs contain a .SetExtraFields(map[string]any) method which can send non-conforming fields in the request body. Extra fields overwrite any struct fields with a matching key. For security reasons, only use SetExtraFields with trusted data.

To send a custom value instead of a struct, use param.Override[T](value).

// In cases where the API specifies a given type,
// but you want to send something else, use [SetExtraFields]:
p.SetExtraFields(map[string]any{
	"x": 0.01, // send "x" as a float instead of int
})

// Send a number instead of an object
custom := param.Override[beeperdesktopapi.FooParams](12)
Request unions

Unions are represented as a struct with fields prefixed by "Of" for each of its variants, only one field can be non-zero. The non-zero field will be serialized.

Sub-properties of the union can be accessed via methods on the union struct. These methods return a mutable pointer to the underlying data, if present.

// Only one field can be non-zero, use param.IsOmitted() to check if a field is set
type AnimalUnionParam struct {
	OfCat *Cat `json:",omitzero,inline`
	OfDog *Dog `json:",omitzero,inline`
}

animal := AnimalUnionParam{
	OfCat: &Cat{
		Name: "Whiskers",
		Owner: PersonParam{
			Address: AddressParam{Street: "3333 Coyote Hill Rd", Zip: 0},
		},
	},
}

// Mutating a field
if address := animal.GetOwner().GetAddress(); address != nil {
	address.ZipCode = 94304
}
Response objects

All fields in response structs are ordinary value types (not pointers or wrappers). Response structs also include a special JSON field containing metadata about each property.

type Animal struct {
	Name   string `json:"name,nullable"`
	Owners int    `json:"owners"`
	Age    int    `json:"age"`
	JSON   struct {
		Name        respjson.Field
		Owner       respjson.Field
		Age         respjson.Field
		ExtraFields map[string]respjson.Field
	} `json:"-"`
}

To handle optional data, use the .Valid() method on the JSON field. .Valid() returns true if a field is not null, not present, or couldn't be marshaled.

If .Valid() is false, the corresponding field will simply be its zero value.

raw := `{"owners": 1, "name": null}`

var res Animal
json.Unmarshal([]byte(raw), &res)

// Accessing regular fields

res.Owners // 1
res.Name   // ""
res.Age    // 0

// Optional field checks

res.JSON.Owners.Valid() // true
res.JSON.Name.Valid()   // false
res.JSON.Age.Valid()    // false

// Raw JSON values

res.JSON.Owners.Raw()                  // "1"
res.JSON.Name.Raw() == "null"          // true
res.JSON.Name.Raw() == respjson.Null   // true
res.JSON.Age.Raw() == ""               // true
res.JSON.Age.Raw() == respjson.Omitted // true

These .JSON structs also include an ExtraFields map containing any properties in the json response that were not specified in the struct. This can be useful for API features not yet present in the SDK.

body := res.JSON.ExtraFields["my_unexpected_field"].Raw()
Response Unions

In responses, unions are represented by a flattened struct containing all possible fields from each of the object variants. To convert it to a variant use the .AsFooVariant() method or the .AsAny() method if present.

If a response value union contains primitive values, primitive fields will be alongside the properties but prefixed with Of and feature the tag json:"...,inline".

type AnimalUnion struct {
	// From variants [Dog], [Cat]
	Owner Person `json:"owner"`
	// From variant [Dog]
	DogBreed string `json:"dog_breed"`
	// From variant [Cat]
	CatBreed string `json:"cat_breed"`
	// ...

	JSON struct {
		Owner respjson.Field
		// ...
	} `json:"-"`
}

// If animal variant
if animal.Owner.Address.ZipCode == "" {
	panic("missing zip code")
}

// Switch on the variant
switch variant := animal.AsAny().(type) {
case Dog:
case Cat:
default:
	panic("unexpected type")
}
RequestOptions

This library uses the functional options pattern. Functions defined in the option package return a RequestOption, which is a closure that mutates a RequestConfig. These options can be supplied to the client or at individual requests. For example:

client := beeperdesktopapi.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Accounts.List(context.TODO(), ...,
	// Override the header
	option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
	// Add an undocumented field to the request body, using sjson syntax
	option.WithJSONSet("some.json.path", map[string]string{"my": "object"}),
)

The request option option.WithDebugLog(nil) may be helpful while debugging.

See the full list of request options.

Pagination

This library provides some conveniences for working with paginated list endpoints.

You can use .ListAutoPaging() methods to iterate through items across all pages:

iter := client.Messages.SearchAutoPaging(context.TODO(), beeperdesktopapi.MessageSearchParams{
	AccountIDs: []string{"discordgo", "local-whatsapp_ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc"},
	Limit:      beeperdesktopapi.Int(10),
	Query:      beeperdesktopapi.String("oauth"),
})
// Automatically fetches more pages as needed.
for iter.Next() {
	message := iter.Current()
	fmt.Printf("%+v\n", message)
}
if err := iter.Err(); err != nil {
	panic(err.Error())
}

Or you can use simple .List() methods to fetch a single page and receive a standard response object with additional helper methods like .GetNextPage(), e.g.:

page, err := client.Messages.Search(context.TODO(), beeperdesktopapi.MessageSearchParams{
	AccountIDs: []string{"discordgo", "local-whatsapp_ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc"},
	Limit:      beeperdesktopapi.Int(10),
	Query:      beeperdesktopapi.String("oauth"),
})
for page != nil {
	for _, message := range page.Items {
		fmt.Printf("%+v\n", message)
	}
	page, err = page.GetNextPage()
}
if err != nil {
	panic(err.Error())
}
Errors

When the API returns a non-success status code, we return an error with type *beeperdesktopapi.Error. This contains the StatusCode, *http.Request, and *http.Response values of the request, as well as the JSON of the error body (much like other response objects in the SDK).

To handle errors, we recommend that you use the errors.As pattern:

_, err := client.Accounts.List(context.TODO())
if err != nil {
	var apierr *beeperdesktopapi.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/v1/accounts": 400 Bad Request { ... }
}

When other errors occur, they are returned unwrapped; for example, if HTTP transport fails, you might receive *url.Error wrapping *net.OpError.

Timeouts

Requests do not time out by default; use context to configure a timeout for a request lifecycle.

Note that if a request is retried, the context timeout does not start over. To set a per-retry timeout, use option.WithRequestTimeout().

// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Accounts.List(
	ctx,
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

Request parameters that correspond to file uploads in multipart requests are typed as io.Reader. The contents of the io.Reader will by default be sent as a multipart form part with the file name of "anonymous_file" and content-type of "application/octet-stream".

The file name and content-type can be customized by implementing Name() string or ContentType() string on the run-time type of io.Reader. Note that os.File implements Name() string, so a file returned by os.Open will be sent with the file name on disk.

We also provide a helper beeperdesktopapi.File(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

// A file from the file system
file, err := os.Open("/path/to/file")
beeperdesktopapi.AssetUploadParams{
	File: file,
}

// A file from a string
beeperdesktopapi.AssetUploadParams{
	File: strings.NewReader("my file contents"),
}

// With a custom filename and contentType
beeperdesktopapi.AssetUploadParams{
	File: beeperdesktopapi.File(strings.NewReader(`{"hello": "foo"}`), "file.go", "application/json"),
}
Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors.

You can use the WithMaxRetries option to configure or disable this:

// Configure the default for all requests:
client := beeperdesktopapi.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Accounts.List(context.TODO(), option.WithMaxRetries(5))
Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the option.WithResponseInto() request option. This is useful when you need to examine response headers, status codes, or other details.

// Create a variable to store the HTTP response
var response *http.Response
accounts, err := client.Accounts.List(context.TODO(), option.WithResponseInto(&response))
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", accounts)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.Get, client.Post, and other HTTP verbs. RequestOptions on the client, such as retries, will be respected when making these requests.

var (
    // params can be an io.Reader, a []byte, an encoding/json serializable object,
    // or a "…Params" struct defined in this library.
    params map[string]any

    // result can be an []byte, *http.Response, a encoding/json deserializable object,
    // or a model defined in this library.
    result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
    …
}
Undocumented request params

To make requests using undocumented parameters, you may use either the option.WithQuerySet() or the option.WithJSONSet() methods.

params := FooNewParams{
    ID:   "id_xxxx",
    Data: FooNewParamsData{
        FirstName: beeperdesktopapi.String("John"),
    },
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string with result.JSON.RawJSON(), or get the raw JSON of a particular field on the result with result.JSON.Foo.Raw().

Any fields that are not present on the response struct will be saved and can be accessed by result.JSON.ExtraFields() which returns the extra fields as a map[string]Field.

Middleware

We provide option.WithMiddleware which applies the given middleware to requests.

func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
	// Before the request
	start := time.Now()
	LogReq(req)

	// Forward the request to the next handler
	res, err = next(req)

	// Handle stuff after the request
	end := time.Now()
	LogRes(res, err, start - end)

    return res, err
}

client := beeperdesktopapi.NewClient(
	option.WithMiddleware(Logger),
)

When multiple middlewares are provided as variadic arguments, the middlewares are applied left to right. If option.WithMiddleware is given multiple times, for example first in the client then the method, the middleware in the client will run first and the middleware given in the method will run next.

You may also replace the default http.Client with option.WithHTTPClient(client). Only one http client is accepted (this overwrites any previous client) and receives requests after any middleware has been applied.

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

Documentation

Index

Constants

View Source
const AttachmentTypeAudio = shared.AttachmentTypeAudio

Equals "audio"

View Source
const AttachmentTypeImg = shared.AttachmentTypeImg

Equals "img"

View Source
const AttachmentTypeUnknown = shared.AttachmentTypeUnknown

Equals "unknown"

View Source
const AttachmentTypeVideo = shared.AttachmentTypeVideo

Equals "video"

View Source
const MessageTypeAudio = shared.MessageTypeAudio

Equals "AUDIO"

View Source
const MessageTypeFile = shared.MessageTypeFile

Equals "FILE"

View Source
const MessageTypeImage = shared.MessageTypeImage

Equals "IMAGE"

View Source
const MessageTypeLocation = shared.MessageTypeLocation

Equals "LOCATION"

View Source
const MessageTypeNotice = shared.MessageTypeNotice

Equals "NOTICE"

View Source
const MessageTypeReaction = shared.MessageTypeReaction

Equals "REACTION"

View Source
const MessageTypeSticker = shared.MessageTypeSticker

Equals "STICKER"

View Source
const MessageTypeText = shared.MessageTypeText

Equals "TEXT"

View Source
const MessageTypeVideo = shared.MessageTypeVideo

Equals "VIDEO"

View Source
const MessageTypeVoice = shared.MessageTypeVoice

Equals "VOICE"

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) param.Opt[bool]

func BoolPtr

func BoolPtr(v bool) *bool

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 File

func File(rdr io.Reader, filename string, contentType string) file

func Float

func Float(f float64) param.Opt[float64]

func FloatPtr

func FloatPtr(v float64) *float64

func Int

func Int(i int64) param.Opt[int64]

func IntPtr

func IntPtr(v int64) *int64

func Opt

func Opt[T comparable](v T) param.Opt[T]

func Ptr

func Ptr[T any](v T) *T

func String

func String(s string) param.Opt[string]

func StringPtr

func StringPtr(v string) *string

func Time

func Time(t time.Time) param.Opt[time.Time]

func TimePtr

func TimePtr(v time.Time) *time.Time

Types

type APIError added in v5.0.1

type APIError = shared.APIError

This is an alias to an internal type.

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) RawJSON

func (r Account) RawJSON() string

Returns the unmodified JSON received from the API

func (*Account) UnmarshalJSON

func (r *Account) UnmarshalJSON(data []byte) error

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 added in v5.0.1

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. 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

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

List merged contacts for a specific account with cursor-based pagination.

func (*AccountContactService) ListAutoPaging

List merged contacts for a specific account with cursor-based pagination.

func (*AccountContactService) Search

Search contacts on a specific account using merged account contacts, network search, and exact identifier lookup.

type AccountGetResponse added in v5.0.1

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 added in v5.0.1

func (r AccountGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountGetResponse) UnmarshalJSON added in v5.0.1

func (r *AccountGetResponse) UnmarshalJSON(data []byte) error

type AccountGetResponseStatus added in v5.0.1

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 added in v5.0.1

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 added in v5.0.1

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 AppLoginEmailParams added in v5.0.1

type AppLoginEmailParams 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 (AppLoginEmailParams) MarshalJSON added in v5.0.1

func (r AppLoginEmailParams) MarshalJSON() (data []byte, err error)

func (*AppLoginEmailParams) UnmarshalJSON added in v5.0.1

func (r *AppLoginEmailParams) UnmarshalJSON(data []byte) error

type AppLoginRegisterParams added in v5.0.1

type AppLoginRegisterParams 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 (AppLoginRegisterParams) MarshalJSON added in v5.0.1

func (r AppLoginRegisterParams) MarshalJSON() (data []byte, err error)

func (*AppLoginRegisterParams) UnmarshalJSON added in v5.0.1

func (r *AppLoginRegisterParams) UnmarshalJSON(data []byte) error

type AppLoginRegisterResponse added in v5.0.1

type AppLoginRegisterResponse struct {
	// Account credentials for first-party app setup.
	Matrix AppLoginRegisterResponseMatrix `json:"matrix" api:"required"`
	// Current app sign-in and encrypted messaging setup state after sign-in.
	Session AppLoginRegisterResponseSession `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 (AppLoginRegisterResponse) RawJSON added in v5.0.1

func (r AppLoginRegisterResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AppLoginRegisterResponse) UnmarshalJSON added in v5.0.1

func (r *AppLoginRegisterResponse) UnmarshalJSON(data []byte) error

type AppLoginRegisterResponseMatrix added in v5.0.1

type AppLoginRegisterResponseMatrix 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 (AppLoginRegisterResponseMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginRegisterResponseMatrix) UnmarshalJSON added in v5.0.1

func (r *AppLoginRegisterResponseMatrix) UnmarshalJSON(data []byte) error

type AppLoginRegisterResponseSession added in v5.0.1

type AppLoginRegisterResponseSession struct {
	// Encrypted messaging setup status.
	E2EE AppLoginRegisterResponseSessionE2EE `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 AppLoginRegisterResponseSessionMatrix `json:"matrix"`
	// Trusted device verification progress.
	Verification AppLoginRegisterResponseSessionVerification `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 (AppLoginRegisterResponseSession) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginRegisterResponseSession) UnmarshalJSON added in v5.0.1

func (r *AppLoginRegisterResponseSession) UnmarshalJSON(data []byte) error

type AppLoginRegisterResponseSessionE2EE added in v5.0.1

type AppLoginRegisterResponseSessionE2EE 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 AppLoginRegisterResponseSessionE2EESecrets `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 (AppLoginRegisterResponseSessionE2EE) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginRegisterResponseSessionE2EE) UnmarshalJSON added in v5.0.1

func (r *AppLoginRegisterResponseSessionE2EE) UnmarshalJSON(data []byte) error

type AppLoginRegisterResponseSessionE2EESecrets added in v5.0.1

type AppLoginRegisterResponseSessionE2EESecrets 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 (AppLoginRegisterResponseSessionE2EESecrets) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginRegisterResponseSessionE2EESecrets) UnmarshalJSON added in v5.0.1

func (r *AppLoginRegisterResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error

type AppLoginRegisterResponseSessionMatrix added in v5.0.1

type AppLoginRegisterResponseSessionMatrix 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 (AppLoginRegisterResponseSessionMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginRegisterResponseSessionMatrix) UnmarshalJSON added in v5.0.1

func (r *AppLoginRegisterResponseSessionMatrix) UnmarshalJSON(data []byte) error

type AppLoginRegisterResponseSessionVerification added in v5.0.1

type AppLoginRegisterResponseSessionVerification 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 AppLoginRegisterResponseSessionVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppLoginRegisterResponseSessionVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppLoginRegisterResponseSessionVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppLoginRegisterResponseSessionVerificationSAS `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 (AppLoginRegisterResponseSessionVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginRegisterResponseSessionVerification) UnmarshalJSON added in v5.0.1

func (r *AppLoginRegisterResponseSessionVerification) UnmarshalJSON(data []byte) error

type AppLoginRegisterResponseSessionVerificationError added in v5.0.1

type AppLoginRegisterResponseSessionVerificationError 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 (AppLoginRegisterResponseSessionVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginRegisterResponseSessionVerificationError) UnmarshalJSON added in v5.0.1

type AppLoginRegisterResponseSessionVerificationOtherDevice added in v5.0.1

type AppLoginRegisterResponseSessionVerificationOtherDevice 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 (AppLoginRegisterResponseSessionVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginRegisterResponseSessionVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppLoginRegisterResponseSessionVerificationQr added in v5.0.1

type AppLoginRegisterResponseSessionVerificationQr 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 (AppLoginRegisterResponseSessionVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginRegisterResponseSessionVerificationQr) UnmarshalJSON added in v5.0.1

func (r *AppLoginRegisterResponseSessionVerificationQr) UnmarshalJSON(data []byte) error

type AppLoginRegisterResponseSessionVerificationSAS added in v5.0.1

type AppLoginRegisterResponseSessionVerificationSAS 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 (AppLoginRegisterResponseSessionVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginRegisterResponseSessionVerificationSAS) UnmarshalJSON added in v5.0.1

type AppLoginResponseParams added in v5.0.1

type AppLoginResponseParams 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 (AppLoginResponseParams) MarshalJSON added in v5.0.1

func (r AppLoginResponseParams) MarshalJSON() (data []byte, err error)

func (*AppLoginResponseParams) UnmarshalJSON added in v5.0.1

func (r *AppLoginResponseParams) UnmarshalJSON(data []byte) error

type AppLoginResponseResponseRegistrationRequired added in v5.0.1

type AppLoginResponseResponseRegistrationRequired struct {
	// Copy to display during account creation.
	Copy AppLoginResponseResponseRegistrationRequiredCopy `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 (AppLoginResponseResponseRegistrationRequired) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginResponseResponseRegistrationRequired) UnmarshalJSON added in v5.0.1

func (r *AppLoginResponseResponseRegistrationRequired) UnmarshalJSON(data []byte) error

type AppLoginResponseResponseRegistrationRequiredCopy added in v5.0.1

type AppLoginResponseResponseRegistrationRequiredCopy 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 (AppLoginResponseResponseRegistrationRequiredCopy) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginResponseResponseRegistrationRequiredCopy) UnmarshalJSON added in v5.0.1

type AppLoginResponseResponseSuccess added in v5.0.1

type AppLoginResponseResponseSuccess struct {
	// Account credentials for first-party app setup.
	Matrix AppLoginResponseResponseSuccessMatrix `json:"matrix" api:"required"`
	// Current app sign-in and encrypted messaging setup state after sign-in.
	Session AppLoginResponseResponseSuccessSession `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 (AppLoginResponseResponseSuccess) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginResponseResponseSuccess) UnmarshalJSON added in v5.0.1

func (r *AppLoginResponseResponseSuccess) UnmarshalJSON(data []byte) error

type AppLoginResponseResponseSuccessMatrix added in v5.0.1

type AppLoginResponseResponseSuccessMatrix 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 (AppLoginResponseResponseSuccessMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginResponseResponseSuccessMatrix) UnmarshalJSON added in v5.0.1

func (r *AppLoginResponseResponseSuccessMatrix) UnmarshalJSON(data []byte) error

type AppLoginResponseResponseSuccessSession added in v5.0.1

type AppLoginResponseResponseSuccessSession struct {
	// Encrypted messaging setup status.
	E2EE AppLoginResponseResponseSuccessSessionE2EE `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 AppLoginResponseResponseSuccessSessionMatrix `json:"matrix"`
	// Trusted device verification progress.
	Verification AppLoginResponseResponseSuccessSessionVerification `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 (AppLoginResponseResponseSuccessSession) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginResponseResponseSuccessSession) UnmarshalJSON added in v5.0.1

func (r *AppLoginResponseResponseSuccessSession) UnmarshalJSON(data []byte) error

type AppLoginResponseResponseSuccessSessionE2EE added in v5.0.1

type AppLoginResponseResponseSuccessSessionE2EE 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 AppLoginResponseResponseSuccessSessionE2EESecrets `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 (AppLoginResponseResponseSuccessSessionE2EE) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginResponseResponseSuccessSessionE2EE) UnmarshalJSON added in v5.0.1

func (r *AppLoginResponseResponseSuccessSessionE2EE) UnmarshalJSON(data []byte) error

type AppLoginResponseResponseSuccessSessionE2EESecrets added in v5.0.1

type AppLoginResponseResponseSuccessSessionE2EESecrets 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 (AppLoginResponseResponseSuccessSessionE2EESecrets) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginResponseResponseSuccessSessionE2EESecrets) UnmarshalJSON added in v5.0.1

type AppLoginResponseResponseSuccessSessionMatrix added in v5.0.1

type AppLoginResponseResponseSuccessSessionMatrix 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 (AppLoginResponseResponseSuccessSessionMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginResponseResponseSuccessSessionMatrix) UnmarshalJSON added in v5.0.1

func (r *AppLoginResponseResponseSuccessSessionMatrix) UnmarshalJSON(data []byte) error

type AppLoginResponseResponseSuccessSessionVerification added in v5.0.1

type AppLoginResponseResponseSuccessSessionVerification 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 AppLoginResponseResponseSuccessSessionVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppLoginResponseResponseSuccessSessionVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppLoginResponseResponseSuccessSessionVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppLoginResponseResponseSuccessSessionVerificationSAS `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 (AppLoginResponseResponseSuccessSessionVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginResponseResponseSuccessSessionVerification) UnmarshalJSON added in v5.0.1

type AppLoginResponseResponseSuccessSessionVerificationError added in v5.0.1

type AppLoginResponseResponseSuccessSessionVerificationError 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 (AppLoginResponseResponseSuccessSessionVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginResponseResponseSuccessSessionVerificationError) UnmarshalJSON added in v5.0.1

type AppLoginResponseResponseSuccessSessionVerificationOtherDevice added in v5.0.1

type AppLoginResponseResponseSuccessSessionVerificationOtherDevice 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 (AppLoginResponseResponseSuccessSessionVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginResponseResponseSuccessSessionVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppLoginResponseResponseSuccessSessionVerificationQr added in v5.0.1

type AppLoginResponseResponseSuccessSessionVerificationQr 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 (AppLoginResponseResponseSuccessSessionVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginResponseResponseSuccessSessionVerificationQr) UnmarshalJSON added in v5.0.1

type AppLoginResponseResponseSuccessSessionVerificationSAS added in v5.0.1

type AppLoginResponseResponseSuccessSessionVerificationSAS 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 (AppLoginResponseResponseSuccessSessionVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginResponseResponseSuccessSessionVerificationSAS) UnmarshalJSON added in v5.0.1

type AppLoginResponseResponseUnion added in v5.0.1

type AppLoginResponseResponseUnion struct {
	// This field is from variant [AppLoginResponseResponseSuccess].
	Matrix AppLoginResponseResponseSuccessMatrix `json:"matrix"`
	// This field is from variant [AppLoginResponseResponseSuccess].
	Session AppLoginResponseResponseSuccessSession `json:"session"`
	// This field is from variant [AppLoginResponseResponseRegistrationRequired].
	Copy AppLoginResponseResponseRegistrationRequiredCopy `json:"copy"`
	// This field is from variant [AppLoginResponseResponseRegistrationRequired].
	LeadToken string `json:"leadToken"`
	// This field is from variant [AppLoginResponseResponseRegistrationRequired].
	RegistrationRequired bool `json:"registrationRequired"`
	// This field is from variant [AppLoginResponseResponseRegistrationRequired].
	SetupRequestID string `json:"setupRequestID"`
	// This field is from variant [AppLoginResponseResponseRegistrationRequired].
	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:"-"`
}

AppLoginResponseResponseUnion contains all possible properties and values from AppLoginResponseResponseSuccess, AppLoginResponseResponseRegistrationRequired.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (AppLoginResponseResponseUnion) AsRegistrationRequired added in v5.0.1

func (AppLoginResponseResponseUnion) AsSuccess added in v5.0.1

func (AppLoginResponseResponseUnion) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginResponseResponseUnion) UnmarshalJSON added in v5.0.1

func (r *AppLoginResponseResponseUnion) UnmarshalJSON(data []byte) error

type AppLoginService added in v5.0.1

type AppLoginService struct {
	Options      []option.RequestOption
	Verification AppLoginVerificationService
}

Complete first-party Beeper app login

AppLoginService 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 NewAppLoginService method instead.

func NewAppLoginService added in v5.0.1

func NewAppLoginService(opts ...option.RequestOption) (r AppLoginService)

NewAppLoginService 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 (*AppLoginService) Email added in v5.0.1

func (r *AppLoginService) Email(ctx context.Context, body AppLoginEmailParams, opts ...option.RequestOption) (err error)

Send a sign-in code to the user email address for app setup.

func (*AppLoginService) Register added in v5.0.1

Create a Beeper account after the user chooses a username and accepts the Terms of Use.

func (*AppLoginService) Response added in v5.0.1

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 (*AppLoginService) Start added in v5.0.1

func (r *AppLoginService) Start(ctx context.Context, opts ...option.RequestOption) (res *AppLoginStartResponse, err error)

Start setting up Beeper Desktop or Beeper Server. The flow supports existing Beeper accounts and new account creation.

type AppLoginStartResponse added in v5.0.1

type AppLoginStartResponse 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 (AppLoginStartResponse) RawJSON added in v5.0.1

func (r AppLoginStartResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AppLoginStartResponse) UnmarshalJSON added in v5.0.1

func (r *AppLoginStartResponse) UnmarshalJSON(data []byte) error

type AppLoginVerificationRecoveryKeyResetConfirmParams added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmParams struct {
	// New recovery key returned by the reset step.
	RecoveryKey string `json:"recoveryKey" api:"required"`
	// contains filtered or unexported fields
}

func (AppLoginVerificationRecoveryKeyResetConfirmParams) MarshalJSON added in v5.0.1

func (r AppLoginVerificationRecoveryKeyResetConfirmParams) MarshalJSON() (data []byte, err error)

func (*AppLoginVerificationRecoveryKeyResetConfirmParams) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponse added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponse struct {
	// Current app sign-in and encrypted messaging setup state.
	Session AppLoginVerificationRecoveryKeyResetConfirmResponseSession `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 (AppLoginVerificationRecoveryKeyResetConfirmResponse) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetConfirmResponse) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSession added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSession struct {
	// Encrypted messaging setup status.
	E2EE AppLoginVerificationRecoveryKeyResetConfirmResponseSessionE2EE `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 AppLoginVerificationRecoveryKeyResetConfirmResponseSessionMatrix `json:"matrix"`
	// Trusted device verification progress.
	Verification AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerification `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 (AppLoginVerificationRecoveryKeyResetConfirmResponseSession) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetConfirmResponseSession) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionE2EE added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionE2EE 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 AppLoginVerificationRecoveryKeyResetConfirmResponseSessionE2EESecrets `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 (AppLoginVerificationRecoveryKeyResetConfirmResponseSessionE2EE) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetConfirmResponseSessionE2EE) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionE2EESecrets added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionE2EESecrets 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 (AppLoginVerificationRecoveryKeyResetConfirmResponseSessionE2EESecrets) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetConfirmResponseSessionE2EESecrets) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionMatrix added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionMatrix 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 (AppLoginVerificationRecoveryKeyResetConfirmResponseSessionMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetConfirmResponseSessionMatrix) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerification added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerification 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 AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationSAS `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 (AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerification) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationError added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationError 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 (AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationError) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice 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 (AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationQr added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationQr 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 (AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationQr) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationSAS added in v5.0.1

type AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationSAS 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 (AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationSAS) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewParams added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewParams struct {
	// Existing recovery key, if the user has it.
	ExistingRecoveryKey param.Opt[string] `json:"existingRecoveryKey,omitzero"`
	// contains filtered or unexported fields
}

func (AppLoginVerificationRecoveryKeyResetNewParams) MarshalJSON added in v5.0.1

func (r AppLoginVerificationRecoveryKeyResetNewParams) MarshalJSON() (data []byte, err error)

func (*AppLoginVerificationRecoveryKeyResetNewParams) UnmarshalJSON added in v5.0.1

func (r *AppLoginVerificationRecoveryKeyResetNewParams) UnmarshalJSON(data []byte) error

type AppLoginVerificationRecoveryKeyResetNewResponse added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponse 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 AppLoginVerificationRecoveryKeyResetNewResponseSession `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 (AppLoginVerificationRecoveryKeyResetNewResponse) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetNewResponse) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSession added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSession struct {
	// Encrypted messaging setup status.
	E2EE AppLoginVerificationRecoveryKeyResetNewResponseSessionE2EE `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 AppLoginVerificationRecoveryKeyResetNewResponseSessionMatrix `json:"matrix"`
	// Trusted device verification progress.
	Verification AppLoginVerificationRecoveryKeyResetNewResponseSessionVerification `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 (AppLoginVerificationRecoveryKeyResetNewResponseSession) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetNewResponseSession) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionE2EE added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionE2EE 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 AppLoginVerificationRecoveryKeyResetNewResponseSessionE2EESecrets `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 (AppLoginVerificationRecoveryKeyResetNewResponseSessionE2EE) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetNewResponseSessionE2EE) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionE2EESecrets added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionE2EESecrets 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 (AppLoginVerificationRecoveryKeyResetNewResponseSessionE2EESecrets) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetNewResponseSessionE2EESecrets) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionMatrix added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionMatrix 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 (AppLoginVerificationRecoveryKeyResetNewResponseSessionMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetNewResponseSessionMatrix) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionVerification added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionVerification 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 AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationSAS `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 (AppLoginVerificationRecoveryKeyResetNewResponseSessionVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetNewResponseSessionVerification) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationError added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationError 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 (AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationError) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationOtherDevice added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationOtherDevice 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 (AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationQr added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationQr 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 (AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationQr) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationSAS added in v5.0.1

type AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationSAS 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 (AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationSAS) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyResetService added in v5.0.1

type AppLoginVerificationRecoveryKeyResetService struct {
	Options []option.RequestOption
}

First-party sign-in and encrypted messaging setup for Beeper Desktop and Beeper Server.

AppLoginVerificationRecoveryKeyResetService 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 NewAppLoginVerificationRecoveryKeyResetService method instead.

func NewAppLoginVerificationRecoveryKeyResetService added in v5.0.1

func NewAppLoginVerificationRecoveryKeyResetService(opts ...option.RequestOption) (r AppLoginVerificationRecoveryKeyResetService)

NewAppLoginVerificationRecoveryKeyResetService 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 (*AppLoginVerificationRecoveryKeyResetService) Confirm added in v5.0.1

Confirm that the new recovery key should be used for this account.

func (*AppLoginVerificationRecoveryKeyResetService) New added in v5.0.1

Create a new recovery key when the user cannot use the existing one.

type AppLoginVerificationRecoveryKeyService added in v5.0.1

type AppLoginVerificationRecoveryKeyService struct {
	Options []option.RequestOption
	// First-party sign-in and encrypted messaging setup for Beeper Desktop and Beeper
	// Server.
	Reset AppLoginVerificationRecoveryKeyResetService
}

First-party sign-in and encrypted messaging setup for Beeper Desktop and Beeper Server.

AppLoginVerificationRecoveryKeyService 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 NewAppLoginVerificationRecoveryKeyService method instead.

func NewAppLoginVerificationRecoveryKeyService added in v5.0.1

func NewAppLoginVerificationRecoveryKeyService(opts ...option.RequestOption) (r AppLoginVerificationRecoveryKeyService)

NewAppLoginVerificationRecoveryKeyService 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 (*AppLoginVerificationRecoveryKeyService) Verify added in v5.0.1

Unlock encrypted messages with the user recovery key.

type AppLoginVerificationRecoveryKeyVerifyParams added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyParams struct {
	// Recovery key saved by the user.
	RecoveryKey string `json:"recoveryKey" api:"required"`
	// contains filtered or unexported fields
}

func (AppLoginVerificationRecoveryKeyVerifyParams) MarshalJSON added in v5.0.1

func (r AppLoginVerificationRecoveryKeyVerifyParams) MarshalJSON() (data []byte, err error)

func (*AppLoginVerificationRecoveryKeyVerifyParams) UnmarshalJSON added in v5.0.1

func (r *AppLoginVerificationRecoveryKeyVerifyParams) UnmarshalJSON(data []byte) error

type AppLoginVerificationRecoveryKeyVerifyResponse added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponse struct {
	// Current app sign-in and encrypted messaging setup state.
	Session AppLoginVerificationRecoveryKeyVerifyResponseSession `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 (AppLoginVerificationRecoveryKeyVerifyResponse) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyVerifyResponse) UnmarshalJSON added in v5.0.1

func (r *AppLoginVerificationRecoveryKeyVerifyResponse) UnmarshalJSON(data []byte) error

type AppLoginVerificationRecoveryKeyVerifyResponseSession added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSession struct {
	// Encrypted messaging setup status.
	E2EE AppLoginVerificationRecoveryKeyVerifyResponseSessionE2EE `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 AppLoginVerificationRecoveryKeyVerifyResponseSessionMatrix `json:"matrix"`
	// Trusted device verification progress.
	Verification AppLoginVerificationRecoveryKeyVerifyResponseSessionVerification `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 (AppLoginVerificationRecoveryKeyVerifyResponseSession) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyVerifyResponseSession) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionE2EE added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionE2EE 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 AppLoginVerificationRecoveryKeyVerifyResponseSessionE2EESecrets `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 (AppLoginVerificationRecoveryKeyVerifyResponseSessionE2EE) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyVerifyResponseSessionE2EE) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionE2EESecrets added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionE2EESecrets 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 (AppLoginVerificationRecoveryKeyVerifyResponseSessionE2EESecrets) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyVerifyResponseSessionE2EESecrets) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionMatrix added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionMatrix 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 (AppLoginVerificationRecoveryKeyVerifyResponseSessionMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyVerifyResponseSessionMatrix) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionVerification added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionVerification 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 AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationSAS `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 (AppLoginVerificationRecoveryKeyVerifyResponseSessionVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyVerifyResponseSessionVerification) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationError added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationError 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 (AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationError) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationOtherDevice added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationOtherDevice 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 (AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationQr added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationQr 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 (AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationQr) UnmarshalJSON added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationSAS added in v5.0.1

type AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationSAS 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 (AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationSAS) UnmarshalJSON added in v5.0.1

type AppLoginVerificationService added in v5.0.1

type AppLoginVerificationService struct {
	Options []option.RequestOption
	// First-party sign-in and encrypted messaging setup for Beeper Desktop and Beeper
	// Server.
	RecoveryKey AppLoginVerificationRecoveryKeyService
}

AppLoginVerificationService 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 NewAppLoginVerificationService method instead.

func NewAppLoginVerificationService added in v5.0.1

func NewAppLoginVerificationService(opts ...option.RequestOption) (r AppLoginVerificationService)

NewAppLoginVerificationService 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 AppService added in v5.0.1

type AppService struct {
	Options []option.RequestOption
	// Complete first-party Beeper app login
	Login AppLoginService
	// Manage device verification transactions
	Verifications AppVerificationService
}

Manage Beeper app login 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 added in v5.0.1

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.

func (*AppService) Session added in v5.0.1

func (r *AppService) Session(ctx context.Context, opts ...option.RequestOption) (res *AppSessionResponse, 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.

type AppSessionResponse added in v5.0.1

type AppSessionResponse struct {
	// Encrypted messaging setup status.
	E2EE AppSessionResponseE2EE `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 AppSessionResponseState `json:"state" api:"required"`
	// Signed-in account details. Omitted until sign-in is complete.
	Matrix AppSessionResponseMatrix `json:"matrix"`
	// Trusted device verification progress.
	Verification AppSessionResponseVerification `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 (AppSessionResponse) RawJSON added in v5.0.1

func (r AppSessionResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AppSessionResponse) UnmarshalJSON added in v5.0.1

func (r *AppSessionResponse) UnmarshalJSON(data []byte) error

type AppSessionResponseE2EE added in v5.0.1

type AppSessionResponseE2EE 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 AppSessionResponseE2EESecrets `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 (AppSessionResponseE2EE) RawJSON added in v5.0.1

func (r AppSessionResponseE2EE) RawJSON() string

Returns the unmodified JSON received from the API

func (*AppSessionResponseE2EE) UnmarshalJSON added in v5.0.1

func (r *AppSessionResponseE2EE) UnmarshalJSON(data []byte) error

type AppSessionResponseE2EESecrets added in v5.0.1

type AppSessionResponseE2EESecrets 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 (AppSessionResponseE2EESecrets) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppSessionResponseE2EESecrets) UnmarshalJSON added in v5.0.1

func (r *AppSessionResponseE2EESecrets) UnmarshalJSON(data []byte) error

type AppSessionResponseMatrix added in v5.0.1

type AppSessionResponseMatrix 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 (AppSessionResponseMatrix) RawJSON added in v5.0.1

func (r AppSessionResponseMatrix) RawJSON() string

Returns the unmodified JSON received from the API

func (*AppSessionResponseMatrix) UnmarshalJSON added in v5.0.1

func (r *AppSessionResponseMatrix) UnmarshalJSON(data []byte) error

type AppSessionResponseState added in v5.0.1

type AppSessionResponseState string

Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

const (
	AppSessionResponseStateNeedsLogin             AppSessionResponseState = "needs-login"
	AppSessionResponseStateInitializing           AppSessionResponseState = "initializing"
	AppSessionResponseStateNeedsCrossSigningSetup AppSessionResponseState = "needs-cross-signing-setup"
	AppSessionResponseStateNeedsVerification      AppSessionResponseState = "needs-verification"
	AppSessionResponseStateNeedsSecrets           AppSessionResponseState = "needs-secrets"
	AppSessionResponseStateNeedsFirstSync         AppSessionResponseState = "needs-first-sync"
	AppSessionResponseStateReady                  AppSessionResponseState = "ready"
)

type AppSessionResponseVerification added in v5.0.1

type AppSessionResponseVerification 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 AppSessionResponseVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppSessionResponseVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppSessionResponseVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppSessionResponseVerificationSAS `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 (AppSessionResponseVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppSessionResponseVerification) UnmarshalJSON added in v5.0.1

func (r *AppSessionResponseVerification) UnmarshalJSON(data []byte) error

type AppSessionResponseVerificationError added in v5.0.1

type AppSessionResponseVerificationError 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 (AppSessionResponseVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppSessionResponseVerificationError) UnmarshalJSON added in v5.0.1

func (r *AppSessionResponseVerificationError) UnmarshalJSON(data []byte) error

type AppSessionResponseVerificationOtherDevice added in v5.0.1

type AppSessionResponseVerificationOtherDevice 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 (AppSessionResponseVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppSessionResponseVerificationOtherDevice) UnmarshalJSON added in v5.0.1

func (r *AppSessionResponseVerificationOtherDevice) UnmarshalJSON(data []byte) error

type AppSessionResponseVerificationQr added in v5.0.1

type AppSessionResponseVerificationQr 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 (AppSessionResponseVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppSessionResponseVerificationQr) UnmarshalJSON added in v5.0.1

func (r *AppSessionResponseVerificationQr) UnmarshalJSON(data []byte) error

type AppSessionResponseVerificationSAS added in v5.0.1

type AppSessionResponseVerificationSAS 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 (AppSessionResponseVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppSessionResponseVerificationSAS) UnmarshalJSON added in v5.0.1

func (r *AppSessionResponseVerificationSAS) UnmarshalJSON(data []byte) error

type AppVerificationAcceptResponse added in v5.0.1

type AppVerificationAcceptResponse struct {
	// Current app sign-in and encrypted messaging setup state.
	Session AppVerificationAcceptResponseSession `json:"session" api:"required"`
	// Trusted device verification progress.
	Verification AppVerificationAcceptResponseVerification `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 (AppVerificationAcceptResponse) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponse) UnmarshalJSON added in v5.0.1

func (r *AppVerificationAcceptResponse) UnmarshalJSON(data []byte) error

type AppVerificationAcceptResponseSession added in v5.0.1

type AppVerificationAcceptResponseSession struct {
	// Encrypted messaging setup status.
	E2EE AppVerificationAcceptResponseSessionE2EE `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 AppVerificationAcceptResponseSessionMatrix `json:"matrix"`
	// Trusted device verification progress.
	Verification AppVerificationAcceptResponseSessionVerification `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 (AppVerificationAcceptResponseSession) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponseSession) UnmarshalJSON added in v5.0.1

func (r *AppVerificationAcceptResponseSession) UnmarshalJSON(data []byte) error

type AppVerificationAcceptResponseSessionE2EE added in v5.0.1

type AppVerificationAcceptResponseSessionE2EE 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 AppVerificationAcceptResponseSessionE2EESecrets `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 (AppVerificationAcceptResponseSessionE2EE) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponseSessionE2EE) UnmarshalJSON added in v5.0.1

func (r *AppVerificationAcceptResponseSessionE2EE) UnmarshalJSON(data []byte) error

type AppVerificationAcceptResponseSessionE2EESecrets added in v5.0.1

type AppVerificationAcceptResponseSessionE2EESecrets 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 (AppVerificationAcceptResponseSessionE2EESecrets) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponseSessionE2EESecrets) UnmarshalJSON added in v5.0.1

type AppVerificationAcceptResponseSessionMatrix added in v5.0.1

type AppVerificationAcceptResponseSessionMatrix 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 (AppVerificationAcceptResponseSessionMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponseSessionMatrix) UnmarshalJSON added in v5.0.1

func (r *AppVerificationAcceptResponseSessionMatrix) UnmarshalJSON(data []byte) error

type AppVerificationAcceptResponseSessionVerification added in v5.0.1

type AppVerificationAcceptResponseSessionVerification 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 AppVerificationAcceptResponseSessionVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationAcceptResponseSessionVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationAcceptResponseSessionVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationAcceptResponseSessionVerificationSAS `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 (AppVerificationAcceptResponseSessionVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponseSessionVerification) UnmarshalJSON added in v5.0.1

type AppVerificationAcceptResponseSessionVerificationError added in v5.0.1

type AppVerificationAcceptResponseSessionVerificationError 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 (AppVerificationAcceptResponseSessionVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponseSessionVerificationError) UnmarshalJSON added in v5.0.1

type AppVerificationAcceptResponseSessionVerificationOtherDevice added in v5.0.1

type AppVerificationAcceptResponseSessionVerificationOtherDevice 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 (AppVerificationAcceptResponseSessionVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponseSessionVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationAcceptResponseSessionVerificationQr added in v5.0.1

type AppVerificationAcceptResponseSessionVerificationQr 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 (AppVerificationAcceptResponseSessionVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponseSessionVerificationQr) UnmarshalJSON added in v5.0.1

type AppVerificationAcceptResponseSessionVerificationSAS added in v5.0.1

type AppVerificationAcceptResponseSessionVerificationSAS 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 (AppVerificationAcceptResponseSessionVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponseSessionVerificationSAS) UnmarshalJSON added in v5.0.1

type AppVerificationAcceptResponseVerification added in v5.0.1

type AppVerificationAcceptResponseVerification 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 AppVerificationAcceptResponseVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationAcceptResponseVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationAcceptResponseVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationAcceptResponseVerificationSAS `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 (AppVerificationAcceptResponseVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponseVerification) UnmarshalJSON added in v5.0.1

func (r *AppVerificationAcceptResponseVerification) UnmarshalJSON(data []byte) error

type AppVerificationAcceptResponseVerificationError added in v5.0.1

type AppVerificationAcceptResponseVerificationError 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 (AppVerificationAcceptResponseVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponseVerificationError) UnmarshalJSON added in v5.0.1

type AppVerificationAcceptResponseVerificationOtherDevice added in v5.0.1

type AppVerificationAcceptResponseVerificationOtherDevice 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 (AppVerificationAcceptResponseVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponseVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationAcceptResponseVerificationQr added in v5.0.1

type AppVerificationAcceptResponseVerificationQr 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 (AppVerificationAcceptResponseVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponseVerificationQr) UnmarshalJSON added in v5.0.1

func (r *AppVerificationAcceptResponseVerificationQr) UnmarshalJSON(data []byte) error

type AppVerificationAcceptResponseVerificationSAS added in v5.0.1

type AppVerificationAcceptResponseVerificationSAS 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 (AppVerificationAcceptResponseVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationAcceptResponseVerificationSAS) UnmarshalJSON added in v5.0.1

func (r *AppVerificationAcceptResponseVerificationSAS) UnmarshalJSON(data []byte) error

type AppVerificationCancelParams added in v5.0.1

type AppVerificationCancelParams 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 (AppVerificationCancelParams) MarshalJSON added in v5.0.1

func (r AppVerificationCancelParams) MarshalJSON() (data []byte, err error)

func (*AppVerificationCancelParams) UnmarshalJSON added in v5.0.1

func (r *AppVerificationCancelParams) UnmarshalJSON(data []byte) error

type AppVerificationCancelResponse added in v5.0.1

type AppVerificationCancelResponse struct {
	// Current app sign-in and encrypted messaging setup state.
	Session AppVerificationCancelResponseSession `json:"session" api:"required"`
	// Trusted device verification progress.
	Verification AppVerificationCancelResponseVerification `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 (AppVerificationCancelResponse) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponse) UnmarshalJSON added in v5.0.1

func (r *AppVerificationCancelResponse) UnmarshalJSON(data []byte) error

type AppVerificationCancelResponseSession added in v5.0.1

type AppVerificationCancelResponseSession struct {
	// Encrypted messaging setup status.
	E2EE AppVerificationCancelResponseSessionE2EE `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 AppVerificationCancelResponseSessionMatrix `json:"matrix"`
	// Trusted device verification progress.
	Verification AppVerificationCancelResponseSessionVerification `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 (AppVerificationCancelResponseSession) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponseSession) UnmarshalJSON added in v5.0.1

func (r *AppVerificationCancelResponseSession) UnmarshalJSON(data []byte) error

type AppVerificationCancelResponseSessionE2EE added in v5.0.1

type AppVerificationCancelResponseSessionE2EE 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 AppVerificationCancelResponseSessionE2EESecrets `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 (AppVerificationCancelResponseSessionE2EE) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponseSessionE2EE) UnmarshalJSON added in v5.0.1

func (r *AppVerificationCancelResponseSessionE2EE) UnmarshalJSON(data []byte) error

type AppVerificationCancelResponseSessionE2EESecrets added in v5.0.1

type AppVerificationCancelResponseSessionE2EESecrets 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 (AppVerificationCancelResponseSessionE2EESecrets) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponseSessionE2EESecrets) UnmarshalJSON added in v5.0.1

type AppVerificationCancelResponseSessionMatrix added in v5.0.1

type AppVerificationCancelResponseSessionMatrix 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 (AppVerificationCancelResponseSessionMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponseSessionMatrix) UnmarshalJSON added in v5.0.1

func (r *AppVerificationCancelResponseSessionMatrix) UnmarshalJSON(data []byte) error

type AppVerificationCancelResponseSessionVerification added in v5.0.1

type AppVerificationCancelResponseSessionVerification 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 AppVerificationCancelResponseSessionVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationCancelResponseSessionVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationCancelResponseSessionVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationCancelResponseSessionVerificationSAS `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 (AppVerificationCancelResponseSessionVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponseSessionVerification) UnmarshalJSON added in v5.0.1

type AppVerificationCancelResponseSessionVerificationError added in v5.0.1

type AppVerificationCancelResponseSessionVerificationError 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 (AppVerificationCancelResponseSessionVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponseSessionVerificationError) UnmarshalJSON added in v5.0.1

type AppVerificationCancelResponseSessionVerificationOtherDevice added in v5.0.1

type AppVerificationCancelResponseSessionVerificationOtherDevice 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 (AppVerificationCancelResponseSessionVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponseSessionVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationCancelResponseSessionVerificationQr added in v5.0.1

type AppVerificationCancelResponseSessionVerificationQr 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 (AppVerificationCancelResponseSessionVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponseSessionVerificationQr) UnmarshalJSON added in v5.0.1

type AppVerificationCancelResponseSessionVerificationSAS added in v5.0.1

type AppVerificationCancelResponseSessionVerificationSAS 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 (AppVerificationCancelResponseSessionVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponseSessionVerificationSAS) UnmarshalJSON added in v5.0.1

type AppVerificationCancelResponseVerification added in v5.0.1

type AppVerificationCancelResponseVerification 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 AppVerificationCancelResponseVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationCancelResponseVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationCancelResponseVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationCancelResponseVerificationSAS `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 (AppVerificationCancelResponseVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponseVerification) UnmarshalJSON added in v5.0.1

func (r *AppVerificationCancelResponseVerification) UnmarshalJSON(data []byte) error

type AppVerificationCancelResponseVerificationError added in v5.0.1

type AppVerificationCancelResponseVerificationError 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 (AppVerificationCancelResponseVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponseVerificationError) UnmarshalJSON added in v5.0.1

type AppVerificationCancelResponseVerificationOtherDevice added in v5.0.1

type AppVerificationCancelResponseVerificationOtherDevice 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 (AppVerificationCancelResponseVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponseVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationCancelResponseVerificationQr added in v5.0.1

type AppVerificationCancelResponseVerificationQr 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 (AppVerificationCancelResponseVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponseVerificationQr) UnmarshalJSON added in v5.0.1

func (r *AppVerificationCancelResponseVerificationQr) UnmarshalJSON(data []byte) error

type AppVerificationCancelResponseVerificationSAS added in v5.0.1

type AppVerificationCancelResponseVerificationSAS 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 (AppVerificationCancelResponseVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationCancelResponseVerificationSAS) UnmarshalJSON added in v5.0.1

func (r *AppVerificationCancelResponseVerificationSAS) UnmarshalJSON(data []byte) error

type AppVerificationGetResponse added in v5.0.1

type AppVerificationGetResponse struct {
	// Current app sign-in and encrypted messaging setup state.
	Session AppVerificationGetResponseSession `json:"session" api:"required"`
	// Trusted device verification progress.
	Verification AppVerificationGetResponseVerification `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 (AppVerificationGetResponse) RawJSON added in v5.0.1

func (r AppVerificationGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponse) UnmarshalJSON added in v5.0.1

func (r *AppVerificationGetResponse) UnmarshalJSON(data []byte) error

type AppVerificationGetResponseSession added in v5.0.1

type AppVerificationGetResponseSession struct {
	// Encrypted messaging setup status.
	E2EE AppVerificationGetResponseSessionE2EE `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 AppVerificationGetResponseSessionMatrix `json:"matrix"`
	// Trusted device verification progress.
	Verification AppVerificationGetResponseSessionVerification `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 (AppVerificationGetResponseSession) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponseSession) UnmarshalJSON added in v5.0.1

func (r *AppVerificationGetResponseSession) UnmarshalJSON(data []byte) error

type AppVerificationGetResponseSessionE2EE added in v5.0.1

type AppVerificationGetResponseSessionE2EE 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 AppVerificationGetResponseSessionE2EESecrets `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 (AppVerificationGetResponseSessionE2EE) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponseSessionE2EE) UnmarshalJSON added in v5.0.1

func (r *AppVerificationGetResponseSessionE2EE) UnmarshalJSON(data []byte) error

type AppVerificationGetResponseSessionE2EESecrets added in v5.0.1

type AppVerificationGetResponseSessionE2EESecrets 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 (AppVerificationGetResponseSessionE2EESecrets) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponseSessionE2EESecrets) UnmarshalJSON added in v5.0.1

func (r *AppVerificationGetResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error

type AppVerificationGetResponseSessionMatrix added in v5.0.1

type AppVerificationGetResponseSessionMatrix 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 (AppVerificationGetResponseSessionMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponseSessionMatrix) UnmarshalJSON added in v5.0.1

func (r *AppVerificationGetResponseSessionMatrix) UnmarshalJSON(data []byte) error

type AppVerificationGetResponseSessionVerification added in v5.0.1

type AppVerificationGetResponseSessionVerification 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 AppVerificationGetResponseSessionVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationGetResponseSessionVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationGetResponseSessionVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationGetResponseSessionVerificationSAS `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 (AppVerificationGetResponseSessionVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponseSessionVerification) UnmarshalJSON added in v5.0.1

func (r *AppVerificationGetResponseSessionVerification) UnmarshalJSON(data []byte) error

type AppVerificationGetResponseSessionVerificationError added in v5.0.1

type AppVerificationGetResponseSessionVerificationError 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 (AppVerificationGetResponseSessionVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponseSessionVerificationError) UnmarshalJSON added in v5.0.1

type AppVerificationGetResponseSessionVerificationOtherDevice added in v5.0.1

type AppVerificationGetResponseSessionVerificationOtherDevice 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 (AppVerificationGetResponseSessionVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponseSessionVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationGetResponseSessionVerificationQr added in v5.0.1

type AppVerificationGetResponseSessionVerificationQr 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 (AppVerificationGetResponseSessionVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponseSessionVerificationQr) UnmarshalJSON added in v5.0.1

type AppVerificationGetResponseSessionVerificationSAS added in v5.0.1

type AppVerificationGetResponseSessionVerificationSAS 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 (AppVerificationGetResponseSessionVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponseSessionVerificationSAS) UnmarshalJSON added in v5.0.1

type AppVerificationGetResponseVerification added in v5.0.1

type AppVerificationGetResponseVerification 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 AppVerificationGetResponseVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationGetResponseVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationGetResponseVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationGetResponseVerificationSAS `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 (AppVerificationGetResponseVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponseVerification) UnmarshalJSON added in v5.0.1

func (r *AppVerificationGetResponseVerification) UnmarshalJSON(data []byte) error

type AppVerificationGetResponseVerificationError added in v5.0.1

type AppVerificationGetResponseVerificationError 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 (AppVerificationGetResponseVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponseVerificationError) UnmarshalJSON added in v5.0.1

func (r *AppVerificationGetResponseVerificationError) UnmarshalJSON(data []byte) error

type AppVerificationGetResponseVerificationOtherDevice added in v5.0.1

type AppVerificationGetResponseVerificationOtherDevice 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 (AppVerificationGetResponseVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponseVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationGetResponseVerificationQr added in v5.0.1

type AppVerificationGetResponseVerificationQr 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 (AppVerificationGetResponseVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponseVerificationQr) UnmarshalJSON added in v5.0.1

func (r *AppVerificationGetResponseVerificationQr) UnmarshalJSON(data []byte) error

type AppVerificationGetResponseVerificationSAS added in v5.0.1

type AppVerificationGetResponseVerificationSAS 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 (AppVerificationGetResponseVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationGetResponseVerificationSAS) UnmarshalJSON added in v5.0.1

func (r *AppVerificationGetResponseVerificationSAS) UnmarshalJSON(data []byte) error

type AppVerificationListResponse added in v5.0.1

type AppVerificationListResponse struct {
	Items []AppVerificationListResponseItem `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 (AppVerificationListResponse) RawJSON added in v5.0.1

func (r AppVerificationListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AppVerificationListResponse) UnmarshalJSON added in v5.0.1

func (r *AppVerificationListResponse) UnmarshalJSON(data []byte) error

type AppVerificationListResponseItem added in v5.0.1

type AppVerificationListResponseItem 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 AppVerificationListResponseItemError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationListResponseItemOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationListResponseItemQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationListResponseItemSAS `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 (AppVerificationListResponseItem) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationListResponseItem) UnmarshalJSON added in v5.0.1

func (r *AppVerificationListResponseItem) UnmarshalJSON(data []byte) error

type AppVerificationListResponseItemError added in v5.0.1

type AppVerificationListResponseItemError 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 (AppVerificationListResponseItemError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationListResponseItemError) UnmarshalJSON added in v5.0.1

func (r *AppVerificationListResponseItemError) UnmarshalJSON(data []byte) error

type AppVerificationListResponseItemOtherDevice added in v5.0.1

type AppVerificationListResponseItemOtherDevice 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 (AppVerificationListResponseItemOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationListResponseItemOtherDevice) UnmarshalJSON added in v5.0.1

func (r *AppVerificationListResponseItemOtherDevice) UnmarshalJSON(data []byte) error

type AppVerificationListResponseItemQr added in v5.0.1

type AppVerificationListResponseItemQr 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 (AppVerificationListResponseItemQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationListResponseItemQr) UnmarshalJSON added in v5.0.1

func (r *AppVerificationListResponseItemQr) UnmarshalJSON(data []byte) error

type AppVerificationListResponseItemSAS added in v5.0.1

type AppVerificationListResponseItemSAS 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 (AppVerificationListResponseItemSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationListResponseItemSAS) UnmarshalJSON added in v5.0.1

func (r *AppVerificationListResponseItemSAS) UnmarshalJSON(data []byte) error

type AppVerificationNewParams added in v5.0.1

type AppVerificationNewParams 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 AppVerificationNewParamsPurpose `json:"purpose,omitzero"`
	// contains filtered or unexported fields
}

func (AppVerificationNewParams) MarshalJSON added in v5.0.1

func (r AppVerificationNewParams) MarshalJSON() (data []byte, err error)

func (*AppVerificationNewParams) UnmarshalJSON added in v5.0.1

func (r *AppVerificationNewParams) UnmarshalJSON(data []byte) error

type AppVerificationNewParamsPurpose added in v5.0.1

type AppVerificationNewParamsPurpose string

Why this verification is being started.

const (
	AppVerificationNewParamsPurposeLogin  AppVerificationNewParamsPurpose = "login"
	AppVerificationNewParamsPurposeDevice AppVerificationNewParamsPurpose = "device"
)

type AppVerificationNewResponse added in v5.0.1

type AppVerificationNewResponse struct {
	// Current app sign-in and encrypted messaging setup state.
	Session AppVerificationNewResponseSession `json:"session" api:"required"`
	// Trusted device verification progress.
	Verification AppVerificationNewResponseVerification `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 (AppVerificationNewResponse) RawJSON added in v5.0.1

func (r AppVerificationNewResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponse) UnmarshalJSON added in v5.0.1

func (r *AppVerificationNewResponse) UnmarshalJSON(data []byte) error

type AppVerificationNewResponseSession added in v5.0.1

type AppVerificationNewResponseSession struct {
	// Encrypted messaging setup status.
	E2EE AppVerificationNewResponseSessionE2EE `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 AppVerificationNewResponseSessionMatrix `json:"matrix"`
	// Trusted device verification progress.
	Verification AppVerificationNewResponseSessionVerification `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 (AppVerificationNewResponseSession) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponseSession) UnmarshalJSON added in v5.0.1

func (r *AppVerificationNewResponseSession) UnmarshalJSON(data []byte) error

type AppVerificationNewResponseSessionE2EE added in v5.0.1

type AppVerificationNewResponseSessionE2EE 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 AppVerificationNewResponseSessionE2EESecrets `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 (AppVerificationNewResponseSessionE2EE) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponseSessionE2EE) UnmarshalJSON added in v5.0.1

func (r *AppVerificationNewResponseSessionE2EE) UnmarshalJSON(data []byte) error

type AppVerificationNewResponseSessionE2EESecrets added in v5.0.1

type AppVerificationNewResponseSessionE2EESecrets 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 (AppVerificationNewResponseSessionE2EESecrets) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponseSessionE2EESecrets) UnmarshalJSON added in v5.0.1

func (r *AppVerificationNewResponseSessionE2EESecrets) UnmarshalJSON(data []byte) error

type AppVerificationNewResponseSessionMatrix added in v5.0.1

type AppVerificationNewResponseSessionMatrix 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 (AppVerificationNewResponseSessionMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponseSessionMatrix) UnmarshalJSON added in v5.0.1

func (r *AppVerificationNewResponseSessionMatrix) UnmarshalJSON(data []byte) error

type AppVerificationNewResponseSessionVerification added in v5.0.1

type AppVerificationNewResponseSessionVerification 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 AppVerificationNewResponseSessionVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationNewResponseSessionVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationNewResponseSessionVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationNewResponseSessionVerificationSAS `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 (AppVerificationNewResponseSessionVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponseSessionVerification) UnmarshalJSON added in v5.0.1

func (r *AppVerificationNewResponseSessionVerification) UnmarshalJSON(data []byte) error

type AppVerificationNewResponseSessionVerificationError added in v5.0.1

type AppVerificationNewResponseSessionVerificationError 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 (AppVerificationNewResponseSessionVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponseSessionVerificationError) UnmarshalJSON added in v5.0.1

type AppVerificationNewResponseSessionVerificationOtherDevice added in v5.0.1

type AppVerificationNewResponseSessionVerificationOtherDevice 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 (AppVerificationNewResponseSessionVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponseSessionVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationNewResponseSessionVerificationQr added in v5.0.1

type AppVerificationNewResponseSessionVerificationQr 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 (AppVerificationNewResponseSessionVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponseSessionVerificationQr) UnmarshalJSON added in v5.0.1

type AppVerificationNewResponseSessionVerificationSAS added in v5.0.1

type AppVerificationNewResponseSessionVerificationSAS 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 (AppVerificationNewResponseSessionVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponseSessionVerificationSAS) UnmarshalJSON added in v5.0.1

type AppVerificationNewResponseVerification added in v5.0.1

type AppVerificationNewResponseVerification 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 AppVerificationNewResponseVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationNewResponseVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationNewResponseVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationNewResponseVerificationSAS `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 (AppVerificationNewResponseVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponseVerification) UnmarshalJSON added in v5.0.1

func (r *AppVerificationNewResponseVerification) UnmarshalJSON(data []byte) error

type AppVerificationNewResponseVerificationError added in v5.0.1

type AppVerificationNewResponseVerificationError 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 (AppVerificationNewResponseVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponseVerificationError) UnmarshalJSON added in v5.0.1

func (r *AppVerificationNewResponseVerificationError) UnmarshalJSON(data []byte) error

type AppVerificationNewResponseVerificationOtherDevice added in v5.0.1

type AppVerificationNewResponseVerificationOtherDevice 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 (AppVerificationNewResponseVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponseVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationNewResponseVerificationQr added in v5.0.1

type AppVerificationNewResponseVerificationQr 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 (AppVerificationNewResponseVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponseVerificationQr) UnmarshalJSON added in v5.0.1

func (r *AppVerificationNewResponseVerificationQr) UnmarshalJSON(data []byte) error

type AppVerificationNewResponseVerificationSAS added in v5.0.1

type AppVerificationNewResponseVerificationSAS 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 (AppVerificationNewResponseVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationNewResponseVerificationSAS) UnmarshalJSON added in v5.0.1

func (r *AppVerificationNewResponseVerificationSAS) UnmarshalJSON(data []byte) error

type AppVerificationQrConfirmScannedResponse added in v5.0.1

type AppVerificationQrConfirmScannedResponse struct {
	// Current app sign-in and encrypted messaging setup state.
	Session AppVerificationQrConfirmScannedResponseSession `json:"session" api:"required"`
	// Trusted device verification progress.
	Verification AppVerificationQrConfirmScannedResponseVerification `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 (AppVerificationQrConfirmScannedResponse) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponse) UnmarshalJSON added in v5.0.1

func (r *AppVerificationQrConfirmScannedResponse) UnmarshalJSON(data []byte) error

type AppVerificationQrConfirmScannedResponseSession added in v5.0.1

type AppVerificationQrConfirmScannedResponseSession struct {
	// Encrypted messaging setup status.
	E2EE AppVerificationQrConfirmScannedResponseSessionE2EE `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 AppVerificationQrConfirmScannedResponseSessionMatrix `json:"matrix"`
	// Trusted device verification progress.
	Verification AppVerificationQrConfirmScannedResponseSessionVerification `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 (AppVerificationQrConfirmScannedResponseSession) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponseSession) UnmarshalJSON added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionE2EE added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionE2EE 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 AppVerificationQrConfirmScannedResponseSessionE2EESecrets `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 (AppVerificationQrConfirmScannedResponseSessionE2EE) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponseSessionE2EE) UnmarshalJSON added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionE2EESecrets added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionE2EESecrets 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 (AppVerificationQrConfirmScannedResponseSessionE2EESecrets) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponseSessionE2EESecrets) UnmarshalJSON added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionMatrix added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionMatrix 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 (AppVerificationQrConfirmScannedResponseSessionMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponseSessionMatrix) UnmarshalJSON added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionVerification added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionVerification 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 AppVerificationQrConfirmScannedResponseSessionVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationQrConfirmScannedResponseSessionVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationQrConfirmScannedResponseSessionVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationQrConfirmScannedResponseSessionVerificationSAS `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 (AppVerificationQrConfirmScannedResponseSessionVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponseSessionVerification) UnmarshalJSON added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionVerificationError added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionVerificationError 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 (AppVerificationQrConfirmScannedResponseSessionVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponseSessionVerificationError) UnmarshalJSON added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionVerificationOtherDevice added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionVerificationOtherDevice 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 (AppVerificationQrConfirmScannedResponseSessionVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponseSessionVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionVerificationQr added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionVerificationQr 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 (AppVerificationQrConfirmScannedResponseSessionVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponseSessionVerificationQr) UnmarshalJSON added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionVerificationSAS added in v5.0.1

type AppVerificationQrConfirmScannedResponseSessionVerificationSAS 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 (AppVerificationQrConfirmScannedResponseSessionVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponseSessionVerificationSAS) UnmarshalJSON added in v5.0.1

type AppVerificationQrConfirmScannedResponseVerification added in v5.0.1

type AppVerificationQrConfirmScannedResponseVerification 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 AppVerificationQrConfirmScannedResponseVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationQrConfirmScannedResponseVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationQrConfirmScannedResponseVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationQrConfirmScannedResponseVerificationSAS `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 (AppVerificationQrConfirmScannedResponseVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponseVerification) UnmarshalJSON added in v5.0.1

type AppVerificationQrConfirmScannedResponseVerificationError added in v5.0.1

type AppVerificationQrConfirmScannedResponseVerificationError 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 (AppVerificationQrConfirmScannedResponseVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponseVerificationError) UnmarshalJSON added in v5.0.1

type AppVerificationQrConfirmScannedResponseVerificationOtherDevice added in v5.0.1

type AppVerificationQrConfirmScannedResponseVerificationOtherDevice 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 (AppVerificationQrConfirmScannedResponseVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponseVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationQrConfirmScannedResponseVerificationQr added in v5.0.1

type AppVerificationQrConfirmScannedResponseVerificationQr 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 (AppVerificationQrConfirmScannedResponseVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponseVerificationQr) UnmarshalJSON added in v5.0.1

type AppVerificationQrConfirmScannedResponseVerificationSAS added in v5.0.1

type AppVerificationQrConfirmScannedResponseVerificationSAS 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 (AppVerificationQrConfirmScannedResponseVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrConfirmScannedResponseVerificationSAS) UnmarshalJSON added in v5.0.1

type AppVerificationQrScanParams added in v5.0.1

type AppVerificationQrScanParams struct {
	// QR code payload scanned from the other device.
	Data string `json:"data" api:"required"`
	// contains filtered or unexported fields
}

func (AppVerificationQrScanParams) MarshalJSON added in v5.0.1

func (r AppVerificationQrScanParams) MarshalJSON() (data []byte, err error)

func (*AppVerificationQrScanParams) UnmarshalJSON added in v5.0.1

func (r *AppVerificationQrScanParams) UnmarshalJSON(data []byte) error

type AppVerificationQrScanResponse added in v5.0.1

type AppVerificationQrScanResponse struct {
	// Current app sign-in and encrypted messaging setup state.
	Session AppVerificationQrScanResponseSession `json:"session" api:"required"`
	// Trusted device verification progress.
	Verification AppVerificationQrScanResponseVerification `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 (AppVerificationQrScanResponse) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponse) UnmarshalJSON added in v5.0.1

func (r *AppVerificationQrScanResponse) UnmarshalJSON(data []byte) error

type AppVerificationQrScanResponseSession added in v5.0.1

type AppVerificationQrScanResponseSession struct {
	// Encrypted messaging setup status.
	E2EE AppVerificationQrScanResponseSessionE2EE `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 AppVerificationQrScanResponseSessionMatrix `json:"matrix"`
	// Trusted device verification progress.
	Verification AppVerificationQrScanResponseSessionVerification `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 (AppVerificationQrScanResponseSession) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponseSession) UnmarshalJSON added in v5.0.1

func (r *AppVerificationQrScanResponseSession) UnmarshalJSON(data []byte) error

type AppVerificationQrScanResponseSessionE2EE added in v5.0.1

type AppVerificationQrScanResponseSessionE2EE 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 AppVerificationQrScanResponseSessionE2EESecrets `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 (AppVerificationQrScanResponseSessionE2EE) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponseSessionE2EE) UnmarshalJSON added in v5.0.1

func (r *AppVerificationQrScanResponseSessionE2EE) UnmarshalJSON(data []byte) error

type AppVerificationQrScanResponseSessionE2EESecrets added in v5.0.1

type AppVerificationQrScanResponseSessionE2EESecrets 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 (AppVerificationQrScanResponseSessionE2EESecrets) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponseSessionE2EESecrets) UnmarshalJSON added in v5.0.1

type AppVerificationQrScanResponseSessionMatrix added in v5.0.1

type AppVerificationQrScanResponseSessionMatrix 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 (AppVerificationQrScanResponseSessionMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponseSessionMatrix) UnmarshalJSON added in v5.0.1

func (r *AppVerificationQrScanResponseSessionMatrix) UnmarshalJSON(data []byte) error

type AppVerificationQrScanResponseSessionVerification added in v5.0.1

type AppVerificationQrScanResponseSessionVerification 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 AppVerificationQrScanResponseSessionVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationQrScanResponseSessionVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationQrScanResponseSessionVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationQrScanResponseSessionVerificationSAS `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 (AppVerificationQrScanResponseSessionVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponseSessionVerification) UnmarshalJSON added in v5.0.1

type AppVerificationQrScanResponseSessionVerificationError added in v5.0.1

type AppVerificationQrScanResponseSessionVerificationError 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 (AppVerificationQrScanResponseSessionVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponseSessionVerificationError) UnmarshalJSON added in v5.0.1

type AppVerificationQrScanResponseSessionVerificationOtherDevice added in v5.0.1

type AppVerificationQrScanResponseSessionVerificationOtherDevice 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 (AppVerificationQrScanResponseSessionVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponseSessionVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationQrScanResponseSessionVerificationQr added in v5.0.1

type AppVerificationQrScanResponseSessionVerificationQr 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 (AppVerificationQrScanResponseSessionVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponseSessionVerificationQr) UnmarshalJSON added in v5.0.1

type AppVerificationQrScanResponseSessionVerificationSAS added in v5.0.1

type AppVerificationQrScanResponseSessionVerificationSAS 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 (AppVerificationQrScanResponseSessionVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponseSessionVerificationSAS) UnmarshalJSON added in v5.0.1

type AppVerificationQrScanResponseVerification added in v5.0.1

type AppVerificationQrScanResponseVerification 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 AppVerificationQrScanResponseVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationQrScanResponseVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationQrScanResponseVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationQrScanResponseVerificationSAS `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 (AppVerificationQrScanResponseVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponseVerification) UnmarshalJSON added in v5.0.1

func (r *AppVerificationQrScanResponseVerification) UnmarshalJSON(data []byte) error

type AppVerificationQrScanResponseVerificationError added in v5.0.1

type AppVerificationQrScanResponseVerificationError 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 (AppVerificationQrScanResponseVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponseVerificationError) UnmarshalJSON added in v5.0.1

type AppVerificationQrScanResponseVerificationOtherDevice added in v5.0.1

type AppVerificationQrScanResponseVerificationOtherDevice 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 (AppVerificationQrScanResponseVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponseVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationQrScanResponseVerificationQr added in v5.0.1

type AppVerificationQrScanResponseVerificationQr 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 (AppVerificationQrScanResponseVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponseVerificationQr) UnmarshalJSON added in v5.0.1

func (r *AppVerificationQrScanResponseVerificationQr) UnmarshalJSON(data []byte) error

type AppVerificationQrScanResponseVerificationSAS added in v5.0.1

type AppVerificationQrScanResponseVerificationSAS 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 (AppVerificationQrScanResponseVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationQrScanResponseVerificationSAS) UnmarshalJSON added in v5.0.1

func (r *AppVerificationQrScanResponseVerificationSAS) UnmarshalJSON(data []byte) error

type AppVerificationQrService added in v5.0.1

type AppVerificationQrService struct {
	Options []option.RequestOption
}

First-party sign-in and encrypted messaging setup for Beeper Desktop and Beeper Server.

AppVerificationQrService 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 NewAppVerificationQrService method instead.

func NewAppVerificationQrService added in v5.0.1

func NewAppVerificationQrService(opts ...option.RequestOption) (r AppVerificationQrService)

NewAppVerificationQrService 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 (*AppVerificationQrService) ConfirmScanned added in v5.0.1

func (r *AppVerificationQrService) ConfirmScanned(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppVerificationQrConfirmScannedResponse, err error)

Confirm that another device scanned this device QR code.

func (*AppVerificationQrService) Scan added in v5.0.1

Submit the QR code scanned from another signed-in device.

type AppVerificationSASConfirmResponse added in v5.0.1

type AppVerificationSASConfirmResponse struct {
	// Current app sign-in and encrypted messaging setup state.
	Session AppVerificationSASConfirmResponseSession `json:"session" api:"required"`
	// Trusted device verification progress.
	Verification AppVerificationSASConfirmResponseVerification `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 (AppVerificationSASConfirmResponse) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponse) UnmarshalJSON added in v5.0.1

func (r *AppVerificationSASConfirmResponse) UnmarshalJSON(data []byte) error

type AppVerificationSASConfirmResponseSession added in v5.0.1

type AppVerificationSASConfirmResponseSession struct {
	// Encrypted messaging setup status.
	E2EE AppVerificationSASConfirmResponseSessionE2EE `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 AppVerificationSASConfirmResponseSessionMatrix `json:"matrix"`
	// Trusted device verification progress.
	Verification AppVerificationSASConfirmResponseSessionVerification `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 (AppVerificationSASConfirmResponseSession) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponseSession) UnmarshalJSON added in v5.0.1

func (r *AppVerificationSASConfirmResponseSession) UnmarshalJSON(data []byte) error

type AppVerificationSASConfirmResponseSessionE2EE added in v5.0.1

type AppVerificationSASConfirmResponseSessionE2EE 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 AppVerificationSASConfirmResponseSessionE2EESecrets `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 (AppVerificationSASConfirmResponseSessionE2EE) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponseSessionE2EE) UnmarshalJSON added in v5.0.1

func (r *AppVerificationSASConfirmResponseSessionE2EE) UnmarshalJSON(data []byte) error

type AppVerificationSASConfirmResponseSessionE2EESecrets added in v5.0.1

type AppVerificationSASConfirmResponseSessionE2EESecrets 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 (AppVerificationSASConfirmResponseSessionE2EESecrets) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponseSessionE2EESecrets) UnmarshalJSON added in v5.0.1

type AppVerificationSASConfirmResponseSessionMatrix added in v5.0.1

type AppVerificationSASConfirmResponseSessionMatrix 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 (AppVerificationSASConfirmResponseSessionMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponseSessionMatrix) UnmarshalJSON added in v5.0.1

type AppVerificationSASConfirmResponseSessionVerification added in v5.0.1

type AppVerificationSASConfirmResponseSessionVerification 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 AppVerificationSASConfirmResponseSessionVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationSASConfirmResponseSessionVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationSASConfirmResponseSessionVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationSASConfirmResponseSessionVerificationSAS `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 (AppVerificationSASConfirmResponseSessionVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponseSessionVerification) UnmarshalJSON added in v5.0.1

type AppVerificationSASConfirmResponseSessionVerificationError added in v5.0.1

type AppVerificationSASConfirmResponseSessionVerificationError 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 (AppVerificationSASConfirmResponseSessionVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponseSessionVerificationError) UnmarshalJSON added in v5.0.1

type AppVerificationSASConfirmResponseSessionVerificationOtherDevice added in v5.0.1

type AppVerificationSASConfirmResponseSessionVerificationOtherDevice 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 (AppVerificationSASConfirmResponseSessionVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponseSessionVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationSASConfirmResponseSessionVerificationQr added in v5.0.1

type AppVerificationSASConfirmResponseSessionVerificationQr 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 (AppVerificationSASConfirmResponseSessionVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponseSessionVerificationQr) UnmarshalJSON added in v5.0.1

type AppVerificationSASConfirmResponseSessionVerificationSAS added in v5.0.1

type AppVerificationSASConfirmResponseSessionVerificationSAS 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 (AppVerificationSASConfirmResponseSessionVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponseSessionVerificationSAS) UnmarshalJSON added in v5.0.1

type AppVerificationSASConfirmResponseVerification added in v5.0.1

type AppVerificationSASConfirmResponseVerification 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 AppVerificationSASConfirmResponseVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationSASConfirmResponseVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationSASConfirmResponseVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationSASConfirmResponseVerificationSAS `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 (AppVerificationSASConfirmResponseVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponseVerification) UnmarshalJSON added in v5.0.1

func (r *AppVerificationSASConfirmResponseVerification) UnmarshalJSON(data []byte) error

type AppVerificationSASConfirmResponseVerificationError added in v5.0.1

type AppVerificationSASConfirmResponseVerificationError 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 (AppVerificationSASConfirmResponseVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponseVerificationError) UnmarshalJSON added in v5.0.1

type AppVerificationSASConfirmResponseVerificationOtherDevice added in v5.0.1

type AppVerificationSASConfirmResponseVerificationOtherDevice 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 (AppVerificationSASConfirmResponseVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponseVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationSASConfirmResponseVerificationQr added in v5.0.1

type AppVerificationSASConfirmResponseVerificationQr 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 (AppVerificationSASConfirmResponseVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponseVerificationQr) UnmarshalJSON added in v5.0.1

type AppVerificationSASConfirmResponseVerificationSAS added in v5.0.1

type AppVerificationSASConfirmResponseVerificationSAS 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 (AppVerificationSASConfirmResponseVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASConfirmResponseVerificationSAS) UnmarshalJSON added in v5.0.1

type AppVerificationSASService added in v5.0.1

type AppVerificationSASService struct {
	Options []option.RequestOption
}

First-party sign-in and encrypted messaging setup for Beeper Desktop and Beeper Server.

AppVerificationSASService 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 NewAppVerificationSASService method instead.

func NewAppVerificationSASService added in v5.0.1

func NewAppVerificationSASService(opts ...option.RequestOption) (r AppVerificationSASService)

NewAppVerificationSASService 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 (*AppVerificationSASService) Confirm added in v5.0.1

func (r *AppVerificationSASService) Confirm(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppVerificationSASConfirmResponse, err error)

Confirm that the emoji or number sequence matches on both devices.

func (*AppVerificationSASService) Start added in v5.0.1

func (r *AppVerificationSASService) Start(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppVerificationSASStartResponse, err error)

Start emoji comparison for device verification.

type AppVerificationSASStartResponse added in v5.0.1

type AppVerificationSASStartResponse struct {
	// Current app sign-in and encrypted messaging setup state.
	Session AppVerificationSASStartResponseSession `json:"session" api:"required"`
	// Trusted device verification progress.
	Verification AppVerificationSASStartResponseVerification `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 (AppVerificationSASStartResponse) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponse) UnmarshalJSON added in v5.0.1

func (r *AppVerificationSASStartResponse) UnmarshalJSON(data []byte) error

type AppVerificationSASStartResponseSession added in v5.0.1

type AppVerificationSASStartResponseSession struct {
	// Encrypted messaging setup status.
	E2EE AppVerificationSASStartResponseSessionE2EE `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 AppVerificationSASStartResponseSessionMatrix `json:"matrix"`
	// Trusted device verification progress.
	Verification AppVerificationSASStartResponseSessionVerification `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 (AppVerificationSASStartResponseSession) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponseSession) UnmarshalJSON added in v5.0.1

func (r *AppVerificationSASStartResponseSession) UnmarshalJSON(data []byte) error

type AppVerificationSASStartResponseSessionE2EE added in v5.0.1

type AppVerificationSASStartResponseSessionE2EE 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 AppVerificationSASStartResponseSessionE2EESecrets `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 (AppVerificationSASStartResponseSessionE2EE) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponseSessionE2EE) UnmarshalJSON added in v5.0.1

func (r *AppVerificationSASStartResponseSessionE2EE) UnmarshalJSON(data []byte) error

type AppVerificationSASStartResponseSessionE2EESecrets added in v5.0.1

type AppVerificationSASStartResponseSessionE2EESecrets 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 (AppVerificationSASStartResponseSessionE2EESecrets) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponseSessionE2EESecrets) UnmarshalJSON added in v5.0.1

type AppVerificationSASStartResponseSessionMatrix added in v5.0.1

type AppVerificationSASStartResponseSessionMatrix 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 (AppVerificationSASStartResponseSessionMatrix) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponseSessionMatrix) UnmarshalJSON added in v5.0.1

func (r *AppVerificationSASStartResponseSessionMatrix) UnmarshalJSON(data []byte) error

type AppVerificationSASStartResponseSessionVerification added in v5.0.1

type AppVerificationSASStartResponseSessionVerification 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 AppVerificationSASStartResponseSessionVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationSASStartResponseSessionVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationSASStartResponseSessionVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationSASStartResponseSessionVerificationSAS `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 (AppVerificationSASStartResponseSessionVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponseSessionVerification) UnmarshalJSON added in v5.0.1

type AppVerificationSASStartResponseSessionVerificationError added in v5.0.1

type AppVerificationSASStartResponseSessionVerificationError 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 (AppVerificationSASStartResponseSessionVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponseSessionVerificationError) UnmarshalJSON added in v5.0.1

type AppVerificationSASStartResponseSessionVerificationOtherDevice added in v5.0.1

type AppVerificationSASStartResponseSessionVerificationOtherDevice 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 (AppVerificationSASStartResponseSessionVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponseSessionVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationSASStartResponseSessionVerificationQr added in v5.0.1

type AppVerificationSASStartResponseSessionVerificationQr 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 (AppVerificationSASStartResponseSessionVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponseSessionVerificationQr) UnmarshalJSON added in v5.0.1

type AppVerificationSASStartResponseSessionVerificationSAS added in v5.0.1

type AppVerificationSASStartResponseSessionVerificationSAS 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 (AppVerificationSASStartResponseSessionVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponseSessionVerificationSAS) UnmarshalJSON added in v5.0.1

type AppVerificationSASStartResponseVerification added in v5.0.1

type AppVerificationSASStartResponseVerification 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 AppVerificationSASStartResponseVerificationError `json:"error"`
	// Other device participating in verification.
	OtherDevice AppVerificationSASStartResponseVerificationOtherDevice `json:"otherDevice"`
	// Other Beeper user participating in verification.
	OtherUserID string `json:"otherUserID"`
	// QR verification data.
	Qr AppVerificationSASStartResponseVerificationQr `json:"qr"`
	// Emoji or number comparison data for verification.
	SAS AppVerificationSASStartResponseVerificationSAS `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 (AppVerificationSASStartResponseVerification) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponseVerification) UnmarshalJSON added in v5.0.1

func (r *AppVerificationSASStartResponseVerification) UnmarshalJSON(data []byte) error

type AppVerificationSASStartResponseVerificationError added in v5.0.1

type AppVerificationSASStartResponseVerificationError 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 (AppVerificationSASStartResponseVerificationError) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponseVerificationError) UnmarshalJSON added in v5.0.1

type AppVerificationSASStartResponseVerificationOtherDevice added in v5.0.1

type AppVerificationSASStartResponseVerificationOtherDevice 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 (AppVerificationSASStartResponseVerificationOtherDevice) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponseVerificationOtherDevice) UnmarshalJSON added in v5.0.1

type AppVerificationSASStartResponseVerificationQr added in v5.0.1

type AppVerificationSASStartResponseVerificationQr 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 (AppVerificationSASStartResponseVerificationQr) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponseVerificationQr) UnmarshalJSON added in v5.0.1

func (r *AppVerificationSASStartResponseVerificationQr) UnmarshalJSON(data []byte) error

type AppVerificationSASStartResponseVerificationSAS added in v5.0.1

type AppVerificationSASStartResponseVerificationSAS 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 (AppVerificationSASStartResponseVerificationSAS) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*AppVerificationSASStartResponseVerificationSAS) UnmarshalJSON added in v5.0.1

type AppVerificationService added in v5.0.1

type AppVerificationService struct {
	Options []option.RequestOption
	// First-party sign-in and encrypted messaging setup for Beeper Desktop and Beeper
	// Server.
	Qr AppVerificationQrService
	// First-party sign-in and encrypted messaging setup for Beeper Desktop and Beeper
	// Server.
	SAS AppVerificationSASService
}

Manage device verification transactions

AppVerificationService 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 NewAppVerificationService method instead.

func NewAppVerificationService added in v5.0.1

func NewAppVerificationService(opts ...option.RequestOption) (r AppVerificationService)

NewAppVerificationService 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 (*AppVerificationService) Accept added in v5.0.1

func (r *AppVerificationService) Accept(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppVerificationAcceptResponse, err error)

Accept an incoming device verification request.

func (*AppVerificationService) Cancel added in v5.0.1

Cancel an active device verification request.

func (*AppVerificationService) Get added in v5.0.1

func (r *AppVerificationService) Get(ctx context.Context, verificationID string, opts ...option.RequestOption) (res *AppVerificationGetResponse, err error)

Get the current state of a device verification transaction.

func (*AppVerificationService) List added in v5.0.1

List pending and active device verifications. Use this to recover state without a WebSocket connection.

func (*AppVerificationService) New added in v5.0.1

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 assets in Beeper Desktop, like 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

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 Attachment

type Attachment = shared.Attachment

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 added in v5.0.1

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) RawJSON added in v5.0.1

func (r Bridge) RawJSON() string

Returns the unmodified JSON received from the API

func (*Bridge) UnmarshalJSON added in v5.0.1

func (r *Bridge) UnmarshalJSON(data []byte) error

type BridgeConnectionService added in v5.0.1

type BridgeConnectionService struct {
	Options []option.RequestOption
}

BridgeConnectionService 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 NewBridgeConnectionService method instead.

func NewBridgeConnectionService added in v5.0.1

func NewBridgeConnectionService(opts ...option.RequestOption) (r BridgeConnectionService)

NewBridgeConnectionService 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 BridgeGetResponse added in v5.0.1

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 added in v5.0.1

func (r BridgeGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BridgeGetResponse) UnmarshalJSON added in v5.0.1

func (r *BridgeGetResponse) UnmarshalJSON(data []byte) error

type BridgeGetResponseProvider added in v5.0.1

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 added in v5.0.1

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"
	BridgeGetResponseStatusTemporarilyUnavailable BridgeGetResponseStatus = "temporarily_unavailable"
	BridgeGetResponseStatusDisabled               BridgeGetResponseStatus = "disabled"
)

type BridgeListResponse added in v5.0.1

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 added in v5.0.1

func (r BridgeListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BridgeListResponse) UnmarshalJSON added in v5.0.1

func (r *BridgeListResponse) UnmarshalJSON(data []byte) error

type BridgeLoginFlowListResponse added in v5.0.1

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 added in v5.0.1

func (r BridgeLoginFlowListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BridgeLoginFlowListResponse) UnmarshalJSON added in v5.0.1

func (r *BridgeLoginFlowListResponse) UnmarshalJSON(data []byte) error

type BridgeLoginFlowService added in v5.0.1

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 added in v5.0.1

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 added in v5.0.1

List connect and reconnect flow options for a bridge. Use a flowID when creating a bridge login session.

type BridgeLoginSessionCancelParams added in v5.0.1

type BridgeLoginSessionCancelParams struct {
	// Bridge ID.
	BridgeID string `path:"bridgeID" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type BridgeLoginSessionCancelResponse added in v5.0.1

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 added in v5.0.1

Returns the unmodified JSON received from the API

func (*BridgeLoginSessionCancelResponse) UnmarshalJSON added in v5.0.1

func (r *BridgeLoginSessionCancelResponse) UnmarshalJSON(data []byte) error

type BridgeLoginSessionGetParams added in v5.0.1

type BridgeLoginSessionGetParams struct {
	// Bridge ID.
	BridgeID string `path:"bridgeID" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type BridgeLoginSessionNewParams added in v5.0.1

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 added in v5.0.1

func (r BridgeLoginSessionNewParams) MarshalJSON() (data []byte, err error)

func (*BridgeLoginSessionNewParams) UnmarshalJSON added in v5.0.1

func (r *BridgeLoginSessionNewParams) UnmarshalJSON(data []byte) error

type BridgeLoginSessionService added in v5.0.1

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 added in v5.0.1

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 added in v5.0.1

Cancel a temporary bridge login session.

func (*BridgeLoginSessionService) Get added in v5.0.1

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 added in v5.0.1

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 added in v5.0.1

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 added in v5.0.1

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 added in v5.0.1

Submit input for the current step of a bridge login session.

type BridgeLoginSessionStepSubmitParams added in v5.0.1

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 added in v5.0.1

func (r BridgeLoginSessionStepSubmitParams) MarshalJSON() (data []byte, err error)

func (*BridgeLoginSessionStepSubmitParams) UnmarshalJSON added in v5.0.1

func (r *BridgeLoginSessionStepSubmitParams) UnmarshalJSON(data []byte) error

type BridgeLoginSessionStepSubmitParamsSource added in v5.0.1

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 added in v5.0.1

type BridgeLoginSessionStepSubmitParamsType string
const (
	BridgeLoginSessionStepSubmitParamsTypeUserInput      BridgeLoginSessionStepSubmitParamsType = "user_input"
	BridgeLoginSessionStepSubmitParamsTypeCookies        BridgeLoginSessionStepSubmitParamsType = "cookies"
	BridgeLoginSessionStepSubmitParamsTypeDisplayAndWait BridgeLoginSessionStepSubmitParamsType = "display_and_wait"
)

type BridgeProvider added in v5.0.1

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 added in v5.0.1

type BridgeService struct {
	Options []option.RequestOption
	// Available bridges, bridge logins, login sessions for connect and reconnect
	// flows, and advanced network capabilities.
	LoginFlows  BridgeLoginFlowService
	Connections BridgeConnectionService
	// Available bridges, bridge logins, login sessions for connect and reconnect
	// flows, and advanced network capabilities.
	LoginSessions BridgeLoginSessionService
}

Manage bridge-backed account types, connections, and login sessions

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 added in v5.0.1

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 added in v5.0.1

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 added in v5.0.1

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 added in v5.0.1

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 added in v5.0.1

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"
	BridgeStatusTemporarilyUnavailable BridgeStatus = "temporarily_unavailable"
	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 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 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"`
	// 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"`
	// 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
		LastActivity           respjson.Field
		LastReadMessageSortKey respjson.Field
		LocalChatID            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) RawJSON

func (r Chat) RawJSON() string

Returns the unmodified JSON received from the API

func (*Chat) UnmarshalJSON

func (r *Chat) UnmarshalJSON(data []byte) error

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 struct {
	// Allowed Unicode reactions. Omitted means all emoji reactions are allowed.
	AllowedReactions []string `json:"allowedReactions"`
	// True if archive/unarchive is supported.
	Archive bool `json:"archive"`
	// Supported attachment message types and their per-type constraints, keyed by
	// Matrix msgtype or pseudo-msgtype (for example m.image, m.video,
	// org.matrix.msc3245.voice). Missing message types should be treated as rejected.
	Attachments map[string]ChatCapabilitiesAttachment `json:"attachments"`
	// True if custom emoji reactions are supported.
	CustomEmojiReactions bool `json:"customEmojiReactions"`
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Delete int64 `json:"delete"`
	// True if deleting chats for the authenticated user is supported.
	DeleteChat bool `json:"deleteChat"`
	// True if deleting chats for everyone is supported.
	DeleteChatForEveryone bool `json:"deleteChatForEveryone"`
	// True if deleting messages only for the authenticated user is supported.
	DeleteForMe bool `json:"deleteForMe"`
	// Maximum message age for delete-for-everyone, in seconds.
	DeleteMaxAge int64 `json:"deleteMaxAge"`
	// Disappearing-message timer capabilities.
	DisappearingTimer ChatCapabilitiesDisappearingTimer `json:"disappearingTimer"`
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Edit int64 `json:"edit"`
	// Maximum message age for edits, in seconds.
	EditMaxAge int64 `json:"editMaxAge"`
	// Maximum number of edits allowed for one message.
	EditMaxCount int64 `json:"editMaxCount"`
	// Supported rich-text formatting features keyed by feature name (for example bold,
	// inline_code, code_block.syntax_highlighting). Omitted means no formatting
	// support is advertised.
	//
	// Any of -2, -1, 0, 1, 2.
	Formatting map[string]int64 `json:"formatting"`
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	LocationMessage int64 `json:"locationMessage"`
	// True if marking chats unread is supported.
	MarkAsUnread bool `json:"markAsUnread"`
	// Maximum length of normal text messages.
	MaxTextLength int64 `json:"maxTextLength"`
	// Message request capabilities.
	MessageRequest ChatCapabilitiesMessageRequest `json:"messageRequest"`
	// Participant management capabilities.
	ParticipantActions ChatCapabilitiesParticipantActions `json:"participantActions"`
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Poll int64 `json:"poll"`
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Reaction int64 `json:"reaction"`
	// Maximum number of reactions allowed on a single message.
	ReactionCount int64 `json:"reactionCount"`
	// True if read receipts are supported.
	ReadReceipts bool `json:"readReceipts"`
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Reply int64 `json:"reply"`
	// Chat state update capabilities.
	State ChatCapabilitiesState `json:"state"`
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Thread int64 `json:"thread"`
	// True if typing notifications are supported.
	TypingNotifications bool `json:"typingNotifications"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedReactions      respjson.Field
		Archive               respjson.Field
		Attachments           respjson.Field
		CustomEmojiReactions  respjson.Field
		Delete                respjson.Field
		DeleteChat            respjson.Field
		DeleteChatForEveryone respjson.Field
		DeleteForMe           respjson.Field
		DeleteMaxAge          respjson.Field
		DisappearingTimer     respjson.Field
		Edit                  respjson.Field
		EditMaxAge            respjson.Field
		EditMaxCount          respjson.Field
		Formatting            respjson.Field
		LocationMessage       respjson.Field
		MarkAsUnread          respjson.Field
		MaxTextLength         respjson.Field
		MessageRequest        respjson.Field
		ParticipantActions    respjson.Field
		Poll                  respjson.Field
		Reaction              respjson.Field
		ReactionCount         respjson.Field
		ReadReceipts          respjson.Field
		Reply                 respjson.Field
		State                 respjson.Field
		Thread                respjson.Field
		TypingNotifications   respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Chat capabilities reported by the platform.

func (ChatCapabilities) RawJSON

func (r ChatCapabilities) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChatCapabilities) UnmarshalJSON

func (r *ChatCapabilities) UnmarshalJSON(data []byte) error

type ChatCapabilitiesAttachment

type ChatCapabilitiesAttachment struct {
	// Supported MIME types or MIME patterns for this file message type. Missing MIME
	// types should be treated as rejected.
	//
	// Any of -2, -1, 0, 1, 2.
	MimeTypes map[string]int64 `json:"mimeTypes" api:"required"`
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Caption int64 `json:"caption"`
	// Maximum caption length when captions are supported.
	MaxCaptionLength int64 `json:"maxCaptionLength"`
	// Maximum audio or video duration in seconds.
	MaxDuration int64 `json:"maxDuration"`
	// Maximum image or video height in pixels.
	MaxHeight int64 `json:"maxHeight"`
	// Maximum file size in bytes.
	MaxSize int64 `json:"maxSize"`
	// Maximum image or video width in pixels.
	MaxWidth int64 `json:"maxWidth"`
	// True if this file type can be sent as view-once media.
	ViewOnce bool `json:"viewOnce"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MimeTypes        respjson.Field
		Caption          respjson.Field
		MaxCaptionLength respjson.Field
		MaxDuration      respjson.Field
		MaxHeight        respjson.Field
		MaxSize          respjson.Field
		MaxWidth         respjson.Field
		ViewOnce         respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Capabilities for one attachment message type.

func (ChatCapabilitiesAttachment) RawJSON

func (r ChatCapabilitiesAttachment) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChatCapabilitiesAttachment) UnmarshalJSON

func (r *ChatCapabilitiesAttachment) UnmarshalJSON(data []byte) error

type ChatCapabilitiesDisappearingTimer

type ChatCapabilitiesDisappearingTimer struct {
	// True if empty timer objects should be omitted from message content.
	OmitEmptyTimer bool `json:"omitEmptyTimer"`
	// Allowed disappearing timer values in milliseconds. Omitted means any timer is
	// allowed.
	Timers []int64 `json:"timers"`
	// Supported disappearing timer types.
	//
	// Any of "afterRead", "afterSend".
	Types []string `json:"types"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		OmitEmptyTimer respjson.Field
		Timers         respjson.Field
		Types          respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Disappearing-message timer capabilities.

func (ChatCapabilitiesDisappearingTimer) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCapabilitiesDisappearingTimer) UnmarshalJSON

func (r *ChatCapabilitiesDisappearingTimer) UnmarshalJSON(data []byte) error

type ChatCapabilitiesMessageRequest

type ChatCapabilitiesMessageRequest struct {
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	AcceptWithButton int64 `json:"acceptWithButton"`
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	AcceptWithMessage int64 `json:"acceptWithMessage"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AcceptWithButton  respjson.Field
		AcceptWithMessage respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Message request capabilities.

func (ChatCapabilitiesMessageRequest) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCapabilitiesMessageRequest) UnmarshalJSON

func (r *ChatCapabilitiesMessageRequest) UnmarshalJSON(data []byte) error

type ChatCapabilitiesParticipantActions

type ChatCapabilitiesParticipantActions struct {
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Ban int64 `json:"ban"`
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Invite int64 `json:"invite"`
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Kick int64 `json:"kick"`
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Leave int64 `json:"leave"`
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	RevokeInvite int64 `json:"revokeInvite"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Ban          respjson.Field
		Invite       respjson.Field
		Kick         respjson.Field
		Leave        respjson.Field
		RevokeInvite respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Participant management capabilities.

func (ChatCapabilitiesParticipantActions) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCapabilitiesParticipantActions) UnmarshalJSON

func (r *ChatCapabilitiesParticipantActions) UnmarshalJSON(data []byte) error

type ChatCapabilitiesState

type ChatCapabilitiesState struct {
	// Chat avatar state capability.
	Avatar ChatCapabilitiesStateAvatar `json:"avatar"`
	// Chat description/topic state capability.
	Description ChatCapabilitiesStateDescription `json:"description"`
	// Disappearing-message timer state capability.
	DisappearingTimer ChatCapabilitiesStateDisappearingTimer `json:"disappearingTimer"`
	// Chat title state capability.
	Title ChatCapabilitiesStateTitle `json:"title"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Avatar            respjson.Field
		Description       respjson.Field
		DisappearingTimer respjson.Field
		Title             respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Chat state update capabilities.

func (ChatCapabilitiesState) RawJSON

func (r ChatCapabilitiesState) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChatCapabilitiesState) UnmarshalJSON

func (r *ChatCapabilitiesState) UnmarshalJSON(data []byte) error

type ChatCapabilitiesStateAvatar

type ChatCapabilitiesStateAvatar struct {
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Level int64 `json:"level" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Level       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Chat avatar state capability.

func (ChatCapabilitiesStateAvatar) RawJSON

func (r ChatCapabilitiesStateAvatar) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChatCapabilitiesStateAvatar) UnmarshalJSON

func (r *ChatCapabilitiesStateAvatar) UnmarshalJSON(data []byte) error

type ChatCapabilitiesStateDescription

type ChatCapabilitiesStateDescription struct {
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Level int64 `json:"level" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Level       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Chat description/topic state capability.

func (ChatCapabilitiesStateDescription) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCapabilitiesStateDescription) UnmarshalJSON

func (r *ChatCapabilitiesStateDescription) UnmarshalJSON(data []byte) error

type ChatCapabilitiesStateDisappearingTimer

type ChatCapabilitiesStateDisappearingTimer struct {
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Level int64 `json:"level" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Level       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Disappearing-message timer state capability.

func (ChatCapabilitiesStateDisappearingTimer) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCapabilitiesStateDisappearingTimer) UnmarshalJSON

func (r *ChatCapabilitiesStateDisappearingTimer) UnmarshalJSON(data []byte) error

type ChatCapabilitiesStateTitle

type ChatCapabilitiesStateTitle struct {
	// -2: rejected, -1: dropped, 0: unsupported, 1: partially supported, 2: fully
	// supported.
	//
	// Any of -2, -1, 0, 1, 2.
	Level int64 `json:"level" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Level       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Chat title state capability.

func (ChatCapabilitiesStateTitle) RawJSON

func (r ChatCapabilitiesStateTitle) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChatCapabilitiesStateTitle) UnmarshalJSON

func (r *ChatCapabilitiesStateTitle) UnmarshalJSON(data []byte) error

type ChatDraft

type ChatDraft struct {
	// Rich-text draft body as returned by Beeper.
	Text string `json:"text" api:"required"`
	// Draft attachments keyed by attachment ID.
	Attachments map[string]ChatDraftAttachment `json:"attachments"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Text        respjson.Field
		Attachments respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Current draft object for this chat, or null when no draft is set.

func (ChatDraft) RawJSON

func (r ChatDraft) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChatDraft) UnmarshalJSON

func (r *ChatDraft) UnmarshalJSON(data []byte) error

type ChatDraftAttachment

type ChatDraftAttachment struct {
	// Draft attachment identifier.
	ID string `json:"id" api:"required"`
	// Draft attachment type. GIF and recorded audio are mutually exclusive types.
	//
	// Any of "file", "gif", "recorded_audio".
	Type string `json:"type" api:"required"`
	// Audio duration in seconds if known.
	AudioDurationSeconds float64 `json:"audioDurationSeconds"`
	// Original filename if available.
	FileName string `json:"fileName"`
	// Local filesystem path for the draft attachment.
	FilePath string `json:"filePath"`
	// File size in bytes if known.
	FileSize float64 `json:"fileSize"`
	// MIME type if known.
	MimeType string `json:"mimeType"`
	// Pixel dimensions of the attachment.
	Size ChatDraftAttachmentSize `json:"size"`
	// Sticker identifier if the draft attachment is a sticker.
	StickerID string `json:"stickerID"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		Type                 respjson.Field
		AudioDurationSeconds respjson.Field
		FileName             respjson.Field
		FilePath             respjson.Field
		FileSize             respjson.Field
		MimeType             respjson.Field
		Size                 respjson.Field
		StickerID            respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ChatDraftAttachment) RawJSON

func (r ChatDraftAttachment) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChatDraftAttachment) UnmarshalJSON

func (r *ChatDraftAttachment) UnmarshalJSON(data []byte) error

type ChatDraftAttachmentSize

type ChatDraftAttachmentSize struct {
	Height float64 `json:"height"`
	Width  float64 `json:"width"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Height      respjson.Field
		Width       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Pixel dimensions of the attachment.

func (ChatDraftAttachmentSize) RawJSON

func (r ChatDraftAttachmentSize) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChatDraftAttachmentSize) UnmarshalJSON

func (r *ChatDraftAttachmentSize) UnmarshalJSON(data []byte) error

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:"-"`
	// 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 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

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

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

Add a reaction to an existing message.

func (*ChatMessageReactionService) Delete

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 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" (non-archived, non-low-priority),
	// "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" (non-archived, non-low-priority), "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

List all chats sorted by last activity (most recent first). Combines all accounts into a single paginated list.

func (*ChatService) ListAutoPaging

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

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 ChatType

type ChatType string

Chat type: 'single' for direct messages, 'group' for group chats.

const (
	ChatTypeSingle ChatType = "single"
	ChatTypeGroup  ChatType = "group"
)

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 bridge-backed account types, connections, and login sessions
	Bridges BridgeService
	// Manage chats
	Chats ChatService
	// Manage messages in chats
	Messages MessageService
	// Manage assets in Beeper Desktop, like message attachments
	Assets AssetService
	// Server discovery and capability metadata. Use /v1/info before authentication
	// setup.
	Info InfoService
	// Manage Beeper app login 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 added in v5.0.1

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 added in v5.0.1

func (r CookieField) RawJSON() string

Returns the unmodified JSON received from the API

func (*CookieField) UnmarshalJSON added in v5.0.1

func (r *CookieField) UnmarshalJSON(data []byte) error

type CookieFieldType added in v5.0.1

type CookieFieldType string

Browser storage source for this value.

const (
	CookieFieldTypeCookie       CookieFieldType = "cookie"
	CookieFieldTypeHeader       CookieFieldType = "header"
	CookieFieldTypeLocalStorage CookieFieldType = "local_storage"
)

type DisappearingTimerCapability added in v5.0.1

type DisappearingTimerCapability struct {
	// Any of "", "after_read", "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 added in v5.0.1

func (r DisappearingTimerCapability) RawJSON() string

Returns the unmodified JSON received from the API

func (*DisappearingTimerCapability) UnmarshalJSON added in v5.0.1

func (r *DisappearingTimerCapability) UnmarshalJSON(data []byte) error

type Error

type Error = apierror.Error

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 added in v5.0.1

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 added in v5.0.1

func (r GroupFieldCapability) RawJSON() string

Returns the unmodified JSON received from the API

func (*GroupFieldCapability) UnmarshalJSON added in v5.0.1

func (r *GroupFieldCapability) UnmarshalJSON(data []byte) error

type GroupTypeCapabilities added in v5.0.1

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 added in v5.0.1

func (r GroupTypeCapabilities) RawJSON() string

Returns the unmodified JSON received from the API

func (*GroupTypeCapabilities) UnmarshalJSON added in v5.0.1

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

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 LoginFlow added in v5.0.1

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) RawJSON added in v5.0.1

func (r LoginFlow) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoginFlow) UnmarshalJSON added in v5.0.1

func (r *LoginFlow) UnmarshalJSON(data []byte) error

type LoginInputField added in v5.0.1

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 added in v5.0.1

func (r LoginInputField) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoginInputField) UnmarshalJSON added in v5.0.1

func (r *LoginInputField) UnmarshalJSON(data []byte) error

type LoginSession added in v5.0.1

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 LoginSessionLogin `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 added in v5.0.1

func (r LoginSession) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoginSession) UnmarshalJSON added in v5.0.1

func (r *LoginSession) UnmarshalJSON(data []byte) error

type LoginSessionCurrentStepComplete added in v5.0.1

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  LoginSessionCurrentStepCompleteLogin `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 added in v5.0.1

Returns the unmodified JSON received from the API

func (*LoginSessionCurrentStepComplete) UnmarshalJSON added in v5.0.1

func (r *LoginSessionCurrentStepComplete) UnmarshalJSON(data []byte) error

type LoginSessionCurrentStepCompleteLogin added in v5.0.1

type LoginSessionCurrentStepCompleteLogin 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 string `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 (LoginSessionCurrentStepCompleteLogin) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*LoginSessionCurrentStepCompleteLogin) UnmarshalJSON added in v5.0.1

func (r *LoginSessionCurrentStepCompleteLogin) UnmarshalJSON(data []byte) error

type LoginSessionCurrentStepCookies added in v5.0.1

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 added in v5.0.1

Returns the unmodified JSON received from the API

func (*LoginSessionCurrentStepCookies) UnmarshalJSON added in v5.0.1

func (r *LoginSessionCurrentStepCookies) UnmarshalJSON(data []byte) error

type LoginSessionCurrentStepDisplayAndWait added in v5.0.1

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 added in v5.0.1

Returns the unmodified JSON received from the API

func (*LoginSessionCurrentStepDisplayAndWait) UnmarshalJSON added in v5.0.1

func (r *LoginSessionCurrentStepDisplayAndWait) UnmarshalJSON(data []byte) error

type LoginSessionCurrentStepDisplayAndWaitDisplayEmoji added in v5.0.1

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 added in v5.0.1

Returns the unmodified JSON received from the API

func (*LoginSessionCurrentStepDisplayAndWaitDisplayEmoji) UnmarshalJSON added in v5.0.1

type LoginSessionCurrentStepDisplayAndWaitDisplayEmpty added in v5.0.1

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 added in v5.0.1

Returns the unmodified JSON received from the API

func (*LoginSessionCurrentStepDisplayAndWaitDisplayEmpty) UnmarshalJSON added in v5.0.1

type LoginSessionCurrentStepDisplayAndWaitDisplayQrCode added in v5.0.1

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 added in v5.0.1

Returns the unmodified JSON received from the API

func (*LoginSessionCurrentStepDisplayAndWaitDisplayQrCode) UnmarshalJSON added in v5.0.1

type LoginSessionCurrentStepDisplayAndWaitDisplayUnion added in v5.0.1

type LoginSessionCurrentStepDisplayAndWaitDisplayUnion struct {
	// This field is from variant [LoginSessionCurrentStepDisplayAndWaitDisplayQrCode].
	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, LoginSessionCurrentStepDisplayAndWaitDisplayEmpty.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (LoginSessionCurrentStepDisplayAndWaitDisplayUnion) AsEmoji added in v5.0.1

func (LoginSessionCurrentStepDisplayAndWaitDisplayUnion) AsEmpty added in v5.0.1

func (LoginSessionCurrentStepDisplayAndWaitDisplayUnion) AsQrCode added in v5.0.1

func (LoginSessionCurrentStepDisplayAndWaitDisplayUnion) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*LoginSessionCurrentStepDisplayAndWaitDisplayUnion) UnmarshalJSON added in v5.0.1

type LoginSessionCurrentStepUnion added in v5.0.1

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 LoginSessionCurrentStepCompleteLogin `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 added in v5.0.1

func (LoginSessionCurrentStepUnion) AsCookies added in v5.0.1

func (LoginSessionCurrentStepUnion) AsDisplayAndWait added in v5.0.1

func (LoginSessionCurrentStepUnion) AsUserInput added in v5.0.1

func (LoginSessionCurrentStepUnion) RawJSON added in v5.0.1

Returns the unmodified JSON received from the API

func (*LoginSessionCurrentStepUnion) UnmarshalJSON added in v5.0.1

func (r *LoginSessionCurrentStepUnion) UnmarshalJSON(data []byte) error

type LoginSessionCurrentStepUnionFields added in v5.0.1

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 added in v5.0.1

func (r *LoginSessionCurrentStepUnionFields) UnmarshalJSON(data []byte) error

type LoginSessionCurrentStepUserInput added in v5.0.1

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 added in v5.0.1

Returns the unmodified JSON received from the API

func (*LoginSessionCurrentStepUserInput) UnmarshalJSON added in v5.0.1

func (r *LoginSessionCurrentStepUserInput) UnmarshalJSON(data []byte) error

type LoginSessionLogin added in v5.0.1

type LoginSessionLogin 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 string `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 (LoginSessionLogin) RawJSON added in v5.0.1

func (r LoginSessionLogin) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoginSessionLogin) UnmarshalJSON added in v5.0.1

func (r *LoginSessionLogin) UnmarshalJSON(data []byte) error

type LoginSessionStatus added in v5.0.1

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 Message

type Message = shared.Message

This is an alias to an internal type.

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 MessageLink = shared.MessageLink

Link preview included with a message.

This is an alias to an internal type.

type MessageLinkImgSize

type MessageLinkImgSize = shared.MessageLinkImgSize

Preview image dimensions.

This is an alias to an internal type.

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 ID. Input routes also accept the local chat ID from this installation when
	// available.
	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 MessageSendStatus

type MessageSendStatus = shared.MessageSendStatus

Message send status for this message, when reported by the bridge.

This is an alias to an internal type.

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

List all messages in a chat with cursor-based pagination. Sorted by timestamp.

func (*MessageService) ListAutoPaging

List all messages in a chat with cursor-based pagination. Sorted by timestamp.

func (*MessageService) Search

Search messages across chats.

func (*MessageService) SearchAutoPaging

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 added in v5.0.1

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 added in v5.0.1

func (r ProvisioningCapabilities) RawJSON() string

Returns the unmodified JSON received from the API

func (*ProvisioningCapabilities) UnmarshalJSON added in v5.0.1

func (r *ProvisioningCapabilities) UnmarshalJSON(data []byte) error

type Reaction

type Reaction = shared.Reaction

This is an alias to an internal type.

type ResolveIdentifierCapabilities added in v5.0.1

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 added in v5.0.1

Returns the unmodified JSON received from the API

func (*ResolveIdentifierCapabilities) UnmarshalJSON added in v5.0.1

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

Returns the unmodified JSON received from the API

func (*SearchResponseResultsMessages) UnmarshalJSON

func (r *SearchResponseResultsMessages) UnmarshalJSON(data []byte) error

type User

type User = shared.User

User the account belongs to.

This is an alias to an internal type.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL