relaygo

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Relay Go API Library

Go Reference

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

It is generated with Stainless.

MCP Server

Use the Relay 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/relayapi-dev/relay-go" // imported as relaygo
)

Or to pin the version:

go get -u 'github.com/relayapi-dev/relay-go@v0.1.0'

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/relayapi-dev/relay-go"
	"github.com/relayapi-dev/relay-go/option"
)

func main() {
	client := relaygo.NewClient(
		option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("RELAY_API_KEY")
	)
	posts, err := client.Posts.List(context.TODO(), relaygo.PostListParams{})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", posts.Data)
}

Request fields

All request parameters are wrapped in a generic Field type, which we use to distinguish zero values from null or omitted fields.

This prevents accidentally sending a zero value if you forget a required parameter, and enables explicitly sending null, false, '', or 0 on optional parameters. Any field not specified is not sent.

To construct fields with values, use the helpers String(), Int(), Float(), or most commonly, the generic F[T](). To send a null, use Null[T](), and to send a nonconforming value, use Raw[T](any). For example:

params := FooParams{
	Name: relaygo.F("hello"),

	// Explicitly send `"description": null`
	Description: relaygo.Null[string](),

	Point: relaygo.F(relaygo.Point{
		X: relaygo.Int(0),
		Y: relaygo.Int(1),

		// In cases where the API specifies a given type,
		// but you want to send something else, use `Raw`:
		Z: relaygo.Raw[int64](0.01), // sends a float
	}),
}
Response objects

All fields in response structs are value types (not pointers or wrappers).

If a given field is null, not present, or invalid, the corresponding field will simply be its zero value.

All response structs also include a special JSON field, containing more detailed information about each property, which you can use like so:

if res.Name == "" {
	// true if `"name"` is either not present or explicitly null
	res.JSON.Name.IsNull()

	// true if the `"name"` key was not present in the response JSON at all
	res.JSON.Name.IsMissing()

	// When the API returns data that cannot be coerced to the expected type:
	if res.JSON.Name.IsInvalid() {
		raw := res.JSON.Name.Raw()

		legacyName := struct{
			First string `json:"first"`
			Last  string `json:"last"`
		}{}
		json.Unmarshal([]byte(raw), &legacyName)
		name = legacyName.First + " " + legacyName.Last
	}
}

These .JSON structs also include an Extras 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()
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 := relaygo.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Posts.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"}),
)

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:

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

Errors

When the API returns a non-success status code, we return an error with type *relaygo.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.Posts.List(context.TODO(), relaygo.PostListParams{})
if err != nil {
	var apierr *relaygo.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/posts": 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.Posts.List(
	ctx,
	relaygo.PostListParams{},
	// 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 param.Field[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 relaygo.FileParam(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

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 := relaygo.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Posts.List(
	context.TODO(),
	relaygo.PostListParams{},
	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
posts, err := client.Posts.List(
	context.TODO(),
	relaygo.PostListParams{},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", posts)

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]interface{}

    // 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:   relaygo.F("id_xxxx"),
    Data: relaygo.F(FooNewParamsData{
        FirstName: relaygo.F("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 := relaygo.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

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(value bool) param.Field[bool]

Bool is a param field helper which helps specify bools.

func DefaultClientOptions

func DefaultClientOptions() []option.RequestOption

DefaultClientOptions read from the environment (RELAY_API_KEY, RELAY_BASE_URL). This should be used to initialize new clients.

func F

func F[T any](value T) param.Field[T]

F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.

func FileParam

func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]

FileParam is a param field helper which helps files with a mime content-type.

func Float

func Float(value float64) param.Field[float64]

Float is a param field helper which helps specify floats.

func Int

func Int(value int64) param.Field[int64]

Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.

func Null

func Null[T any]() param.Field[T]

Null is a param field helper which explicitly sends null to the API.

func Raw

func Raw[T any](value any) param.Field[T]

Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).

func String

func String(value string) param.Field[string]

String is a param field helper which helps specify strings.

Types

type APIKeyListParams

type APIKeyListParams struct {
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Filter: start date (ISO 8601)
	From param.Field[time.Time] `query:"from" format:"date-time"`
	// Number of items per page
	Limit param.Field[int64] `query:"limit"`
	// Filter: end date (ISO 8601)
	To param.Field[time.Time] `query:"to" format:"date-time"`
}

func (APIKeyListParams) URLQuery

func (r APIKeyListParams) URLQuery() (v url.Values)

URLQuery serializes APIKeyListParams's query parameters as `url.Values`.

type APIKeyListResponse

type APIKeyListResponse struct {
	Data []APIKeyListResponseData `json:"data" api:"required"`
	// Whether more items exist
	HasMore bool `json:"has_more" api:"required"`
	// Cursor for next page
	NextCursor string                 `json:"next_cursor" api:"required,nullable"`
	JSON       apiKeyListResponseJSON `json:"-"`
}

func (*APIKeyListResponse) UnmarshalJSON

func (r *APIKeyListResponse) UnmarshalJSON(data []byte) (err error)

type APIKeyListResponseData

type APIKeyListResponseData struct {
	// API key ID
	ID string `json:"id" api:"required"`
	// Creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Whether the key is active
	Enabled bool `json:"enabled" api:"required"`
	// Expiration timestamp
	ExpiresAt time.Time `json:"expires_at" api:"required,nullable" format:"date-time"`
	// API key name
	Name string `json:"name" api:"required,nullable"`
	// Key prefix (e.g. rlay*live*)
	Prefix string `json:"prefix" api:"required,nullable"`
	// First 8 characters of the key (preview)
	Start string                     `json:"start" api:"required"`
	JSON  apiKeyListResponseDataJSON `json:"-"`
}

func (*APIKeyListResponseData) UnmarshalJSON

func (r *APIKeyListResponseData) UnmarshalJSON(data []byte) (err error)

type APIKeyNewParams

type APIKeyNewParams struct {
	// Name for the API key
	Name param.Field[string] `json:"name" api:"required"`
	// Number of days until the key expires
	ExpiresInDays param.Field[int64] `json:"expires_in_days"`
}

func (APIKeyNewParams) MarshalJSON

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

type APIKeyNewResponse

type APIKeyNewResponse struct {
	// API key ID
	ID string `json:"id" api:"required"`
	// Creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Expiration timestamp
	ExpiresAt time.Time `json:"expires_at" api:"required,nullable" format:"date-time"`
	// Full API key (shown once, store securely)
	Key string `json:"key" api:"required"`
	// API key name
	Name string `json:"name" api:"required,nullable"`
	// Key prefix
	Prefix string                `json:"prefix" api:"required"`
	JSON   apiKeyNewResponseJSON `json:"-"`
}

func (*APIKeyNewResponse) UnmarshalJSON

func (r *APIKeyNewResponse) UnmarshalJSON(data []byte) (err error)

type APIKeyService

type APIKeyService struct {
	Options []option.RequestOption
}

APIKeyService contains methods and other services that help with interacting with the relay 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 NewAPIKeyService method instead.

func NewAPIKeyService

func NewAPIKeyService(opts ...option.RequestOption) (r *APIKeyService)

NewAPIKeyService 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 (*APIKeyService) Delete

func (r *APIKeyService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)

Delete an API key

func (*APIKeyService) List

func (r *APIKeyService) List(ctx context.Context, query APIKeyListParams, opts ...option.RequestOption) (res *APIKeyListResponse, err error)

List API keys

func (*APIKeyService) New

Create a new API key. The full key is returned only once in the response — store it securely.

type AccountFacebookPageGetResponse

type AccountFacebookPageGetResponse struct {
	Data []AccountFacebookPageGetResponseData `json:"data" api:"required"`
	JSON accountFacebookPageGetResponseJSON   `json:"-"`
}

func (*AccountFacebookPageGetResponse) UnmarshalJSON

func (r *AccountFacebookPageGetResponse) UnmarshalJSON(data []byte) (err error)

type AccountFacebookPageGetResponseData

type AccountFacebookPageGetResponseData struct {
	ID          string                                 `json:"id" api:"required"`
	Name        string                                 `json:"name" api:"required"`
	AccessToken string                                 `json:"access_token"`
	JSON        accountFacebookPageGetResponseDataJSON `json:"-"`
}

func (*AccountFacebookPageGetResponseData) UnmarshalJSON

func (r *AccountFacebookPageGetResponseData) UnmarshalJSON(data []byte) (err error)

type AccountFacebookPageService

type AccountFacebookPageService struct {
	Options []option.RequestOption
}

AccountFacebookPageService contains methods and other services that help with interacting with the relay 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 NewAccountFacebookPageService method instead.

func NewAccountFacebookPageService

func NewAccountFacebookPageService(opts ...option.RequestOption) (r *AccountFacebookPageService)

NewAccountFacebookPageService 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 (*AccountFacebookPageService) Get

Fetch Facebook pages for an account

func (*AccountFacebookPageService) SetDefault

Set default Facebook page

type AccountFacebookPageSetDefaultParams

type AccountFacebookPageSetDefaultParams struct {
	// Facebook page ID to set as default
	PageID param.Field[string] `json:"page_id" api:"required"`
}

func (AccountFacebookPageSetDefaultParams) MarshalJSON

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

type AccountFacebookPageSetDefaultResponse

type AccountFacebookPageSetDefaultResponse struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             AccountFacebookPageSetDefaultResponseGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                        `json:"metadata" api:"required,nullable"`
	Platform          AccountFacebookPageSetDefaultResponsePlatform `json:"platform" api:"required"`
	PlatformAccountID string                                        `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                     `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                        `json:"username" api:"required,nullable"`
	JSON              accountFacebookPageSetDefaultResponseJSON     `json:"-"`
}

func (*AccountFacebookPageSetDefaultResponse) UnmarshalJSON

func (r *AccountFacebookPageSetDefaultResponse) UnmarshalJSON(data []byte) (err error)

type AccountFacebookPageSetDefaultResponseGroup

type AccountFacebookPageSetDefaultResponseGroup struct {
	ID   string                                         `json:"id" api:"required"`
	Name string                                         `json:"name" api:"required"`
	JSON accountFacebookPageSetDefaultResponseGroupJSON `json:"-"`
}

Account group

func (*AccountFacebookPageSetDefaultResponseGroup) UnmarshalJSON

func (r *AccountFacebookPageSetDefaultResponseGroup) UnmarshalJSON(data []byte) (err error)

type AccountFacebookPageSetDefaultResponsePlatform

type AccountFacebookPageSetDefaultResponsePlatform string
const (
	AccountFacebookPageSetDefaultResponsePlatformTwitter        AccountFacebookPageSetDefaultResponsePlatform = "twitter"
	AccountFacebookPageSetDefaultResponsePlatformInstagram      AccountFacebookPageSetDefaultResponsePlatform = "instagram"
	AccountFacebookPageSetDefaultResponsePlatformFacebook       AccountFacebookPageSetDefaultResponsePlatform = "facebook"
	AccountFacebookPageSetDefaultResponsePlatformLinkedin       AccountFacebookPageSetDefaultResponsePlatform = "linkedin"
	AccountFacebookPageSetDefaultResponsePlatformTiktok         AccountFacebookPageSetDefaultResponsePlatform = "tiktok"
	AccountFacebookPageSetDefaultResponsePlatformYoutube        AccountFacebookPageSetDefaultResponsePlatform = "youtube"
	AccountFacebookPageSetDefaultResponsePlatformPinterest      AccountFacebookPageSetDefaultResponsePlatform = "pinterest"
	AccountFacebookPageSetDefaultResponsePlatformReddit         AccountFacebookPageSetDefaultResponsePlatform = "reddit"
	AccountFacebookPageSetDefaultResponsePlatformBluesky        AccountFacebookPageSetDefaultResponsePlatform = "bluesky"
	AccountFacebookPageSetDefaultResponsePlatformThreads        AccountFacebookPageSetDefaultResponsePlatform = "threads"
	AccountFacebookPageSetDefaultResponsePlatformTelegram       AccountFacebookPageSetDefaultResponsePlatform = "telegram"
	AccountFacebookPageSetDefaultResponsePlatformSnapchat       AccountFacebookPageSetDefaultResponsePlatform = "snapchat"
	AccountFacebookPageSetDefaultResponsePlatformGooglebusiness AccountFacebookPageSetDefaultResponsePlatform = "googlebusiness"
	AccountFacebookPageSetDefaultResponsePlatformWhatsapp       AccountFacebookPageSetDefaultResponsePlatform = "whatsapp"
	AccountFacebookPageSetDefaultResponsePlatformMastodon       AccountFacebookPageSetDefaultResponsePlatform = "mastodon"
	AccountFacebookPageSetDefaultResponsePlatformDiscord        AccountFacebookPageSetDefaultResponsePlatform = "discord"
	AccountFacebookPageSetDefaultResponsePlatformSMS            AccountFacebookPageSetDefaultResponsePlatform = "sms"
)

func (AccountFacebookPageSetDefaultResponsePlatform) IsKnown

type AccountGetResponse

type AccountGetResponse struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             AccountGetResponseGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}     `json:"metadata" api:"required,nullable"`
	Platform          AccountGetResponsePlatform `json:"platform" api:"required"`
	PlatformAccountID string                     `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                  `json:"updated_at" api:"required" format:"date-time"`
	Username          string                     `json:"username" api:"required,nullable"`
	JSON              accountGetResponseJSON     `json:"-"`
}

func (*AccountGetResponse) UnmarshalJSON

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

type AccountGetResponseGroup

type AccountGetResponseGroup struct {
	ID   string                      `json:"id" api:"required"`
	Name string                      `json:"name" api:"required"`
	JSON accountGetResponseGroupJSON `json:"-"`
}

Account group

func (*AccountGetResponseGroup) UnmarshalJSON

func (r *AccountGetResponseGroup) UnmarshalJSON(data []byte) (err error)

type AccountGetResponsePlatform

type AccountGetResponsePlatform string
const (
	AccountGetResponsePlatformTwitter        AccountGetResponsePlatform = "twitter"
	AccountGetResponsePlatformInstagram      AccountGetResponsePlatform = "instagram"
	AccountGetResponsePlatformFacebook       AccountGetResponsePlatform = "facebook"
	AccountGetResponsePlatformLinkedin       AccountGetResponsePlatform = "linkedin"
	AccountGetResponsePlatformTiktok         AccountGetResponsePlatform = "tiktok"
	AccountGetResponsePlatformYoutube        AccountGetResponsePlatform = "youtube"
	AccountGetResponsePlatformPinterest      AccountGetResponsePlatform = "pinterest"
	AccountGetResponsePlatformReddit         AccountGetResponsePlatform = "reddit"
	AccountGetResponsePlatformBluesky        AccountGetResponsePlatform = "bluesky"
	AccountGetResponsePlatformThreads        AccountGetResponsePlatform = "threads"
	AccountGetResponsePlatformTelegram       AccountGetResponsePlatform = "telegram"
	AccountGetResponsePlatformSnapchat       AccountGetResponsePlatform = "snapchat"
	AccountGetResponsePlatformGooglebusiness AccountGetResponsePlatform = "googlebusiness"
	AccountGetResponsePlatformWhatsapp       AccountGetResponsePlatform = "whatsapp"
	AccountGetResponsePlatformMastodon       AccountGetResponsePlatform = "mastodon"
	AccountGetResponsePlatformDiscord        AccountGetResponsePlatform = "discord"
	AccountGetResponsePlatformSMS            AccountGetResponsePlatform = "sms"
)

func (AccountGetResponsePlatform) IsKnown

func (r AccountGetResponsePlatform) IsKnown() bool

type AccountGmbLocationGetResponse

type AccountGmbLocationGetResponse struct {
	Data []AccountGmbLocationGetResponseData `json:"data" api:"required"`
	JSON accountGmbLocationGetResponseJSON   `json:"-"`
}

func (*AccountGmbLocationGetResponse) UnmarshalJSON

func (r *AccountGmbLocationGetResponse) UnmarshalJSON(data []byte) (err error)

type AccountGmbLocationGetResponseData

type AccountGmbLocationGetResponseData struct {
	ID      string                                `json:"id" api:"required"`
	Address string                                `json:"address" api:"required,nullable"`
	Name    string                                `json:"name" api:"required"`
	JSON    accountGmbLocationGetResponseDataJSON `json:"-"`
}

func (*AccountGmbLocationGetResponseData) UnmarshalJSON

func (r *AccountGmbLocationGetResponseData) UnmarshalJSON(data []byte) (err error)

type AccountGmbLocationService

type AccountGmbLocationService struct {
	Options []option.RequestOption
}

AccountGmbLocationService contains methods and other services that help with interacting with the relay 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 NewAccountGmbLocationService method instead.

func NewAccountGmbLocationService

func NewAccountGmbLocationService(opts ...option.RequestOption) (r *AccountGmbLocationService)

NewAccountGmbLocationService 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 (*AccountGmbLocationService) Get

Fetch Google My Business locations

func (*AccountGmbLocationService) SetDefault

Set default GMB location

type AccountGmbLocationSetDefaultParams

type AccountGmbLocationSetDefaultParams struct {
	// Google My Business location ID to set as default
	LocationID param.Field[string] `json:"location_id" api:"required"`
}

func (AccountGmbLocationSetDefaultParams) MarshalJSON

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

type AccountGmbLocationSetDefaultResponse

type AccountGmbLocationSetDefaultResponse struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             AccountGmbLocationSetDefaultResponseGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                       `json:"metadata" api:"required,nullable"`
	Platform          AccountGmbLocationSetDefaultResponsePlatform `json:"platform" api:"required"`
	PlatformAccountID string                                       `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                    `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                       `json:"username" api:"required,nullable"`
	JSON              accountGmbLocationSetDefaultResponseJSON     `json:"-"`
}

func (*AccountGmbLocationSetDefaultResponse) UnmarshalJSON

func (r *AccountGmbLocationSetDefaultResponse) UnmarshalJSON(data []byte) (err error)

type AccountGmbLocationSetDefaultResponseGroup

type AccountGmbLocationSetDefaultResponseGroup struct {
	ID   string                                        `json:"id" api:"required"`
	Name string                                        `json:"name" api:"required"`
	JSON accountGmbLocationSetDefaultResponseGroupJSON `json:"-"`
}

Account group

func (*AccountGmbLocationSetDefaultResponseGroup) UnmarshalJSON

func (r *AccountGmbLocationSetDefaultResponseGroup) UnmarshalJSON(data []byte) (err error)

type AccountGmbLocationSetDefaultResponsePlatform

type AccountGmbLocationSetDefaultResponsePlatform string
const (
	AccountGmbLocationSetDefaultResponsePlatformTwitter        AccountGmbLocationSetDefaultResponsePlatform = "twitter"
	AccountGmbLocationSetDefaultResponsePlatformInstagram      AccountGmbLocationSetDefaultResponsePlatform = "instagram"
	AccountGmbLocationSetDefaultResponsePlatformFacebook       AccountGmbLocationSetDefaultResponsePlatform = "facebook"
	AccountGmbLocationSetDefaultResponsePlatformLinkedin       AccountGmbLocationSetDefaultResponsePlatform = "linkedin"
	AccountGmbLocationSetDefaultResponsePlatformTiktok         AccountGmbLocationSetDefaultResponsePlatform = "tiktok"
	AccountGmbLocationSetDefaultResponsePlatformYoutube        AccountGmbLocationSetDefaultResponsePlatform = "youtube"
	AccountGmbLocationSetDefaultResponsePlatformPinterest      AccountGmbLocationSetDefaultResponsePlatform = "pinterest"
	AccountGmbLocationSetDefaultResponsePlatformReddit         AccountGmbLocationSetDefaultResponsePlatform = "reddit"
	AccountGmbLocationSetDefaultResponsePlatformBluesky        AccountGmbLocationSetDefaultResponsePlatform = "bluesky"
	AccountGmbLocationSetDefaultResponsePlatformThreads        AccountGmbLocationSetDefaultResponsePlatform = "threads"
	AccountGmbLocationSetDefaultResponsePlatformTelegram       AccountGmbLocationSetDefaultResponsePlatform = "telegram"
	AccountGmbLocationSetDefaultResponsePlatformSnapchat       AccountGmbLocationSetDefaultResponsePlatform = "snapchat"
	AccountGmbLocationSetDefaultResponsePlatformGooglebusiness AccountGmbLocationSetDefaultResponsePlatform = "googlebusiness"
	AccountGmbLocationSetDefaultResponsePlatformWhatsapp       AccountGmbLocationSetDefaultResponsePlatform = "whatsapp"
	AccountGmbLocationSetDefaultResponsePlatformMastodon       AccountGmbLocationSetDefaultResponsePlatform = "mastodon"
	AccountGmbLocationSetDefaultResponsePlatformDiscord        AccountGmbLocationSetDefaultResponsePlatform = "discord"
	AccountGmbLocationSetDefaultResponsePlatformSMS            AccountGmbLocationSetDefaultResponsePlatform = "sms"
)

func (AccountGmbLocationSetDefaultResponsePlatform) IsKnown

type AccountGroupListParams

type AccountGroupListParams struct {
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Page size
	Limit param.Field[float64] `query:"limit"`
	// Search groups by name
	Search param.Field[string] `query:"search"`
}

func (AccountGroupListParams) URLQuery

func (r AccountGroupListParams) URLQuery() (v url.Values)

URLQuery serializes AccountGroupListParams's query parameters as `url.Values`.

type AccountGroupListResponse

type AccountGroupListResponse struct {
	Data       []AccountGroupListResponseData `json:"data" api:"required"`
	HasMore    bool                           `json:"has_more" api:"required"`
	NextCursor string                         `json:"next_cursor" api:"required,nullable"`
	JSON       accountGroupListResponseJSON   `json:"-"`
}

func (*AccountGroupListResponse) UnmarshalJSON

func (r *AccountGroupListResponse) UnmarshalJSON(data []byte) (err error)

type AccountGroupListResponseData

type AccountGroupListResponseData struct {
	// Group ID
	ID string `json:"id" api:"required"`
	// Number of accounts in this group
	AccountCount float64 `json:"account_count" api:"required"`
	// Creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Group description
	Description string `json:"description" api:"required,nullable"`
	// Group name
	Name string `json:"name" api:"required"`
	// Last updated timestamp
	UpdatedAt time.Time                        `json:"updated_at" api:"required" format:"date-time"`
	JSON      accountGroupListResponseDataJSON `json:"-"`
}

func (*AccountGroupListResponseData) UnmarshalJSON

func (r *AccountGroupListResponseData) UnmarshalJSON(data []byte) (err error)

type AccountGroupNewParams

type AccountGroupNewParams struct {
	// Group name
	Name param.Field[string] `json:"name" api:"required"`
	// Group description
	Description param.Field[string] `json:"description"`
}

func (AccountGroupNewParams) MarshalJSON

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

type AccountGroupNewResponse

type AccountGroupNewResponse struct {
	// Group ID
	ID string `json:"id" api:"required"`
	// Number of accounts in this group
	AccountCount float64 `json:"account_count" api:"required"`
	// Creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Group description
	Description string `json:"description" api:"required,nullable"`
	// Group name
	Name string `json:"name" api:"required"`
	// Last updated timestamp
	UpdatedAt time.Time                   `json:"updated_at" api:"required" format:"date-time"`
	JSON      accountGroupNewResponseJSON `json:"-"`
}

func (*AccountGroupNewResponse) UnmarshalJSON

func (r *AccountGroupNewResponse) UnmarshalJSON(data []byte) (err error)

type AccountGroupService

type AccountGroupService struct {
	Options []option.RequestOption
}

AccountGroupService contains methods and other services that help with interacting with the relay 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 NewAccountGroupService method instead.

func NewAccountGroupService

func NewAccountGroupService(opts ...option.RequestOption) (r *AccountGroupService)

NewAccountGroupService 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 (*AccountGroupService) Delete

func (r *AccountGroupService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)

Delete an account group

func (*AccountGroupService) List

List account groups

func (*AccountGroupService) New

Create an account group

func (*AccountGroupService) Update

Update an account group

type AccountGroupUpdateParams

type AccountGroupUpdateParams struct {
	// Group description
	Description param.Field[string] `json:"description"`
	// Group name
	Name param.Field[string] `json:"name"`
}

func (AccountGroupUpdateParams) MarshalJSON

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

type AccountGroupUpdateResponse

type AccountGroupUpdateResponse struct {
	// Group ID
	ID string `json:"id" api:"required"`
	// Number of accounts in this group
	AccountCount float64 `json:"account_count" api:"required"`
	// Creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Group description
	Description string `json:"description" api:"required,nullable"`
	// Group name
	Name string `json:"name" api:"required"`
	// Last updated timestamp
	UpdatedAt time.Time                      `json:"updated_at" api:"required" format:"date-time"`
	JSON      accountGroupUpdateResponseJSON `json:"-"`
}

func (*AccountGroupUpdateResponse) UnmarshalJSON

func (r *AccountGroupUpdateResponse) UnmarshalJSON(data []byte) (err error)

type AccountHealthGetResponse

type AccountHealthGetResponse struct {
	ID             string                        `json:"id" api:"required"`
	Healthy        bool                          `json:"healthy" api:"required"`
	Platform       string                        `json:"platform" api:"required"`
	TokenExpiresAt string                        `json:"token_expires_at" api:"required,nullable"`
	Username       string                        `json:"username" api:"required,nullable"`
	Error          AccountHealthGetResponseError `json:"error"`
	JSON           accountHealthGetResponseJSON  `json:"-"`
}

func (*AccountHealthGetResponse) UnmarshalJSON

func (r *AccountHealthGetResponse) UnmarshalJSON(data []byte) (err error)

type AccountHealthGetResponseError

type AccountHealthGetResponseError struct {
	Code    string                            `json:"code" api:"required"`
	Message string                            `json:"message" api:"required"`
	JSON    accountHealthGetResponseErrorJSON `json:"-"`
}

func (*AccountHealthGetResponseError) UnmarshalJSON

func (r *AccountHealthGetResponseError) UnmarshalJSON(data []byte) (err error)

type AccountHealthListResponse

type AccountHealthListResponse struct {
	Data []AccountHealthListResponseData `json:"data" api:"required"`
	JSON accountHealthListResponseJSON   `json:"-"`
}

func (*AccountHealthListResponse) UnmarshalJSON

func (r *AccountHealthListResponse) UnmarshalJSON(data []byte) (err error)

type AccountHealthListResponseData

type AccountHealthListResponseData struct {
	ID             string                                `json:"id" api:"required"`
	Healthy        bool                                  `json:"healthy" api:"required"`
	Platform       AccountHealthListResponseDataPlatform `json:"platform" api:"required"`
	TokenExpiresAt time.Time                             `json:"token_expires_at" api:"required,nullable" format:"date-time"`
	Username       string                                `json:"username" api:"required,nullable"`
	Error          AccountHealthListResponseDataError    `json:"error"`
	JSON           accountHealthListResponseDataJSON     `json:"-"`
}

func (*AccountHealthListResponseData) UnmarshalJSON

func (r *AccountHealthListResponseData) UnmarshalJSON(data []byte) (err error)

type AccountHealthListResponseDataError

type AccountHealthListResponseDataError struct {
	Code    string                                 `json:"code" api:"required"`
	Message string                                 `json:"message" api:"required"`
	JSON    accountHealthListResponseDataErrorJSON `json:"-"`
}

func (*AccountHealthListResponseDataError) UnmarshalJSON

func (r *AccountHealthListResponseDataError) UnmarshalJSON(data []byte) (err error)

type AccountHealthListResponseDataPlatform

type AccountHealthListResponseDataPlatform string
const (
	AccountHealthListResponseDataPlatformTwitter        AccountHealthListResponseDataPlatform = "twitter"
	AccountHealthListResponseDataPlatformInstagram      AccountHealthListResponseDataPlatform = "instagram"
	AccountHealthListResponseDataPlatformFacebook       AccountHealthListResponseDataPlatform = "facebook"
	AccountHealthListResponseDataPlatformLinkedin       AccountHealthListResponseDataPlatform = "linkedin"
	AccountHealthListResponseDataPlatformTiktok         AccountHealthListResponseDataPlatform = "tiktok"
	AccountHealthListResponseDataPlatformYoutube        AccountHealthListResponseDataPlatform = "youtube"
	AccountHealthListResponseDataPlatformPinterest      AccountHealthListResponseDataPlatform = "pinterest"
	AccountHealthListResponseDataPlatformReddit         AccountHealthListResponseDataPlatform = "reddit"
	AccountHealthListResponseDataPlatformBluesky        AccountHealthListResponseDataPlatform = "bluesky"
	AccountHealthListResponseDataPlatformThreads        AccountHealthListResponseDataPlatform = "threads"
	AccountHealthListResponseDataPlatformTelegram       AccountHealthListResponseDataPlatform = "telegram"
	AccountHealthListResponseDataPlatformSnapchat       AccountHealthListResponseDataPlatform = "snapchat"
	AccountHealthListResponseDataPlatformGooglebusiness AccountHealthListResponseDataPlatform = "googlebusiness"
	AccountHealthListResponseDataPlatformWhatsapp       AccountHealthListResponseDataPlatform = "whatsapp"
	AccountHealthListResponseDataPlatformMastodon       AccountHealthListResponseDataPlatform = "mastodon"
	AccountHealthListResponseDataPlatformDiscord        AccountHealthListResponseDataPlatform = "discord"
	AccountHealthListResponseDataPlatformSMS            AccountHealthListResponseDataPlatform = "sms"
)

func (AccountHealthListResponseDataPlatform) IsKnown

type AccountHealthService

type AccountHealthService struct {
	Options []option.RequestOption
}

AccountHealthService contains methods and other services that help with interacting with the relay 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 NewAccountHealthService method instead.

func NewAccountHealthService

func NewAccountHealthService(opts ...option.RequestOption) (r *AccountHealthService)

NewAccountHealthService 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 (*AccountHealthService) Get

Check health of a single connected account

func (*AccountHealthService) List

Check health of all connected accounts

type AccountLinkedinOrganizationGetResponse

type AccountLinkedinOrganizationGetResponse struct {
	Data []AccountLinkedinOrganizationGetResponseData `json:"data" api:"required"`
	JSON accountLinkedinOrganizationGetResponseJSON   `json:"-"`
}

func (*AccountLinkedinOrganizationGetResponse) UnmarshalJSON

func (r *AccountLinkedinOrganizationGetResponse) UnmarshalJSON(data []byte) (err error)

type AccountLinkedinOrganizationGetResponseData

type AccountLinkedinOrganizationGetResponseData struct {
	ID         string                                         `json:"id" api:"required"`
	Name       string                                         `json:"name" api:"required"`
	VanityName string                                         `json:"vanity_name" api:"required,nullable"`
	JSON       accountLinkedinOrganizationGetResponseDataJSON `json:"-"`
}

func (*AccountLinkedinOrganizationGetResponseData) UnmarshalJSON

func (r *AccountLinkedinOrganizationGetResponseData) UnmarshalJSON(data []byte) (err error)

type AccountLinkedinOrganizationService

type AccountLinkedinOrganizationService struct {
	Options []option.RequestOption
}

AccountLinkedinOrganizationService contains methods and other services that help with interacting with the relay 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 NewAccountLinkedinOrganizationService method instead.

func NewAccountLinkedinOrganizationService

func NewAccountLinkedinOrganizationService(opts ...option.RequestOption) (r *AccountLinkedinOrganizationService)

NewAccountLinkedinOrganizationService 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 (*AccountLinkedinOrganizationService) Get

Fetch LinkedIn organizations for an account

func (*AccountLinkedinOrganizationService) SwitchType

Switch LinkedIn account type

type AccountLinkedinOrganizationSwitchTypeParams

type AccountLinkedinOrganizationSwitchTypeParams struct {
	// Account type to switch to
	AccountType param.Field[AccountLinkedinOrganizationSwitchTypeParamsAccountType] `json:"account_type" api:"required"`
	// LinkedIn organization ID
	OrganizationID param.Field[string] `json:"organization_id" api:"required"`
}

func (AccountLinkedinOrganizationSwitchTypeParams) MarshalJSON

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

type AccountLinkedinOrganizationSwitchTypeParamsAccountType

type AccountLinkedinOrganizationSwitchTypeParamsAccountType string

Account type to switch to

const (
	AccountLinkedinOrganizationSwitchTypeParamsAccountTypePersonal     AccountLinkedinOrganizationSwitchTypeParamsAccountType = "personal"
	AccountLinkedinOrganizationSwitchTypeParamsAccountTypeOrganization AccountLinkedinOrganizationSwitchTypeParamsAccountType = "organization"
)

func (AccountLinkedinOrganizationSwitchTypeParamsAccountType) IsKnown

type AccountLinkedinOrganizationSwitchTypeResponse

type AccountLinkedinOrganizationSwitchTypeResponse struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             AccountLinkedinOrganizationSwitchTypeResponseGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                                `json:"metadata" api:"required,nullable"`
	Platform          AccountLinkedinOrganizationSwitchTypeResponsePlatform `json:"platform" api:"required"`
	PlatformAccountID string                                                `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                             `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                                `json:"username" api:"required,nullable"`
	JSON              accountLinkedinOrganizationSwitchTypeResponseJSON     `json:"-"`
}

func (*AccountLinkedinOrganizationSwitchTypeResponse) UnmarshalJSON

func (r *AccountLinkedinOrganizationSwitchTypeResponse) UnmarshalJSON(data []byte) (err error)

type AccountLinkedinOrganizationSwitchTypeResponseGroup

type AccountLinkedinOrganizationSwitchTypeResponseGroup struct {
	ID   string                                                 `json:"id" api:"required"`
	Name string                                                 `json:"name" api:"required"`
	JSON accountLinkedinOrganizationSwitchTypeResponseGroupJSON `json:"-"`
}

Account group

func (*AccountLinkedinOrganizationSwitchTypeResponseGroup) UnmarshalJSON

func (r *AccountLinkedinOrganizationSwitchTypeResponseGroup) UnmarshalJSON(data []byte) (err error)

type AccountLinkedinOrganizationSwitchTypeResponsePlatform

type AccountLinkedinOrganizationSwitchTypeResponsePlatform string
const (
	AccountLinkedinOrganizationSwitchTypeResponsePlatformTwitter        AccountLinkedinOrganizationSwitchTypeResponsePlatform = "twitter"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformInstagram      AccountLinkedinOrganizationSwitchTypeResponsePlatform = "instagram"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformFacebook       AccountLinkedinOrganizationSwitchTypeResponsePlatform = "facebook"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformLinkedin       AccountLinkedinOrganizationSwitchTypeResponsePlatform = "linkedin"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformTiktok         AccountLinkedinOrganizationSwitchTypeResponsePlatform = "tiktok"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformYoutube        AccountLinkedinOrganizationSwitchTypeResponsePlatform = "youtube"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformPinterest      AccountLinkedinOrganizationSwitchTypeResponsePlatform = "pinterest"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformReddit         AccountLinkedinOrganizationSwitchTypeResponsePlatform = "reddit"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformBluesky        AccountLinkedinOrganizationSwitchTypeResponsePlatform = "bluesky"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformThreads        AccountLinkedinOrganizationSwitchTypeResponsePlatform = "threads"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformTelegram       AccountLinkedinOrganizationSwitchTypeResponsePlatform = "telegram"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformSnapchat       AccountLinkedinOrganizationSwitchTypeResponsePlatform = "snapchat"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformGooglebusiness AccountLinkedinOrganizationSwitchTypeResponsePlatform = "googlebusiness"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformWhatsapp       AccountLinkedinOrganizationSwitchTypeResponsePlatform = "whatsapp"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformMastodon       AccountLinkedinOrganizationSwitchTypeResponsePlatform = "mastodon"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformDiscord        AccountLinkedinOrganizationSwitchTypeResponsePlatform = "discord"
	AccountLinkedinOrganizationSwitchTypeResponsePlatformSMS            AccountLinkedinOrganizationSwitchTypeResponsePlatform = "sms"
)

func (AccountLinkedinOrganizationSwitchTypeResponsePlatform) IsKnown

type AccountListParams

type AccountListParams struct {
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Filter: start date (ISO 8601)
	From param.Field[time.Time] `query:"from" format:"date-time"`
	// Filter by group ID
	GroupID param.Field[string] `query:"group_id"`
	// Number of items per page
	Limit param.Field[int64] `query:"limit"`
	// Search by name or username
	Search param.Field[string] `query:"search"`
	// Filter: end date (ISO 8601)
	To param.Field[time.Time] `query:"to" format:"date-time"`
	// Only show ungrouped accounts
	Ungrouped param.Field[bool] `query:"ungrouped"`
}

func (AccountListParams) URLQuery

func (r AccountListParams) URLQuery() (v url.Values)

URLQuery serializes AccountListParams's query parameters as `url.Values`.

type AccountListResponse

type AccountListResponse struct {
	Data []AccountListResponseData `json:"data" api:"required"`
	// Whether more items exist
	HasMore bool `json:"has_more" api:"required"`
	// Cursor for next page
	NextCursor string                  `json:"next_cursor" api:"required,nullable"`
	JSON       accountListResponseJSON `json:"-"`
}

func (*AccountListResponse) UnmarshalJSON

func (r *AccountListResponse) UnmarshalJSON(data []byte) (err error)

type AccountListResponseData

type AccountListResponseData struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             AccountListResponseDataGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}          `json:"metadata" api:"required,nullable"`
	Platform          AccountListResponseDataPlatform `json:"platform" api:"required"`
	PlatformAccountID string                          `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                       `json:"updated_at" api:"required" format:"date-time"`
	Username          string                          `json:"username" api:"required,nullable"`
	JSON              accountListResponseDataJSON     `json:"-"`
}

func (*AccountListResponseData) UnmarshalJSON

func (r *AccountListResponseData) UnmarshalJSON(data []byte) (err error)

type AccountListResponseDataGroup

type AccountListResponseDataGroup struct {
	ID   string                           `json:"id" api:"required"`
	Name string                           `json:"name" api:"required"`
	JSON accountListResponseDataGroupJSON `json:"-"`
}

Account group

func (*AccountListResponseDataGroup) UnmarshalJSON

func (r *AccountListResponseDataGroup) UnmarshalJSON(data []byte) (err error)

type AccountListResponseDataPlatform

type AccountListResponseDataPlatform string
const (
	AccountListResponseDataPlatformTwitter        AccountListResponseDataPlatform = "twitter"
	AccountListResponseDataPlatformInstagram      AccountListResponseDataPlatform = "instagram"
	AccountListResponseDataPlatformFacebook       AccountListResponseDataPlatform = "facebook"
	AccountListResponseDataPlatformLinkedin       AccountListResponseDataPlatform = "linkedin"
	AccountListResponseDataPlatformTiktok         AccountListResponseDataPlatform = "tiktok"
	AccountListResponseDataPlatformYoutube        AccountListResponseDataPlatform = "youtube"
	AccountListResponseDataPlatformPinterest      AccountListResponseDataPlatform = "pinterest"
	AccountListResponseDataPlatformReddit         AccountListResponseDataPlatform = "reddit"
	AccountListResponseDataPlatformBluesky        AccountListResponseDataPlatform = "bluesky"
	AccountListResponseDataPlatformThreads        AccountListResponseDataPlatform = "threads"
	AccountListResponseDataPlatformTelegram       AccountListResponseDataPlatform = "telegram"
	AccountListResponseDataPlatformSnapchat       AccountListResponseDataPlatform = "snapchat"
	AccountListResponseDataPlatformGooglebusiness AccountListResponseDataPlatform = "googlebusiness"
	AccountListResponseDataPlatformWhatsapp       AccountListResponseDataPlatform = "whatsapp"
	AccountListResponseDataPlatformMastodon       AccountListResponseDataPlatform = "mastodon"
	AccountListResponseDataPlatformDiscord        AccountListResponseDataPlatform = "discord"
	AccountListResponseDataPlatformSMS            AccountListResponseDataPlatform = "sms"
)

func (AccountListResponseDataPlatform) IsKnown

type AccountPinterestBoardGetResponse

type AccountPinterestBoardGetResponse struct {
	Data []AccountPinterestBoardGetResponseData `json:"data" api:"required"`
	JSON accountPinterestBoardGetResponseJSON   `json:"-"`
}

func (*AccountPinterestBoardGetResponse) UnmarshalJSON

func (r *AccountPinterestBoardGetResponse) UnmarshalJSON(data []byte) (err error)

type AccountPinterestBoardGetResponseData

type AccountPinterestBoardGetResponseData struct {
	ID   string                                   `json:"id" api:"required"`
	Name string                                   `json:"name" api:"required"`
	URL  string                                   `json:"url" api:"required,nullable"`
	JSON accountPinterestBoardGetResponseDataJSON `json:"-"`
}

func (*AccountPinterestBoardGetResponseData) UnmarshalJSON

func (r *AccountPinterestBoardGetResponseData) UnmarshalJSON(data []byte) (err error)

type AccountPinterestBoardService

type AccountPinterestBoardService struct {
	Options []option.RequestOption
}

AccountPinterestBoardService contains methods and other services that help with interacting with the relay 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 NewAccountPinterestBoardService method instead.

func NewAccountPinterestBoardService

func NewAccountPinterestBoardService(opts ...option.RequestOption) (r *AccountPinterestBoardService)

NewAccountPinterestBoardService 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 (*AccountPinterestBoardService) Get

Fetch Pinterest boards for an account

func (*AccountPinterestBoardService) SetDefault

Set default Pinterest board

type AccountPinterestBoardSetDefaultParams

type AccountPinterestBoardSetDefaultParams struct {
	// Pinterest board ID to set as default
	BoardID param.Field[string] `json:"board_id" api:"required"`
}

func (AccountPinterestBoardSetDefaultParams) MarshalJSON

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

type AccountPinterestBoardSetDefaultResponse

type AccountPinterestBoardSetDefaultResponse struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             AccountPinterestBoardSetDefaultResponseGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                          `json:"metadata" api:"required,nullable"`
	Platform          AccountPinterestBoardSetDefaultResponsePlatform `json:"platform" api:"required"`
	PlatformAccountID string                                          `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                       `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                          `json:"username" api:"required,nullable"`
	JSON              accountPinterestBoardSetDefaultResponseJSON     `json:"-"`
}

func (*AccountPinterestBoardSetDefaultResponse) UnmarshalJSON

func (r *AccountPinterestBoardSetDefaultResponse) UnmarshalJSON(data []byte) (err error)

type AccountPinterestBoardSetDefaultResponseGroup

type AccountPinterestBoardSetDefaultResponseGroup struct {
	ID   string                                           `json:"id" api:"required"`
	Name string                                           `json:"name" api:"required"`
	JSON accountPinterestBoardSetDefaultResponseGroupJSON `json:"-"`
}

Account group

func (*AccountPinterestBoardSetDefaultResponseGroup) UnmarshalJSON

func (r *AccountPinterestBoardSetDefaultResponseGroup) UnmarshalJSON(data []byte) (err error)

type AccountPinterestBoardSetDefaultResponsePlatform

type AccountPinterestBoardSetDefaultResponsePlatform string
const (
	AccountPinterestBoardSetDefaultResponsePlatformTwitter        AccountPinterestBoardSetDefaultResponsePlatform = "twitter"
	AccountPinterestBoardSetDefaultResponsePlatformInstagram      AccountPinterestBoardSetDefaultResponsePlatform = "instagram"
	AccountPinterestBoardSetDefaultResponsePlatformFacebook       AccountPinterestBoardSetDefaultResponsePlatform = "facebook"
	AccountPinterestBoardSetDefaultResponsePlatformLinkedin       AccountPinterestBoardSetDefaultResponsePlatform = "linkedin"
	AccountPinterestBoardSetDefaultResponsePlatformTiktok         AccountPinterestBoardSetDefaultResponsePlatform = "tiktok"
	AccountPinterestBoardSetDefaultResponsePlatformYoutube        AccountPinterestBoardSetDefaultResponsePlatform = "youtube"
	AccountPinterestBoardSetDefaultResponsePlatformPinterest      AccountPinterestBoardSetDefaultResponsePlatform = "pinterest"
	AccountPinterestBoardSetDefaultResponsePlatformReddit         AccountPinterestBoardSetDefaultResponsePlatform = "reddit"
	AccountPinterestBoardSetDefaultResponsePlatformBluesky        AccountPinterestBoardSetDefaultResponsePlatform = "bluesky"
	AccountPinterestBoardSetDefaultResponsePlatformThreads        AccountPinterestBoardSetDefaultResponsePlatform = "threads"
	AccountPinterestBoardSetDefaultResponsePlatformTelegram       AccountPinterestBoardSetDefaultResponsePlatform = "telegram"
	AccountPinterestBoardSetDefaultResponsePlatformSnapchat       AccountPinterestBoardSetDefaultResponsePlatform = "snapchat"
	AccountPinterestBoardSetDefaultResponsePlatformGooglebusiness AccountPinterestBoardSetDefaultResponsePlatform = "googlebusiness"
	AccountPinterestBoardSetDefaultResponsePlatformWhatsapp       AccountPinterestBoardSetDefaultResponsePlatform = "whatsapp"
	AccountPinterestBoardSetDefaultResponsePlatformMastodon       AccountPinterestBoardSetDefaultResponsePlatform = "mastodon"
	AccountPinterestBoardSetDefaultResponsePlatformDiscord        AccountPinterestBoardSetDefaultResponsePlatform = "discord"
	AccountPinterestBoardSetDefaultResponsePlatformSMS            AccountPinterestBoardSetDefaultResponsePlatform = "sms"
)

func (AccountPinterestBoardSetDefaultResponsePlatform) IsKnown

type AccountRedditFlairGetParams

type AccountRedditFlairGetParams struct {
	// Subreddit name
	Subreddit param.Field[string] `query:"subreddit" api:"required"`
}

func (AccountRedditFlairGetParams) URLQuery

func (r AccountRedditFlairGetParams) URLQuery() (v url.Values)

URLQuery serializes AccountRedditFlairGetParams's query parameters as `url.Values`.

type AccountRedditFlairGetResponse

type AccountRedditFlairGetResponse struct {
	Data []AccountRedditFlairGetResponseData `json:"data" api:"required"`
	JSON accountRedditFlairGetResponseJSON   `json:"-"`
}

func (*AccountRedditFlairGetResponse) UnmarshalJSON

func (r *AccountRedditFlairGetResponse) UnmarshalJSON(data []byte) (err error)

type AccountRedditFlairGetResponseData

type AccountRedditFlairGetResponseData struct {
	ID   string                                `json:"id" api:"required"`
	Text string                                `json:"text" api:"required"`
	JSON accountRedditFlairGetResponseDataJSON `json:"-"`
}

func (*AccountRedditFlairGetResponseData) UnmarshalJSON

func (r *AccountRedditFlairGetResponseData) UnmarshalJSON(data []byte) (err error)

type AccountRedditFlairService

type AccountRedditFlairService struct {
	Options []option.RequestOption
}

AccountRedditFlairService contains methods and other services that help with interacting with the relay 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 NewAccountRedditFlairService method instead.

func NewAccountRedditFlairService

func NewAccountRedditFlairService(opts ...option.RequestOption) (r *AccountRedditFlairService)

NewAccountRedditFlairService 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 (*AccountRedditFlairService) Get

Fetch Reddit flairs for a subreddit

type AccountRedditSubredditGetResponse

type AccountRedditSubredditGetResponse struct {
	Data []AccountRedditSubredditGetResponseData `json:"data" api:"required"`
	JSON accountRedditSubredditGetResponseJSON   `json:"-"`
}

func (*AccountRedditSubredditGetResponse) UnmarshalJSON

func (r *AccountRedditSubredditGetResponse) UnmarshalJSON(data []byte) (err error)

type AccountRedditSubredditGetResponseData

type AccountRedditSubredditGetResponseData struct {
	DisplayName string                                    `json:"display_name" api:"required"`
	Name        string                                    `json:"name" api:"required"`
	Subscribers float64                                   `json:"subscribers" api:"required,nullable"`
	JSON        accountRedditSubredditGetResponseDataJSON `json:"-"`
}

func (*AccountRedditSubredditGetResponseData) UnmarshalJSON

func (r *AccountRedditSubredditGetResponseData) UnmarshalJSON(data []byte) (err error)

type AccountRedditSubredditService

type AccountRedditSubredditService struct {
	Options []option.RequestOption
}

AccountRedditSubredditService contains methods and other services that help with interacting with the relay 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 NewAccountRedditSubredditService method instead.

func NewAccountRedditSubredditService

func NewAccountRedditSubredditService(opts ...option.RequestOption) (r *AccountRedditSubredditService)

NewAccountRedditSubredditService 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 (*AccountRedditSubredditService) Get

Fetch Reddit subreddits for an account

func (*AccountRedditSubredditService) SetDefault

Set default Reddit subreddit

type AccountRedditSubredditSetDefaultParams

type AccountRedditSubredditSetDefaultParams struct {
	// Subreddit name to set as default
	Subreddit param.Field[string] `json:"subreddit" api:"required"`
}

func (AccountRedditSubredditSetDefaultParams) MarshalJSON

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

type AccountRedditSubredditSetDefaultResponse

type AccountRedditSubredditSetDefaultResponse struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             AccountRedditSubredditSetDefaultResponseGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                           `json:"metadata" api:"required,nullable"`
	Platform          AccountRedditSubredditSetDefaultResponsePlatform `json:"platform" api:"required"`
	PlatformAccountID string                                           `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                        `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                           `json:"username" api:"required,nullable"`
	JSON              accountRedditSubredditSetDefaultResponseJSON     `json:"-"`
}

func (*AccountRedditSubredditSetDefaultResponse) UnmarshalJSON

func (r *AccountRedditSubredditSetDefaultResponse) UnmarshalJSON(data []byte) (err error)

type AccountRedditSubredditSetDefaultResponseGroup

type AccountRedditSubredditSetDefaultResponseGroup struct {
	ID   string                                            `json:"id" api:"required"`
	Name string                                            `json:"name" api:"required"`
	JSON accountRedditSubredditSetDefaultResponseGroupJSON `json:"-"`
}

Account group

func (*AccountRedditSubredditSetDefaultResponseGroup) UnmarshalJSON

func (r *AccountRedditSubredditSetDefaultResponseGroup) UnmarshalJSON(data []byte) (err error)

type AccountRedditSubredditSetDefaultResponsePlatform

type AccountRedditSubredditSetDefaultResponsePlatform string
const (
	AccountRedditSubredditSetDefaultResponsePlatformTwitter        AccountRedditSubredditSetDefaultResponsePlatform = "twitter"
	AccountRedditSubredditSetDefaultResponsePlatformInstagram      AccountRedditSubredditSetDefaultResponsePlatform = "instagram"
	AccountRedditSubredditSetDefaultResponsePlatformFacebook       AccountRedditSubredditSetDefaultResponsePlatform = "facebook"
	AccountRedditSubredditSetDefaultResponsePlatformLinkedin       AccountRedditSubredditSetDefaultResponsePlatform = "linkedin"
	AccountRedditSubredditSetDefaultResponsePlatformTiktok         AccountRedditSubredditSetDefaultResponsePlatform = "tiktok"
	AccountRedditSubredditSetDefaultResponsePlatformYoutube        AccountRedditSubredditSetDefaultResponsePlatform = "youtube"
	AccountRedditSubredditSetDefaultResponsePlatformPinterest      AccountRedditSubredditSetDefaultResponsePlatform = "pinterest"
	AccountRedditSubredditSetDefaultResponsePlatformReddit         AccountRedditSubredditSetDefaultResponsePlatform = "reddit"
	AccountRedditSubredditSetDefaultResponsePlatformBluesky        AccountRedditSubredditSetDefaultResponsePlatform = "bluesky"
	AccountRedditSubredditSetDefaultResponsePlatformThreads        AccountRedditSubredditSetDefaultResponsePlatform = "threads"
	AccountRedditSubredditSetDefaultResponsePlatformTelegram       AccountRedditSubredditSetDefaultResponsePlatform = "telegram"
	AccountRedditSubredditSetDefaultResponsePlatformSnapchat       AccountRedditSubredditSetDefaultResponsePlatform = "snapchat"
	AccountRedditSubredditSetDefaultResponsePlatformGooglebusiness AccountRedditSubredditSetDefaultResponsePlatform = "googlebusiness"
	AccountRedditSubredditSetDefaultResponsePlatformWhatsapp       AccountRedditSubredditSetDefaultResponsePlatform = "whatsapp"
	AccountRedditSubredditSetDefaultResponsePlatformMastodon       AccountRedditSubredditSetDefaultResponsePlatform = "mastodon"
	AccountRedditSubredditSetDefaultResponsePlatformDiscord        AccountRedditSubredditSetDefaultResponsePlatform = "discord"
	AccountRedditSubredditSetDefaultResponsePlatformSMS            AccountRedditSubredditSetDefaultResponsePlatform = "sms"
)

func (AccountRedditSubredditSetDefaultResponsePlatform) IsKnown

type AccountService

type AccountService struct {
	Options               []option.RequestOption
	Health                *AccountHealthService
	RedditFlairs          *AccountRedditFlairService
	FacebookPages         *AccountFacebookPageService
	LinkedinOrganizations *AccountLinkedinOrganizationService
	PinterestBoards       *AccountPinterestBoardService
	RedditSubreddits      *AccountRedditSubredditService
	GmbLocations          *AccountGmbLocationService
}

AccountService contains methods and other services that help with interacting with the relay 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) Delete

func (r *AccountService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)

Disconnect a social account

func (*AccountService) Get

func (r *AccountService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountGetResponse, err error)

Get a connected account

func (*AccountService) List

List connected accounts

func (*AccountService) Update

Update account metadata

type AccountUpdateParams

type AccountUpdateParams struct {
	DisplayName param.Field[string] `json:"display_name"`
	// Group ID (null to ungroup)
	GroupID  param.Field[string]                 `json:"group_id"`
	Metadata param.Field[map[string]interface{}] `json:"metadata"`
}

func (AccountUpdateParams) MarshalJSON

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

type AccountUpdateResponse

type AccountUpdateResponse struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             AccountUpdateResponseGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}        `json:"metadata" api:"required,nullable"`
	Platform          AccountUpdateResponsePlatform `json:"platform" api:"required"`
	PlatformAccountID string                        `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                     `json:"updated_at" api:"required" format:"date-time"`
	Username          string                        `json:"username" api:"required,nullable"`
	JSON              accountUpdateResponseJSON     `json:"-"`
}

func (*AccountUpdateResponse) UnmarshalJSON

func (r *AccountUpdateResponse) UnmarshalJSON(data []byte) (err error)

type AccountUpdateResponseGroup

type AccountUpdateResponseGroup struct {
	ID   string                         `json:"id" api:"required"`
	Name string                         `json:"name" api:"required"`
	JSON accountUpdateResponseGroupJSON `json:"-"`
}

Account group

func (*AccountUpdateResponseGroup) UnmarshalJSON

func (r *AccountUpdateResponseGroup) UnmarshalJSON(data []byte) (err error)

type AccountUpdateResponsePlatform

type AccountUpdateResponsePlatform string
const (
	AccountUpdateResponsePlatformTwitter        AccountUpdateResponsePlatform = "twitter"
	AccountUpdateResponsePlatformInstagram      AccountUpdateResponsePlatform = "instagram"
	AccountUpdateResponsePlatformFacebook       AccountUpdateResponsePlatform = "facebook"
	AccountUpdateResponsePlatformLinkedin       AccountUpdateResponsePlatform = "linkedin"
	AccountUpdateResponsePlatformTiktok         AccountUpdateResponsePlatform = "tiktok"
	AccountUpdateResponsePlatformYoutube        AccountUpdateResponsePlatform = "youtube"
	AccountUpdateResponsePlatformPinterest      AccountUpdateResponsePlatform = "pinterest"
	AccountUpdateResponsePlatformReddit         AccountUpdateResponsePlatform = "reddit"
	AccountUpdateResponsePlatformBluesky        AccountUpdateResponsePlatform = "bluesky"
	AccountUpdateResponsePlatformThreads        AccountUpdateResponsePlatform = "threads"
	AccountUpdateResponsePlatformTelegram       AccountUpdateResponsePlatform = "telegram"
	AccountUpdateResponsePlatformSnapchat       AccountUpdateResponsePlatform = "snapchat"
	AccountUpdateResponsePlatformGooglebusiness AccountUpdateResponsePlatform = "googlebusiness"
	AccountUpdateResponsePlatformWhatsapp       AccountUpdateResponsePlatform = "whatsapp"
	AccountUpdateResponsePlatformMastodon       AccountUpdateResponsePlatform = "mastodon"
	AccountUpdateResponsePlatformDiscord        AccountUpdateResponsePlatform = "discord"
	AccountUpdateResponsePlatformSMS            AccountUpdateResponsePlatform = "sms"
)

func (AccountUpdateResponsePlatform) IsKnown

func (r AccountUpdateResponsePlatform) IsKnown() bool

type AnalyticsGetBestTimeParams

type AnalyticsGetBestTimeParams struct {
	// Filter by account ID
	AccountID param.Field[string] `query:"account_id"`
	// Start date (ISO 8601)
	FromDate param.Field[string] `query:"from_date"`
	// Filter by platform
	Platform param.Field[AnalyticsGetBestTimeParamsPlatform] `query:"platform"`
	// End date (ISO 8601)
	ToDate param.Field[string] `query:"to_date"`
}

func (AnalyticsGetBestTimeParams) URLQuery

func (r AnalyticsGetBestTimeParams) URLQuery() (v url.Values)

URLQuery serializes AnalyticsGetBestTimeParams's query parameters as `url.Values`.

type AnalyticsGetBestTimeParamsPlatform

type AnalyticsGetBestTimeParamsPlatform string

Filter by platform

const (
	AnalyticsGetBestTimeParamsPlatformTwitter        AnalyticsGetBestTimeParamsPlatform = "twitter"
	AnalyticsGetBestTimeParamsPlatformInstagram      AnalyticsGetBestTimeParamsPlatform = "instagram"
	AnalyticsGetBestTimeParamsPlatformFacebook       AnalyticsGetBestTimeParamsPlatform = "facebook"
	AnalyticsGetBestTimeParamsPlatformLinkedin       AnalyticsGetBestTimeParamsPlatform = "linkedin"
	AnalyticsGetBestTimeParamsPlatformTiktok         AnalyticsGetBestTimeParamsPlatform = "tiktok"
	AnalyticsGetBestTimeParamsPlatformYoutube        AnalyticsGetBestTimeParamsPlatform = "youtube"
	AnalyticsGetBestTimeParamsPlatformPinterest      AnalyticsGetBestTimeParamsPlatform = "pinterest"
	AnalyticsGetBestTimeParamsPlatformReddit         AnalyticsGetBestTimeParamsPlatform = "reddit"
	AnalyticsGetBestTimeParamsPlatformBluesky        AnalyticsGetBestTimeParamsPlatform = "bluesky"
	AnalyticsGetBestTimeParamsPlatformThreads        AnalyticsGetBestTimeParamsPlatform = "threads"
	AnalyticsGetBestTimeParamsPlatformTelegram       AnalyticsGetBestTimeParamsPlatform = "telegram"
	AnalyticsGetBestTimeParamsPlatformSnapchat       AnalyticsGetBestTimeParamsPlatform = "snapchat"
	AnalyticsGetBestTimeParamsPlatformGooglebusiness AnalyticsGetBestTimeParamsPlatform = "googlebusiness"
	AnalyticsGetBestTimeParamsPlatformWhatsapp       AnalyticsGetBestTimeParamsPlatform = "whatsapp"
	AnalyticsGetBestTimeParamsPlatformMastodon       AnalyticsGetBestTimeParamsPlatform = "mastodon"
	AnalyticsGetBestTimeParamsPlatformDiscord        AnalyticsGetBestTimeParamsPlatform = "discord"
	AnalyticsGetBestTimeParamsPlatformSMS            AnalyticsGetBestTimeParamsPlatform = "sms"
)

func (AnalyticsGetBestTimeParamsPlatform) IsKnown

type AnalyticsGetBestTimeResponse

type AnalyticsGetBestTimeResponse struct {
	Data []AnalyticsGetBestTimeResponseData `json:"data" api:"required"`
	JSON analyticsGetBestTimeResponseJSON   `json:"-"`
}

func (*AnalyticsGetBestTimeResponse) UnmarshalJSON

func (r *AnalyticsGetBestTimeResponse) UnmarshalJSON(data []byte) (err error)

type AnalyticsGetBestTimeResponseData

type AnalyticsGetBestTimeResponseData struct {
	// Average engagement score
	AvgEngagement float64 `json:"avg_engagement" api:"required"`
	// Day of week (0=Sunday)
	DayOfWeek int64 `json:"day_of_week" api:"required"`
	// Hour in UTC
	HourUtc int64 `json:"hour_utc" api:"required"`
	// Number of posts analyzed
	PostCount float64                              `json:"post_count" api:"required"`
	JSON      analyticsGetBestTimeResponseDataJSON `json:"-"`
}

func (*AnalyticsGetBestTimeResponseData) UnmarshalJSON

func (r *AnalyticsGetBestTimeResponseData) UnmarshalJSON(data []byte) (err error)

type AnalyticsGetContentDecayParams

type AnalyticsGetContentDecayParams struct {
	// Post ID to analyze decay for
	PostID param.Field[string] `query:"post_id" api:"required"`
	// Number of days to analyze
	Days param.Field[int64] `query:"days"`
}

func (AnalyticsGetContentDecayParams) URLQuery

func (r AnalyticsGetContentDecayParams) URLQuery() (v url.Values)

URLQuery serializes AnalyticsGetContentDecayParams's query parameters as `url.Values`.

type AnalyticsGetContentDecayResponse

type AnalyticsGetContentDecayResponse struct {
	Data []AnalyticsGetContentDecayResponseData `json:"data" api:"required"`
	// Days until engagement halved
	HalfLifeDays float64                                  `json:"half_life_days" api:"required,nullable"`
	Platform     AnalyticsGetContentDecayResponsePlatform `json:"platform" api:"required"`
	PostID       string                                   `json:"post_id" api:"required"`
	JSON         analyticsGetContentDecayResponseJSON     `json:"-"`
}

func (*AnalyticsGetContentDecayResponse) UnmarshalJSON

func (r *AnalyticsGetContentDecayResponse) UnmarshalJSON(data []byte) (err error)

type AnalyticsGetContentDecayResponseData

type AnalyticsGetContentDecayResponseData struct {
	// Cumulative engagement
	CumulativeEngagement float64 `json:"cumulative_engagement" api:"required"`
	// Cumulative impressions
	CumulativeImpressions float64 `json:"cumulative_impressions" api:"required"`
	// Days since publication
	Day float64 `json:"day" api:"required"`
	// Engagement on this day
	Engagement float64 `json:"engagement" api:"required"`
	// Impressions on this day
	Impressions float64                                  `json:"impressions" api:"required"`
	JSON        analyticsGetContentDecayResponseDataJSON `json:"-"`
}

func (*AnalyticsGetContentDecayResponseData) UnmarshalJSON

func (r *AnalyticsGetContentDecayResponseData) UnmarshalJSON(data []byte) (err error)

type AnalyticsGetContentDecayResponsePlatform

type AnalyticsGetContentDecayResponsePlatform string
const (
	AnalyticsGetContentDecayResponsePlatformTwitter        AnalyticsGetContentDecayResponsePlatform = "twitter"
	AnalyticsGetContentDecayResponsePlatformInstagram      AnalyticsGetContentDecayResponsePlatform = "instagram"
	AnalyticsGetContentDecayResponsePlatformFacebook       AnalyticsGetContentDecayResponsePlatform = "facebook"
	AnalyticsGetContentDecayResponsePlatformLinkedin       AnalyticsGetContentDecayResponsePlatform = "linkedin"
	AnalyticsGetContentDecayResponsePlatformTiktok         AnalyticsGetContentDecayResponsePlatform = "tiktok"
	AnalyticsGetContentDecayResponsePlatformYoutube        AnalyticsGetContentDecayResponsePlatform = "youtube"
	AnalyticsGetContentDecayResponsePlatformPinterest      AnalyticsGetContentDecayResponsePlatform = "pinterest"
	AnalyticsGetContentDecayResponsePlatformReddit         AnalyticsGetContentDecayResponsePlatform = "reddit"
	AnalyticsGetContentDecayResponsePlatformBluesky        AnalyticsGetContentDecayResponsePlatform = "bluesky"
	AnalyticsGetContentDecayResponsePlatformThreads        AnalyticsGetContentDecayResponsePlatform = "threads"
	AnalyticsGetContentDecayResponsePlatformTelegram       AnalyticsGetContentDecayResponsePlatform = "telegram"
	AnalyticsGetContentDecayResponsePlatformSnapchat       AnalyticsGetContentDecayResponsePlatform = "snapchat"
	AnalyticsGetContentDecayResponsePlatformGooglebusiness AnalyticsGetContentDecayResponsePlatform = "googlebusiness"
	AnalyticsGetContentDecayResponsePlatformWhatsapp       AnalyticsGetContentDecayResponsePlatform = "whatsapp"
	AnalyticsGetContentDecayResponsePlatformMastodon       AnalyticsGetContentDecayResponsePlatform = "mastodon"
	AnalyticsGetContentDecayResponsePlatformDiscord        AnalyticsGetContentDecayResponsePlatform = "discord"
	AnalyticsGetContentDecayResponsePlatformSMS            AnalyticsGetContentDecayResponsePlatform = "sms"
)

func (AnalyticsGetContentDecayResponsePlatform) IsKnown

type AnalyticsGetParams

type AnalyticsGetParams struct {
	// Filter by account ID
	AccountID param.Field[string] `query:"account_id"`
	// Start date (ISO 8601 date string)
	FromDate param.Field[string] `query:"from_date"`
	// Number of items
	Limit param.Field[int64] `query:"limit"`
	// Offset
	Offset param.Field[int64] `query:"offset"`
	// Filter by platform
	Platform param.Field[AnalyticsGetParamsPlatform] `query:"platform"`
	// Filter by post ID
	PostID param.Field[string] `query:"post_id"`
	// End date (ISO 8601 date string)
	ToDate param.Field[string] `query:"to_date"`
}

func (AnalyticsGetParams) URLQuery

func (r AnalyticsGetParams) URLQuery() (v url.Values)

URLQuery serializes AnalyticsGetParams's query parameters as `url.Values`.

type AnalyticsGetParamsPlatform

type AnalyticsGetParamsPlatform string

Filter by platform

const (
	AnalyticsGetParamsPlatformTwitter        AnalyticsGetParamsPlatform = "twitter"
	AnalyticsGetParamsPlatformInstagram      AnalyticsGetParamsPlatform = "instagram"
	AnalyticsGetParamsPlatformFacebook       AnalyticsGetParamsPlatform = "facebook"
	AnalyticsGetParamsPlatformLinkedin       AnalyticsGetParamsPlatform = "linkedin"
	AnalyticsGetParamsPlatformTiktok         AnalyticsGetParamsPlatform = "tiktok"
	AnalyticsGetParamsPlatformYoutube        AnalyticsGetParamsPlatform = "youtube"
	AnalyticsGetParamsPlatformPinterest      AnalyticsGetParamsPlatform = "pinterest"
	AnalyticsGetParamsPlatformReddit         AnalyticsGetParamsPlatform = "reddit"
	AnalyticsGetParamsPlatformBluesky        AnalyticsGetParamsPlatform = "bluesky"
	AnalyticsGetParamsPlatformThreads        AnalyticsGetParamsPlatform = "threads"
	AnalyticsGetParamsPlatformTelegram       AnalyticsGetParamsPlatform = "telegram"
	AnalyticsGetParamsPlatformSnapchat       AnalyticsGetParamsPlatform = "snapchat"
	AnalyticsGetParamsPlatformGooglebusiness AnalyticsGetParamsPlatform = "googlebusiness"
	AnalyticsGetParamsPlatformWhatsapp       AnalyticsGetParamsPlatform = "whatsapp"
	AnalyticsGetParamsPlatformMastodon       AnalyticsGetParamsPlatform = "mastodon"
	AnalyticsGetParamsPlatformDiscord        AnalyticsGetParamsPlatform = "discord"
	AnalyticsGetParamsPlatformSMS            AnalyticsGetParamsPlatform = "sms"
)

func (AnalyticsGetParamsPlatform) IsKnown

func (r AnalyticsGetParamsPlatform) IsKnown() bool

type AnalyticsGetPostTimelineParams

type AnalyticsGetPostTimelineParams struct {
	// Post ID
	PostID param.Field[string] `query:"post_id" api:"required"`
	// Start date (ISO 8601)
	FromDate param.Field[string] `query:"from_date"`
	// End date (ISO 8601)
	ToDate param.Field[string] `query:"to_date"`
}

func (AnalyticsGetPostTimelineParams) URLQuery

func (r AnalyticsGetPostTimelineParams) URLQuery() (v url.Values)

URLQuery serializes AnalyticsGetPostTimelineParams's query parameters as `url.Values`.

type AnalyticsGetPostTimelineResponse

type AnalyticsGetPostTimelineResponse struct {
	Data   []AnalyticsGetPostTimelineResponseData `json:"data" api:"required"`
	PostID string                                 `json:"post_id" api:"required"`
	JSON   analyticsGetPostTimelineResponseJSON   `json:"-"`
}

func (*AnalyticsGetPostTimelineResponse) UnmarshalJSON

func (r *AnalyticsGetPostTimelineResponse) UnmarshalJSON(data []byte) (err error)

type AnalyticsGetPostTimelineResponseData

type AnalyticsGetPostTimelineResponseData struct {
	Clicks   float64 `json:"clicks" api:"required"`
	Comments float64 `json:"comments" api:"required"`
	// Date (YYYY-MM-DD)
	Date        string                                   `json:"date" api:"required"`
	Impressions float64                                  `json:"impressions" api:"required"`
	Likes       float64                                  `json:"likes" api:"required"`
	Shares      float64                                  `json:"shares" api:"required"`
	Views       float64                                  `json:"views" api:"required"`
	JSON        analyticsGetPostTimelineResponseDataJSON `json:"-"`
}

func (*AnalyticsGetPostTimelineResponseData) UnmarshalJSON

func (r *AnalyticsGetPostTimelineResponseData) UnmarshalJSON(data []byte) (err error)

type AnalyticsGetPostingFrequencyParams

type AnalyticsGetPostingFrequencyParams struct {
	// Filter by account ID
	AccountID param.Field[string] `query:"account_id"`
	// Start date (ISO 8601)
	FromDate param.Field[string] `query:"from_date"`
	// Filter by platform
	Platform param.Field[AnalyticsGetPostingFrequencyParamsPlatform] `query:"platform"`
	// End date (ISO 8601)
	ToDate param.Field[string] `query:"to_date"`
}

func (AnalyticsGetPostingFrequencyParams) URLQuery

URLQuery serializes AnalyticsGetPostingFrequencyParams's query parameters as `url.Values`.

type AnalyticsGetPostingFrequencyParamsPlatform

type AnalyticsGetPostingFrequencyParamsPlatform string

Filter by platform

const (
	AnalyticsGetPostingFrequencyParamsPlatformTwitter        AnalyticsGetPostingFrequencyParamsPlatform = "twitter"
	AnalyticsGetPostingFrequencyParamsPlatformInstagram      AnalyticsGetPostingFrequencyParamsPlatform = "instagram"
	AnalyticsGetPostingFrequencyParamsPlatformFacebook       AnalyticsGetPostingFrequencyParamsPlatform = "facebook"
	AnalyticsGetPostingFrequencyParamsPlatformLinkedin       AnalyticsGetPostingFrequencyParamsPlatform = "linkedin"
	AnalyticsGetPostingFrequencyParamsPlatformTiktok         AnalyticsGetPostingFrequencyParamsPlatform = "tiktok"
	AnalyticsGetPostingFrequencyParamsPlatformYoutube        AnalyticsGetPostingFrequencyParamsPlatform = "youtube"
	AnalyticsGetPostingFrequencyParamsPlatformPinterest      AnalyticsGetPostingFrequencyParamsPlatform = "pinterest"
	AnalyticsGetPostingFrequencyParamsPlatformReddit         AnalyticsGetPostingFrequencyParamsPlatform = "reddit"
	AnalyticsGetPostingFrequencyParamsPlatformBluesky        AnalyticsGetPostingFrequencyParamsPlatform = "bluesky"
	AnalyticsGetPostingFrequencyParamsPlatformThreads        AnalyticsGetPostingFrequencyParamsPlatform = "threads"
	AnalyticsGetPostingFrequencyParamsPlatformTelegram       AnalyticsGetPostingFrequencyParamsPlatform = "telegram"
	AnalyticsGetPostingFrequencyParamsPlatformSnapchat       AnalyticsGetPostingFrequencyParamsPlatform = "snapchat"
	AnalyticsGetPostingFrequencyParamsPlatformGooglebusiness AnalyticsGetPostingFrequencyParamsPlatform = "googlebusiness"
	AnalyticsGetPostingFrequencyParamsPlatformWhatsapp       AnalyticsGetPostingFrequencyParamsPlatform = "whatsapp"
	AnalyticsGetPostingFrequencyParamsPlatformMastodon       AnalyticsGetPostingFrequencyParamsPlatform = "mastodon"
	AnalyticsGetPostingFrequencyParamsPlatformDiscord        AnalyticsGetPostingFrequencyParamsPlatform = "discord"
	AnalyticsGetPostingFrequencyParamsPlatformSMS            AnalyticsGetPostingFrequencyParamsPlatform = "sms"
)

func (AnalyticsGetPostingFrequencyParamsPlatform) IsKnown

type AnalyticsGetPostingFrequencyResponse

type AnalyticsGetPostingFrequencyResponse struct {
	Data []AnalyticsGetPostingFrequencyResponseData `json:"data" api:"required"`
	// Recommended posts per week
	OptimalFrequency float64                                  `json:"optimal_frequency" api:"required,nullable"`
	JSON             analyticsGetPostingFrequencyResponseJSON `json:"-"`
}

func (*AnalyticsGetPostingFrequencyResponse) UnmarshalJSON

func (r *AnalyticsGetPostingFrequencyResponse) UnmarshalJSON(data []byte) (err error)

type AnalyticsGetPostingFrequencyResponseData

type AnalyticsGetPostingFrequencyResponseData struct {
	// Average engagement
	AvgEngagement float64 `json:"avg_engagement" api:"required"`
	// Average impressions
	AvgImpressions float64 `json:"avg_impressions" api:"required"`
	// Average posts per week in bucket
	PostsPerWeek float64 `json:"posts_per_week" api:"required"`
	// Number of weeks in sample
	SampleWeeks float64                                      `json:"sample_weeks" api:"required"`
	JSON        analyticsGetPostingFrequencyResponseDataJSON `json:"-"`
}

func (*AnalyticsGetPostingFrequencyResponseData) UnmarshalJSON

func (r *AnalyticsGetPostingFrequencyResponseData) UnmarshalJSON(data []byte) (err error)

type AnalyticsGetResponse

type AnalyticsGetResponse struct {
	Data     []AnalyticsGetResponseData   `json:"data" api:"required"`
	Overview AnalyticsGetResponseOverview `json:"overview"`
	JSON     analyticsGetResponseJSON     `json:"-"`
}

func (*AnalyticsGetResponse) UnmarshalJSON

func (r *AnalyticsGetResponse) UnmarshalJSON(data []byte) (err error)

type AnalyticsGetResponseData

type AnalyticsGetResponseData struct {
	Platform AnalyticsGetResponseDataPlatform `json:"platform" api:"required"`
	// Post ID
	PostID string `json:"post_id" api:"required"`
	// Published timestamp
	PublishedAt time.Time `json:"published_at" api:"required" format:"date-time"`
	// Total clicks
	Clicks float64 `json:"clicks" api:"nullable"`
	// Total comments
	Comments float64 `json:"comments" api:"nullable"`
	// Total impressions
	Impressions float64 `json:"impressions" api:"nullable"`
	// Total likes
	Likes float64 `json:"likes" api:"nullable"`
	// Total reach
	Reach float64 `json:"reach" api:"nullable"`
	// Total saves
	Saves float64 `json:"saves" api:"nullable"`
	// Total shares
	Shares float64 `json:"shares" api:"nullable"`
	// Total views
	Views float64                      `json:"views" api:"nullable"`
	JSON  analyticsGetResponseDataJSON `json:"-"`
}

func (*AnalyticsGetResponseData) UnmarshalJSON

func (r *AnalyticsGetResponseData) UnmarshalJSON(data []byte) (err error)

type AnalyticsGetResponseDataPlatform

type AnalyticsGetResponseDataPlatform string
const (
	AnalyticsGetResponseDataPlatformTwitter        AnalyticsGetResponseDataPlatform = "twitter"
	AnalyticsGetResponseDataPlatformInstagram      AnalyticsGetResponseDataPlatform = "instagram"
	AnalyticsGetResponseDataPlatformFacebook       AnalyticsGetResponseDataPlatform = "facebook"
	AnalyticsGetResponseDataPlatformLinkedin       AnalyticsGetResponseDataPlatform = "linkedin"
	AnalyticsGetResponseDataPlatformTiktok         AnalyticsGetResponseDataPlatform = "tiktok"
	AnalyticsGetResponseDataPlatformYoutube        AnalyticsGetResponseDataPlatform = "youtube"
	AnalyticsGetResponseDataPlatformPinterest      AnalyticsGetResponseDataPlatform = "pinterest"
	AnalyticsGetResponseDataPlatformReddit         AnalyticsGetResponseDataPlatform = "reddit"
	AnalyticsGetResponseDataPlatformBluesky        AnalyticsGetResponseDataPlatform = "bluesky"
	AnalyticsGetResponseDataPlatformThreads        AnalyticsGetResponseDataPlatform = "threads"
	AnalyticsGetResponseDataPlatformTelegram       AnalyticsGetResponseDataPlatform = "telegram"
	AnalyticsGetResponseDataPlatformSnapchat       AnalyticsGetResponseDataPlatform = "snapchat"
	AnalyticsGetResponseDataPlatformGooglebusiness AnalyticsGetResponseDataPlatform = "googlebusiness"
	AnalyticsGetResponseDataPlatformWhatsapp       AnalyticsGetResponseDataPlatform = "whatsapp"
	AnalyticsGetResponseDataPlatformMastodon       AnalyticsGetResponseDataPlatform = "mastodon"
	AnalyticsGetResponseDataPlatformDiscord        AnalyticsGetResponseDataPlatform = "discord"
	AnalyticsGetResponseDataPlatformSMS            AnalyticsGetResponseDataPlatform = "sms"
)

func (AnalyticsGetResponseDataPlatform) IsKnown

type AnalyticsGetResponseOverview

type AnalyticsGetResponseOverview struct {
	// Total clicks across posts
	TotalClicks float64 `json:"total_clicks" api:"required"`
	// Total comments across posts
	TotalComments float64 `json:"total_comments" api:"required"`
	// Total impressions across posts
	TotalImpressions float64 `json:"total_impressions" api:"required"`
	// Total likes across posts
	TotalLikes float64 `json:"total_likes" api:"required"`
	// Total number of posts
	TotalPosts float64 `json:"total_posts" api:"required"`
	// Total shares across posts
	TotalShares float64 `json:"total_shares" api:"required"`
	// Total views across posts
	TotalViews float64                          `json:"total_views" api:"required"`
	JSON       analyticsGetResponseOverviewJSON `json:"-"`
}

func (*AnalyticsGetResponseOverview) UnmarshalJSON

func (r *AnalyticsGetResponseOverview) UnmarshalJSON(data []byte) (err error)

type AnalyticsListDailyMetricsParams

type AnalyticsListDailyMetricsParams struct {
	// Filter by account ID
	AccountID param.Field[string] `query:"account_id"`
	// Start date (ISO 8601)
	FromDate param.Field[string] `query:"from_date"`
	// Filter by platform
	Platform param.Field[AnalyticsListDailyMetricsParamsPlatform] `query:"platform"`
	// End date (ISO 8601)
	ToDate param.Field[string] `query:"to_date"`
}

func (AnalyticsListDailyMetricsParams) URLQuery

func (r AnalyticsListDailyMetricsParams) URLQuery() (v url.Values)

URLQuery serializes AnalyticsListDailyMetricsParams's query parameters as `url.Values`.

type AnalyticsListDailyMetricsParamsPlatform

type AnalyticsListDailyMetricsParamsPlatform string

Filter by platform

const (
	AnalyticsListDailyMetricsParamsPlatformTwitter        AnalyticsListDailyMetricsParamsPlatform = "twitter"
	AnalyticsListDailyMetricsParamsPlatformInstagram      AnalyticsListDailyMetricsParamsPlatform = "instagram"
	AnalyticsListDailyMetricsParamsPlatformFacebook       AnalyticsListDailyMetricsParamsPlatform = "facebook"
	AnalyticsListDailyMetricsParamsPlatformLinkedin       AnalyticsListDailyMetricsParamsPlatform = "linkedin"
	AnalyticsListDailyMetricsParamsPlatformTiktok         AnalyticsListDailyMetricsParamsPlatform = "tiktok"
	AnalyticsListDailyMetricsParamsPlatformYoutube        AnalyticsListDailyMetricsParamsPlatform = "youtube"
	AnalyticsListDailyMetricsParamsPlatformPinterest      AnalyticsListDailyMetricsParamsPlatform = "pinterest"
	AnalyticsListDailyMetricsParamsPlatformReddit         AnalyticsListDailyMetricsParamsPlatform = "reddit"
	AnalyticsListDailyMetricsParamsPlatformBluesky        AnalyticsListDailyMetricsParamsPlatform = "bluesky"
	AnalyticsListDailyMetricsParamsPlatformThreads        AnalyticsListDailyMetricsParamsPlatform = "threads"
	AnalyticsListDailyMetricsParamsPlatformTelegram       AnalyticsListDailyMetricsParamsPlatform = "telegram"
	AnalyticsListDailyMetricsParamsPlatformSnapchat       AnalyticsListDailyMetricsParamsPlatform = "snapchat"
	AnalyticsListDailyMetricsParamsPlatformGooglebusiness AnalyticsListDailyMetricsParamsPlatform = "googlebusiness"
	AnalyticsListDailyMetricsParamsPlatformWhatsapp       AnalyticsListDailyMetricsParamsPlatform = "whatsapp"
	AnalyticsListDailyMetricsParamsPlatformMastodon       AnalyticsListDailyMetricsParamsPlatform = "mastodon"
	AnalyticsListDailyMetricsParamsPlatformDiscord        AnalyticsListDailyMetricsParamsPlatform = "discord"
	AnalyticsListDailyMetricsParamsPlatformSMS            AnalyticsListDailyMetricsParamsPlatform = "sms"
)

func (AnalyticsListDailyMetricsParamsPlatform) IsKnown

type AnalyticsListDailyMetricsResponse

type AnalyticsListDailyMetricsResponse struct {
	Data []AnalyticsListDailyMetricsResponseData `json:"data" api:"required"`
	JSON analyticsListDailyMetricsResponseJSON   `json:"-"`
}

func (*AnalyticsListDailyMetricsResponse) UnmarshalJSON

func (r *AnalyticsListDailyMetricsResponse) UnmarshalJSON(data []byte) (err error)

type AnalyticsListDailyMetricsResponseData

type AnalyticsListDailyMetricsResponseData struct {
	// Total clicks
	Clicks float64 `json:"clicks" api:"required"`
	// Total comments
	Comments float64 `json:"comments" api:"required"`
	// Date (YYYY-MM-DD)
	Date string `json:"date" api:"required"`
	// Total impressions
	Impressions float64 `json:"impressions" api:"required"`
	// Total likes
	Likes float64 `json:"likes" api:"required"`
	// Post count per platform
	Platforms map[string]float64 `json:"platforms" api:"required"`
	// Posts published on this date
	PostCount float64 `json:"post_count" api:"required"`
	// Total shares
	Shares float64 `json:"shares" api:"required"`
	// Total views
	Views float64                                   `json:"views" api:"required"`
	JSON  analyticsListDailyMetricsResponseDataJSON `json:"-"`
}

func (*AnalyticsListDailyMetricsResponseData) UnmarshalJSON

func (r *AnalyticsListDailyMetricsResponseData) UnmarshalJSON(data []byte) (err error)

type AnalyticsService

type AnalyticsService struct {
	Options []option.RequestOption
	Youtube *AnalyticsYoutubeService
}

AnalyticsService contains methods and other services that help with interacting with the relay 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 NewAnalyticsService method instead.

func NewAnalyticsService

func NewAnalyticsService(opts ...option.RequestOption) (r *AnalyticsService)

NewAnalyticsService 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 (*AnalyticsService) Get

Get post analytics

func (*AnalyticsService) GetBestTime

Get best posting times based on engagement

func (*AnalyticsService) GetContentDecay

Get engagement decay curve for a post

func (*AnalyticsService) GetPostTimeline

Get per-post daily timeline of metrics

func (*AnalyticsService) GetPostingFrequency

Get posting frequency vs engagement analysis

func (*AnalyticsService) ListDailyMetrics

Get daily aggregated metrics

type AnalyticsYoutubeGetDailyViewsParams

type AnalyticsYoutubeGetDailyViewsParams struct {
	// YouTube account ID
	AccountID param.Field[string] `query:"account_id" api:"required"`
	// Start date (ISO 8601)
	FromDate param.Field[string] `query:"from_date"`
	// End date (ISO 8601)
	ToDate param.Field[string] `query:"to_date"`
}

func (AnalyticsYoutubeGetDailyViewsParams) URLQuery

URLQuery serializes AnalyticsYoutubeGetDailyViewsParams's query parameters as `url.Values`.

type AnalyticsYoutubeGetDailyViewsResponse

type AnalyticsYoutubeGetDailyViewsResponse struct {
	Data []AnalyticsYoutubeGetDailyViewsResponseData `json:"data" api:"required"`
	JSON analyticsYoutubeGetDailyViewsResponseJSON   `json:"-"`
}

func (*AnalyticsYoutubeGetDailyViewsResponse) UnmarshalJSON

func (r *AnalyticsYoutubeGetDailyViewsResponse) UnmarshalJSON(data []byte) (err error)

type AnalyticsYoutubeGetDailyViewsResponseData

type AnalyticsYoutubeGetDailyViewsResponseData struct {
	// Date (YYYY-MM-DD)
	Date string `json:"date" api:"required"`
	// Net subscribers gained
	SubscribersGained float64 `json:"subscribers_gained" api:"required"`
	// Total views
	Views float64 `json:"views" api:"required"`
	// Watch time in minutes
	WatchTimeMinutes float64                                       `json:"watch_time_minutes" api:"required"`
	JSON             analyticsYoutubeGetDailyViewsResponseDataJSON `json:"-"`
}

func (*AnalyticsYoutubeGetDailyViewsResponseData) UnmarshalJSON

func (r *AnalyticsYoutubeGetDailyViewsResponseData) UnmarshalJSON(data []byte) (err error)

type AnalyticsYoutubeService

type AnalyticsYoutubeService struct {
	Options []option.RequestOption
}

AnalyticsYoutubeService contains methods and other services that help with interacting with the relay 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 NewAnalyticsYoutubeService method instead.

func NewAnalyticsYoutubeService

func NewAnalyticsYoutubeService(opts ...option.RequestOption) (r *AnalyticsYoutubeService)

NewAnalyticsYoutubeService 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 (*AnalyticsYoutubeService) GetDailyViews

Get YouTube daily views and watch time

type Client

type Client struct {
	Options       []option.RequestOption
	Posts         *PostService
	Accounts      *AccountService
	Media         *MediaService
	Webhooks      *WebhookService
	APIKeys       *APIKeyService
	Usage         *UsageService
	AccountGroups *AccountGroupService
	Connect       *ConnectService
	Connections   *ConnectionService
	Analytics     *AnalyticsService
	Tools         *ToolService
	Queue         *QueueService
	Twitter       *TwitterService
	Inbox         *InboxService
	Reddit        *RedditService
	Whatsapp      *WhatsappService
}

Client creates a struct with services and top level methods that help with interacting with the relay 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 (RELAY_API_KEY, RELAY_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 interface{}, res interface{}, 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 interface{}, res interface{}, 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) Get

func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, 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 interface{}, res interface{}, 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 interface{}, res interface{}, 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 interface{}, res interface{}, 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.

type ConnectCompleteOAuthCallbackParams

type ConnectCompleteOAuthCallbackParams struct {
	// OAuth authorization code
	Code param.Field[string] `json:"code" api:"required"`
	// Redirect URL used during the OAuth flow (must match)
	RedirectURL param.Field[string] `json:"redirect_url" format:"uri"`
}

func (ConnectCompleteOAuthCallbackParams) MarshalJSON

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

type ConnectCompleteOAuthCallbackParamsPlatform

type ConnectCompleteOAuthCallbackParamsPlatform string

OAuth platform to complete

const (
	ConnectCompleteOAuthCallbackParamsPlatformTwitter        ConnectCompleteOAuthCallbackParamsPlatform = "twitter"
	ConnectCompleteOAuthCallbackParamsPlatformInstagram      ConnectCompleteOAuthCallbackParamsPlatform = "instagram"
	ConnectCompleteOAuthCallbackParamsPlatformFacebook       ConnectCompleteOAuthCallbackParamsPlatform = "facebook"
	ConnectCompleteOAuthCallbackParamsPlatformLinkedin       ConnectCompleteOAuthCallbackParamsPlatform = "linkedin"
	ConnectCompleteOAuthCallbackParamsPlatformTiktok         ConnectCompleteOAuthCallbackParamsPlatform = "tiktok"
	ConnectCompleteOAuthCallbackParamsPlatformYoutube        ConnectCompleteOAuthCallbackParamsPlatform = "youtube"
	ConnectCompleteOAuthCallbackParamsPlatformPinterest      ConnectCompleteOAuthCallbackParamsPlatform = "pinterest"
	ConnectCompleteOAuthCallbackParamsPlatformReddit         ConnectCompleteOAuthCallbackParamsPlatform = "reddit"
	ConnectCompleteOAuthCallbackParamsPlatformThreads        ConnectCompleteOAuthCallbackParamsPlatform = "threads"
	ConnectCompleteOAuthCallbackParamsPlatformSnapchat       ConnectCompleteOAuthCallbackParamsPlatform = "snapchat"
	ConnectCompleteOAuthCallbackParamsPlatformGooglebusiness ConnectCompleteOAuthCallbackParamsPlatform = "googlebusiness"
	ConnectCompleteOAuthCallbackParamsPlatformMastodon       ConnectCompleteOAuthCallbackParamsPlatform = "mastodon"
)

func (ConnectCompleteOAuthCallbackParamsPlatform) IsKnown

type ConnectCompleteOAuthCallbackResponse

type ConnectCompleteOAuthCallbackResponse struct {
	Account ConnectCompleteOAuthCallbackResponseAccount `json:"account" api:"required"`
	JSON    connectCompleteOAuthCallbackResponseJSON    `json:"-"`
}

func (*ConnectCompleteOAuthCallbackResponse) UnmarshalJSON

func (r *ConnectCompleteOAuthCallbackResponse) UnmarshalJSON(data []byte) (err error)

type ConnectCompleteOAuthCallbackResponseAccount

type ConnectCompleteOAuthCallbackResponseAccount struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             ConnectCompleteOAuthCallbackResponseAccountGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                              `json:"metadata" api:"required,nullable"`
	Platform          ConnectCompleteOAuthCallbackResponseAccountPlatform `json:"platform" api:"required"`
	PlatformAccountID string                                              `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                           `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                              `json:"username" api:"required,nullable"`
	JSON              connectCompleteOAuthCallbackResponseAccountJSON     `json:"-"`
}

func (*ConnectCompleteOAuthCallbackResponseAccount) UnmarshalJSON

func (r *ConnectCompleteOAuthCallbackResponseAccount) UnmarshalJSON(data []byte) (err error)

type ConnectCompleteOAuthCallbackResponseAccountGroup

type ConnectCompleteOAuthCallbackResponseAccountGroup struct {
	ID   string                                               `json:"id" api:"required"`
	Name string                                               `json:"name" api:"required"`
	JSON connectCompleteOAuthCallbackResponseAccountGroupJSON `json:"-"`
}

Account group

func (*ConnectCompleteOAuthCallbackResponseAccountGroup) UnmarshalJSON

func (r *ConnectCompleteOAuthCallbackResponseAccountGroup) UnmarshalJSON(data []byte) (err error)

type ConnectCompleteOAuthCallbackResponseAccountPlatform

type ConnectCompleteOAuthCallbackResponseAccountPlatform string
const (
	ConnectCompleteOAuthCallbackResponseAccountPlatformTwitter        ConnectCompleteOAuthCallbackResponseAccountPlatform = "twitter"
	ConnectCompleteOAuthCallbackResponseAccountPlatformInstagram      ConnectCompleteOAuthCallbackResponseAccountPlatform = "instagram"
	ConnectCompleteOAuthCallbackResponseAccountPlatformFacebook       ConnectCompleteOAuthCallbackResponseAccountPlatform = "facebook"
	ConnectCompleteOAuthCallbackResponseAccountPlatformLinkedin       ConnectCompleteOAuthCallbackResponseAccountPlatform = "linkedin"
	ConnectCompleteOAuthCallbackResponseAccountPlatformTiktok         ConnectCompleteOAuthCallbackResponseAccountPlatform = "tiktok"
	ConnectCompleteOAuthCallbackResponseAccountPlatformYoutube        ConnectCompleteOAuthCallbackResponseAccountPlatform = "youtube"
	ConnectCompleteOAuthCallbackResponseAccountPlatformPinterest      ConnectCompleteOAuthCallbackResponseAccountPlatform = "pinterest"
	ConnectCompleteOAuthCallbackResponseAccountPlatformReddit         ConnectCompleteOAuthCallbackResponseAccountPlatform = "reddit"
	ConnectCompleteOAuthCallbackResponseAccountPlatformBluesky        ConnectCompleteOAuthCallbackResponseAccountPlatform = "bluesky"
	ConnectCompleteOAuthCallbackResponseAccountPlatformThreads        ConnectCompleteOAuthCallbackResponseAccountPlatform = "threads"
	ConnectCompleteOAuthCallbackResponseAccountPlatformTelegram       ConnectCompleteOAuthCallbackResponseAccountPlatform = "telegram"
	ConnectCompleteOAuthCallbackResponseAccountPlatformSnapchat       ConnectCompleteOAuthCallbackResponseAccountPlatform = "snapchat"
	ConnectCompleteOAuthCallbackResponseAccountPlatformGooglebusiness ConnectCompleteOAuthCallbackResponseAccountPlatform = "googlebusiness"
	ConnectCompleteOAuthCallbackResponseAccountPlatformWhatsapp       ConnectCompleteOAuthCallbackResponseAccountPlatform = "whatsapp"
	ConnectCompleteOAuthCallbackResponseAccountPlatformMastodon       ConnectCompleteOAuthCallbackResponseAccountPlatform = "mastodon"
	ConnectCompleteOAuthCallbackResponseAccountPlatformDiscord        ConnectCompleteOAuthCallbackResponseAccountPlatform = "discord"
	ConnectCompleteOAuthCallbackResponseAccountPlatformSMS            ConnectCompleteOAuthCallbackResponseAccountPlatform = "sms"
)

func (ConnectCompleteOAuthCallbackResponseAccountPlatform) IsKnown

type ConnectFacebookPageListResponse

type ConnectFacebookPageListResponse struct {
	Pages []ConnectFacebookPageListResponsePage `json:"pages" api:"required"`
	JSON  connectFacebookPageListResponseJSON   `json:"-"`
}

func (*ConnectFacebookPageListResponse) UnmarshalJSON

func (r *ConnectFacebookPageListResponse) UnmarshalJSON(data []byte) (err error)

type ConnectFacebookPageListResponsePage

type ConnectFacebookPageListResponsePage struct {
	// Facebook page ID
	ID string `json:"id" api:"required"`
	// Page name
	Name string `json:"name" api:"required"`
	// Page category
	Category string `json:"category" api:"nullable"`
	// Page profile picture URL
	PictureURL string                                  `json:"picture_url" api:"nullable"`
	JSON       connectFacebookPageListResponsePageJSON `json:"-"`
}

func (*ConnectFacebookPageListResponsePage) UnmarshalJSON

func (r *ConnectFacebookPageListResponsePage) UnmarshalJSON(data []byte) (err error)

type ConnectFacebookPageSelectParams

type ConnectFacebookPageSelectParams struct {
	// Token from pending data or OAuth flow
	ConnectToken param.Field[string] `json:"connect_token" api:"required"`
	// Selected Facebook page ID
	PageID param.Field[string] `json:"page_id" api:"required"`
}

func (ConnectFacebookPageSelectParams) MarshalJSON

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

type ConnectFacebookPageSelectResponse

type ConnectFacebookPageSelectResponse struct {
	Account ConnectFacebookPageSelectResponseAccount `json:"account" api:"required"`
	JSON    connectFacebookPageSelectResponseJSON    `json:"-"`
}

func (*ConnectFacebookPageSelectResponse) UnmarshalJSON

func (r *ConnectFacebookPageSelectResponse) UnmarshalJSON(data []byte) (err error)

type ConnectFacebookPageSelectResponseAccount

type ConnectFacebookPageSelectResponseAccount struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             ConnectFacebookPageSelectResponseAccountGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                           `json:"metadata" api:"required,nullable"`
	Platform          ConnectFacebookPageSelectResponseAccountPlatform `json:"platform" api:"required"`
	PlatformAccountID string                                           `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                        `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                           `json:"username" api:"required,nullable"`
	JSON              connectFacebookPageSelectResponseAccountJSON     `json:"-"`
}

func (*ConnectFacebookPageSelectResponseAccount) UnmarshalJSON

func (r *ConnectFacebookPageSelectResponseAccount) UnmarshalJSON(data []byte) (err error)

type ConnectFacebookPageSelectResponseAccountGroup

type ConnectFacebookPageSelectResponseAccountGroup struct {
	ID   string                                            `json:"id" api:"required"`
	Name string                                            `json:"name" api:"required"`
	JSON connectFacebookPageSelectResponseAccountGroupJSON `json:"-"`
}

Account group

func (*ConnectFacebookPageSelectResponseAccountGroup) UnmarshalJSON

func (r *ConnectFacebookPageSelectResponseAccountGroup) UnmarshalJSON(data []byte) (err error)

type ConnectFacebookPageSelectResponseAccountPlatform

type ConnectFacebookPageSelectResponseAccountPlatform string
const (
	ConnectFacebookPageSelectResponseAccountPlatformTwitter        ConnectFacebookPageSelectResponseAccountPlatform = "twitter"
	ConnectFacebookPageSelectResponseAccountPlatformInstagram      ConnectFacebookPageSelectResponseAccountPlatform = "instagram"
	ConnectFacebookPageSelectResponseAccountPlatformFacebook       ConnectFacebookPageSelectResponseAccountPlatform = "facebook"
	ConnectFacebookPageSelectResponseAccountPlatformLinkedin       ConnectFacebookPageSelectResponseAccountPlatform = "linkedin"
	ConnectFacebookPageSelectResponseAccountPlatformTiktok         ConnectFacebookPageSelectResponseAccountPlatform = "tiktok"
	ConnectFacebookPageSelectResponseAccountPlatformYoutube        ConnectFacebookPageSelectResponseAccountPlatform = "youtube"
	ConnectFacebookPageSelectResponseAccountPlatformPinterest      ConnectFacebookPageSelectResponseAccountPlatform = "pinterest"
	ConnectFacebookPageSelectResponseAccountPlatformReddit         ConnectFacebookPageSelectResponseAccountPlatform = "reddit"
	ConnectFacebookPageSelectResponseAccountPlatformBluesky        ConnectFacebookPageSelectResponseAccountPlatform = "bluesky"
	ConnectFacebookPageSelectResponseAccountPlatformThreads        ConnectFacebookPageSelectResponseAccountPlatform = "threads"
	ConnectFacebookPageSelectResponseAccountPlatformTelegram       ConnectFacebookPageSelectResponseAccountPlatform = "telegram"
	ConnectFacebookPageSelectResponseAccountPlatformSnapchat       ConnectFacebookPageSelectResponseAccountPlatform = "snapchat"
	ConnectFacebookPageSelectResponseAccountPlatformGooglebusiness ConnectFacebookPageSelectResponseAccountPlatform = "googlebusiness"
	ConnectFacebookPageSelectResponseAccountPlatformWhatsapp       ConnectFacebookPageSelectResponseAccountPlatform = "whatsapp"
	ConnectFacebookPageSelectResponseAccountPlatformMastodon       ConnectFacebookPageSelectResponseAccountPlatform = "mastodon"
	ConnectFacebookPageSelectResponseAccountPlatformDiscord        ConnectFacebookPageSelectResponseAccountPlatform = "discord"
	ConnectFacebookPageSelectResponseAccountPlatformSMS            ConnectFacebookPageSelectResponseAccountPlatform = "sms"
)

func (ConnectFacebookPageSelectResponseAccountPlatform) IsKnown

type ConnectFacebookPageService

type ConnectFacebookPageService struct {
	Options []option.RequestOption
}

ConnectFacebookPageService contains methods and other services that help with interacting with the relay 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 NewConnectFacebookPageService method instead.

func NewConnectFacebookPageService

func NewConnectFacebookPageService(opts ...option.RequestOption) (r *ConnectFacebookPageService)

NewConnectFacebookPageService 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 (*ConnectFacebookPageService) List

List Facebook Pages after OAuth

func (*ConnectFacebookPageService) Select

Select Facebook Page to connect

type ConnectFacebookService

type ConnectFacebookService struct {
	Options []option.RequestOption
	Pages   *ConnectFacebookPageService
}

ConnectFacebookService contains methods and other services that help with interacting with the relay 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 NewConnectFacebookService method instead.

func NewConnectFacebookService

func NewConnectFacebookService(opts ...option.RequestOption) (r *ConnectFacebookService)

NewConnectFacebookService 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 ConnectFetchPendingDataParams

type ConnectFetchPendingDataParams struct {
	// Temporary token from headless OAuth flow
	Token param.Field[string] `query:"token" api:"required"`
}

func (ConnectFetchPendingDataParams) URLQuery

func (r ConnectFetchPendingDataParams) URLQuery() (v url.Values)

URLQuery serializes ConnectFetchPendingDataParams's query parameters as `url.Values`.

type ConnectFetchPendingDataResponse

type ConnectFetchPendingDataResponse struct {
	Platform ConnectFetchPendingDataResponsePlatform `json:"platform" api:"required"`
	// Token to use for secondary selection
	TempToken string `json:"temp_token" api:"required"`
	// Basic user profile from the platform
	UserProfile ConnectFetchPendingDataResponseUserProfile `json:"user_profile" api:"required"`
	// Pinterest boards available
	Boards []map[string]interface{} `json:"boards"`
	// Google Business locations available
	Locations []map[string]interface{} `json:"locations"`
	// LinkedIn organizations available
	Organizations []map[string]interface{} `json:"organizations"`
	// Facebook pages available
	Pages []map[string]interface{} `json:"pages"`
	// Snapchat profiles available
	Profiles []map[string]interface{}            `json:"profiles"`
	JSON     connectFetchPendingDataResponseJSON `json:"-"`
}

func (*ConnectFetchPendingDataResponse) UnmarshalJSON

func (r *ConnectFetchPendingDataResponse) UnmarshalJSON(data []byte) (err error)

type ConnectFetchPendingDataResponsePlatform

type ConnectFetchPendingDataResponsePlatform string
const (
	ConnectFetchPendingDataResponsePlatformTwitter        ConnectFetchPendingDataResponsePlatform = "twitter"
	ConnectFetchPendingDataResponsePlatformInstagram      ConnectFetchPendingDataResponsePlatform = "instagram"
	ConnectFetchPendingDataResponsePlatformFacebook       ConnectFetchPendingDataResponsePlatform = "facebook"
	ConnectFetchPendingDataResponsePlatformLinkedin       ConnectFetchPendingDataResponsePlatform = "linkedin"
	ConnectFetchPendingDataResponsePlatformTiktok         ConnectFetchPendingDataResponsePlatform = "tiktok"
	ConnectFetchPendingDataResponsePlatformYoutube        ConnectFetchPendingDataResponsePlatform = "youtube"
	ConnectFetchPendingDataResponsePlatformPinterest      ConnectFetchPendingDataResponsePlatform = "pinterest"
	ConnectFetchPendingDataResponsePlatformReddit         ConnectFetchPendingDataResponsePlatform = "reddit"
	ConnectFetchPendingDataResponsePlatformBluesky        ConnectFetchPendingDataResponsePlatform = "bluesky"
	ConnectFetchPendingDataResponsePlatformThreads        ConnectFetchPendingDataResponsePlatform = "threads"
	ConnectFetchPendingDataResponsePlatformTelegram       ConnectFetchPendingDataResponsePlatform = "telegram"
	ConnectFetchPendingDataResponsePlatformSnapchat       ConnectFetchPendingDataResponsePlatform = "snapchat"
	ConnectFetchPendingDataResponsePlatformGooglebusiness ConnectFetchPendingDataResponsePlatform = "googlebusiness"
	ConnectFetchPendingDataResponsePlatformWhatsapp       ConnectFetchPendingDataResponsePlatform = "whatsapp"
	ConnectFetchPendingDataResponsePlatformMastodon       ConnectFetchPendingDataResponsePlatform = "mastodon"
	ConnectFetchPendingDataResponsePlatformDiscord        ConnectFetchPendingDataResponsePlatform = "discord"
	ConnectFetchPendingDataResponsePlatformSMS            ConnectFetchPendingDataResponsePlatform = "sms"
)

func (ConnectFetchPendingDataResponsePlatform) IsKnown

type ConnectFetchPendingDataResponseUserProfile

type ConnectFetchPendingDataResponseUserProfile struct {
	ID        string                                         `json:"id" api:"required"`
	AvatarURL string                                         `json:"avatar_url" api:"required,nullable"`
	Name      string                                         `json:"name" api:"required,nullable"`
	Username  string                                         `json:"username" api:"required,nullable"`
	JSON      connectFetchPendingDataResponseUserProfileJSON `json:"-"`
}

Basic user profile from the platform

func (*ConnectFetchPendingDataResponseUserProfile) UnmarshalJSON

func (r *ConnectFetchPendingDataResponseUserProfile) UnmarshalJSON(data []byte) (err error)

type ConnectGooglebusinessLocationListResponse

type ConnectGooglebusinessLocationListResponse struct {
	Locations []ConnectGooglebusinessLocationListResponseLocation `json:"locations" api:"required"`
	JSON      connectGooglebusinessLocationListResponseJSON       `json:"-"`
}

func (*ConnectGooglebusinessLocationListResponse) UnmarshalJSON

func (r *ConnectGooglebusinessLocationListResponse) UnmarshalJSON(data []byte) (err error)

type ConnectGooglebusinessLocationListResponseLocation

type ConnectGooglebusinessLocationListResponseLocation struct {
	// Google Business location ID
	ID string `json:"id" api:"required"`
	// Business name
	Name string `json:"name" api:"required"`
	// Business address
	Address string `json:"address" api:"nullable"`
	// Business phone number
	Phone string                                                `json:"phone" api:"nullable"`
	JSON  connectGooglebusinessLocationListResponseLocationJSON `json:"-"`
}

func (*ConnectGooglebusinessLocationListResponseLocation) UnmarshalJSON

func (r *ConnectGooglebusinessLocationListResponseLocation) UnmarshalJSON(data []byte) (err error)

type ConnectGooglebusinessLocationSelectParams

type ConnectGooglebusinessLocationSelectParams struct {
	// Token from pending data or OAuth flow
	ConnectToken param.Field[string] `json:"connect_token" api:"required"`
	// Selected Google Business location ID
	LocationID param.Field[string] `json:"location_id" api:"required"`
}

func (ConnectGooglebusinessLocationSelectParams) MarshalJSON

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

type ConnectGooglebusinessLocationSelectResponse

type ConnectGooglebusinessLocationSelectResponse struct {
	Account ConnectGooglebusinessLocationSelectResponseAccount `json:"account" api:"required"`
	JSON    connectGooglebusinessLocationSelectResponseJSON    `json:"-"`
}

func (*ConnectGooglebusinessLocationSelectResponse) UnmarshalJSON

func (r *ConnectGooglebusinessLocationSelectResponse) UnmarshalJSON(data []byte) (err error)

type ConnectGooglebusinessLocationSelectResponseAccount

type ConnectGooglebusinessLocationSelectResponseAccount struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             ConnectGooglebusinessLocationSelectResponseAccountGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                                     `json:"metadata" api:"required,nullable"`
	Platform          ConnectGooglebusinessLocationSelectResponseAccountPlatform `json:"platform" api:"required"`
	PlatformAccountID string                                                     `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                                  `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                                     `json:"username" api:"required,nullable"`
	JSON              connectGooglebusinessLocationSelectResponseAccountJSON     `json:"-"`
}

func (*ConnectGooglebusinessLocationSelectResponseAccount) UnmarshalJSON

func (r *ConnectGooglebusinessLocationSelectResponseAccount) UnmarshalJSON(data []byte) (err error)

type ConnectGooglebusinessLocationSelectResponseAccountGroup

type ConnectGooglebusinessLocationSelectResponseAccountGroup struct {
	ID   string                                                      `json:"id" api:"required"`
	Name string                                                      `json:"name" api:"required"`
	JSON connectGooglebusinessLocationSelectResponseAccountGroupJSON `json:"-"`
}

Account group

func (*ConnectGooglebusinessLocationSelectResponseAccountGroup) UnmarshalJSON

type ConnectGooglebusinessLocationSelectResponseAccountPlatform

type ConnectGooglebusinessLocationSelectResponseAccountPlatform string
const (
	ConnectGooglebusinessLocationSelectResponseAccountPlatformTwitter        ConnectGooglebusinessLocationSelectResponseAccountPlatform = "twitter"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformInstagram      ConnectGooglebusinessLocationSelectResponseAccountPlatform = "instagram"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformFacebook       ConnectGooglebusinessLocationSelectResponseAccountPlatform = "facebook"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformLinkedin       ConnectGooglebusinessLocationSelectResponseAccountPlatform = "linkedin"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformTiktok         ConnectGooglebusinessLocationSelectResponseAccountPlatform = "tiktok"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformYoutube        ConnectGooglebusinessLocationSelectResponseAccountPlatform = "youtube"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformPinterest      ConnectGooglebusinessLocationSelectResponseAccountPlatform = "pinterest"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformReddit         ConnectGooglebusinessLocationSelectResponseAccountPlatform = "reddit"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformBluesky        ConnectGooglebusinessLocationSelectResponseAccountPlatform = "bluesky"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformThreads        ConnectGooglebusinessLocationSelectResponseAccountPlatform = "threads"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformTelegram       ConnectGooglebusinessLocationSelectResponseAccountPlatform = "telegram"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformSnapchat       ConnectGooglebusinessLocationSelectResponseAccountPlatform = "snapchat"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformGooglebusiness ConnectGooglebusinessLocationSelectResponseAccountPlatform = "googlebusiness"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformWhatsapp       ConnectGooglebusinessLocationSelectResponseAccountPlatform = "whatsapp"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformMastodon       ConnectGooglebusinessLocationSelectResponseAccountPlatform = "mastodon"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformDiscord        ConnectGooglebusinessLocationSelectResponseAccountPlatform = "discord"
	ConnectGooglebusinessLocationSelectResponseAccountPlatformSMS            ConnectGooglebusinessLocationSelectResponseAccountPlatform = "sms"
)

func (ConnectGooglebusinessLocationSelectResponseAccountPlatform) IsKnown

type ConnectGooglebusinessLocationService

type ConnectGooglebusinessLocationService struct {
	Options []option.RequestOption
}

ConnectGooglebusinessLocationService contains methods and other services that help with interacting with the relay 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 NewConnectGooglebusinessLocationService method instead.

func NewConnectGooglebusinessLocationService

func NewConnectGooglebusinessLocationService(opts ...option.RequestOption) (r *ConnectGooglebusinessLocationService)

NewConnectGooglebusinessLocationService 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 (*ConnectGooglebusinessLocationService) List

List Google Business locations after OAuth

func (*ConnectGooglebusinessLocationService) Select

Select Google Business location

type ConnectGooglebusinessService

type ConnectGooglebusinessService struct {
	Options   []option.RequestOption
	Locations *ConnectGooglebusinessLocationService
}

ConnectGooglebusinessService contains methods and other services that help with interacting with the relay 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 NewConnectGooglebusinessService method instead.

func NewConnectGooglebusinessService

func NewConnectGooglebusinessService(opts ...option.RequestOption) (r *ConnectGooglebusinessService)

NewConnectGooglebusinessService 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 ConnectLinkedinOrganizationListResponse

type ConnectLinkedinOrganizationListResponse struct {
	Organizations []ConnectLinkedinOrganizationListResponseOrganization `json:"organizations" api:"required"`
	// User's personal LinkedIn profile
	PersonalProfile ConnectLinkedinOrganizationListResponsePersonalProfile `json:"personal_profile"`
	JSON            connectLinkedinOrganizationListResponseJSON            `json:"-"`
}

func (*ConnectLinkedinOrganizationListResponse) UnmarshalJSON

func (r *ConnectLinkedinOrganizationListResponse) UnmarshalJSON(data []byte) (err error)

type ConnectLinkedinOrganizationListResponseOrganization

type ConnectLinkedinOrganizationListResponseOrganization struct {
	// Organization name
	Name string `json:"name" api:"required"`
	// LinkedIn organization URN
	Urn string `json:"urn" api:"required"`
	// Organization logo URL
	LogoURL string `json:"logo_url" api:"nullable"`
	// Organization vanity name
	VanityName string                                                  `json:"vanity_name" api:"nullable"`
	JSON       connectLinkedinOrganizationListResponseOrganizationJSON `json:"-"`
}

func (*ConnectLinkedinOrganizationListResponseOrganization) UnmarshalJSON

func (r *ConnectLinkedinOrganizationListResponseOrganization) UnmarshalJSON(data []byte) (err error)

type ConnectLinkedinOrganizationListResponsePersonalProfile

type ConnectLinkedinOrganizationListResponsePersonalProfile struct {
	Name string                                                     `json:"name" api:"required"`
	Urn  string                                                     `json:"urn" api:"required"`
	JSON connectLinkedinOrganizationListResponsePersonalProfileJSON `json:"-"`
}

User's personal LinkedIn profile

func (*ConnectLinkedinOrganizationListResponsePersonalProfile) UnmarshalJSON

func (r *ConnectLinkedinOrganizationListResponsePersonalProfile) UnmarshalJSON(data []byte) (err error)

type ConnectLinkedinOrganizationSelectParams

type ConnectLinkedinOrganizationSelectParams struct {
	// Whether to connect as a personal profile or organization
	AccountType param.Field[ConnectLinkedinOrganizationSelectParamsAccountType] `json:"account_type" api:"required"`
	// Token from pending data or OAuth flow
	ConnectToken param.Field[string] `json:"connect_token" api:"required"`
	// LinkedIn organization URN (required if account_type is organization)
	OrganizationUrn param.Field[string] `json:"organization_urn"`
}

func (ConnectLinkedinOrganizationSelectParams) MarshalJSON

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

type ConnectLinkedinOrganizationSelectParamsAccountType

type ConnectLinkedinOrganizationSelectParamsAccountType string

Whether to connect as a personal profile or organization

const (
	ConnectLinkedinOrganizationSelectParamsAccountTypePersonal     ConnectLinkedinOrganizationSelectParamsAccountType = "personal"
	ConnectLinkedinOrganizationSelectParamsAccountTypeOrganization ConnectLinkedinOrganizationSelectParamsAccountType = "organization"
)

func (ConnectLinkedinOrganizationSelectParamsAccountType) IsKnown

type ConnectLinkedinOrganizationSelectResponse

type ConnectLinkedinOrganizationSelectResponse struct {
	Account ConnectLinkedinOrganizationSelectResponseAccount `json:"account" api:"required"`
	JSON    connectLinkedinOrganizationSelectResponseJSON    `json:"-"`
}

func (*ConnectLinkedinOrganizationSelectResponse) UnmarshalJSON

func (r *ConnectLinkedinOrganizationSelectResponse) UnmarshalJSON(data []byte) (err error)

type ConnectLinkedinOrganizationSelectResponseAccount

type ConnectLinkedinOrganizationSelectResponseAccount struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             ConnectLinkedinOrganizationSelectResponseAccountGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                                   `json:"metadata" api:"required,nullable"`
	Platform          ConnectLinkedinOrganizationSelectResponseAccountPlatform `json:"platform" api:"required"`
	PlatformAccountID string                                                   `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                                `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                                   `json:"username" api:"required,nullable"`
	JSON              connectLinkedinOrganizationSelectResponseAccountJSON     `json:"-"`
}

func (*ConnectLinkedinOrganizationSelectResponseAccount) UnmarshalJSON

func (r *ConnectLinkedinOrganizationSelectResponseAccount) UnmarshalJSON(data []byte) (err error)

type ConnectLinkedinOrganizationSelectResponseAccountGroup

type ConnectLinkedinOrganizationSelectResponseAccountGroup struct {
	ID   string                                                    `json:"id" api:"required"`
	Name string                                                    `json:"name" api:"required"`
	JSON connectLinkedinOrganizationSelectResponseAccountGroupJSON `json:"-"`
}

Account group

func (*ConnectLinkedinOrganizationSelectResponseAccountGroup) UnmarshalJSON

func (r *ConnectLinkedinOrganizationSelectResponseAccountGroup) UnmarshalJSON(data []byte) (err error)

type ConnectLinkedinOrganizationSelectResponseAccountPlatform

type ConnectLinkedinOrganizationSelectResponseAccountPlatform string
const (
	ConnectLinkedinOrganizationSelectResponseAccountPlatformTwitter        ConnectLinkedinOrganizationSelectResponseAccountPlatform = "twitter"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformInstagram      ConnectLinkedinOrganizationSelectResponseAccountPlatform = "instagram"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformFacebook       ConnectLinkedinOrganizationSelectResponseAccountPlatform = "facebook"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformLinkedin       ConnectLinkedinOrganizationSelectResponseAccountPlatform = "linkedin"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformTiktok         ConnectLinkedinOrganizationSelectResponseAccountPlatform = "tiktok"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformYoutube        ConnectLinkedinOrganizationSelectResponseAccountPlatform = "youtube"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformPinterest      ConnectLinkedinOrganizationSelectResponseAccountPlatform = "pinterest"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformReddit         ConnectLinkedinOrganizationSelectResponseAccountPlatform = "reddit"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformBluesky        ConnectLinkedinOrganizationSelectResponseAccountPlatform = "bluesky"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformThreads        ConnectLinkedinOrganizationSelectResponseAccountPlatform = "threads"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformTelegram       ConnectLinkedinOrganizationSelectResponseAccountPlatform = "telegram"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformSnapchat       ConnectLinkedinOrganizationSelectResponseAccountPlatform = "snapchat"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformGooglebusiness ConnectLinkedinOrganizationSelectResponseAccountPlatform = "googlebusiness"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformWhatsapp       ConnectLinkedinOrganizationSelectResponseAccountPlatform = "whatsapp"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformMastodon       ConnectLinkedinOrganizationSelectResponseAccountPlatform = "mastodon"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformDiscord        ConnectLinkedinOrganizationSelectResponseAccountPlatform = "discord"
	ConnectLinkedinOrganizationSelectResponseAccountPlatformSMS            ConnectLinkedinOrganizationSelectResponseAccountPlatform = "sms"
)

func (ConnectLinkedinOrganizationSelectResponseAccountPlatform) IsKnown

type ConnectLinkedinOrganizationService

type ConnectLinkedinOrganizationService struct {
	Options []option.RequestOption
}

ConnectLinkedinOrganizationService contains methods and other services that help with interacting with the relay 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 NewConnectLinkedinOrganizationService method instead.

func NewConnectLinkedinOrganizationService

func NewConnectLinkedinOrganizationService(opts ...option.RequestOption) (r *ConnectLinkedinOrganizationService)

NewConnectLinkedinOrganizationService 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 (*ConnectLinkedinOrganizationService) List

List LinkedIn organizations after OAuth

func (*ConnectLinkedinOrganizationService) Select

Select LinkedIn organization

type ConnectLinkedinService

type ConnectLinkedinService struct {
	Options       []option.RequestOption
	Organizations *ConnectLinkedinOrganizationService
}

ConnectLinkedinService contains methods and other services that help with interacting with the relay 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 NewConnectLinkedinService method instead.

func NewConnectLinkedinService

func NewConnectLinkedinService(opts ...option.RequestOption) (r *ConnectLinkedinService)

NewConnectLinkedinService 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 ConnectNewBlueskyConnectionParams

type ConnectNewBlueskyConnectionParams struct {
	// Bluesky app password
	AppPassword param.Field[string] `json:"app_password" api:"required"`
	// Bluesky handle (e.g. user.bsky.social)
	Handle param.Field[string] `json:"handle" api:"required"`
}

func (ConnectNewBlueskyConnectionParams) MarshalJSON

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

type ConnectNewBlueskyConnectionResponse

type ConnectNewBlueskyConnectionResponse struct {
	Account ConnectNewBlueskyConnectionResponseAccount `json:"account" api:"required"`
	JSON    connectNewBlueskyConnectionResponseJSON    `json:"-"`
}

func (*ConnectNewBlueskyConnectionResponse) UnmarshalJSON

func (r *ConnectNewBlueskyConnectionResponse) UnmarshalJSON(data []byte) (err error)

type ConnectNewBlueskyConnectionResponseAccount

type ConnectNewBlueskyConnectionResponseAccount struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             ConnectNewBlueskyConnectionResponseAccountGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                             `json:"metadata" api:"required,nullable"`
	Platform          ConnectNewBlueskyConnectionResponseAccountPlatform `json:"platform" api:"required"`
	PlatformAccountID string                                             `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                          `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                             `json:"username" api:"required,nullable"`
	JSON              connectNewBlueskyConnectionResponseAccountJSON     `json:"-"`
}

func (*ConnectNewBlueskyConnectionResponseAccount) UnmarshalJSON

func (r *ConnectNewBlueskyConnectionResponseAccount) UnmarshalJSON(data []byte) (err error)

type ConnectNewBlueskyConnectionResponseAccountGroup

type ConnectNewBlueskyConnectionResponseAccountGroup struct {
	ID   string                                              `json:"id" api:"required"`
	Name string                                              `json:"name" api:"required"`
	JSON connectNewBlueskyConnectionResponseAccountGroupJSON `json:"-"`
}

Account group

func (*ConnectNewBlueskyConnectionResponseAccountGroup) UnmarshalJSON

func (r *ConnectNewBlueskyConnectionResponseAccountGroup) UnmarshalJSON(data []byte) (err error)

type ConnectNewBlueskyConnectionResponseAccountPlatform

type ConnectNewBlueskyConnectionResponseAccountPlatform string
const (
	ConnectNewBlueskyConnectionResponseAccountPlatformTwitter        ConnectNewBlueskyConnectionResponseAccountPlatform = "twitter"
	ConnectNewBlueskyConnectionResponseAccountPlatformInstagram      ConnectNewBlueskyConnectionResponseAccountPlatform = "instagram"
	ConnectNewBlueskyConnectionResponseAccountPlatformFacebook       ConnectNewBlueskyConnectionResponseAccountPlatform = "facebook"
	ConnectNewBlueskyConnectionResponseAccountPlatformLinkedin       ConnectNewBlueskyConnectionResponseAccountPlatform = "linkedin"
	ConnectNewBlueskyConnectionResponseAccountPlatformTiktok         ConnectNewBlueskyConnectionResponseAccountPlatform = "tiktok"
	ConnectNewBlueskyConnectionResponseAccountPlatformYoutube        ConnectNewBlueskyConnectionResponseAccountPlatform = "youtube"
	ConnectNewBlueskyConnectionResponseAccountPlatformPinterest      ConnectNewBlueskyConnectionResponseAccountPlatform = "pinterest"
	ConnectNewBlueskyConnectionResponseAccountPlatformReddit         ConnectNewBlueskyConnectionResponseAccountPlatform = "reddit"
	ConnectNewBlueskyConnectionResponseAccountPlatformBluesky        ConnectNewBlueskyConnectionResponseAccountPlatform = "bluesky"
	ConnectNewBlueskyConnectionResponseAccountPlatformThreads        ConnectNewBlueskyConnectionResponseAccountPlatform = "threads"
	ConnectNewBlueskyConnectionResponseAccountPlatformTelegram       ConnectNewBlueskyConnectionResponseAccountPlatform = "telegram"
	ConnectNewBlueskyConnectionResponseAccountPlatformSnapchat       ConnectNewBlueskyConnectionResponseAccountPlatform = "snapchat"
	ConnectNewBlueskyConnectionResponseAccountPlatformGooglebusiness ConnectNewBlueskyConnectionResponseAccountPlatform = "googlebusiness"
	ConnectNewBlueskyConnectionResponseAccountPlatformWhatsapp       ConnectNewBlueskyConnectionResponseAccountPlatform = "whatsapp"
	ConnectNewBlueskyConnectionResponseAccountPlatformMastodon       ConnectNewBlueskyConnectionResponseAccountPlatform = "mastodon"
	ConnectNewBlueskyConnectionResponseAccountPlatformDiscord        ConnectNewBlueskyConnectionResponseAccountPlatform = "discord"
	ConnectNewBlueskyConnectionResponseAccountPlatformSMS            ConnectNewBlueskyConnectionResponseAccountPlatform = "sms"
)

func (ConnectNewBlueskyConnectionResponseAccountPlatform) IsKnown

type ConnectPinterestBoardListResponse

type ConnectPinterestBoardListResponse struct {
	Boards []ConnectPinterestBoardListResponseBoard `json:"boards" api:"required"`
	JSON   connectPinterestBoardListResponseJSON    `json:"-"`
}

func (*ConnectPinterestBoardListResponse) UnmarshalJSON

func (r *ConnectPinterestBoardListResponse) UnmarshalJSON(data []byte) (err error)

type ConnectPinterestBoardListResponseBoard

type ConnectPinterestBoardListResponseBoard struct {
	// Pinterest board ID
	ID string `json:"id" api:"required"`
	// Board name
	Name string `json:"name" api:"required"`
	// Board description
	Description string `json:"description" api:"nullable"`
	// Number of pins on the board
	PinCount int64                                      `json:"pin_count"`
	JSON     connectPinterestBoardListResponseBoardJSON `json:"-"`
}

func (*ConnectPinterestBoardListResponseBoard) UnmarshalJSON

func (r *ConnectPinterestBoardListResponseBoard) UnmarshalJSON(data []byte) (err error)

type ConnectPinterestBoardSelectParams

type ConnectPinterestBoardSelectParams struct {
	// Selected Pinterest board ID
	BoardID param.Field[string] `json:"board_id" api:"required"`
	// Token from pending data or OAuth flow
	ConnectToken param.Field[string] `json:"connect_token" api:"required"`
}

func (ConnectPinterestBoardSelectParams) MarshalJSON

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

type ConnectPinterestBoardSelectResponse

type ConnectPinterestBoardSelectResponse struct {
	Account ConnectPinterestBoardSelectResponseAccount `json:"account" api:"required"`
	JSON    connectPinterestBoardSelectResponseJSON    `json:"-"`
}

func (*ConnectPinterestBoardSelectResponse) UnmarshalJSON

func (r *ConnectPinterestBoardSelectResponse) UnmarshalJSON(data []byte) (err error)

type ConnectPinterestBoardSelectResponseAccount

type ConnectPinterestBoardSelectResponseAccount struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             ConnectPinterestBoardSelectResponseAccountGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                             `json:"metadata" api:"required,nullable"`
	Platform          ConnectPinterestBoardSelectResponseAccountPlatform `json:"platform" api:"required"`
	PlatformAccountID string                                             `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                          `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                             `json:"username" api:"required,nullable"`
	JSON              connectPinterestBoardSelectResponseAccountJSON     `json:"-"`
}

func (*ConnectPinterestBoardSelectResponseAccount) UnmarshalJSON

func (r *ConnectPinterestBoardSelectResponseAccount) UnmarshalJSON(data []byte) (err error)

type ConnectPinterestBoardSelectResponseAccountGroup

type ConnectPinterestBoardSelectResponseAccountGroup struct {
	ID   string                                              `json:"id" api:"required"`
	Name string                                              `json:"name" api:"required"`
	JSON connectPinterestBoardSelectResponseAccountGroupJSON `json:"-"`
}

Account group

func (*ConnectPinterestBoardSelectResponseAccountGroup) UnmarshalJSON

func (r *ConnectPinterestBoardSelectResponseAccountGroup) UnmarshalJSON(data []byte) (err error)

type ConnectPinterestBoardSelectResponseAccountPlatform

type ConnectPinterestBoardSelectResponseAccountPlatform string
const (
	ConnectPinterestBoardSelectResponseAccountPlatformTwitter        ConnectPinterestBoardSelectResponseAccountPlatform = "twitter"
	ConnectPinterestBoardSelectResponseAccountPlatformInstagram      ConnectPinterestBoardSelectResponseAccountPlatform = "instagram"
	ConnectPinterestBoardSelectResponseAccountPlatformFacebook       ConnectPinterestBoardSelectResponseAccountPlatform = "facebook"
	ConnectPinterestBoardSelectResponseAccountPlatformLinkedin       ConnectPinterestBoardSelectResponseAccountPlatform = "linkedin"
	ConnectPinterestBoardSelectResponseAccountPlatformTiktok         ConnectPinterestBoardSelectResponseAccountPlatform = "tiktok"
	ConnectPinterestBoardSelectResponseAccountPlatformYoutube        ConnectPinterestBoardSelectResponseAccountPlatform = "youtube"
	ConnectPinterestBoardSelectResponseAccountPlatformPinterest      ConnectPinterestBoardSelectResponseAccountPlatform = "pinterest"
	ConnectPinterestBoardSelectResponseAccountPlatformReddit         ConnectPinterestBoardSelectResponseAccountPlatform = "reddit"
	ConnectPinterestBoardSelectResponseAccountPlatformBluesky        ConnectPinterestBoardSelectResponseAccountPlatform = "bluesky"
	ConnectPinterestBoardSelectResponseAccountPlatformThreads        ConnectPinterestBoardSelectResponseAccountPlatform = "threads"
	ConnectPinterestBoardSelectResponseAccountPlatformTelegram       ConnectPinterestBoardSelectResponseAccountPlatform = "telegram"
	ConnectPinterestBoardSelectResponseAccountPlatformSnapchat       ConnectPinterestBoardSelectResponseAccountPlatform = "snapchat"
	ConnectPinterestBoardSelectResponseAccountPlatformGooglebusiness ConnectPinterestBoardSelectResponseAccountPlatform = "googlebusiness"
	ConnectPinterestBoardSelectResponseAccountPlatformWhatsapp       ConnectPinterestBoardSelectResponseAccountPlatform = "whatsapp"
	ConnectPinterestBoardSelectResponseAccountPlatformMastodon       ConnectPinterestBoardSelectResponseAccountPlatform = "mastodon"
	ConnectPinterestBoardSelectResponseAccountPlatformDiscord        ConnectPinterestBoardSelectResponseAccountPlatform = "discord"
	ConnectPinterestBoardSelectResponseAccountPlatformSMS            ConnectPinterestBoardSelectResponseAccountPlatform = "sms"
)

func (ConnectPinterestBoardSelectResponseAccountPlatform) IsKnown

type ConnectPinterestBoardService

type ConnectPinterestBoardService struct {
	Options []option.RequestOption
}

ConnectPinterestBoardService contains methods and other services that help with interacting with the relay 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 NewConnectPinterestBoardService method instead.

func NewConnectPinterestBoardService

func NewConnectPinterestBoardService(opts ...option.RequestOption) (r *ConnectPinterestBoardService)

NewConnectPinterestBoardService 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 (*ConnectPinterestBoardService) List

List Pinterest boards after OAuth

func (*ConnectPinterestBoardService) Select

Select Pinterest board

type ConnectPinterestService

type ConnectPinterestService struct {
	Options []option.RequestOption
	Boards  *ConnectPinterestBoardService
}

ConnectPinterestService contains methods and other services that help with interacting with the relay 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 NewConnectPinterestService method instead.

func NewConnectPinterestService

func NewConnectPinterestService(opts ...option.RequestOption) (r *ConnectPinterestService)

NewConnectPinterestService 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 ConnectService

type ConnectService struct {
	Options        []option.RequestOption
	Telegram       *ConnectTelegramService
	Whatsapp       *ConnectWhatsappService
	Facebook       *ConnectFacebookService
	Linkedin       *ConnectLinkedinService
	Pinterest      *ConnectPinterestService
	Googlebusiness *ConnectGooglebusinessService
	Snapchat       *ConnectSnapchatService
}

ConnectService contains methods and other services that help with interacting with the relay 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 NewConnectService method instead.

func NewConnectService

func NewConnectService(opts ...option.RequestOption) (r *ConnectService)

NewConnectService 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 (*ConnectService) CompleteOAuthCallback

Exchange OAuth code for tokens and save the account.

func (*ConnectService) FetchPendingData

One-time use, expires after 10 minutes. For headless OAuth flows.

func (*ConnectService) NewBlueskyConnection

Connect Bluesky via app password

func (*ConnectService) StartOAuthFlow

Returns an auth_url to redirect the user for OAuth authorization.

type ConnectSnapchatProfileListResponse

type ConnectSnapchatProfileListResponse struct {
	Profiles []ConnectSnapchatProfileListResponseProfile `json:"profiles" api:"required"`
	JSON     connectSnapchatProfileListResponseJSON      `json:"-"`
}

func (*ConnectSnapchatProfileListResponse) UnmarshalJSON

func (r *ConnectSnapchatProfileListResponse) UnmarshalJSON(data []byte) (err error)

type ConnectSnapchatProfileListResponseProfile

type ConnectSnapchatProfileListResponseProfile struct {
	// Snapchat profile ID
	ID string `json:"id" api:"required"`
	// Display name
	DisplayName string `json:"display_name" api:"required"`
	// Snapchat username
	Username string `json:"username" api:"required"`
	// Profile image URL
	ProfileImageURL string `json:"profile_image_url" api:"nullable"`
	// Number of subscribers
	SubscriberCount int64                                         `json:"subscriber_count"`
	JSON            connectSnapchatProfileListResponseProfileJSON `json:"-"`
}

func (*ConnectSnapchatProfileListResponseProfile) UnmarshalJSON

func (r *ConnectSnapchatProfileListResponseProfile) UnmarshalJSON(data []byte) (err error)

type ConnectSnapchatProfileSelectParams

type ConnectSnapchatProfileSelectParams struct {
	// Token from pending data or OAuth flow
	ConnectToken param.Field[string] `json:"connect_token" api:"required"`
	// Selected Snapchat profile ID
	ProfileID param.Field[string] `json:"profile_id" api:"required"`
}

func (ConnectSnapchatProfileSelectParams) MarshalJSON

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

type ConnectSnapchatProfileSelectResponse

type ConnectSnapchatProfileSelectResponse struct {
	Account ConnectSnapchatProfileSelectResponseAccount `json:"account" api:"required"`
	JSON    connectSnapchatProfileSelectResponseJSON    `json:"-"`
}

func (*ConnectSnapchatProfileSelectResponse) UnmarshalJSON

func (r *ConnectSnapchatProfileSelectResponse) UnmarshalJSON(data []byte) (err error)

type ConnectSnapchatProfileSelectResponseAccount

type ConnectSnapchatProfileSelectResponseAccount struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             ConnectSnapchatProfileSelectResponseAccountGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                              `json:"metadata" api:"required,nullable"`
	Platform          ConnectSnapchatProfileSelectResponseAccountPlatform `json:"platform" api:"required"`
	PlatformAccountID string                                              `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                           `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                              `json:"username" api:"required,nullable"`
	JSON              connectSnapchatProfileSelectResponseAccountJSON     `json:"-"`
}

func (*ConnectSnapchatProfileSelectResponseAccount) UnmarshalJSON

func (r *ConnectSnapchatProfileSelectResponseAccount) UnmarshalJSON(data []byte) (err error)

type ConnectSnapchatProfileSelectResponseAccountGroup

type ConnectSnapchatProfileSelectResponseAccountGroup struct {
	ID   string                                               `json:"id" api:"required"`
	Name string                                               `json:"name" api:"required"`
	JSON connectSnapchatProfileSelectResponseAccountGroupJSON `json:"-"`
}

Account group

func (*ConnectSnapchatProfileSelectResponseAccountGroup) UnmarshalJSON

func (r *ConnectSnapchatProfileSelectResponseAccountGroup) UnmarshalJSON(data []byte) (err error)

type ConnectSnapchatProfileSelectResponseAccountPlatform

type ConnectSnapchatProfileSelectResponseAccountPlatform string
const (
	ConnectSnapchatProfileSelectResponseAccountPlatformTwitter        ConnectSnapchatProfileSelectResponseAccountPlatform = "twitter"
	ConnectSnapchatProfileSelectResponseAccountPlatformInstagram      ConnectSnapchatProfileSelectResponseAccountPlatform = "instagram"
	ConnectSnapchatProfileSelectResponseAccountPlatformFacebook       ConnectSnapchatProfileSelectResponseAccountPlatform = "facebook"
	ConnectSnapchatProfileSelectResponseAccountPlatformLinkedin       ConnectSnapchatProfileSelectResponseAccountPlatform = "linkedin"
	ConnectSnapchatProfileSelectResponseAccountPlatformTiktok         ConnectSnapchatProfileSelectResponseAccountPlatform = "tiktok"
	ConnectSnapchatProfileSelectResponseAccountPlatformYoutube        ConnectSnapchatProfileSelectResponseAccountPlatform = "youtube"
	ConnectSnapchatProfileSelectResponseAccountPlatformPinterest      ConnectSnapchatProfileSelectResponseAccountPlatform = "pinterest"
	ConnectSnapchatProfileSelectResponseAccountPlatformReddit         ConnectSnapchatProfileSelectResponseAccountPlatform = "reddit"
	ConnectSnapchatProfileSelectResponseAccountPlatformBluesky        ConnectSnapchatProfileSelectResponseAccountPlatform = "bluesky"
	ConnectSnapchatProfileSelectResponseAccountPlatformThreads        ConnectSnapchatProfileSelectResponseAccountPlatform = "threads"
	ConnectSnapchatProfileSelectResponseAccountPlatformTelegram       ConnectSnapchatProfileSelectResponseAccountPlatform = "telegram"
	ConnectSnapchatProfileSelectResponseAccountPlatformSnapchat       ConnectSnapchatProfileSelectResponseAccountPlatform = "snapchat"
	ConnectSnapchatProfileSelectResponseAccountPlatformGooglebusiness ConnectSnapchatProfileSelectResponseAccountPlatform = "googlebusiness"
	ConnectSnapchatProfileSelectResponseAccountPlatformWhatsapp       ConnectSnapchatProfileSelectResponseAccountPlatform = "whatsapp"
	ConnectSnapchatProfileSelectResponseAccountPlatformMastodon       ConnectSnapchatProfileSelectResponseAccountPlatform = "mastodon"
	ConnectSnapchatProfileSelectResponseAccountPlatformDiscord        ConnectSnapchatProfileSelectResponseAccountPlatform = "discord"
	ConnectSnapchatProfileSelectResponseAccountPlatformSMS            ConnectSnapchatProfileSelectResponseAccountPlatform = "sms"
)

func (ConnectSnapchatProfileSelectResponseAccountPlatform) IsKnown

type ConnectSnapchatProfileService

type ConnectSnapchatProfileService struct {
	Options []option.RequestOption
}

ConnectSnapchatProfileService contains methods and other services that help with interacting with the relay 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 NewConnectSnapchatProfileService method instead.

func NewConnectSnapchatProfileService

func NewConnectSnapchatProfileService(opts ...option.RequestOption) (r *ConnectSnapchatProfileService)

NewConnectSnapchatProfileService 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 (*ConnectSnapchatProfileService) List

List Snapchat Public Profiles after OAuth

func (*ConnectSnapchatProfileService) Select

Select Snapchat Public Profile

type ConnectSnapchatService

type ConnectSnapchatService struct {
	Options  []option.RequestOption
	Profiles *ConnectSnapchatProfileService
}

ConnectSnapchatService contains methods and other services that help with interacting with the relay 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 NewConnectSnapchatService method instead.

func NewConnectSnapchatService

func NewConnectSnapchatService(opts ...option.RequestOption) (r *ConnectSnapchatService)

NewConnectSnapchatService 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 ConnectStartOAuthFlowParams

type ConnectStartOAuthFlowParams struct {
	// Set to "true" for headless mode (returns data instead of redirecting)
	Headless param.Field[string] `query:"headless"`
	// Auth method variant (e.g. "direct" for Instagram Login instead of Facebook
	// Login)
	Method param.Field[string] `query:"method"`
	// URL to redirect after OAuth completes
	RedirectURL param.Field[string] `query:"redirect_url" format:"uri"`
}

func (ConnectStartOAuthFlowParams) URLQuery

func (r ConnectStartOAuthFlowParams) URLQuery() (v url.Values)

URLQuery serializes ConnectStartOAuthFlowParams's query parameters as `url.Values`.

type ConnectStartOAuthFlowParamsPlatform

type ConnectStartOAuthFlowParamsPlatform string

OAuth platform to connect

const (
	ConnectStartOAuthFlowParamsPlatformTwitter        ConnectStartOAuthFlowParamsPlatform = "twitter"
	ConnectStartOAuthFlowParamsPlatformInstagram      ConnectStartOAuthFlowParamsPlatform = "instagram"
	ConnectStartOAuthFlowParamsPlatformFacebook       ConnectStartOAuthFlowParamsPlatform = "facebook"
	ConnectStartOAuthFlowParamsPlatformLinkedin       ConnectStartOAuthFlowParamsPlatform = "linkedin"
	ConnectStartOAuthFlowParamsPlatformTiktok         ConnectStartOAuthFlowParamsPlatform = "tiktok"
	ConnectStartOAuthFlowParamsPlatformYoutube        ConnectStartOAuthFlowParamsPlatform = "youtube"
	ConnectStartOAuthFlowParamsPlatformPinterest      ConnectStartOAuthFlowParamsPlatform = "pinterest"
	ConnectStartOAuthFlowParamsPlatformReddit         ConnectStartOAuthFlowParamsPlatform = "reddit"
	ConnectStartOAuthFlowParamsPlatformThreads        ConnectStartOAuthFlowParamsPlatform = "threads"
	ConnectStartOAuthFlowParamsPlatformSnapchat       ConnectStartOAuthFlowParamsPlatform = "snapchat"
	ConnectStartOAuthFlowParamsPlatformGooglebusiness ConnectStartOAuthFlowParamsPlatform = "googlebusiness"
	ConnectStartOAuthFlowParamsPlatformMastodon       ConnectStartOAuthFlowParamsPlatform = "mastodon"
)

func (ConnectStartOAuthFlowParamsPlatform) IsKnown

type ConnectStartOAuthFlowResponse

type ConnectStartOAuthFlowResponse struct {
	// URL to redirect the user for OAuth authorization
	AuthURL string                            `json:"auth_url" api:"required" format:"uri"`
	JSON    connectStartOAuthFlowResponseJSON `json:"-"`
}

func (*ConnectStartOAuthFlowResponse) UnmarshalJSON

func (r *ConnectStartOAuthFlowResponse) UnmarshalJSON(data []byte) (err error)

type ConnectTelegramConnectDirectlyParams

type ConnectTelegramConnectDirectlyParams struct {
	// Telegram chat or channel ID
	ChatID param.Field[string] `json:"chat_id" api:"required"`
}

func (ConnectTelegramConnectDirectlyParams) MarshalJSON

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

type ConnectTelegramConnectDirectlyResponse

type ConnectTelegramConnectDirectlyResponse struct {
	Account ConnectTelegramConnectDirectlyResponseAccount `json:"account" api:"required"`
	JSON    connectTelegramConnectDirectlyResponseJSON    `json:"-"`
}

func (*ConnectTelegramConnectDirectlyResponse) UnmarshalJSON

func (r *ConnectTelegramConnectDirectlyResponse) UnmarshalJSON(data []byte) (err error)

type ConnectTelegramConnectDirectlyResponseAccount

type ConnectTelegramConnectDirectlyResponseAccount struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             ConnectTelegramConnectDirectlyResponseAccountGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                                `json:"metadata" api:"required,nullable"`
	Platform          ConnectTelegramConnectDirectlyResponseAccountPlatform `json:"platform" api:"required"`
	PlatformAccountID string                                                `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                             `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                                `json:"username" api:"required,nullable"`
	JSON              connectTelegramConnectDirectlyResponseAccountJSON     `json:"-"`
}

func (*ConnectTelegramConnectDirectlyResponseAccount) UnmarshalJSON

func (r *ConnectTelegramConnectDirectlyResponseAccount) UnmarshalJSON(data []byte) (err error)

type ConnectTelegramConnectDirectlyResponseAccountGroup

type ConnectTelegramConnectDirectlyResponseAccountGroup struct {
	ID   string                                                 `json:"id" api:"required"`
	Name string                                                 `json:"name" api:"required"`
	JSON connectTelegramConnectDirectlyResponseAccountGroupJSON `json:"-"`
}

Account group

func (*ConnectTelegramConnectDirectlyResponseAccountGroup) UnmarshalJSON

func (r *ConnectTelegramConnectDirectlyResponseAccountGroup) UnmarshalJSON(data []byte) (err error)

type ConnectTelegramConnectDirectlyResponseAccountPlatform

type ConnectTelegramConnectDirectlyResponseAccountPlatform string
const (
	ConnectTelegramConnectDirectlyResponseAccountPlatformTwitter        ConnectTelegramConnectDirectlyResponseAccountPlatform = "twitter"
	ConnectTelegramConnectDirectlyResponseAccountPlatformInstagram      ConnectTelegramConnectDirectlyResponseAccountPlatform = "instagram"
	ConnectTelegramConnectDirectlyResponseAccountPlatformFacebook       ConnectTelegramConnectDirectlyResponseAccountPlatform = "facebook"
	ConnectTelegramConnectDirectlyResponseAccountPlatformLinkedin       ConnectTelegramConnectDirectlyResponseAccountPlatform = "linkedin"
	ConnectTelegramConnectDirectlyResponseAccountPlatformTiktok         ConnectTelegramConnectDirectlyResponseAccountPlatform = "tiktok"
	ConnectTelegramConnectDirectlyResponseAccountPlatformYoutube        ConnectTelegramConnectDirectlyResponseAccountPlatform = "youtube"
	ConnectTelegramConnectDirectlyResponseAccountPlatformPinterest      ConnectTelegramConnectDirectlyResponseAccountPlatform = "pinterest"
	ConnectTelegramConnectDirectlyResponseAccountPlatformReddit         ConnectTelegramConnectDirectlyResponseAccountPlatform = "reddit"
	ConnectTelegramConnectDirectlyResponseAccountPlatformBluesky        ConnectTelegramConnectDirectlyResponseAccountPlatform = "bluesky"
	ConnectTelegramConnectDirectlyResponseAccountPlatformThreads        ConnectTelegramConnectDirectlyResponseAccountPlatform = "threads"
	ConnectTelegramConnectDirectlyResponseAccountPlatformTelegram       ConnectTelegramConnectDirectlyResponseAccountPlatform = "telegram"
	ConnectTelegramConnectDirectlyResponseAccountPlatformSnapchat       ConnectTelegramConnectDirectlyResponseAccountPlatform = "snapchat"
	ConnectTelegramConnectDirectlyResponseAccountPlatformGooglebusiness ConnectTelegramConnectDirectlyResponseAccountPlatform = "googlebusiness"
	ConnectTelegramConnectDirectlyResponseAccountPlatformWhatsapp       ConnectTelegramConnectDirectlyResponseAccountPlatform = "whatsapp"
	ConnectTelegramConnectDirectlyResponseAccountPlatformMastodon       ConnectTelegramConnectDirectlyResponseAccountPlatform = "mastodon"
	ConnectTelegramConnectDirectlyResponseAccountPlatformDiscord        ConnectTelegramConnectDirectlyResponseAccountPlatform = "discord"
	ConnectTelegramConnectDirectlyResponseAccountPlatformSMS            ConnectTelegramConnectDirectlyResponseAccountPlatform = "sms"
)

func (ConnectTelegramConnectDirectlyResponseAccountPlatform) IsKnown

type ConnectTelegramInitiateConnectionResponse

type ConnectTelegramInitiateConnectionResponse struct {
	// Telegram bot username to message
	BotUsername string `json:"bot_username" api:"required"`
	// 6-character access code
	Code string `json:"code" api:"required"`
	// ISO 8601 expiry timestamp
	ExpiresAt time.Time `json:"expires_at" api:"required" format:"date-time"`
	// Seconds until code expires
	ExpiresIn int64 `json:"expires_in" api:"required"`
	// Step-by-step instructions for the user
	Instructions []string                                      `json:"instructions" api:"required"`
	JSON         connectTelegramInitiateConnectionResponseJSON `json:"-"`
}

func (*ConnectTelegramInitiateConnectionResponse) UnmarshalJSON

func (r *ConnectTelegramInitiateConnectionResponse) UnmarshalJSON(data []byte) (err error)

type ConnectTelegramPollConnectionStatusParams

type ConnectTelegramPollConnectionStatusParams struct {
	// The 6-character access code to check
	Code param.Field[string] `query:"code" api:"required"`
}

func (ConnectTelegramPollConnectionStatusParams) URLQuery

URLQuery serializes ConnectTelegramPollConnectionStatusParams's query parameters as `url.Values`.

type ConnectTelegramPollConnectionStatusResponse

type ConnectTelegramPollConnectionStatusResponse struct {
	// Current connection status
	Status ConnectTelegramPollConnectionStatusResponseStatus `json:"status" api:"required"`
	// Connected account details
	Account ConnectTelegramPollConnectionStatusResponseAccount `json:"account"`
	// Telegram chat ID once connected
	ChatID string `json:"chat_id"`
	// Chat or channel title
	ChatTitle string `json:"chat_title"`
	// Chat type (private, group, supergroup, channel)
	ChatType string `json:"chat_type"`
	// Code expiry timestamp
	ExpiresAt time.Time                                       `json:"expires_at" format:"date-time"`
	JSON      connectTelegramPollConnectionStatusResponseJSON `json:"-"`
}

func (*ConnectTelegramPollConnectionStatusResponse) UnmarshalJSON

func (r *ConnectTelegramPollConnectionStatusResponse) UnmarshalJSON(data []byte) (err error)

type ConnectTelegramPollConnectionStatusResponseAccount

type ConnectTelegramPollConnectionStatusResponseAccount struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             ConnectTelegramPollConnectionStatusResponseAccountGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                                     `json:"metadata" api:"required,nullable"`
	Platform          ConnectTelegramPollConnectionStatusResponseAccountPlatform `json:"platform" api:"required"`
	PlatformAccountID string                                                     `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                                  `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                                     `json:"username" api:"required,nullable"`
	JSON              connectTelegramPollConnectionStatusResponseAccountJSON     `json:"-"`
}

Connected account details

func (*ConnectTelegramPollConnectionStatusResponseAccount) UnmarshalJSON

func (r *ConnectTelegramPollConnectionStatusResponseAccount) UnmarshalJSON(data []byte) (err error)

type ConnectTelegramPollConnectionStatusResponseAccountGroup

type ConnectTelegramPollConnectionStatusResponseAccountGroup struct {
	ID   string                                                      `json:"id" api:"required"`
	Name string                                                      `json:"name" api:"required"`
	JSON connectTelegramPollConnectionStatusResponseAccountGroupJSON `json:"-"`
}

Account group

func (*ConnectTelegramPollConnectionStatusResponseAccountGroup) UnmarshalJSON

type ConnectTelegramPollConnectionStatusResponseAccountPlatform

type ConnectTelegramPollConnectionStatusResponseAccountPlatform string
const (
	ConnectTelegramPollConnectionStatusResponseAccountPlatformTwitter        ConnectTelegramPollConnectionStatusResponseAccountPlatform = "twitter"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformInstagram      ConnectTelegramPollConnectionStatusResponseAccountPlatform = "instagram"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformFacebook       ConnectTelegramPollConnectionStatusResponseAccountPlatform = "facebook"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformLinkedin       ConnectTelegramPollConnectionStatusResponseAccountPlatform = "linkedin"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformTiktok         ConnectTelegramPollConnectionStatusResponseAccountPlatform = "tiktok"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformYoutube        ConnectTelegramPollConnectionStatusResponseAccountPlatform = "youtube"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformPinterest      ConnectTelegramPollConnectionStatusResponseAccountPlatform = "pinterest"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformReddit         ConnectTelegramPollConnectionStatusResponseAccountPlatform = "reddit"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformBluesky        ConnectTelegramPollConnectionStatusResponseAccountPlatform = "bluesky"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformThreads        ConnectTelegramPollConnectionStatusResponseAccountPlatform = "threads"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformTelegram       ConnectTelegramPollConnectionStatusResponseAccountPlatform = "telegram"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformSnapchat       ConnectTelegramPollConnectionStatusResponseAccountPlatform = "snapchat"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformGooglebusiness ConnectTelegramPollConnectionStatusResponseAccountPlatform = "googlebusiness"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformWhatsapp       ConnectTelegramPollConnectionStatusResponseAccountPlatform = "whatsapp"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformMastodon       ConnectTelegramPollConnectionStatusResponseAccountPlatform = "mastodon"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformDiscord        ConnectTelegramPollConnectionStatusResponseAccountPlatform = "discord"
	ConnectTelegramPollConnectionStatusResponseAccountPlatformSMS            ConnectTelegramPollConnectionStatusResponseAccountPlatform = "sms"
)

func (ConnectTelegramPollConnectionStatusResponseAccountPlatform) IsKnown

type ConnectTelegramPollConnectionStatusResponseStatus

type ConnectTelegramPollConnectionStatusResponseStatus string

Current connection status

const (
	ConnectTelegramPollConnectionStatusResponseStatusPending   ConnectTelegramPollConnectionStatusResponseStatus = "pending"
	ConnectTelegramPollConnectionStatusResponseStatusConnected ConnectTelegramPollConnectionStatusResponseStatus = "connected"
	ConnectTelegramPollConnectionStatusResponseStatusExpired   ConnectTelegramPollConnectionStatusResponseStatus = "expired"
)

func (ConnectTelegramPollConnectionStatusResponseStatus) IsKnown

type ConnectTelegramService

type ConnectTelegramService struct {
	Options []option.RequestOption
}

ConnectTelegramService contains methods and other services that help with interacting with the relay 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 NewConnectTelegramService method instead.

func NewConnectTelegramService

func NewConnectTelegramService(opts ...option.RequestOption) (r *ConnectTelegramService)

NewConnectTelegramService 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 (*ConnectTelegramService) ConnectDirectly

Connect Telegram directly with chat ID

func (*ConnectTelegramService) InitiateConnection

Generates a 6-character access code (valid 15 minutes).

func (*ConnectTelegramService) PollConnectionStatus

Poll Telegram connection status

type ConnectWhatsappCompleteEmbeddedSignupParams

type ConnectWhatsappCompleteEmbeddedSignupParams struct {
	// Code from WhatsApp embedded signup flow
	Code param.Field[string] `json:"code" api:"required"`
}

func (ConnectWhatsappCompleteEmbeddedSignupParams) MarshalJSON

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

type ConnectWhatsappCompleteEmbeddedSignupResponse

type ConnectWhatsappCompleteEmbeddedSignupResponse struct {
	Account ConnectWhatsappCompleteEmbeddedSignupResponseAccount `json:"account" api:"required"`
	JSON    connectWhatsappCompleteEmbeddedSignupResponseJSON    `json:"-"`
}

func (*ConnectWhatsappCompleteEmbeddedSignupResponse) UnmarshalJSON

func (r *ConnectWhatsappCompleteEmbeddedSignupResponse) UnmarshalJSON(data []byte) (err error)

type ConnectWhatsappCompleteEmbeddedSignupResponseAccount

type ConnectWhatsappCompleteEmbeddedSignupResponseAccount struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             ConnectWhatsappCompleteEmbeddedSignupResponseAccountGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                                       `json:"metadata" api:"required,nullable"`
	Platform          ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform `json:"platform" api:"required"`
	PlatformAccountID string                                                       `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                                    `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                                       `json:"username" api:"required,nullable"`
	JSON              connectWhatsappCompleteEmbeddedSignupResponseAccountJSON     `json:"-"`
}

func (*ConnectWhatsappCompleteEmbeddedSignupResponseAccount) UnmarshalJSON

func (r *ConnectWhatsappCompleteEmbeddedSignupResponseAccount) UnmarshalJSON(data []byte) (err error)

type ConnectWhatsappCompleteEmbeddedSignupResponseAccountGroup

type ConnectWhatsappCompleteEmbeddedSignupResponseAccountGroup struct {
	ID   string                                                        `json:"id" api:"required"`
	Name string                                                        `json:"name" api:"required"`
	JSON connectWhatsappCompleteEmbeddedSignupResponseAccountGroupJSON `json:"-"`
}

Account group

func (*ConnectWhatsappCompleteEmbeddedSignupResponseAccountGroup) UnmarshalJSON

type ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform

type ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform string
const (
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformTwitter        ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "twitter"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformInstagram      ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "instagram"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformFacebook       ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "facebook"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformLinkedin       ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "linkedin"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformTiktok         ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "tiktok"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformYoutube        ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "youtube"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformPinterest      ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "pinterest"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformReddit         ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "reddit"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformBluesky        ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "bluesky"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformThreads        ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "threads"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformTelegram       ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "telegram"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformSnapchat       ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "snapchat"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformGooglebusiness ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "googlebusiness"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformWhatsapp       ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "whatsapp"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformMastodon       ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "mastodon"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformDiscord        ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "discord"
	ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformSMS            ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "sms"
)

func (ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform) IsKnown

type ConnectWhatsappConnectViaCredentialsParams

type ConnectWhatsappConnectViaCredentialsParams struct {
	// WhatsApp Business API access token
	AccessToken param.Field[string] `json:"access_token" api:"required"`
	// WhatsApp phone number ID
	PhoneNumberID param.Field[string] `json:"phone_number_id" api:"required"`
	// WhatsApp Business Account ID
	WabaID param.Field[string] `json:"waba_id" api:"required"`
}

func (ConnectWhatsappConnectViaCredentialsParams) MarshalJSON

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

type ConnectWhatsappConnectViaCredentialsResponse

type ConnectWhatsappConnectViaCredentialsResponse struct {
	Account ConnectWhatsappConnectViaCredentialsResponseAccount `json:"account" api:"required"`
	JSON    connectWhatsappConnectViaCredentialsResponseJSON    `json:"-"`
}

func (*ConnectWhatsappConnectViaCredentialsResponse) UnmarshalJSON

func (r *ConnectWhatsappConnectViaCredentialsResponse) UnmarshalJSON(data []byte) (err error)

type ConnectWhatsappConnectViaCredentialsResponseAccount

type ConnectWhatsappConnectViaCredentialsResponseAccount struct {
	// Account ID
	ID          string    `json:"id" api:"required"`
	AvatarURL   string    `json:"avatar_url" api:"required,nullable"`
	ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
	DisplayName string    `json:"display_name" api:"required,nullable"`
	// Account group
	Group             ConnectWhatsappConnectViaCredentialsResponseAccountGroup    `json:"group" api:"required,nullable"`
	Metadata          map[string]interface{}                                      `json:"metadata" api:"required,nullable"`
	Platform          ConnectWhatsappConnectViaCredentialsResponseAccountPlatform `json:"platform" api:"required"`
	PlatformAccountID string                                                      `json:"platform_account_id" api:"required"`
	UpdatedAt         time.Time                                                   `json:"updated_at" api:"required" format:"date-time"`
	Username          string                                                      `json:"username" api:"required,nullable"`
	JSON              connectWhatsappConnectViaCredentialsResponseAccountJSON     `json:"-"`
}

func (*ConnectWhatsappConnectViaCredentialsResponseAccount) UnmarshalJSON

func (r *ConnectWhatsappConnectViaCredentialsResponseAccount) UnmarshalJSON(data []byte) (err error)

type ConnectWhatsappConnectViaCredentialsResponseAccountGroup

type ConnectWhatsappConnectViaCredentialsResponseAccountGroup struct {
	ID   string                                                       `json:"id" api:"required"`
	Name string                                                       `json:"name" api:"required"`
	JSON connectWhatsappConnectViaCredentialsResponseAccountGroupJSON `json:"-"`
}

Account group

func (*ConnectWhatsappConnectViaCredentialsResponseAccountGroup) UnmarshalJSON

type ConnectWhatsappConnectViaCredentialsResponseAccountPlatform

type ConnectWhatsappConnectViaCredentialsResponseAccountPlatform string
const (
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformTwitter        ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "twitter"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformInstagram      ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "instagram"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformFacebook       ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "facebook"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformLinkedin       ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "linkedin"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformTiktok         ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "tiktok"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformYoutube        ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "youtube"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformPinterest      ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "pinterest"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformReddit         ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "reddit"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformBluesky        ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "bluesky"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformThreads        ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "threads"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformTelegram       ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "telegram"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformSnapchat       ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "snapchat"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformGooglebusiness ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "googlebusiness"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformWhatsapp       ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "whatsapp"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformMastodon       ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "mastodon"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformDiscord        ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "discord"
	ConnectWhatsappConnectViaCredentialsResponseAccountPlatformSMS            ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "sms"
)

func (ConnectWhatsappConnectViaCredentialsResponseAccountPlatform) IsKnown

type ConnectWhatsappGetSDKConfigResponse

type ConnectWhatsappGetSDKConfigResponse struct {
	// Facebook App ID for WhatsApp embedded signup
	AppID string `json:"app_id" api:"required"`
	// WhatsApp configuration ID
	ConfigID string                                  `json:"config_id" api:"required"`
	JSON     connectWhatsappGetSDKConfigResponseJSON `json:"-"`
}

func (*ConnectWhatsappGetSDKConfigResponse) UnmarshalJSON

func (r *ConnectWhatsappGetSDKConfigResponse) UnmarshalJSON(data []byte) (err error)

type ConnectWhatsappService

type ConnectWhatsappService struct {
	Options []option.RequestOption
}

ConnectWhatsappService contains methods and other services that help with interacting with the relay 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 NewConnectWhatsappService method instead.

func NewConnectWhatsappService

func NewConnectWhatsappService(opts ...option.RequestOption) (r *ConnectWhatsappService)

NewConnectWhatsappService 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 (*ConnectWhatsappService) CompleteEmbeddedSignup

Complete WhatsApp Embedded Signup

func (*ConnectWhatsappService) ConnectViaCredentials

Connect WhatsApp via System User credentials

func (*ConnectWhatsappService) GetSDKConfig

Get WhatsApp Embedded Signup SDK config

type ConnectionListLogsParams

type ConnectionListLogsParams struct {
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Filter: start date (ISO 8601)
	From param.Field[time.Time] `query:"from" format:"date-time"`
	// Number of items per page
	Limit param.Field[int64] `query:"limit"`
	// Filter: end date (ISO 8601)
	To param.Field[time.Time] `query:"to" format:"date-time"`
}

func (ConnectionListLogsParams) URLQuery

func (r ConnectionListLogsParams) URLQuery() (v url.Values)

URLQuery serializes ConnectionListLogsParams's query parameters as `url.Values`.

type ConnectionListLogsResponse

type ConnectionListLogsResponse struct {
	Data       []ConnectionListLogsResponseData `json:"data" api:"required"`
	HasMore    bool                             `json:"has_more" api:"required"`
	NextCursor string                           `json:"next_cursor" api:"required,nullable"`
	JSON       connectionListLogsResponseJSON   `json:"-"`
}

func (*ConnectionListLogsResponse) UnmarshalJSON

func (r *ConnectionListLogsResponse) UnmarshalJSON(data []byte) (err error)

type ConnectionListLogsResponseData

type ConnectionListLogsResponseData struct {
	// Log entry ID
	ID string `json:"id" api:"required"`
	// Social account ID
	AccountID string `json:"account_id" api:"required,nullable"`
	// Timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Event type
	Event ConnectionListLogsResponseDataEvent `json:"event" api:"required"`
	// Event details
	Message string `json:"message" api:"required,nullable"`
	// Platform name
	Platform string                             `json:"platform" api:"required"`
	JSON     connectionListLogsResponseDataJSON `json:"-"`
}

func (*ConnectionListLogsResponseData) UnmarshalJSON

func (r *ConnectionListLogsResponseData) UnmarshalJSON(data []byte) (err error)

type ConnectionListLogsResponseDataEvent

type ConnectionListLogsResponseDataEvent string

Event type

const (
	ConnectionListLogsResponseDataEventConnected      ConnectionListLogsResponseDataEvent = "connected"
	ConnectionListLogsResponseDataEventDisconnected   ConnectionListLogsResponseDataEvent = "disconnected"
	ConnectionListLogsResponseDataEventTokenRefreshed ConnectionListLogsResponseDataEvent = "token_refreshed"
	ConnectionListLogsResponseDataEventError          ConnectionListLogsResponseDataEvent = "error"
)

func (ConnectionListLogsResponseDataEvent) IsKnown

type ConnectionService

type ConnectionService struct {
	Options []option.RequestOption
}

ConnectionService contains methods and other services that help with interacting with the relay 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 NewConnectionService method instead.

func NewConnectionService

func NewConnectionService(opts ...option.RequestOption) (r *ConnectionService)

NewConnectionService 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 (*ConnectionService) ListLogs

Returns connection event history for the organization.

type Error

type Error = apierror.Error

type InboxCommentDeleteResponse

type InboxCommentDeleteResponse struct {
	// Whether the action succeeded
	Success bool `json:"success" api:"required"`
	// Comment ID
	CommentID string                         `json:"comment_id"`
	JSON      inboxCommentDeleteResponseJSON `json:"-"`
}

func (*InboxCommentDeleteResponse) UnmarshalJSON

func (r *InboxCommentDeleteResponse) UnmarshalJSON(data []byte) (err error)

type InboxCommentGetParams

type InboxCommentGetParams struct {
	// Filter by account ID
	AccountID param.Field[string] `query:"account_id"`
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Number of items
	Limit param.Field[int64] `query:"limit"`
	// Filter by platform
	Platform param.Field[InboxCommentGetParamsPlatform] `query:"platform"`
}

func (InboxCommentGetParams) URLQuery

func (r InboxCommentGetParams) URLQuery() (v url.Values)

URLQuery serializes InboxCommentGetParams's query parameters as `url.Values`.

type InboxCommentGetParamsPlatform

type InboxCommentGetParamsPlatform string

Filter by platform

const (
	InboxCommentGetParamsPlatformTwitter        InboxCommentGetParamsPlatform = "twitter"
	InboxCommentGetParamsPlatformInstagram      InboxCommentGetParamsPlatform = "instagram"
	InboxCommentGetParamsPlatformFacebook       InboxCommentGetParamsPlatform = "facebook"
	InboxCommentGetParamsPlatformLinkedin       InboxCommentGetParamsPlatform = "linkedin"
	InboxCommentGetParamsPlatformTiktok         InboxCommentGetParamsPlatform = "tiktok"
	InboxCommentGetParamsPlatformYoutube        InboxCommentGetParamsPlatform = "youtube"
	InboxCommentGetParamsPlatformPinterest      InboxCommentGetParamsPlatform = "pinterest"
	InboxCommentGetParamsPlatformReddit         InboxCommentGetParamsPlatform = "reddit"
	InboxCommentGetParamsPlatformBluesky        InboxCommentGetParamsPlatform = "bluesky"
	InboxCommentGetParamsPlatformThreads        InboxCommentGetParamsPlatform = "threads"
	InboxCommentGetParamsPlatformTelegram       InboxCommentGetParamsPlatform = "telegram"
	InboxCommentGetParamsPlatformSnapchat       InboxCommentGetParamsPlatform = "snapchat"
	InboxCommentGetParamsPlatformGooglebusiness InboxCommentGetParamsPlatform = "googlebusiness"
	InboxCommentGetParamsPlatformWhatsapp       InboxCommentGetParamsPlatform = "whatsapp"
	InboxCommentGetParamsPlatformMastodon       InboxCommentGetParamsPlatform = "mastodon"
	InboxCommentGetParamsPlatformDiscord        InboxCommentGetParamsPlatform = "discord"
	InboxCommentGetParamsPlatformSMS            InboxCommentGetParamsPlatform = "sms"
)

func (InboxCommentGetParamsPlatform) IsKnown

func (r InboxCommentGetParamsPlatform) IsKnown() bool

type InboxCommentGetResponse

type InboxCommentGetResponse struct {
	Data       []InboxCommentGetResponseData   `json:"data" api:"required"`
	HasMore    bool                            `json:"has_more"`
	NextCursor string                          `json:"next_cursor" api:"nullable"`
	Platform   InboxCommentGetResponsePlatform `json:"platform"`
	// Post ID if filtered by post
	PostID string                      `json:"post_id"`
	JSON   inboxCommentGetResponseJSON `json:"-"`
}

func (*InboxCommentGetResponse) UnmarshalJSON

func (r *InboxCommentGetResponse) UnmarshalJSON(data []byte) (err error)

type InboxCommentGetResponseData

type InboxCommentGetResponseData struct {
	// Comment ID
	ID string `json:"id" api:"required"`
	// Comment author name
	AuthorName string `json:"author_name" api:"required"`
	// Comment timestamp
	CreatedAt time.Time                           `json:"created_at" api:"required" format:"date-time"`
	Platform  InboxCommentGetResponseDataPlatform `json:"platform" api:"required"`
	// Comment text
	Text string `json:"text" api:"required"`
	// Social account ID
	AccountID string `json:"account_id"`
	// Author avatar URL
	AuthorAvatar string `json:"author_avatar" api:"nullable"`
	// Whether comment is hidden
	Hidden bool `json:"hidden"`
	// Like count
	Likes float64 `json:"likes"`
	// Platform post/media/video ID
	PostID string `json:"post_id"`
	// URL to the post on the platform
	PostPlatformURL string `json:"post_platform_url" api:"nullable"`
	// Post caption snippet
	PostText string `json:"post_text" api:"nullable"`
	// Post thumbnail URL
	PostThumbnailURL string `json:"post_thumbnail_url" api:"nullable"`
	// Reply count
	RepliesCount float64                         `json:"replies_count"`
	JSON         inboxCommentGetResponseDataJSON `json:"-"`
}

func (*InboxCommentGetResponseData) UnmarshalJSON

func (r *InboxCommentGetResponseData) UnmarshalJSON(data []byte) (err error)

type InboxCommentGetResponseDataPlatform

type InboxCommentGetResponseDataPlatform string
const (
	InboxCommentGetResponseDataPlatformTwitter        InboxCommentGetResponseDataPlatform = "twitter"
	InboxCommentGetResponseDataPlatformInstagram      InboxCommentGetResponseDataPlatform = "instagram"
	InboxCommentGetResponseDataPlatformFacebook       InboxCommentGetResponseDataPlatform = "facebook"
	InboxCommentGetResponseDataPlatformLinkedin       InboxCommentGetResponseDataPlatform = "linkedin"
	InboxCommentGetResponseDataPlatformTiktok         InboxCommentGetResponseDataPlatform = "tiktok"
	InboxCommentGetResponseDataPlatformYoutube        InboxCommentGetResponseDataPlatform = "youtube"
	InboxCommentGetResponseDataPlatformPinterest      InboxCommentGetResponseDataPlatform = "pinterest"
	InboxCommentGetResponseDataPlatformReddit         InboxCommentGetResponseDataPlatform = "reddit"
	InboxCommentGetResponseDataPlatformBluesky        InboxCommentGetResponseDataPlatform = "bluesky"
	InboxCommentGetResponseDataPlatformThreads        InboxCommentGetResponseDataPlatform = "threads"
	InboxCommentGetResponseDataPlatformTelegram       InboxCommentGetResponseDataPlatform = "telegram"
	InboxCommentGetResponseDataPlatformSnapchat       InboxCommentGetResponseDataPlatform = "snapchat"
	InboxCommentGetResponseDataPlatformGooglebusiness InboxCommentGetResponseDataPlatform = "googlebusiness"
	InboxCommentGetResponseDataPlatformWhatsapp       InboxCommentGetResponseDataPlatform = "whatsapp"
	InboxCommentGetResponseDataPlatformMastodon       InboxCommentGetResponseDataPlatform = "mastodon"
	InboxCommentGetResponseDataPlatformDiscord        InboxCommentGetResponseDataPlatform = "discord"
	InboxCommentGetResponseDataPlatformSMS            InboxCommentGetResponseDataPlatform = "sms"
)

func (InboxCommentGetResponseDataPlatform) IsKnown

type InboxCommentGetResponsePlatform

type InboxCommentGetResponsePlatform string
const (
	InboxCommentGetResponsePlatformTwitter        InboxCommentGetResponsePlatform = "twitter"
	InboxCommentGetResponsePlatformInstagram      InboxCommentGetResponsePlatform = "instagram"
	InboxCommentGetResponsePlatformFacebook       InboxCommentGetResponsePlatform = "facebook"
	InboxCommentGetResponsePlatformLinkedin       InboxCommentGetResponsePlatform = "linkedin"
	InboxCommentGetResponsePlatformTiktok         InboxCommentGetResponsePlatform = "tiktok"
	InboxCommentGetResponsePlatformYoutube        InboxCommentGetResponsePlatform = "youtube"
	InboxCommentGetResponsePlatformPinterest      InboxCommentGetResponsePlatform = "pinterest"
	InboxCommentGetResponsePlatformReddit         InboxCommentGetResponsePlatform = "reddit"
	InboxCommentGetResponsePlatformBluesky        InboxCommentGetResponsePlatform = "bluesky"
	InboxCommentGetResponsePlatformThreads        InboxCommentGetResponsePlatform = "threads"
	InboxCommentGetResponsePlatformTelegram       InboxCommentGetResponsePlatform = "telegram"
	InboxCommentGetResponsePlatformSnapchat       InboxCommentGetResponsePlatform = "snapchat"
	InboxCommentGetResponsePlatformGooglebusiness InboxCommentGetResponsePlatform = "googlebusiness"
	InboxCommentGetResponsePlatformWhatsapp       InboxCommentGetResponsePlatform = "whatsapp"
	InboxCommentGetResponsePlatformMastodon       InboxCommentGetResponsePlatform = "mastodon"
	InboxCommentGetResponsePlatformDiscord        InboxCommentGetResponsePlatform = "discord"
	InboxCommentGetResponsePlatformSMS            InboxCommentGetResponsePlatform = "sms"
)

func (InboxCommentGetResponsePlatform) IsKnown

type InboxCommentHideDeleteResponse

type InboxCommentHideDeleteResponse struct {
	// Whether the action succeeded
	Success bool `json:"success" api:"required"`
	// Comment ID
	CommentID string                             `json:"comment_id"`
	JSON      inboxCommentHideDeleteResponseJSON `json:"-"`
}

func (*InboxCommentHideDeleteResponse) UnmarshalJSON

func (r *InboxCommentHideDeleteResponse) UnmarshalJSON(data []byte) (err error)

type InboxCommentHideNewResponse

type InboxCommentHideNewResponse struct {
	// Whether the action succeeded
	Success bool `json:"success" api:"required"`
	// Comment ID
	CommentID string                          `json:"comment_id"`
	JSON      inboxCommentHideNewResponseJSON `json:"-"`
}

func (*InboxCommentHideNewResponse) UnmarshalJSON

func (r *InboxCommentHideNewResponse) UnmarshalJSON(data []byte) (err error)

type InboxCommentHideService

type InboxCommentHideService struct {
	Options []option.RequestOption
}

InboxCommentHideService contains methods and other services that help with interacting with the relay 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 NewInboxCommentHideService method instead.

func NewInboxCommentHideService

func NewInboxCommentHideService(opts ...option.RequestOption) (r *InboxCommentHideService)

NewInboxCommentHideService 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 (*InboxCommentHideService) Delete

Unhide a comment

func (*InboxCommentHideService) New

Hide a comment

type InboxCommentLikeDeleteResponse

type InboxCommentLikeDeleteResponse struct {
	// Whether the action succeeded
	Success bool `json:"success" api:"required"`
	// Comment ID
	CommentID string                             `json:"comment_id"`
	JSON      inboxCommentLikeDeleteResponseJSON `json:"-"`
}

func (*InboxCommentLikeDeleteResponse) UnmarshalJSON

func (r *InboxCommentLikeDeleteResponse) UnmarshalJSON(data []byte) (err error)

type InboxCommentLikeNewResponse

type InboxCommentLikeNewResponse struct {
	// Whether the action succeeded
	Success bool `json:"success" api:"required"`
	// Comment ID
	CommentID string                          `json:"comment_id"`
	JSON      inboxCommentLikeNewResponseJSON `json:"-"`
}

func (*InboxCommentLikeNewResponse) UnmarshalJSON

func (r *InboxCommentLikeNewResponse) UnmarshalJSON(data []byte) (err error)

type InboxCommentLikeService

type InboxCommentLikeService struct {
	Options []option.RequestOption
}

InboxCommentLikeService contains methods and other services that help with interacting with the relay 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 NewInboxCommentLikeService method instead.

func NewInboxCommentLikeService

func NewInboxCommentLikeService(opts ...option.RequestOption) (r *InboxCommentLikeService)

NewInboxCommentLikeService 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 (*InboxCommentLikeService) Delete

Unlike a comment

func (*InboxCommentLikeService) New

Like a comment

type InboxCommentListParams

type InboxCommentListParams struct {
	// Filter by account ID
	AccountID param.Field[string] `query:"account_id"`
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Number of items
	Limit param.Field[int64] `query:"limit"`
	// Filter by platform
	Platform param.Field[InboxCommentListParamsPlatform] `query:"platform"`
}

func (InboxCommentListParams) URLQuery

func (r InboxCommentListParams) URLQuery() (v url.Values)

URLQuery serializes InboxCommentListParams's query parameters as `url.Values`.

type InboxCommentListParamsPlatform

type InboxCommentListParamsPlatform string

Filter by platform

const (
	InboxCommentListParamsPlatformTwitter        InboxCommentListParamsPlatform = "twitter"
	InboxCommentListParamsPlatformInstagram      InboxCommentListParamsPlatform = "instagram"
	InboxCommentListParamsPlatformFacebook       InboxCommentListParamsPlatform = "facebook"
	InboxCommentListParamsPlatformLinkedin       InboxCommentListParamsPlatform = "linkedin"
	InboxCommentListParamsPlatformTiktok         InboxCommentListParamsPlatform = "tiktok"
	InboxCommentListParamsPlatformYoutube        InboxCommentListParamsPlatform = "youtube"
	InboxCommentListParamsPlatformPinterest      InboxCommentListParamsPlatform = "pinterest"
	InboxCommentListParamsPlatformReddit         InboxCommentListParamsPlatform = "reddit"
	InboxCommentListParamsPlatformBluesky        InboxCommentListParamsPlatform = "bluesky"
	InboxCommentListParamsPlatformThreads        InboxCommentListParamsPlatform = "threads"
	InboxCommentListParamsPlatformTelegram       InboxCommentListParamsPlatform = "telegram"
	InboxCommentListParamsPlatformSnapchat       InboxCommentListParamsPlatform = "snapchat"
	InboxCommentListParamsPlatformGooglebusiness InboxCommentListParamsPlatform = "googlebusiness"
	InboxCommentListParamsPlatformWhatsapp       InboxCommentListParamsPlatform = "whatsapp"
	InboxCommentListParamsPlatformMastodon       InboxCommentListParamsPlatform = "mastodon"
	InboxCommentListParamsPlatformDiscord        InboxCommentListParamsPlatform = "discord"
	InboxCommentListParamsPlatformSMS            InboxCommentListParamsPlatform = "sms"
)

func (InboxCommentListParamsPlatform) IsKnown

type InboxCommentListResponse

type InboxCommentListResponse struct {
	Data       []InboxCommentListResponseData   `json:"data" api:"required"`
	HasMore    bool                             `json:"has_more"`
	NextCursor string                           `json:"next_cursor" api:"nullable"`
	Platform   InboxCommentListResponsePlatform `json:"platform"`
	// Post ID if filtered by post
	PostID string                       `json:"post_id"`
	JSON   inboxCommentListResponseJSON `json:"-"`
}

func (*InboxCommentListResponse) UnmarshalJSON

func (r *InboxCommentListResponse) UnmarshalJSON(data []byte) (err error)

type InboxCommentListResponseData

type InboxCommentListResponseData struct {
	// Comment ID
	ID string `json:"id" api:"required"`
	// Comment author name
	AuthorName string `json:"author_name" api:"required"`
	// Comment timestamp
	CreatedAt time.Time                            `json:"created_at" api:"required" format:"date-time"`
	Platform  InboxCommentListResponseDataPlatform `json:"platform" api:"required"`
	// Comment text
	Text string `json:"text" api:"required"`
	// Social account ID
	AccountID string `json:"account_id"`
	// Author avatar URL
	AuthorAvatar string `json:"author_avatar" api:"nullable"`
	// Whether comment is hidden
	Hidden bool `json:"hidden"`
	// Like count
	Likes float64 `json:"likes"`
	// Platform post/media/video ID
	PostID string `json:"post_id"`
	// URL to the post on the platform
	PostPlatformURL string `json:"post_platform_url" api:"nullable"`
	// Post caption snippet
	PostText string `json:"post_text" api:"nullable"`
	// Post thumbnail URL
	PostThumbnailURL string `json:"post_thumbnail_url" api:"nullable"`
	// Reply count
	RepliesCount float64                          `json:"replies_count"`
	JSON         inboxCommentListResponseDataJSON `json:"-"`
}

func (*InboxCommentListResponseData) UnmarshalJSON

func (r *InboxCommentListResponseData) UnmarshalJSON(data []byte) (err error)

type InboxCommentListResponseDataPlatform

type InboxCommentListResponseDataPlatform string
const (
	InboxCommentListResponseDataPlatformTwitter        InboxCommentListResponseDataPlatform = "twitter"
	InboxCommentListResponseDataPlatformInstagram      InboxCommentListResponseDataPlatform = "instagram"
	InboxCommentListResponseDataPlatformFacebook       InboxCommentListResponseDataPlatform = "facebook"
	InboxCommentListResponseDataPlatformLinkedin       InboxCommentListResponseDataPlatform = "linkedin"
	InboxCommentListResponseDataPlatformTiktok         InboxCommentListResponseDataPlatform = "tiktok"
	InboxCommentListResponseDataPlatformYoutube        InboxCommentListResponseDataPlatform = "youtube"
	InboxCommentListResponseDataPlatformPinterest      InboxCommentListResponseDataPlatform = "pinterest"
	InboxCommentListResponseDataPlatformReddit         InboxCommentListResponseDataPlatform = "reddit"
	InboxCommentListResponseDataPlatformBluesky        InboxCommentListResponseDataPlatform = "bluesky"
	InboxCommentListResponseDataPlatformThreads        InboxCommentListResponseDataPlatform = "threads"
	InboxCommentListResponseDataPlatformTelegram       InboxCommentListResponseDataPlatform = "telegram"
	InboxCommentListResponseDataPlatformSnapchat       InboxCommentListResponseDataPlatform = "snapchat"
	InboxCommentListResponseDataPlatformGooglebusiness InboxCommentListResponseDataPlatform = "googlebusiness"
	InboxCommentListResponseDataPlatformWhatsapp       InboxCommentListResponseDataPlatform = "whatsapp"
	InboxCommentListResponseDataPlatformMastodon       InboxCommentListResponseDataPlatform = "mastodon"
	InboxCommentListResponseDataPlatformDiscord        InboxCommentListResponseDataPlatform = "discord"
	InboxCommentListResponseDataPlatformSMS            InboxCommentListResponseDataPlatform = "sms"
)

func (InboxCommentListResponseDataPlatform) IsKnown

type InboxCommentListResponsePlatform

type InboxCommentListResponsePlatform string
const (
	InboxCommentListResponsePlatformTwitter        InboxCommentListResponsePlatform = "twitter"
	InboxCommentListResponsePlatformInstagram      InboxCommentListResponsePlatform = "instagram"
	InboxCommentListResponsePlatformFacebook       InboxCommentListResponsePlatform = "facebook"
	InboxCommentListResponsePlatformLinkedin       InboxCommentListResponsePlatform = "linkedin"
	InboxCommentListResponsePlatformTiktok         InboxCommentListResponsePlatform = "tiktok"
	InboxCommentListResponsePlatformYoutube        InboxCommentListResponsePlatform = "youtube"
	InboxCommentListResponsePlatformPinterest      InboxCommentListResponsePlatform = "pinterest"
	InboxCommentListResponsePlatformReddit         InboxCommentListResponsePlatform = "reddit"
	InboxCommentListResponsePlatformBluesky        InboxCommentListResponsePlatform = "bluesky"
	InboxCommentListResponsePlatformThreads        InboxCommentListResponsePlatform = "threads"
	InboxCommentListResponsePlatformTelegram       InboxCommentListResponsePlatform = "telegram"
	InboxCommentListResponsePlatformSnapchat       InboxCommentListResponsePlatform = "snapchat"
	InboxCommentListResponsePlatformGooglebusiness InboxCommentListResponsePlatform = "googlebusiness"
	InboxCommentListResponsePlatformWhatsapp       InboxCommentListResponsePlatform = "whatsapp"
	InboxCommentListResponsePlatformMastodon       InboxCommentListResponsePlatform = "mastodon"
	InboxCommentListResponsePlatformDiscord        InboxCommentListResponsePlatform = "discord"
	InboxCommentListResponsePlatformSMS            InboxCommentListResponsePlatform = "sms"
)

func (InboxCommentListResponsePlatform) IsKnown

type InboxCommentPrivateReplyParams

type InboxCommentPrivateReplyParams struct {
	// Account ID to reply from
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Private reply text
	Text param.Field[string] `json:"text" api:"required"`
}

func (InboxCommentPrivateReplyParams) MarshalJSON

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

type InboxCommentPrivateReplyResponse

type InboxCommentPrivateReplyResponse struct {
	// Whether the action succeeded
	Success bool `json:"success" api:"required"`
	// Comment ID
	CommentID string                               `json:"comment_id"`
	JSON      inboxCommentPrivateReplyResponseJSON `json:"-"`
}

func (*InboxCommentPrivateReplyResponse) UnmarshalJSON

func (r *InboxCommentPrivateReplyResponse) UnmarshalJSON(data []byte) (err error)

type InboxCommentReplyParams

type InboxCommentReplyParams struct {
	// Account ID to reply from
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Reply text
	Text param.Field[string] `json:"text" api:"required"`
	// Parent comment ID for threaded replies
	CommentID param.Field[string] `json:"comment_id"`
}

func (InboxCommentReplyParams) MarshalJSON

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

type InboxCommentReplyResponse

type InboxCommentReplyResponse struct {
	// Whether the action succeeded
	Success bool `json:"success" api:"required"`
	// Comment ID
	CommentID string                        `json:"comment_id"`
	JSON      inboxCommentReplyResponseJSON `json:"-"`
}

func (*InboxCommentReplyResponse) UnmarshalJSON

func (r *InboxCommentReplyResponse) UnmarshalJSON(data []byte) (err error)

type InboxCommentService

type InboxCommentService struct {
	Options []option.RequestOption
	Hide    *InboxCommentHideService
	Like    *InboxCommentLikeService
}

InboxCommentService contains methods and other services that help with interacting with the relay 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 NewInboxCommentService method instead.

func NewInboxCommentService

func NewInboxCommentService(opts ...option.RequestOption) (r *InboxCommentService)

NewInboxCommentService 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 (*InboxCommentService) Delete

func (r *InboxCommentService) Delete(ctx context.Context, commentID string, opts ...option.RequestOption) (res *InboxCommentDeleteResponse, err error)

Delete a comment

func (*InboxCommentService) Get

Get comments for a specific post

func (*InboxCommentService) List

List comments across platforms

func (*InboxCommentService) PrivateReply

Send a private reply to a commenter

func (*InboxCommentService) Reply

Reply to a comment

type InboxMessageArchiveResponse

type InboxMessageArchiveResponse struct {
	// Whether the action succeeded
	Success bool `json:"success" api:"required"`
	// Message ID
	MessageID string                          `json:"message_id"`
	JSON      inboxMessageArchiveResponseJSON `json:"-"`
}

func (*InboxMessageArchiveResponse) UnmarshalJSON

func (r *InboxMessageArchiveResponse) UnmarshalJSON(data []byte) (err error)

type InboxMessageEditParams

type InboxMessageEditParams struct {
	// Updated message text
	Text param.Field[string] `json:"text" api:"required"`
}

func (InboxMessageEditParams) MarshalJSON

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

type InboxMessageEditResponse

type InboxMessageEditResponse struct {
	// Whether the action succeeded
	Success bool `json:"success" api:"required"`
	// Message ID
	MessageID string                       `json:"message_id"`
	JSON      inboxMessageEditResponseJSON `json:"-"`
}

func (*InboxMessageEditResponse) UnmarshalJSON

func (r *InboxMessageEditResponse) UnmarshalJSON(data []byte) (err error)

type InboxMessageGetResponse

type InboxMessageGetResponse struct {
	Data       []InboxMessageGetResponseData `json:"data" api:"required"`
	HasMore    bool                          `json:"has_more"`
	NextCursor string                        `json:"next_cursor" api:"nullable"`
	JSON       inboxMessageGetResponseJSON   `json:"-"`
}

func (*InboxMessageGetResponse) UnmarshalJSON

func (r *InboxMessageGetResponse) UnmarshalJSON(data []byte) (err error)

type InboxMessageGetResponseData

type InboxMessageGetResponseData struct {
	// Message ID
	ID string `json:"id" api:"required"`
	// Message timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Message sender
	Sender InboxMessageGetResponseDataSender `json:"sender" api:"required"`
	// Message text
	Text string `json:"text" api:"required"`
	// Message attachments
	Attachments []InboxMessageGetResponseDataAttachment `json:"attachments"`
	JSON        inboxMessageGetResponseDataJSON         `json:"-"`
}

func (*InboxMessageGetResponseData) UnmarshalJSON

func (r *InboxMessageGetResponseData) UnmarshalJSON(data []byte) (err error)

type InboxMessageGetResponseDataAttachment

type InboxMessageGetResponseDataAttachment struct {
	// Attachment MIME type
	Type string `json:"type" api:"required"`
	// Attachment URL
	URL  string                                    `json:"url" api:"required"`
	JSON inboxMessageGetResponseDataAttachmentJSON `json:"-"`
}

func (*InboxMessageGetResponseDataAttachment) UnmarshalJSON

func (r *InboxMessageGetResponseDataAttachment) UnmarshalJSON(data []byte) (err error)

type InboxMessageGetResponseDataSender

type InboxMessageGetResponseDataSender string

Message sender

const (
	InboxMessageGetResponseDataSenderUser        InboxMessageGetResponseDataSender = "user"
	InboxMessageGetResponseDataSenderParticipant InboxMessageGetResponseDataSender = "participant"
)

func (InboxMessageGetResponseDataSender) IsKnown

type InboxMessageListParams

type InboxMessageListParams struct {
	// Filter by account ID
	AccountID param.Field[string] `query:"account_id"`
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Number of items
	Limit param.Field[int64] `query:"limit"`
	// Filter by platform
	Platform param.Field[InboxMessageListParamsPlatform] `query:"platform"`
}

func (InboxMessageListParams) URLQuery

func (r InboxMessageListParams) URLQuery() (v url.Values)

URLQuery serializes InboxMessageListParams's query parameters as `url.Values`.

type InboxMessageListParamsPlatform

type InboxMessageListParamsPlatform string

Filter by platform

const (
	InboxMessageListParamsPlatformTwitter        InboxMessageListParamsPlatform = "twitter"
	InboxMessageListParamsPlatformInstagram      InboxMessageListParamsPlatform = "instagram"
	InboxMessageListParamsPlatformFacebook       InboxMessageListParamsPlatform = "facebook"
	InboxMessageListParamsPlatformLinkedin       InboxMessageListParamsPlatform = "linkedin"
	InboxMessageListParamsPlatformTiktok         InboxMessageListParamsPlatform = "tiktok"
	InboxMessageListParamsPlatformYoutube        InboxMessageListParamsPlatform = "youtube"
	InboxMessageListParamsPlatformPinterest      InboxMessageListParamsPlatform = "pinterest"
	InboxMessageListParamsPlatformReddit         InboxMessageListParamsPlatform = "reddit"
	InboxMessageListParamsPlatformBluesky        InboxMessageListParamsPlatform = "bluesky"
	InboxMessageListParamsPlatformThreads        InboxMessageListParamsPlatform = "threads"
	InboxMessageListParamsPlatformTelegram       InboxMessageListParamsPlatform = "telegram"
	InboxMessageListParamsPlatformSnapchat       InboxMessageListParamsPlatform = "snapchat"
	InboxMessageListParamsPlatformGooglebusiness InboxMessageListParamsPlatform = "googlebusiness"
	InboxMessageListParamsPlatformWhatsapp       InboxMessageListParamsPlatform = "whatsapp"
	InboxMessageListParamsPlatformMastodon       InboxMessageListParamsPlatform = "mastodon"
	InboxMessageListParamsPlatformDiscord        InboxMessageListParamsPlatform = "discord"
	InboxMessageListParamsPlatformSMS            InboxMessageListParamsPlatform = "sms"
)

func (InboxMessageListParamsPlatform) IsKnown

type InboxMessageListResponse

type InboxMessageListResponse struct {
	Data []InboxMessageListResponseData `json:"data" api:"required"`
	// Whether more items exist
	HasMore bool `json:"has_more" api:"required"`
	// Cursor for next page
	NextCursor string                       `json:"next_cursor" api:"required,nullable"`
	JSON       inboxMessageListResponseJSON `json:"-"`
}

func (*InboxMessageListResponse) UnmarshalJSON

func (r *InboxMessageListResponse) UnmarshalJSON(data []byte) (err error)

type InboxMessageListResponseData

type InboxMessageListResponseData struct {
	// Conversation ID
	ID string `json:"id" api:"required"`
	// Account ID
	AccountID string `json:"account_id" api:"required"`
	// Participant display name
	ParticipantName string                               `json:"participant_name" api:"required"`
	Platform        InboxMessageListResponseDataPlatform `json:"platform" api:"required"`
	// Last updated timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Last message text
	LastMessage string `json:"last_message" api:"nullable"`
	// Participant avatar URL
	ParticipantAvatar string `json:"participant_avatar" api:"nullable"`
	// Unread message count
	UnreadCount float64                          `json:"unread_count"`
	JSON        inboxMessageListResponseDataJSON `json:"-"`
}

func (*InboxMessageListResponseData) UnmarshalJSON

func (r *InboxMessageListResponseData) UnmarshalJSON(data []byte) (err error)

type InboxMessageListResponseDataPlatform

type InboxMessageListResponseDataPlatform string
const (
	InboxMessageListResponseDataPlatformTwitter        InboxMessageListResponseDataPlatform = "twitter"
	InboxMessageListResponseDataPlatformInstagram      InboxMessageListResponseDataPlatform = "instagram"
	InboxMessageListResponseDataPlatformFacebook       InboxMessageListResponseDataPlatform = "facebook"
	InboxMessageListResponseDataPlatformLinkedin       InboxMessageListResponseDataPlatform = "linkedin"
	InboxMessageListResponseDataPlatformTiktok         InboxMessageListResponseDataPlatform = "tiktok"
	InboxMessageListResponseDataPlatformYoutube        InboxMessageListResponseDataPlatform = "youtube"
	InboxMessageListResponseDataPlatformPinterest      InboxMessageListResponseDataPlatform = "pinterest"
	InboxMessageListResponseDataPlatformReddit         InboxMessageListResponseDataPlatform = "reddit"
	InboxMessageListResponseDataPlatformBluesky        InboxMessageListResponseDataPlatform = "bluesky"
	InboxMessageListResponseDataPlatformThreads        InboxMessageListResponseDataPlatform = "threads"
	InboxMessageListResponseDataPlatformTelegram       InboxMessageListResponseDataPlatform = "telegram"
	InboxMessageListResponseDataPlatformSnapchat       InboxMessageListResponseDataPlatform = "snapchat"
	InboxMessageListResponseDataPlatformGooglebusiness InboxMessageListResponseDataPlatform = "googlebusiness"
	InboxMessageListResponseDataPlatformWhatsapp       InboxMessageListResponseDataPlatform = "whatsapp"
	InboxMessageListResponseDataPlatformMastodon       InboxMessageListResponseDataPlatform = "mastodon"
	InboxMessageListResponseDataPlatformDiscord        InboxMessageListResponseDataPlatform = "discord"
	InboxMessageListResponseDataPlatformSMS            InboxMessageListResponseDataPlatform = "sms"
)

func (InboxMessageListResponseDataPlatform) IsKnown

type InboxMessageSendParams

type InboxMessageSendParams struct {
	// Account ID to send from
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Message text
	Text param.Field[string] `json:"text" api:"required"`
	// Attachments
	Attachments param.Field[[]InboxMessageSendParamsAttachment] `json:"attachments"`
	// Message tag (e.g. for Facebook outside 24h window)
	MessageTag param.Field[string] `json:"message_tag"`
	// Message ID to reply to
	ReplyTo param.Field[string] `json:"reply_to"`
}

func (InboxMessageSendParams) MarshalJSON

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

type InboxMessageSendParamsAttachment

type InboxMessageSendParamsAttachment struct {
	// Attachment MIME type
	Type param.Field[string] `json:"type" api:"required"`
	// Attachment URL
	URL param.Field[string] `json:"url" api:"required" format:"uri"`
}

func (InboxMessageSendParamsAttachment) MarshalJSON

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

type InboxMessageSendResponse

type InboxMessageSendResponse struct {
	// Whether the action succeeded
	Success bool `json:"success" api:"required"`
	// Message ID
	MessageID string                       `json:"message_id"`
	JSON      inboxMessageSendResponseJSON `json:"-"`
}

func (*InboxMessageSendResponse) UnmarshalJSON

func (r *InboxMessageSendResponse) UnmarshalJSON(data []byte) (err error)

type InboxMessageService

type InboxMessageService struct {
	Options []option.RequestOption
}

InboxMessageService contains methods and other services that help with interacting with the relay 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 NewInboxMessageService method instead.

func NewInboxMessageService

func NewInboxMessageService(opts ...option.RequestOption) (r *InboxMessageService)

NewInboxMessageService 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 (*InboxMessageService) Archive

func (r *InboxMessageService) Archive(ctx context.Context, conversationID string, opts ...option.RequestOption) (res *InboxMessageArchiveResponse, err error)

Archive a conversation

func (*InboxMessageService) Edit

func (r *InboxMessageService) Edit(ctx context.Context, conversationID string, messageID string, body InboxMessageEditParams, opts ...option.RequestOption) (res *InboxMessageEditResponse, err error)

Edit a sent message

func (*InboxMessageService) Get

func (r *InboxMessageService) Get(ctx context.Context, conversationID string, opts ...option.RequestOption) (res *InboxMessageGetResponse, err error)

Get messages in a conversation

func (*InboxMessageService) List

List message conversations

func (*InboxMessageService) Send

func (r *InboxMessageService) Send(ctx context.Context, conversationID string, body InboxMessageSendParams, opts ...option.RequestOption) (res *InboxMessageSendResponse, err error)

Send a message in a conversation

type InboxReviewListParams

type InboxReviewListParams struct {
	// Filter by account ID
	AccountID param.Field[string] `query:"account_id"`
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Number of items
	Limit     param.Field[int64] `query:"limit"`
	MaxRating param.Field[int64] `query:"max_rating"`
	MinRating param.Field[int64] `query:"min_rating"`
	// Filter by platform
	Platform param.Field[InboxReviewListParamsPlatform] `query:"platform"`
}

func (InboxReviewListParams) URLQuery

func (r InboxReviewListParams) URLQuery() (v url.Values)

URLQuery serializes InboxReviewListParams's query parameters as `url.Values`.

type InboxReviewListParamsPlatform

type InboxReviewListParamsPlatform string

Filter by platform

const (
	InboxReviewListParamsPlatformTwitter        InboxReviewListParamsPlatform = "twitter"
	InboxReviewListParamsPlatformInstagram      InboxReviewListParamsPlatform = "instagram"
	InboxReviewListParamsPlatformFacebook       InboxReviewListParamsPlatform = "facebook"
	InboxReviewListParamsPlatformLinkedin       InboxReviewListParamsPlatform = "linkedin"
	InboxReviewListParamsPlatformTiktok         InboxReviewListParamsPlatform = "tiktok"
	InboxReviewListParamsPlatformYoutube        InboxReviewListParamsPlatform = "youtube"
	InboxReviewListParamsPlatformPinterest      InboxReviewListParamsPlatform = "pinterest"
	InboxReviewListParamsPlatformReddit         InboxReviewListParamsPlatform = "reddit"
	InboxReviewListParamsPlatformBluesky        InboxReviewListParamsPlatform = "bluesky"
	InboxReviewListParamsPlatformThreads        InboxReviewListParamsPlatform = "threads"
	InboxReviewListParamsPlatformTelegram       InboxReviewListParamsPlatform = "telegram"
	InboxReviewListParamsPlatformSnapchat       InboxReviewListParamsPlatform = "snapchat"
	InboxReviewListParamsPlatformGooglebusiness InboxReviewListParamsPlatform = "googlebusiness"
	InboxReviewListParamsPlatformWhatsapp       InboxReviewListParamsPlatform = "whatsapp"
	InboxReviewListParamsPlatformMastodon       InboxReviewListParamsPlatform = "mastodon"
	InboxReviewListParamsPlatformDiscord        InboxReviewListParamsPlatform = "discord"
	InboxReviewListParamsPlatformSMS            InboxReviewListParamsPlatform = "sms"
)

func (InboxReviewListParamsPlatform) IsKnown

func (r InboxReviewListParamsPlatform) IsKnown() bool

type InboxReviewListResponse

type InboxReviewListResponse struct {
	Data []InboxReviewListResponseData `json:"data" api:"required"`
	// Whether more items exist
	HasMore bool `json:"has_more" api:"required"`
	// Cursor for next page
	NextCursor string                      `json:"next_cursor" api:"required,nullable"`
	JSON       inboxReviewListResponseJSON `json:"-"`
}

func (*InboxReviewListResponse) UnmarshalJSON

func (r *InboxReviewListResponse) UnmarshalJSON(data []byte) (err error)

type InboxReviewListResponseData

type InboxReviewListResponseData struct {
	// Review ID
	ID string `json:"id" api:"required"`
	// Review author name
	AuthorName string `json:"author_name" api:"required"`
	// Review timestamp
	CreatedAt time.Time                           `json:"created_at" api:"required" format:"date-time"`
	Platform  InboxReviewListResponseDataPlatform `json:"platform" api:"required"`
	// Rating (1-5)
	Rating float64 `json:"rating" api:"required"`
	// Business reply text
	Reply string `json:"reply" api:"nullable"`
	// Review text
	Text string                          `json:"text" api:"nullable"`
	JSON inboxReviewListResponseDataJSON `json:"-"`
}

func (*InboxReviewListResponseData) UnmarshalJSON

func (r *InboxReviewListResponseData) UnmarshalJSON(data []byte) (err error)

type InboxReviewListResponseDataPlatform

type InboxReviewListResponseDataPlatform string
const (
	InboxReviewListResponseDataPlatformTwitter        InboxReviewListResponseDataPlatform = "twitter"
	InboxReviewListResponseDataPlatformInstagram      InboxReviewListResponseDataPlatform = "instagram"
	InboxReviewListResponseDataPlatformFacebook       InboxReviewListResponseDataPlatform = "facebook"
	InboxReviewListResponseDataPlatformLinkedin       InboxReviewListResponseDataPlatform = "linkedin"
	InboxReviewListResponseDataPlatformTiktok         InboxReviewListResponseDataPlatform = "tiktok"
	InboxReviewListResponseDataPlatformYoutube        InboxReviewListResponseDataPlatform = "youtube"
	InboxReviewListResponseDataPlatformPinterest      InboxReviewListResponseDataPlatform = "pinterest"
	InboxReviewListResponseDataPlatformReddit         InboxReviewListResponseDataPlatform = "reddit"
	InboxReviewListResponseDataPlatformBluesky        InboxReviewListResponseDataPlatform = "bluesky"
	InboxReviewListResponseDataPlatformThreads        InboxReviewListResponseDataPlatform = "threads"
	InboxReviewListResponseDataPlatformTelegram       InboxReviewListResponseDataPlatform = "telegram"
	InboxReviewListResponseDataPlatformSnapchat       InboxReviewListResponseDataPlatform = "snapchat"
	InboxReviewListResponseDataPlatformGooglebusiness InboxReviewListResponseDataPlatform = "googlebusiness"
	InboxReviewListResponseDataPlatformWhatsapp       InboxReviewListResponseDataPlatform = "whatsapp"
	InboxReviewListResponseDataPlatformMastodon       InboxReviewListResponseDataPlatform = "mastodon"
	InboxReviewListResponseDataPlatformDiscord        InboxReviewListResponseDataPlatform = "discord"
	InboxReviewListResponseDataPlatformSMS            InboxReviewListResponseDataPlatform = "sms"
)

func (InboxReviewListResponseDataPlatform) IsKnown

type InboxReviewReplyDeleteResponse

type InboxReviewReplyDeleteResponse struct {
	// Whether the action succeeded
	Success bool                               `json:"success" api:"required"`
	JSON    inboxReviewReplyDeleteResponseJSON `json:"-"`
}

func (*InboxReviewReplyDeleteResponse) UnmarshalJSON

func (r *InboxReviewReplyDeleteResponse) UnmarshalJSON(data []byte) (err error)

type InboxReviewReplyNewParams

type InboxReviewReplyNewParams struct {
	// Account ID
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Reply text
	Text param.Field[string] `json:"text" api:"required"`
}

func (InboxReviewReplyNewParams) MarshalJSON

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

type InboxReviewReplyNewResponse

type InboxReviewReplyNewResponse struct {
	// Whether the action succeeded
	Success bool                            `json:"success" api:"required"`
	JSON    inboxReviewReplyNewResponseJSON `json:"-"`
}

func (*InboxReviewReplyNewResponse) UnmarshalJSON

func (r *InboxReviewReplyNewResponse) UnmarshalJSON(data []byte) (err error)

type InboxReviewReplyService

type InboxReviewReplyService struct {
	Options []option.RequestOption
}

InboxReviewReplyService contains methods and other services that help with interacting with the relay 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 NewInboxReviewReplyService method instead.

func NewInboxReviewReplyService

func NewInboxReviewReplyService(opts ...option.RequestOption) (r *InboxReviewReplyService)

NewInboxReviewReplyService 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 (*InboxReviewReplyService) Delete

Delete a review reply

func (*InboxReviewReplyService) New

Reply to a review

type InboxReviewService

type InboxReviewService struct {
	Options []option.RequestOption
	Reply   *InboxReviewReplyService
}

InboxReviewService contains methods and other services that help with interacting with the relay 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 NewInboxReviewService method instead.

func NewInboxReviewService

func NewInboxReviewService(opts ...option.RequestOption) (r *InboxReviewService)

NewInboxReviewService 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 (*InboxReviewService) List

List reviews across platforms

type InboxService

type InboxService struct {
	Options  []option.RequestOption
	Comments *InboxCommentService
	Messages *InboxMessageService
	Reviews  *InboxReviewService
}

InboxService contains methods and other services that help with interacting with the relay 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 NewInboxService method instead.

func NewInboxService

func NewInboxService(opts ...option.RequestOption) (r *InboxService)

NewInboxService 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 MediaGetPresignURLParams

type MediaGetPresignURLParams struct {
	// MIME type of the file to upload
	ContentType param.Field[string] `json:"content_type" api:"required"`
	// Desired filename
	Filename param.Field[string] `json:"filename" api:"required"`
}

func (MediaGetPresignURLParams) MarshalJSON

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

type MediaGetPresignURLResponse

type MediaGetPresignURLResponse struct {
	// Seconds until the upload URL expires
	ExpiresIn int64 `json:"expires_in" api:"required"`
	// Pre-signed PUT URL for uploading
	UploadURL string `json:"upload_url" api:"required" format:"uri"`
	// Public URL after upload completes
	URL  string                         `json:"url" api:"required" format:"uri"`
	JSON mediaGetPresignURLResponseJSON `json:"-"`
}

func (*MediaGetPresignURLResponse) UnmarshalJSON

func (r *MediaGetPresignURLResponse) UnmarshalJSON(data []byte) (err error)

type MediaGetResponse

type MediaGetResponse struct {
	// Media ID
	ID string `json:"id" api:"required"`
	// Upload timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Original filename
	Filename string `json:"filename" api:"required"`
	// MIME type
	MimeType string `json:"mime_type" api:"required"`
	// File size in bytes
	Size int64 `json:"size" api:"required"`
	// Public URL
	URL string `json:"url" api:"required,nullable" format:"uri"`
	// Duration in seconds (video/audio)
	Duration int64 `json:"duration" api:"nullable"`
	// Height in pixels
	Height int64 `json:"height" api:"nullable"`
	// Width in pixels
	Width int64                `json:"width" api:"nullable"`
	JSON  mediaGetResponseJSON `json:"-"`
}

func (*MediaGetResponse) UnmarshalJSON

func (r *MediaGetResponse) UnmarshalJSON(data []byte) (err error)

type MediaService

type MediaService struct {
	Options []option.RequestOption
}

MediaService contains methods and other services that help with interacting with the relay 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 NewMediaService method instead.

func NewMediaService

func NewMediaService(opts ...option.RequestOption) (r *MediaService)

NewMediaService 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 (*MediaService) Delete

func (r *MediaService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)

Delete media

func (*MediaService) Get

func (r *MediaService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *MediaGetResponse, err error)

Get media details

func (*MediaService) GetPresignURL

Generate a pre-signed URL for direct upload to R2. The client can PUT the file to the returned URL.

func (*MediaService) Upload

func (r *MediaService) Upload(ctx context.Context, body io.Reader, params MediaUploadParams, opts ...option.RequestOption) (res *MediaUploadResponse, err error)

Upload a raw file body. Pass the filename as a query parameter and set the Content-Type header.

type MediaUploadParams

type MediaUploadParams struct {
	// Original filename
	Filename param.Field[string] `query:"filename" api:"required"`
}

func (MediaUploadParams) MarshalMultipart

func (r MediaUploadParams) MarshalMultipart() (data []byte, contentType string, err error)

func (MediaUploadParams) URLQuery

func (r MediaUploadParams) URLQuery() (v url.Values)

URLQuery serializes MediaUploadParams's query parameters as `url.Values`.

type MediaUploadResponse

type MediaUploadResponse struct {
	// Original filename
	Filename string `json:"filename" api:"required"`
	// File size in bytes
	Size int64 `json:"size" api:"required"`
	// MIME type of the uploaded file
	Type string `json:"type" api:"required"`
	// Public URL of the uploaded file
	URL  string                  `json:"url" api:"required" format:"uri"`
	JSON mediaUploadResponseJSON `json:"-"`
}

func (*MediaUploadResponse) UnmarshalJSON

func (r *MediaUploadResponse) UnmarshalJSON(data []byte) (err error)

type PostBulkNewParams

type PostBulkNewParams struct {
	// Array of posts to create (max 50)
	Posts param.Field[[]PostBulkNewParamsPost] `json:"posts" api:"required"`
}

func (PostBulkNewParams) MarshalJSON

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

type PostBulkNewParamsPost

type PostBulkNewParamsPost struct {
	// Publish intent. Use "now" to publish immediately, "draft" to save as draft, or
	// an ISO 8601 timestamp to schedule.
	ScheduledAt param.Field[string] `json:"scheduled_at" api:"required"`
	// Account IDs, platform names, or group IDs to publish to
	Targets param.Field[[]string] `json:"targets" api:"required"`
	// Post text. Optional if target_options provide per-target content.
	Content param.Field[string] `json:"content"`
	// Media attachments
	Media param.Field[[]PostBulkNewParamsPostsMedia] `json:"media"`
	// Per-target customizations keyed by target value (account ID or platform name)
	TargetOptions param.Field[map[string]map[string]interface{}] `json:"target_options"`
	// IANA timezone for scheduling
	Timezone param.Field[string] `json:"timezone"`
}

func (PostBulkNewParamsPost) MarshalJSON

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

type PostBulkNewParamsPostsMedia

type PostBulkNewParamsPostsMedia struct {
	// Public URL of the media file
	URL param.Field[string] `json:"url" api:"required" format:"uri"`
	// Media type. Inferred from URL extension if omitted.
	Type param.Field[PostBulkNewParamsPostsMediaType] `json:"type"`
}

func (PostBulkNewParamsPostsMedia) MarshalJSON

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

type PostBulkNewParamsPostsMediaType

type PostBulkNewParamsPostsMediaType string

Media type. Inferred from URL extension if omitted.

const (
	PostBulkNewParamsPostsMediaTypeImage    PostBulkNewParamsPostsMediaType = "image"
	PostBulkNewParamsPostsMediaTypeVideo    PostBulkNewParamsPostsMediaType = "video"
	PostBulkNewParamsPostsMediaTypeGif      PostBulkNewParamsPostsMediaType = "gif"
	PostBulkNewParamsPostsMediaTypeDocument PostBulkNewParamsPostsMediaType = "document"
)

func (PostBulkNewParamsPostsMediaType) IsKnown

type PostBulkNewResponse

type PostBulkNewResponse struct {
	Data    []PostBulkNewResponseData  `json:"data" api:"required"`
	Summary PostBulkNewResponseSummary `json:"summary" api:"required"`
	JSON    postBulkNewResponseJSON    `json:"-"`
}

func (*PostBulkNewResponse) UnmarshalJSON

func (r *PostBulkNewResponse) UnmarshalJSON(data []byte) (err error)

type PostBulkNewResponseData

type PostBulkNewResponseData struct {
	// Post ID
	ID          string                         `json:"id" api:"required"`
	Content     string                         `json:"content" api:"required,nullable"`
	CreatedAt   time.Time                      `json:"created_at" api:"required" format:"date-time"`
	Media       []PostBulkNewResponseDataMedia `json:"media" api:"required,nullable"`
	ScheduledAt string                         `json:"scheduled_at" api:"required,nullable"`
	Status      PostBulkNewResponseDataStatus  `json:"status" api:"required"`
	// Per-target results
	Targets   map[string]PostBulkNewResponseDataTarget `json:"targets" api:"required"`
	UpdatedAt time.Time                                `json:"updated_at" api:"required" format:"date-time"`
	JSON      postBulkNewResponseDataJSON              `json:"-"`
}

func (*PostBulkNewResponseData) UnmarshalJSON

func (r *PostBulkNewResponseData) UnmarshalJSON(data []byte) (err error)

type PostBulkNewResponseDataMedia

type PostBulkNewResponseDataMedia struct {
	// Public URL of the media file
	URL string `json:"url" api:"required" format:"uri"`
	// Media type. Inferred from URL extension if omitted.
	Type PostBulkNewResponseDataMediaType `json:"type"`
	JSON postBulkNewResponseDataMediaJSON `json:"-"`
}

func (*PostBulkNewResponseDataMedia) UnmarshalJSON

func (r *PostBulkNewResponseDataMedia) UnmarshalJSON(data []byte) (err error)

type PostBulkNewResponseDataMediaType

type PostBulkNewResponseDataMediaType string

Media type. Inferred from URL extension if omitted.

const (
	PostBulkNewResponseDataMediaTypeImage    PostBulkNewResponseDataMediaType = "image"
	PostBulkNewResponseDataMediaTypeVideo    PostBulkNewResponseDataMediaType = "video"
	PostBulkNewResponseDataMediaTypeGif      PostBulkNewResponseDataMediaType = "gif"
	PostBulkNewResponseDataMediaTypeDocument PostBulkNewResponseDataMediaType = "document"
)

func (PostBulkNewResponseDataMediaType) IsKnown

type PostBulkNewResponseDataStatus

type PostBulkNewResponseDataStatus string
const (
	PostBulkNewResponseDataStatusDraft      PostBulkNewResponseDataStatus = "draft"
	PostBulkNewResponseDataStatusScheduled  PostBulkNewResponseDataStatus = "scheduled"
	PostBulkNewResponseDataStatusPublishing PostBulkNewResponseDataStatus = "publishing"
	PostBulkNewResponseDataStatusPublished  PostBulkNewResponseDataStatus = "published"
	PostBulkNewResponseDataStatusFailed     PostBulkNewResponseDataStatus = "failed"
	PostBulkNewResponseDataStatusPartial    PostBulkNewResponseDataStatus = "partial"
)

func (PostBulkNewResponseDataStatus) IsKnown

func (r PostBulkNewResponseDataStatus) IsKnown() bool

type PostBulkNewResponseDataTarget

type PostBulkNewResponseDataTarget struct {
	Platform PostBulkNewResponseDataTargetsPlatform  `json:"platform" api:"required"`
	Status   PostBulkNewResponseDataTargetsStatus    `json:"status" api:"required"`
	Accounts []PostBulkNewResponseDataTargetsAccount `json:"accounts"`
	Error    PostBulkNewResponseDataTargetsError     `json:"error"`
	JSON     postBulkNewResponseDataTargetJSON       `json:"-"`
}

func (*PostBulkNewResponseDataTarget) UnmarshalJSON

func (r *PostBulkNewResponseDataTarget) UnmarshalJSON(data []byte) (err error)

type PostBulkNewResponseDataTargetsAccount

type PostBulkNewResponseDataTargetsAccount struct {
	ID string `json:"id" api:"required"`
	// Published post URL on the platform
	URL      string                                    `json:"url" api:"required,nullable"`
	Username string                                    `json:"username" api:"required,nullable"`
	JSON     postBulkNewResponseDataTargetsAccountJSON `json:"-"`
}

func (*PostBulkNewResponseDataTargetsAccount) UnmarshalJSON

func (r *PostBulkNewResponseDataTargetsAccount) UnmarshalJSON(data []byte) (err error)

type PostBulkNewResponseDataTargetsError

type PostBulkNewResponseDataTargetsError struct {
	Code    string                                  `json:"code" api:"required"`
	Message string                                  `json:"message" api:"required"`
	JSON    postBulkNewResponseDataTargetsErrorJSON `json:"-"`
}

func (*PostBulkNewResponseDataTargetsError) UnmarshalJSON

func (r *PostBulkNewResponseDataTargetsError) UnmarshalJSON(data []byte) (err error)

type PostBulkNewResponseDataTargetsPlatform

type PostBulkNewResponseDataTargetsPlatform string
const (
	PostBulkNewResponseDataTargetsPlatformTwitter        PostBulkNewResponseDataTargetsPlatform = "twitter"
	PostBulkNewResponseDataTargetsPlatformInstagram      PostBulkNewResponseDataTargetsPlatform = "instagram"
	PostBulkNewResponseDataTargetsPlatformFacebook       PostBulkNewResponseDataTargetsPlatform = "facebook"
	PostBulkNewResponseDataTargetsPlatformLinkedin       PostBulkNewResponseDataTargetsPlatform = "linkedin"
	PostBulkNewResponseDataTargetsPlatformTiktok         PostBulkNewResponseDataTargetsPlatform = "tiktok"
	PostBulkNewResponseDataTargetsPlatformYoutube        PostBulkNewResponseDataTargetsPlatform = "youtube"
	PostBulkNewResponseDataTargetsPlatformPinterest      PostBulkNewResponseDataTargetsPlatform = "pinterest"
	PostBulkNewResponseDataTargetsPlatformReddit         PostBulkNewResponseDataTargetsPlatform = "reddit"
	PostBulkNewResponseDataTargetsPlatformBluesky        PostBulkNewResponseDataTargetsPlatform = "bluesky"
	PostBulkNewResponseDataTargetsPlatformThreads        PostBulkNewResponseDataTargetsPlatform = "threads"
	PostBulkNewResponseDataTargetsPlatformTelegram       PostBulkNewResponseDataTargetsPlatform = "telegram"
	PostBulkNewResponseDataTargetsPlatformSnapchat       PostBulkNewResponseDataTargetsPlatform = "snapchat"
	PostBulkNewResponseDataTargetsPlatformGooglebusiness PostBulkNewResponseDataTargetsPlatform = "googlebusiness"
	PostBulkNewResponseDataTargetsPlatformWhatsapp       PostBulkNewResponseDataTargetsPlatform = "whatsapp"
	PostBulkNewResponseDataTargetsPlatformMastodon       PostBulkNewResponseDataTargetsPlatform = "mastodon"
	PostBulkNewResponseDataTargetsPlatformDiscord        PostBulkNewResponseDataTargetsPlatform = "discord"
	PostBulkNewResponseDataTargetsPlatformSMS            PostBulkNewResponseDataTargetsPlatform = "sms"
)

func (PostBulkNewResponseDataTargetsPlatform) IsKnown

type PostBulkNewResponseDataTargetsStatus

type PostBulkNewResponseDataTargetsStatus string
const (
	PostBulkNewResponseDataTargetsStatusDraft      PostBulkNewResponseDataTargetsStatus = "draft"
	PostBulkNewResponseDataTargetsStatusScheduled  PostBulkNewResponseDataTargetsStatus = "scheduled"
	PostBulkNewResponseDataTargetsStatusPublishing PostBulkNewResponseDataTargetsStatus = "publishing"
	PostBulkNewResponseDataTargetsStatusPublished  PostBulkNewResponseDataTargetsStatus = "published"
	PostBulkNewResponseDataTargetsStatusFailed     PostBulkNewResponseDataTargetsStatus = "failed"
)

func (PostBulkNewResponseDataTargetsStatus) IsKnown

type PostBulkNewResponseSummary

type PostBulkNewResponseSummary struct {
	Failed    float64                        `json:"failed" api:"required"`
	Succeeded float64                        `json:"succeeded" api:"required"`
	Total     float64                        `json:"total" api:"required"`
	JSON      postBulkNewResponseSummaryJSON `json:"-"`
}

func (*PostBulkNewResponseSummary) UnmarshalJSON

func (r *PostBulkNewResponseSummary) UnmarshalJSON(data []byte) (err error)

type PostGetResponse

type PostGetResponse struct {
	// Post ID
	ID          string                 `json:"id" api:"required"`
	Content     string                 `json:"content" api:"required,nullable"`
	CreatedAt   time.Time              `json:"created_at" api:"required" format:"date-time"`
	Media       []PostGetResponseMedia `json:"media" api:"required,nullable"`
	ScheduledAt string                 `json:"scheduled_at" api:"required,nullable"`
	Status      PostGetResponseStatus  `json:"status" api:"required"`
	// Per-target results
	Targets   map[string]PostGetResponseTarget `json:"targets" api:"required"`
	UpdatedAt time.Time                        `json:"updated_at" api:"required" format:"date-time"`
	JSON      postGetResponseJSON              `json:"-"`
}

func (*PostGetResponse) UnmarshalJSON

func (r *PostGetResponse) UnmarshalJSON(data []byte) (err error)

type PostGetResponseMedia

type PostGetResponseMedia struct {
	// Public URL of the media file
	URL string `json:"url" api:"required" format:"uri"`
	// Media type. Inferred from URL extension if omitted.
	Type PostGetResponseMediaType `json:"type"`
	JSON postGetResponseMediaJSON `json:"-"`
}

func (*PostGetResponseMedia) UnmarshalJSON

func (r *PostGetResponseMedia) UnmarshalJSON(data []byte) (err error)

type PostGetResponseMediaType

type PostGetResponseMediaType string

Media type. Inferred from URL extension if omitted.

const (
	PostGetResponseMediaTypeImage    PostGetResponseMediaType = "image"
	PostGetResponseMediaTypeVideo    PostGetResponseMediaType = "video"
	PostGetResponseMediaTypeGif      PostGetResponseMediaType = "gif"
	PostGetResponseMediaTypeDocument PostGetResponseMediaType = "document"
)

func (PostGetResponseMediaType) IsKnown

func (r PostGetResponseMediaType) IsKnown() bool

type PostGetResponseStatus

type PostGetResponseStatus string
const (
	PostGetResponseStatusDraft      PostGetResponseStatus = "draft"
	PostGetResponseStatusScheduled  PostGetResponseStatus = "scheduled"
	PostGetResponseStatusPublishing PostGetResponseStatus = "publishing"
	PostGetResponseStatusPublished  PostGetResponseStatus = "published"
	PostGetResponseStatusFailed     PostGetResponseStatus = "failed"
	PostGetResponseStatusPartial    PostGetResponseStatus = "partial"
)

func (PostGetResponseStatus) IsKnown

func (r PostGetResponseStatus) IsKnown() bool

type PostGetResponseTarget

type PostGetResponseTarget struct {
	Platform PostGetResponseTargetsPlatform  `json:"platform" api:"required"`
	Status   PostGetResponseTargetsStatus    `json:"status" api:"required"`
	Accounts []PostGetResponseTargetsAccount `json:"accounts"`
	Error    PostGetResponseTargetsError     `json:"error"`
	JSON     postGetResponseTargetJSON       `json:"-"`
}

func (*PostGetResponseTarget) UnmarshalJSON

func (r *PostGetResponseTarget) UnmarshalJSON(data []byte) (err error)

type PostGetResponseTargetsAccount

type PostGetResponseTargetsAccount struct {
	ID string `json:"id" api:"required"`
	// Published post URL on the platform
	URL      string                            `json:"url" api:"required,nullable"`
	Username string                            `json:"username" api:"required,nullable"`
	JSON     postGetResponseTargetsAccountJSON `json:"-"`
}

func (*PostGetResponseTargetsAccount) UnmarshalJSON

func (r *PostGetResponseTargetsAccount) UnmarshalJSON(data []byte) (err error)

type PostGetResponseTargetsError

type PostGetResponseTargetsError struct {
	Code    string                          `json:"code" api:"required"`
	Message string                          `json:"message" api:"required"`
	JSON    postGetResponseTargetsErrorJSON `json:"-"`
}

func (*PostGetResponseTargetsError) UnmarshalJSON

func (r *PostGetResponseTargetsError) UnmarshalJSON(data []byte) (err error)

type PostGetResponseTargetsPlatform

type PostGetResponseTargetsPlatform string
const (
	PostGetResponseTargetsPlatformTwitter        PostGetResponseTargetsPlatform = "twitter"
	PostGetResponseTargetsPlatformInstagram      PostGetResponseTargetsPlatform = "instagram"
	PostGetResponseTargetsPlatformFacebook       PostGetResponseTargetsPlatform = "facebook"
	PostGetResponseTargetsPlatformLinkedin       PostGetResponseTargetsPlatform = "linkedin"
	PostGetResponseTargetsPlatformTiktok         PostGetResponseTargetsPlatform = "tiktok"
	PostGetResponseTargetsPlatformYoutube        PostGetResponseTargetsPlatform = "youtube"
	PostGetResponseTargetsPlatformPinterest      PostGetResponseTargetsPlatform = "pinterest"
	PostGetResponseTargetsPlatformReddit         PostGetResponseTargetsPlatform = "reddit"
	PostGetResponseTargetsPlatformBluesky        PostGetResponseTargetsPlatform = "bluesky"
	PostGetResponseTargetsPlatformThreads        PostGetResponseTargetsPlatform = "threads"
	PostGetResponseTargetsPlatformTelegram       PostGetResponseTargetsPlatform = "telegram"
	PostGetResponseTargetsPlatformSnapchat       PostGetResponseTargetsPlatform = "snapchat"
	PostGetResponseTargetsPlatformGooglebusiness PostGetResponseTargetsPlatform = "googlebusiness"
	PostGetResponseTargetsPlatformWhatsapp       PostGetResponseTargetsPlatform = "whatsapp"
	PostGetResponseTargetsPlatformMastodon       PostGetResponseTargetsPlatform = "mastodon"
	PostGetResponseTargetsPlatformDiscord        PostGetResponseTargetsPlatform = "discord"
	PostGetResponseTargetsPlatformSMS            PostGetResponseTargetsPlatform = "sms"
)

func (PostGetResponseTargetsPlatform) IsKnown

type PostGetResponseTargetsStatus

type PostGetResponseTargetsStatus string
const (
	PostGetResponseTargetsStatusDraft      PostGetResponseTargetsStatus = "draft"
	PostGetResponseTargetsStatusScheduled  PostGetResponseTargetsStatus = "scheduled"
	PostGetResponseTargetsStatusPublishing PostGetResponseTargetsStatus = "publishing"
	PostGetResponseTargetsStatusPublished  PostGetResponseTargetsStatus = "published"
	PostGetResponseTargetsStatusFailed     PostGetResponseTargetsStatus = "failed"
)

func (PostGetResponseTargetsStatus) IsKnown

func (r PostGetResponseTargetsStatus) IsKnown() bool

type PostListParams

type PostListParams struct {
	// Filter by specific account ID
	AccountID param.Field[string] `query:"account_id"`
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Filter: start date (ISO 8601)
	From param.Field[time.Time] `query:"from" format:"date-time"`
	// Filter by account group ID
	GroupID param.Field[string] `query:"group_id"`
	// Number of items per page
	Limit param.Field[int64] `query:"limit"`
	// Filter by post status
	Status param.Field[PostListParamsStatus] `query:"status"`
	// Filter: end date (ISO 8601)
	To param.Field[time.Time] `query:"to" format:"date-time"`
}

func (PostListParams) URLQuery

func (r PostListParams) URLQuery() (v url.Values)

URLQuery serializes PostListParams's query parameters as `url.Values`.

type PostListParamsStatus

type PostListParamsStatus string

Filter by post status

const (
	PostListParamsStatusDraft      PostListParamsStatus = "draft"
	PostListParamsStatusScheduled  PostListParamsStatus = "scheduled"
	PostListParamsStatusPublishing PostListParamsStatus = "publishing"
	PostListParamsStatusPublished  PostListParamsStatus = "published"
	PostListParamsStatusFailed     PostListParamsStatus = "failed"
)

func (PostListParamsStatus) IsKnown

func (r PostListParamsStatus) IsKnown() bool

type PostListResponse

type PostListResponse struct {
	Data []PostListResponseData `json:"data" api:"required"`
	// Whether more items exist
	HasMore bool `json:"has_more" api:"required"`
	// Cursor for next page
	NextCursor string               `json:"next_cursor" api:"required,nullable"`
	JSON       postListResponseJSON `json:"-"`
}

func (*PostListResponse) UnmarshalJSON

func (r *PostListResponse) UnmarshalJSON(data []byte) (err error)

type PostListResponseData

type PostListResponseData struct {
	// Post ID
	ID          string                      `json:"id" api:"required"`
	Content     string                      `json:"content" api:"required,nullable"`
	CreatedAt   time.Time                   `json:"created_at" api:"required" format:"date-time"`
	Media       []PostListResponseDataMedia `json:"media" api:"required,nullable"`
	ScheduledAt string                      `json:"scheduled_at" api:"required,nullable"`
	Status      PostListResponseDataStatus  `json:"status" api:"required"`
	// Per-target results
	Targets   map[string]PostListResponseDataTarget `json:"targets" api:"required"`
	UpdatedAt time.Time                             `json:"updated_at" api:"required" format:"date-time"`
	JSON      postListResponseDataJSON              `json:"-"`
}

func (*PostListResponseData) UnmarshalJSON

func (r *PostListResponseData) UnmarshalJSON(data []byte) (err error)

type PostListResponseDataMedia

type PostListResponseDataMedia struct {
	// Public URL of the media file
	URL string `json:"url" api:"required" format:"uri"`
	// Media type. Inferred from URL extension if omitted.
	Type PostListResponseDataMediaType `json:"type"`
	JSON postListResponseDataMediaJSON `json:"-"`
}

func (*PostListResponseDataMedia) UnmarshalJSON

func (r *PostListResponseDataMedia) UnmarshalJSON(data []byte) (err error)

type PostListResponseDataMediaType

type PostListResponseDataMediaType string

Media type. Inferred from URL extension if omitted.

const (
	PostListResponseDataMediaTypeImage    PostListResponseDataMediaType = "image"
	PostListResponseDataMediaTypeVideo    PostListResponseDataMediaType = "video"
	PostListResponseDataMediaTypeGif      PostListResponseDataMediaType = "gif"
	PostListResponseDataMediaTypeDocument PostListResponseDataMediaType = "document"
)

func (PostListResponseDataMediaType) IsKnown

func (r PostListResponseDataMediaType) IsKnown() bool

type PostListResponseDataStatus

type PostListResponseDataStatus string
const (
	PostListResponseDataStatusDraft      PostListResponseDataStatus = "draft"
	PostListResponseDataStatusScheduled  PostListResponseDataStatus = "scheduled"
	PostListResponseDataStatusPublishing PostListResponseDataStatus = "publishing"
	PostListResponseDataStatusPublished  PostListResponseDataStatus = "published"
	PostListResponseDataStatusFailed     PostListResponseDataStatus = "failed"
	PostListResponseDataStatusPartial    PostListResponseDataStatus = "partial"
)

func (PostListResponseDataStatus) IsKnown

func (r PostListResponseDataStatus) IsKnown() bool

type PostListResponseDataTarget

type PostListResponseDataTarget struct {
	Platform PostListResponseDataTargetsPlatform  `json:"platform" api:"required"`
	Status   PostListResponseDataTargetsStatus    `json:"status" api:"required"`
	Accounts []PostListResponseDataTargetsAccount `json:"accounts"`
	Error    PostListResponseDataTargetsError     `json:"error"`
	JSON     postListResponseDataTargetJSON       `json:"-"`
}

func (*PostListResponseDataTarget) UnmarshalJSON

func (r *PostListResponseDataTarget) UnmarshalJSON(data []byte) (err error)

type PostListResponseDataTargetsAccount

type PostListResponseDataTargetsAccount struct {
	ID string `json:"id" api:"required"`
	// Published post URL on the platform
	URL      string                                 `json:"url" api:"required,nullable"`
	Username string                                 `json:"username" api:"required,nullable"`
	JSON     postListResponseDataTargetsAccountJSON `json:"-"`
}

func (*PostListResponseDataTargetsAccount) UnmarshalJSON

func (r *PostListResponseDataTargetsAccount) UnmarshalJSON(data []byte) (err error)

type PostListResponseDataTargetsError

type PostListResponseDataTargetsError struct {
	Code    string                               `json:"code" api:"required"`
	Message string                               `json:"message" api:"required"`
	JSON    postListResponseDataTargetsErrorJSON `json:"-"`
}

func (*PostListResponseDataTargetsError) UnmarshalJSON

func (r *PostListResponseDataTargetsError) UnmarshalJSON(data []byte) (err error)

type PostListResponseDataTargetsPlatform

type PostListResponseDataTargetsPlatform string
const (
	PostListResponseDataTargetsPlatformTwitter        PostListResponseDataTargetsPlatform = "twitter"
	PostListResponseDataTargetsPlatformInstagram      PostListResponseDataTargetsPlatform = "instagram"
	PostListResponseDataTargetsPlatformFacebook       PostListResponseDataTargetsPlatform = "facebook"
	PostListResponseDataTargetsPlatformLinkedin       PostListResponseDataTargetsPlatform = "linkedin"
	PostListResponseDataTargetsPlatformTiktok         PostListResponseDataTargetsPlatform = "tiktok"
	PostListResponseDataTargetsPlatformYoutube        PostListResponseDataTargetsPlatform = "youtube"
	PostListResponseDataTargetsPlatformPinterest      PostListResponseDataTargetsPlatform = "pinterest"
	PostListResponseDataTargetsPlatformReddit         PostListResponseDataTargetsPlatform = "reddit"
	PostListResponseDataTargetsPlatformBluesky        PostListResponseDataTargetsPlatform = "bluesky"
	PostListResponseDataTargetsPlatformThreads        PostListResponseDataTargetsPlatform = "threads"
	PostListResponseDataTargetsPlatformTelegram       PostListResponseDataTargetsPlatform = "telegram"
	PostListResponseDataTargetsPlatformSnapchat       PostListResponseDataTargetsPlatform = "snapchat"
	PostListResponseDataTargetsPlatformGooglebusiness PostListResponseDataTargetsPlatform = "googlebusiness"
	PostListResponseDataTargetsPlatformWhatsapp       PostListResponseDataTargetsPlatform = "whatsapp"
	PostListResponseDataTargetsPlatformMastodon       PostListResponseDataTargetsPlatform = "mastodon"
	PostListResponseDataTargetsPlatformDiscord        PostListResponseDataTargetsPlatform = "discord"
	PostListResponseDataTargetsPlatformSMS            PostListResponseDataTargetsPlatform = "sms"
)

func (PostListResponseDataTargetsPlatform) IsKnown

type PostListResponseDataTargetsStatus

type PostListResponseDataTargetsStatus string
const (
	PostListResponseDataTargetsStatusDraft      PostListResponseDataTargetsStatus = "draft"
	PostListResponseDataTargetsStatusScheduled  PostListResponseDataTargetsStatus = "scheduled"
	PostListResponseDataTargetsStatusPublishing PostListResponseDataTargetsStatus = "publishing"
	PostListResponseDataTargetsStatusPublished  PostListResponseDataTargetsStatus = "published"
	PostListResponseDataTargetsStatusFailed     PostListResponseDataTargetsStatus = "failed"
)

func (PostListResponseDataTargetsStatus) IsKnown

type PostLogGetResponse

type PostLogGetResponse struct {
	Data       []PostLogGetResponseData `json:"data" api:"required"`
	HasMore    bool                     `json:"has_more" api:"required"`
	NextCursor string                   `json:"next_cursor" api:"required,nullable"`
	JSON       postLogGetResponseJSON   `json:"-"`
}

func (*PostLogGetResponse) UnmarshalJSON

func (r *PostLogGetResponse) UnmarshalJSON(data []byte) (err error)

type PostLogGetResponseData

type PostLogGetResponseData struct {
	// Log entry ID (post target ID)
	ID string `json:"id" api:"required"`
	// Error message if failed
	Error string `json:"error" api:"required,nullable"`
	// Platform name
	Platform string `json:"platform" api:"required"`
	// Platform post ID
	PlatformPostID string `json:"platform_post_id" api:"required,nullable"`
	// Published URL
	PlatformURL string `json:"platform_url" api:"required,nullable"`
	// Post ID
	PostID string `json:"post_id" api:"required"`
	// Published timestamp
	PublishedAt time.Time `json:"published_at" api:"required,nullable" format:"date-time"`
	// Social account ID
	SocialAccountID string `json:"social_account_id" api:"required"`
	// Target status
	Status string `json:"status" api:"required"`
	// Last updated
	UpdatedAt time.Time                  `json:"updated_at" api:"required" format:"date-time"`
	JSON      postLogGetResponseDataJSON `json:"-"`
}

func (*PostLogGetResponseData) UnmarshalJSON

func (r *PostLogGetResponseData) UnmarshalJSON(data []byte) (err error)

type PostLogListParams

type PostLogListParams struct {
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Filter: start date (ISO 8601)
	From param.Field[time.Time] `query:"from" format:"date-time"`
	// Number of items per page
	Limit param.Field[int64] `query:"limit"`
	// Filter: end date (ISO 8601)
	To param.Field[time.Time] `query:"to" format:"date-time"`
}

func (PostLogListParams) URLQuery

func (r PostLogListParams) URLQuery() (v url.Values)

URLQuery serializes PostLogListParams's query parameters as `url.Values`.

type PostLogListResponse

type PostLogListResponse struct {
	Data       []PostLogListResponseData `json:"data" api:"required"`
	HasMore    bool                      `json:"has_more" api:"required"`
	NextCursor string                    `json:"next_cursor" api:"required,nullable"`
	JSON       postLogListResponseJSON   `json:"-"`
}

func (*PostLogListResponse) UnmarshalJSON

func (r *PostLogListResponse) UnmarshalJSON(data []byte) (err error)

type PostLogListResponseData

type PostLogListResponseData struct {
	// Log entry ID (post target ID)
	ID string `json:"id" api:"required"`
	// Error message if failed
	Error string `json:"error" api:"required,nullable"`
	// Platform name
	Platform string `json:"platform" api:"required"`
	// Platform post ID
	PlatformPostID string `json:"platform_post_id" api:"required,nullable"`
	// Published URL
	PlatformURL string `json:"platform_url" api:"required,nullable"`
	// Post ID
	PostID string `json:"post_id" api:"required"`
	// Published timestamp
	PublishedAt time.Time `json:"published_at" api:"required,nullable" format:"date-time"`
	// Social account ID
	SocialAccountID string `json:"social_account_id" api:"required"`
	// Target status
	Status string `json:"status" api:"required"`
	// Last updated
	UpdatedAt time.Time                   `json:"updated_at" api:"required" format:"date-time"`
	JSON      postLogListResponseDataJSON `json:"-"`
}

func (*PostLogListResponseData) UnmarshalJSON

func (r *PostLogListResponseData) UnmarshalJSON(data []byte) (err error)

type PostLogService

type PostLogService struct {
	Options []option.RequestOption
}

PostLogService contains methods and other services that help with interacting with the relay 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 NewPostLogService method instead.

func NewPostLogService

func NewPostLogService(opts ...option.RequestOption) (r *PostLogService)

NewPostLogService 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 (*PostLogService) Get

func (r *PostLogService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *PostLogGetResponse, err error)

Get publishing logs for a post

func (*PostLogService) List

Query publishing logs across all posts with pagination.

type PostNewParams

type PostNewParams struct {
	// Publish intent. Use "now" to publish immediately, "draft" to save as draft, or
	// an ISO 8601 timestamp to schedule.
	ScheduledAt param.Field[string] `json:"scheduled_at" api:"required"`
	// Account IDs, platform names, or group IDs to publish to
	Targets param.Field[[]string] `json:"targets" api:"required"`
	// Post text. Optional if target_options provide per-target content.
	Content param.Field[string] `json:"content"`
	// Media attachments
	Media param.Field[[]PostNewParamsMedia] `json:"media"`
	// Per-target customizations keyed by target value (account ID or platform name)
	TargetOptions param.Field[map[string]map[string]interface{}] `json:"target_options"`
	// IANA timezone for scheduling
	Timezone param.Field[string] `json:"timezone"`
}

func (PostNewParams) MarshalJSON

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

type PostNewParamsMedia

type PostNewParamsMedia struct {
	// Public URL of the media file
	URL param.Field[string] `json:"url" api:"required" format:"uri"`
	// Media type. Inferred from URL extension if omitted.
	Type param.Field[PostNewParamsMediaType] `json:"type"`
}

func (PostNewParamsMedia) MarshalJSON

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

type PostNewParamsMediaType

type PostNewParamsMediaType string

Media type. Inferred from URL extension if omitted.

const (
	PostNewParamsMediaTypeImage    PostNewParamsMediaType = "image"
	PostNewParamsMediaTypeVideo    PostNewParamsMediaType = "video"
	PostNewParamsMediaTypeGif      PostNewParamsMediaType = "gif"
	PostNewParamsMediaTypeDocument PostNewParamsMediaType = "document"
)

func (PostNewParamsMediaType) IsKnown

func (r PostNewParamsMediaType) IsKnown() bool

type PostNewResponse

type PostNewResponse struct {
	// Post ID
	ID          string                 `json:"id" api:"required"`
	Content     string                 `json:"content" api:"required,nullable"`
	CreatedAt   time.Time              `json:"created_at" api:"required" format:"date-time"`
	Media       []PostNewResponseMedia `json:"media" api:"required,nullable"`
	ScheduledAt string                 `json:"scheduled_at" api:"required,nullable"`
	Status      PostNewResponseStatus  `json:"status" api:"required"`
	// Per-target results
	Targets   map[string]PostNewResponseTarget `json:"targets" api:"required"`
	UpdatedAt time.Time                        `json:"updated_at" api:"required" format:"date-time"`
	JSON      postNewResponseJSON              `json:"-"`
}

func (*PostNewResponse) UnmarshalJSON

func (r *PostNewResponse) UnmarshalJSON(data []byte) (err error)

type PostNewResponseMedia

type PostNewResponseMedia struct {
	// Public URL of the media file
	URL string `json:"url" api:"required" format:"uri"`
	// Media type. Inferred from URL extension if omitted.
	Type PostNewResponseMediaType `json:"type"`
	JSON postNewResponseMediaJSON `json:"-"`
}

func (*PostNewResponseMedia) UnmarshalJSON

func (r *PostNewResponseMedia) UnmarshalJSON(data []byte) (err error)

type PostNewResponseMediaType

type PostNewResponseMediaType string

Media type. Inferred from URL extension if omitted.

const (
	PostNewResponseMediaTypeImage    PostNewResponseMediaType = "image"
	PostNewResponseMediaTypeVideo    PostNewResponseMediaType = "video"
	PostNewResponseMediaTypeGif      PostNewResponseMediaType = "gif"
	PostNewResponseMediaTypeDocument PostNewResponseMediaType = "document"
)

func (PostNewResponseMediaType) IsKnown

func (r PostNewResponseMediaType) IsKnown() bool

type PostNewResponseStatus

type PostNewResponseStatus string
const (
	PostNewResponseStatusDraft      PostNewResponseStatus = "draft"
	PostNewResponseStatusScheduled  PostNewResponseStatus = "scheduled"
	PostNewResponseStatusPublishing PostNewResponseStatus = "publishing"
	PostNewResponseStatusPublished  PostNewResponseStatus = "published"
	PostNewResponseStatusFailed     PostNewResponseStatus = "failed"
	PostNewResponseStatusPartial    PostNewResponseStatus = "partial"
)

func (PostNewResponseStatus) IsKnown

func (r PostNewResponseStatus) IsKnown() bool

type PostNewResponseTarget

type PostNewResponseTarget struct {
	Platform PostNewResponseTargetsPlatform  `json:"platform" api:"required"`
	Status   PostNewResponseTargetsStatus    `json:"status" api:"required"`
	Accounts []PostNewResponseTargetsAccount `json:"accounts"`
	Error    PostNewResponseTargetsError     `json:"error"`
	JSON     postNewResponseTargetJSON       `json:"-"`
}

func (*PostNewResponseTarget) UnmarshalJSON

func (r *PostNewResponseTarget) UnmarshalJSON(data []byte) (err error)

type PostNewResponseTargetsAccount

type PostNewResponseTargetsAccount struct {
	ID string `json:"id" api:"required"`
	// Published post URL on the platform
	URL      string                            `json:"url" api:"required,nullable"`
	Username string                            `json:"username" api:"required,nullable"`
	JSON     postNewResponseTargetsAccountJSON `json:"-"`
}

func (*PostNewResponseTargetsAccount) UnmarshalJSON

func (r *PostNewResponseTargetsAccount) UnmarshalJSON(data []byte) (err error)

type PostNewResponseTargetsError

type PostNewResponseTargetsError struct {
	Code    string                          `json:"code" api:"required"`
	Message string                          `json:"message" api:"required"`
	JSON    postNewResponseTargetsErrorJSON `json:"-"`
}

func (*PostNewResponseTargetsError) UnmarshalJSON

func (r *PostNewResponseTargetsError) UnmarshalJSON(data []byte) (err error)

type PostNewResponseTargetsPlatform

type PostNewResponseTargetsPlatform string
const (
	PostNewResponseTargetsPlatformTwitter        PostNewResponseTargetsPlatform = "twitter"
	PostNewResponseTargetsPlatformInstagram      PostNewResponseTargetsPlatform = "instagram"
	PostNewResponseTargetsPlatformFacebook       PostNewResponseTargetsPlatform = "facebook"
	PostNewResponseTargetsPlatformLinkedin       PostNewResponseTargetsPlatform = "linkedin"
	PostNewResponseTargetsPlatformTiktok         PostNewResponseTargetsPlatform = "tiktok"
	PostNewResponseTargetsPlatformYoutube        PostNewResponseTargetsPlatform = "youtube"
	PostNewResponseTargetsPlatformPinterest      PostNewResponseTargetsPlatform = "pinterest"
	PostNewResponseTargetsPlatformReddit         PostNewResponseTargetsPlatform = "reddit"
	PostNewResponseTargetsPlatformBluesky        PostNewResponseTargetsPlatform = "bluesky"
	PostNewResponseTargetsPlatformThreads        PostNewResponseTargetsPlatform = "threads"
	PostNewResponseTargetsPlatformTelegram       PostNewResponseTargetsPlatform = "telegram"
	PostNewResponseTargetsPlatformSnapchat       PostNewResponseTargetsPlatform = "snapchat"
	PostNewResponseTargetsPlatformGooglebusiness PostNewResponseTargetsPlatform = "googlebusiness"
	PostNewResponseTargetsPlatformWhatsapp       PostNewResponseTargetsPlatform = "whatsapp"
	PostNewResponseTargetsPlatformMastodon       PostNewResponseTargetsPlatform = "mastodon"
	PostNewResponseTargetsPlatformDiscord        PostNewResponseTargetsPlatform = "discord"
	PostNewResponseTargetsPlatformSMS            PostNewResponseTargetsPlatform = "sms"
)

func (PostNewResponseTargetsPlatform) IsKnown

type PostNewResponseTargetsStatus

type PostNewResponseTargetsStatus string
const (
	PostNewResponseTargetsStatusDraft      PostNewResponseTargetsStatus = "draft"
	PostNewResponseTargetsStatusScheduled  PostNewResponseTargetsStatus = "scheduled"
	PostNewResponseTargetsStatusPublishing PostNewResponseTargetsStatus = "publishing"
	PostNewResponseTargetsStatusPublished  PostNewResponseTargetsStatus = "published"
	PostNewResponseTargetsStatusFailed     PostNewResponseTargetsStatus = "failed"
)

func (PostNewResponseTargetsStatus) IsKnown

func (r PostNewResponseTargetsStatus) IsKnown() bool

type PostRetryResponse

type PostRetryResponse struct {
	// Post ID
	ID          string                   `json:"id" api:"required"`
	Content     string                   `json:"content" api:"required,nullable"`
	CreatedAt   time.Time                `json:"created_at" api:"required" format:"date-time"`
	Media       []PostRetryResponseMedia `json:"media" api:"required,nullable"`
	ScheduledAt string                   `json:"scheduled_at" api:"required,nullable"`
	Status      PostRetryResponseStatus  `json:"status" api:"required"`
	// Per-target results
	Targets   map[string]PostRetryResponseTarget `json:"targets" api:"required"`
	UpdatedAt time.Time                          `json:"updated_at" api:"required" format:"date-time"`
	JSON      postRetryResponseJSON              `json:"-"`
}

func (*PostRetryResponse) UnmarshalJSON

func (r *PostRetryResponse) UnmarshalJSON(data []byte) (err error)

type PostRetryResponseMedia

type PostRetryResponseMedia struct {
	// Public URL of the media file
	URL string `json:"url" api:"required" format:"uri"`
	// Media type. Inferred from URL extension if omitted.
	Type PostRetryResponseMediaType `json:"type"`
	JSON postRetryResponseMediaJSON `json:"-"`
}

func (*PostRetryResponseMedia) UnmarshalJSON

func (r *PostRetryResponseMedia) UnmarshalJSON(data []byte) (err error)

type PostRetryResponseMediaType

type PostRetryResponseMediaType string

Media type. Inferred from URL extension if omitted.

const (
	PostRetryResponseMediaTypeImage    PostRetryResponseMediaType = "image"
	PostRetryResponseMediaTypeVideo    PostRetryResponseMediaType = "video"
	PostRetryResponseMediaTypeGif      PostRetryResponseMediaType = "gif"
	PostRetryResponseMediaTypeDocument PostRetryResponseMediaType = "document"
)

func (PostRetryResponseMediaType) IsKnown

func (r PostRetryResponseMediaType) IsKnown() bool

type PostRetryResponseStatus

type PostRetryResponseStatus string
const (
	PostRetryResponseStatusDraft      PostRetryResponseStatus = "draft"
	PostRetryResponseStatusScheduled  PostRetryResponseStatus = "scheduled"
	PostRetryResponseStatusPublishing PostRetryResponseStatus = "publishing"
	PostRetryResponseStatusPublished  PostRetryResponseStatus = "published"
	PostRetryResponseStatusFailed     PostRetryResponseStatus = "failed"
	PostRetryResponseStatusPartial    PostRetryResponseStatus = "partial"
)

func (PostRetryResponseStatus) IsKnown

func (r PostRetryResponseStatus) IsKnown() bool

type PostRetryResponseTarget

type PostRetryResponseTarget struct {
	Platform PostRetryResponseTargetsPlatform  `json:"platform" api:"required"`
	Status   PostRetryResponseTargetsStatus    `json:"status" api:"required"`
	Accounts []PostRetryResponseTargetsAccount `json:"accounts"`
	Error    PostRetryResponseTargetsError     `json:"error"`
	JSON     postRetryResponseTargetJSON       `json:"-"`
}

func (*PostRetryResponseTarget) UnmarshalJSON

func (r *PostRetryResponseTarget) UnmarshalJSON(data []byte) (err error)

type PostRetryResponseTargetsAccount

type PostRetryResponseTargetsAccount struct {
	ID string `json:"id" api:"required"`
	// Published post URL on the platform
	URL      string                              `json:"url" api:"required,nullable"`
	Username string                              `json:"username" api:"required,nullable"`
	JSON     postRetryResponseTargetsAccountJSON `json:"-"`
}

func (*PostRetryResponseTargetsAccount) UnmarshalJSON

func (r *PostRetryResponseTargetsAccount) UnmarshalJSON(data []byte) (err error)

type PostRetryResponseTargetsError

type PostRetryResponseTargetsError struct {
	Code    string                            `json:"code" api:"required"`
	Message string                            `json:"message" api:"required"`
	JSON    postRetryResponseTargetsErrorJSON `json:"-"`
}

func (*PostRetryResponseTargetsError) UnmarshalJSON

func (r *PostRetryResponseTargetsError) UnmarshalJSON(data []byte) (err error)

type PostRetryResponseTargetsPlatform

type PostRetryResponseTargetsPlatform string
const (
	PostRetryResponseTargetsPlatformTwitter        PostRetryResponseTargetsPlatform = "twitter"
	PostRetryResponseTargetsPlatformInstagram      PostRetryResponseTargetsPlatform = "instagram"
	PostRetryResponseTargetsPlatformFacebook       PostRetryResponseTargetsPlatform = "facebook"
	PostRetryResponseTargetsPlatformLinkedin       PostRetryResponseTargetsPlatform = "linkedin"
	PostRetryResponseTargetsPlatformTiktok         PostRetryResponseTargetsPlatform = "tiktok"
	PostRetryResponseTargetsPlatformYoutube        PostRetryResponseTargetsPlatform = "youtube"
	PostRetryResponseTargetsPlatformPinterest      PostRetryResponseTargetsPlatform = "pinterest"
	PostRetryResponseTargetsPlatformReddit         PostRetryResponseTargetsPlatform = "reddit"
	PostRetryResponseTargetsPlatformBluesky        PostRetryResponseTargetsPlatform = "bluesky"
	PostRetryResponseTargetsPlatformThreads        PostRetryResponseTargetsPlatform = "threads"
	PostRetryResponseTargetsPlatformTelegram       PostRetryResponseTargetsPlatform = "telegram"
	PostRetryResponseTargetsPlatformSnapchat       PostRetryResponseTargetsPlatform = "snapchat"
	PostRetryResponseTargetsPlatformGooglebusiness PostRetryResponseTargetsPlatform = "googlebusiness"
	PostRetryResponseTargetsPlatformWhatsapp       PostRetryResponseTargetsPlatform = "whatsapp"
	PostRetryResponseTargetsPlatformMastodon       PostRetryResponseTargetsPlatform = "mastodon"
	PostRetryResponseTargetsPlatformDiscord        PostRetryResponseTargetsPlatform = "discord"
	PostRetryResponseTargetsPlatformSMS            PostRetryResponseTargetsPlatform = "sms"
)

func (PostRetryResponseTargetsPlatform) IsKnown

type PostRetryResponseTargetsStatus

type PostRetryResponseTargetsStatus string
const (
	PostRetryResponseTargetsStatusDraft      PostRetryResponseTargetsStatus = "draft"
	PostRetryResponseTargetsStatusScheduled  PostRetryResponseTargetsStatus = "scheduled"
	PostRetryResponseTargetsStatusPublishing PostRetryResponseTargetsStatus = "publishing"
	PostRetryResponseTargetsStatusPublished  PostRetryResponseTargetsStatus = "published"
	PostRetryResponseTargetsStatusFailed     PostRetryResponseTargetsStatus = "failed"
)

func (PostRetryResponseTargetsStatus) IsKnown

type PostService

type PostService struct {
	Options []option.RequestOption
	Logs    *PostLogService
}

PostService contains methods and other services that help with interacting with the relay 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 NewPostService method instead.

func NewPostService

func NewPostService(opts ...option.RequestOption) (r *PostService)

NewPostService 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 (*PostService) BulkNew

func (r *PostService) BulkNew(ctx context.Context, body PostBulkNewParams, opts ...option.RequestOption) (res *PostBulkNewResponse, err error)

Create multiple posts in a single request. Each item follows the same schema as single post creation.

func (*PostService) Delete

func (r *PostService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)

Delete a post.

func (*PostService) Get

func (r *PostService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *PostGetResponse, err error)

Get a post

func (*PostService) List

func (r *PostService) List(ctx context.Context, query PostListParams, opts ...option.RequestOption) (res *PostListResponse, err error)

List posts

func (*PostService) New

func (r *PostService) New(ctx context.Context, body PostNewParams, opts ...option.RequestOption) (res *PostNewResponse, err error)

Create a post. Use scheduled_at: "now" to publish immediately, "draft" to save as draft, or an ISO timestamp to schedule.

func (*PostService) Retry

func (r *PostService) Retry(ctx context.Context, id string, opts ...option.RequestOption) (res *PostRetryResponse, err error)

Retry publishing for failed targets on a post.

func (*PostService) Unpublish

func (r *PostService) Unpublish(ctx context.Context, id string, body PostUnpublishParams, opts ...option.RequestOption) (res *PostUnpublishResponse, err error)

Attempt to delete the post from each platform and set the post status to cancelled.

func (*PostService) Update

func (r *PostService) Update(ctx context.Context, id string, body PostUpdateParams, opts ...option.RequestOption) (res *PostUpdateResponse, err error)

Update a draft or scheduled post.

type PostUnpublishParams

type PostUnpublishParams struct {
	// Platforms to unpublish from. If omitted, unpublishes from all.
	Platforms param.Field[[]string] `json:"platforms"`
}

func (PostUnpublishParams) MarshalJSON

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

type PostUnpublishResponse

type PostUnpublishResponse struct {
	// Post ID
	ID          string                       `json:"id" api:"required"`
	Content     string                       `json:"content" api:"required,nullable"`
	CreatedAt   time.Time                    `json:"created_at" api:"required" format:"date-time"`
	Media       []PostUnpublishResponseMedia `json:"media" api:"required,nullable"`
	ScheduledAt string                       `json:"scheduled_at" api:"required,nullable"`
	Status      PostUnpublishResponseStatus  `json:"status" api:"required"`
	// Per-target results
	Targets   map[string]PostUnpublishResponseTarget `json:"targets" api:"required"`
	UpdatedAt time.Time                              `json:"updated_at" api:"required" format:"date-time"`
	JSON      postUnpublishResponseJSON              `json:"-"`
}

func (*PostUnpublishResponse) UnmarshalJSON

func (r *PostUnpublishResponse) UnmarshalJSON(data []byte) (err error)

type PostUnpublishResponseMedia

type PostUnpublishResponseMedia struct {
	// Public URL of the media file
	URL string `json:"url" api:"required" format:"uri"`
	// Media type. Inferred from URL extension if omitted.
	Type PostUnpublishResponseMediaType `json:"type"`
	JSON postUnpublishResponseMediaJSON `json:"-"`
}

func (*PostUnpublishResponseMedia) UnmarshalJSON

func (r *PostUnpublishResponseMedia) UnmarshalJSON(data []byte) (err error)

type PostUnpublishResponseMediaType

type PostUnpublishResponseMediaType string

Media type. Inferred from URL extension if omitted.

const (
	PostUnpublishResponseMediaTypeImage    PostUnpublishResponseMediaType = "image"
	PostUnpublishResponseMediaTypeVideo    PostUnpublishResponseMediaType = "video"
	PostUnpublishResponseMediaTypeGif      PostUnpublishResponseMediaType = "gif"
	PostUnpublishResponseMediaTypeDocument PostUnpublishResponseMediaType = "document"
)

func (PostUnpublishResponseMediaType) IsKnown

type PostUnpublishResponseStatus

type PostUnpublishResponseStatus string
const (
	PostUnpublishResponseStatusDraft      PostUnpublishResponseStatus = "draft"
	PostUnpublishResponseStatusScheduled  PostUnpublishResponseStatus = "scheduled"
	PostUnpublishResponseStatusPublishing PostUnpublishResponseStatus = "publishing"
	PostUnpublishResponseStatusPublished  PostUnpublishResponseStatus = "published"
	PostUnpublishResponseStatusFailed     PostUnpublishResponseStatus = "failed"
	PostUnpublishResponseStatusPartial    PostUnpublishResponseStatus = "partial"
)

func (PostUnpublishResponseStatus) IsKnown

func (r PostUnpublishResponseStatus) IsKnown() bool

type PostUnpublishResponseTarget

type PostUnpublishResponseTarget struct {
	Platform PostUnpublishResponseTargetsPlatform  `json:"platform" api:"required"`
	Status   PostUnpublishResponseTargetsStatus    `json:"status" api:"required"`
	Accounts []PostUnpublishResponseTargetsAccount `json:"accounts"`
	Error    PostUnpublishResponseTargetsError     `json:"error"`
	JSON     postUnpublishResponseTargetJSON       `json:"-"`
}

func (*PostUnpublishResponseTarget) UnmarshalJSON

func (r *PostUnpublishResponseTarget) UnmarshalJSON(data []byte) (err error)

type PostUnpublishResponseTargetsAccount

type PostUnpublishResponseTargetsAccount struct {
	ID string `json:"id" api:"required"`
	// Published post URL on the platform
	URL      string                                  `json:"url" api:"required,nullable"`
	Username string                                  `json:"username" api:"required,nullable"`
	JSON     postUnpublishResponseTargetsAccountJSON `json:"-"`
}

func (*PostUnpublishResponseTargetsAccount) UnmarshalJSON

func (r *PostUnpublishResponseTargetsAccount) UnmarshalJSON(data []byte) (err error)

type PostUnpublishResponseTargetsError

type PostUnpublishResponseTargetsError struct {
	Code    string                                `json:"code" api:"required"`
	Message string                                `json:"message" api:"required"`
	JSON    postUnpublishResponseTargetsErrorJSON `json:"-"`
}

func (*PostUnpublishResponseTargetsError) UnmarshalJSON

func (r *PostUnpublishResponseTargetsError) UnmarshalJSON(data []byte) (err error)

type PostUnpublishResponseTargetsPlatform

type PostUnpublishResponseTargetsPlatform string
const (
	PostUnpublishResponseTargetsPlatformTwitter        PostUnpublishResponseTargetsPlatform = "twitter"
	PostUnpublishResponseTargetsPlatformInstagram      PostUnpublishResponseTargetsPlatform = "instagram"
	PostUnpublishResponseTargetsPlatformFacebook       PostUnpublishResponseTargetsPlatform = "facebook"
	PostUnpublishResponseTargetsPlatformLinkedin       PostUnpublishResponseTargetsPlatform = "linkedin"
	PostUnpublishResponseTargetsPlatformTiktok         PostUnpublishResponseTargetsPlatform = "tiktok"
	PostUnpublishResponseTargetsPlatformYoutube        PostUnpublishResponseTargetsPlatform = "youtube"
	PostUnpublishResponseTargetsPlatformPinterest      PostUnpublishResponseTargetsPlatform = "pinterest"
	PostUnpublishResponseTargetsPlatformReddit         PostUnpublishResponseTargetsPlatform = "reddit"
	PostUnpublishResponseTargetsPlatformBluesky        PostUnpublishResponseTargetsPlatform = "bluesky"
	PostUnpublishResponseTargetsPlatformThreads        PostUnpublishResponseTargetsPlatform = "threads"
	PostUnpublishResponseTargetsPlatformTelegram       PostUnpublishResponseTargetsPlatform = "telegram"
	PostUnpublishResponseTargetsPlatformSnapchat       PostUnpublishResponseTargetsPlatform = "snapchat"
	PostUnpublishResponseTargetsPlatformGooglebusiness PostUnpublishResponseTargetsPlatform = "googlebusiness"
	PostUnpublishResponseTargetsPlatformWhatsapp       PostUnpublishResponseTargetsPlatform = "whatsapp"
	PostUnpublishResponseTargetsPlatformMastodon       PostUnpublishResponseTargetsPlatform = "mastodon"
	PostUnpublishResponseTargetsPlatformDiscord        PostUnpublishResponseTargetsPlatform = "discord"
	PostUnpublishResponseTargetsPlatformSMS            PostUnpublishResponseTargetsPlatform = "sms"
)

func (PostUnpublishResponseTargetsPlatform) IsKnown

type PostUnpublishResponseTargetsStatus

type PostUnpublishResponseTargetsStatus string
const (
	PostUnpublishResponseTargetsStatusDraft      PostUnpublishResponseTargetsStatus = "draft"
	PostUnpublishResponseTargetsStatusScheduled  PostUnpublishResponseTargetsStatus = "scheduled"
	PostUnpublishResponseTargetsStatusPublishing PostUnpublishResponseTargetsStatus = "publishing"
	PostUnpublishResponseTargetsStatusPublished  PostUnpublishResponseTargetsStatus = "published"
	PostUnpublishResponseTargetsStatusFailed     PostUnpublishResponseTargetsStatus = "failed"
)

func (PostUnpublishResponseTargetsStatus) IsKnown

type PostUpdateParams

type PostUpdateParams struct {
	// Post text
	Content param.Field[string] `json:"content"`
	// Updated media
	Media param.Field[[]PostUpdateParamsMedia] `json:"media"`
	// Publish intent. Use "now" to publish immediately, "draft" to save as draft, or
	// an ISO 8601 timestamp to schedule.
	ScheduledAt   param.Field[string]                            `json:"scheduled_at"`
	TargetOptions param.Field[map[string]map[string]interface{}] `json:"target_options"`
	// Updated targets
	Targets  param.Field[[]string] `json:"targets"`
	Timezone param.Field[string]   `json:"timezone"`
}

func (PostUpdateParams) MarshalJSON

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

type PostUpdateParamsMedia

type PostUpdateParamsMedia struct {
	// Public URL of the media file
	URL param.Field[string] `json:"url" api:"required" format:"uri"`
	// Media type. Inferred from URL extension if omitted.
	Type param.Field[PostUpdateParamsMediaType] `json:"type"`
}

func (PostUpdateParamsMedia) MarshalJSON

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

type PostUpdateParamsMediaType

type PostUpdateParamsMediaType string

Media type. Inferred from URL extension if omitted.

const (
	PostUpdateParamsMediaTypeImage    PostUpdateParamsMediaType = "image"
	PostUpdateParamsMediaTypeVideo    PostUpdateParamsMediaType = "video"
	PostUpdateParamsMediaTypeGif      PostUpdateParamsMediaType = "gif"
	PostUpdateParamsMediaTypeDocument PostUpdateParamsMediaType = "document"
)

func (PostUpdateParamsMediaType) IsKnown

func (r PostUpdateParamsMediaType) IsKnown() bool

type PostUpdateResponse

type PostUpdateResponse struct {
	// Post ID
	ID          string                    `json:"id" api:"required"`
	Content     string                    `json:"content" api:"required,nullable"`
	CreatedAt   time.Time                 `json:"created_at" api:"required" format:"date-time"`
	Media       []PostUpdateResponseMedia `json:"media" api:"required,nullable"`
	ScheduledAt string                    `json:"scheduled_at" api:"required,nullable"`
	Status      PostUpdateResponseStatus  `json:"status" api:"required"`
	// Per-target results
	Targets   map[string]PostUpdateResponseTarget `json:"targets" api:"required"`
	UpdatedAt time.Time                           `json:"updated_at" api:"required" format:"date-time"`
	JSON      postUpdateResponseJSON              `json:"-"`
}

func (*PostUpdateResponse) UnmarshalJSON

func (r *PostUpdateResponse) UnmarshalJSON(data []byte) (err error)

type PostUpdateResponseMedia

type PostUpdateResponseMedia struct {
	// Public URL of the media file
	URL string `json:"url" api:"required" format:"uri"`
	// Media type. Inferred from URL extension if omitted.
	Type PostUpdateResponseMediaType `json:"type"`
	JSON postUpdateResponseMediaJSON `json:"-"`
}

func (*PostUpdateResponseMedia) UnmarshalJSON

func (r *PostUpdateResponseMedia) UnmarshalJSON(data []byte) (err error)

type PostUpdateResponseMediaType

type PostUpdateResponseMediaType string

Media type. Inferred from URL extension if omitted.

const (
	PostUpdateResponseMediaTypeImage    PostUpdateResponseMediaType = "image"
	PostUpdateResponseMediaTypeVideo    PostUpdateResponseMediaType = "video"
	PostUpdateResponseMediaTypeGif      PostUpdateResponseMediaType = "gif"
	PostUpdateResponseMediaTypeDocument PostUpdateResponseMediaType = "document"
)

func (PostUpdateResponseMediaType) IsKnown

func (r PostUpdateResponseMediaType) IsKnown() bool

type PostUpdateResponseStatus

type PostUpdateResponseStatus string
const (
	PostUpdateResponseStatusDraft      PostUpdateResponseStatus = "draft"
	PostUpdateResponseStatusScheduled  PostUpdateResponseStatus = "scheduled"
	PostUpdateResponseStatusPublishing PostUpdateResponseStatus = "publishing"
	PostUpdateResponseStatusPublished  PostUpdateResponseStatus = "published"
	PostUpdateResponseStatusFailed     PostUpdateResponseStatus = "failed"
	PostUpdateResponseStatusPartial    PostUpdateResponseStatus = "partial"
)

func (PostUpdateResponseStatus) IsKnown

func (r PostUpdateResponseStatus) IsKnown() bool

type PostUpdateResponseTarget

type PostUpdateResponseTarget struct {
	Platform PostUpdateResponseTargetsPlatform  `json:"platform" api:"required"`
	Status   PostUpdateResponseTargetsStatus    `json:"status" api:"required"`
	Accounts []PostUpdateResponseTargetsAccount `json:"accounts"`
	Error    PostUpdateResponseTargetsError     `json:"error"`
	JSON     postUpdateResponseTargetJSON       `json:"-"`
}

func (*PostUpdateResponseTarget) UnmarshalJSON

func (r *PostUpdateResponseTarget) UnmarshalJSON(data []byte) (err error)

type PostUpdateResponseTargetsAccount

type PostUpdateResponseTargetsAccount struct {
	ID string `json:"id" api:"required"`
	// Published post URL on the platform
	URL      string                               `json:"url" api:"required,nullable"`
	Username string                               `json:"username" api:"required,nullable"`
	JSON     postUpdateResponseTargetsAccountJSON `json:"-"`
}

func (*PostUpdateResponseTargetsAccount) UnmarshalJSON

func (r *PostUpdateResponseTargetsAccount) UnmarshalJSON(data []byte) (err error)

type PostUpdateResponseTargetsError

type PostUpdateResponseTargetsError struct {
	Code    string                             `json:"code" api:"required"`
	Message string                             `json:"message" api:"required"`
	JSON    postUpdateResponseTargetsErrorJSON `json:"-"`
}

func (*PostUpdateResponseTargetsError) UnmarshalJSON

func (r *PostUpdateResponseTargetsError) UnmarshalJSON(data []byte) (err error)

type PostUpdateResponseTargetsPlatform

type PostUpdateResponseTargetsPlatform string
const (
	PostUpdateResponseTargetsPlatformTwitter        PostUpdateResponseTargetsPlatform = "twitter"
	PostUpdateResponseTargetsPlatformInstagram      PostUpdateResponseTargetsPlatform = "instagram"
	PostUpdateResponseTargetsPlatformFacebook       PostUpdateResponseTargetsPlatform = "facebook"
	PostUpdateResponseTargetsPlatformLinkedin       PostUpdateResponseTargetsPlatform = "linkedin"
	PostUpdateResponseTargetsPlatformTiktok         PostUpdateResponseTargetsPlatform = "tiktok"
	PostUpdateResponseTargetsPlatformYoutube        PostUpdateResponseTargetsPlatform = "youtube"
	PostUpdateResponseTargetsPlatformPinterest      PostUpdateResponseTargetsPlatform = "pinterest"
	PostUpdateResponseTargetsPlatformReddit         PostUpdateResponseTargetsPlatform = "reddit"
	PostUpdateResponseTargetsPlatformBluesky        PostUpdateResponseTargetsPlatform = "bluesky"
	PostUpdateResponseTargetsPlatformThreads        PostUpdateResponseTargetsPlatform = "threads"
	PostUpdateResponseTargetsPlatformTelegram       PostUpdateResponseTargetsPlatform = "telegram"
	PostUpdateResponseTargetsPlatformSnapchat       PostUpdateResponseTargetsPlatform = "snapchat"
	PostUpdateResponseTargetsPlatformGooglebusiness PostUpdateResponseTargetsPlatform = "googlebusiness"
	PostUpdateResponseTargetsPlatformWhatsapp       PostUpdateResponseTargetsPlatform = "whatsapp"
	PostUpdateResponseTargetsPlatformMastodon       PostUpdateResponseTargetsPlatform = "mastodon"
	PostUpdateResponseTargetsPlatformDiscord        PostUpdateResponseTargetsPlatform = "discord"
	PostUpdateResponseTargetsPlatformSMS            PostUpdateResponseTargetsPlatform = "sms"
)

func (PostUpdateResponseTargetsPlatform) IsKnown

type PostUpdateResponseTargetsStatus

type PostUpdateResponseTargetsStatus string
const (
	PostUpdateResponseTargetsStatusDraft      PostUpdateResponseTargetsStatus = "draft"
	PostUpdateResponseTargetsStatusScheduled  PostUpdateResponseTargetsStatus = "scheduled"
	PostUpdateResponseTargetsStatusPublishing PostUpdateResponseTargetsStatus = "publishing"
	PostUpdateResponseTargetsStatusPublished  PostUpdateResponseTargetsStatus = "published"
	PostUpdateResponseTargetsStatusFailed     PostUpdateResponseTargetsStatus = "failed"
)

func (PostUpdateResponseTargetsStatus) IsKnown

type QueueGetNextSlotResponse

type QueueGetNextSlotResponse struct {
	// Next available slot (ISO 8601)
	NextSlotAt time.Time `json:"next_slot_at" api:"required" format:"date-time"`
	// Queue schedule ID
	QueueID string                       `json:"queue_id" api:"required"`
	JSON    queueGetNextSlotResponseJSON `json:"-"`
}

func (*QueueGetNextSlotResponse) UnmarshalJSON

func (r *QueueGetNextSlotResponse) UnmarshalJSON(data []byte) (err error)

type QueuePreviewParams

type QueuePreviewParams struct {
	// Number of upcoming slots to preview
	Count param.Field[int64] `query:"count"`
}

func (QueuePreviewParams) URLQuery

func (r QueuePreviewParams) URLQuery() (v url.Values)

URLQuery serializes QueuePreviewParams's query parameters as `url.Values`.

type QueuePreviewResponse

type QueuePreviewResponse struct {
	// Upcoming slot timestamps (ISO 8601)
	Slots []time.Time              `json:"slots" api:"required" format:"date-time"`
	JSON  queuePreviewResponseJSON `json:"-"`
}

func (*QueuePreviewResponse) UnmarshalJSON

func (r *QueuePreviewResponse) UnmarshalJSON(data []byte) (err error)

type QueueService

type QueueService struct {
	Options []option.RequestOption
	Slots   *QueueSlotService
}

QueueService contains methods and other services that help with interacting with the relay 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 NewQueueService method instead.

func NewQueueService

func NewQueueService(opts ...option.RequestOption) (r *QueueService)

NewQueueService 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 (*QueueService) GetNextSlot

func (r *QueueService) GetNextSlot(ctx context.Context, opts ...option.RequestOption) (res *QueueGetNextSlotResponse, err error)

Get next available queue slot

func (*QueueService) Preview

func (r *QueueService) Preview(ctx context.Context, query QueuePreviewParams, opts ...option.RequestOption) (res *QueuePreviewResponse, err error)

Preview upcoming queue slots

type QueueSlotListResponse

type QueueSlotListResponse struct {
	Data []QueueSlotListResponseData `json:"data" api:"required"`
	JSON queueSlotListResponseJSON   `json:"-"`
}

func (*QueueSlotListResponse) UnmarshalJSON

func (r *QueueSlotListResponse) UnmarshalJSON(data []byte) (err error)

type QueueSlotListResponseData

type QueueSlotListResponseData struct {
	// Queue schedule ID
	ID string `json:"id" api:"required"`
	// Created timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Whether this is the default schedule
	IsDefault bool `json:"is_default" api:"required"`
	// Time slots
	Slots []QueueSlotListResponseDataSlot `json:"slots" api:"required"`
	// Updated timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Schedule name
	Name string                        `json:"name" api:"nullable"`
	JSON queueSlotListResponseDataJSON `json:"-"`
}

func (*QueueSlotListResponseData) UnmarshalJSON

func (r *QueueSlotListResponseData) UnmarshalJSON(data []byte) (err error)

type QueueSlotListResponseDataSlot

type QueueSlotListResponseDataSlot struct {
	// Day of week (0=Sunday, 6=Saturday)
	DayOfWeek int64 `json:"day_of_week" api:"required"`
	// Time in HH:MM format
	Time string `json:"time" api:"required"`
	// IANA timezone (e.g. America/New_York)
	Timezone string                            `json:"timezone" api:"required"`
	JSON     queueSlotListResponseDataSlotJSON `json:"-"`
}

func (*QueueSlotListResponseDataSlot) UnmarshalJSON

func (r *QueueSlotListResponseDataSlot) UnmarshalJSON(data []byte) (err error)

type QueueSlotNewParams

type QueueSlotNewParams struct {
	// Time slots
	Slots param.Field[[]QueueSlotNewParamsSlot] `json:"slots" api:"required"`
	// Default timezone for slots
	Timezone param.Field[string] `json:"timezone" api:"required"`
	// Schedule name
	Name param.Field[string] `json:"name"`
}

func (QueueSlotNewParams) MarshalJSON

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

type QueueSlotNewParamsSlot

type QueueSlotNewParamsSlot struct {
	// Day of week (0=Sunday, 6=Saturday)
	DayOfWeek param.Field[int64] `json:"day_of_week" api:"required"`
	// Time in HH:MM format
	Time param.Field[string] `json:"time" api:"required"`
	// IANA timezone (e.g. America/New_York)
	Timezone param.Field[string] `json:"timezone" api:"required"`
}

func (QueueSlotNewParamsSlot) MarshalJSON

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

type QueueSlotNewResponse

type QueueSlotNewResponse struct {
	// Queue schedule ID
	ID string `json:"id" api:"required"`
	// Created timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Whether this is the default schedule
	IsDefault bool `json:"is_default" api:"required"`
	// Time slots
	Slots []QueueSlotNewResponseSlot `json:"slots" api:"required"`
	// Updated timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Schedule name
	Name string                   `json:"name" api:"nullable"`
	JSON queueSlotNewResponseJSON `json:"-"`
}

func (*QueueSlotNewResponse) UnmarshalJSON

func (r *QueueSlotNewResponse) UnmarshalJSON(data []byte) (err error)

type QueueSlotNewResponseSlot

type QueueSlotNewResponseSlot struct {
	// Day of week (0=Sunday, 6=Saturday)
	DayOfWeek int64 `json:"day_of_week" api:"required"`
	// Time in HH:MM format
	Time string `json:"time" api:"required"`
	// IANA timezone (e.g. America/New_York)
	Timezone string                       `json:"timezone" api:"required"`
	JSON     queueSlotNewResponseSlotJSON `json:"-"`
}

func (*QueueSlotNewResponseSlot) UnmarshalJSON

func (r *QueueSlotNewResponseSlot) UnmarshalJSON(data []byte) (err error)

type QueueSlotService

type QueueSlotService struct {
	Options []option.RequestOption
}

QueueSlotService contains methods and other services that help with interacting with the relay 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 NewQueueSlotService method instead.

func NewQueueSlotService

func NewQueueSlotService(opts ...option.RequestOption) (r *QueueSlotService)

NewQueueSlotService 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 (*QueueSlotService) Delete

func (r *QueueSlotService) Delete(ctx context.Context, opts ...option.RequestOption) (err error)

Delete queue schedule

func (*QueueSlotService) List

List queue schedules

func (*QueueSlotService) New

Create a queue schedule

func (*QueueSlotService) Update

Update queue schedule

type QueueSlotUpdateParams

type QueueSlotUpdateParams struct {
	// Schedule name
	Name param.Field[string] `json:"name"`
	// Set this schedule as the default
	SetAsDefault param.Field[bool] `json:"set_as_default"`
	// Updated time slots
	Slots param.Field[[]QueueSlotUpdateParamsSlot] `json:"slots"`
}

func (QueueSlotUpdateParams) MarshalJSON

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

type QueueSlotUpdateParamsSlot

type QueueSlotUpdateParamsSlot struct {
	// Day of week (0=Sunday, 6=Saturday)
	DayOfWeek param.Field[int64] `json:"day_of_week" api:"required"`
	// Time in HH:MM format
	Time param.Field[string] `json:"time" api:"required"`
	// IANA timezone (e.g. America/New_York)
	Timezone param.Field[string] `json:"timezone" api:"required"`
}

func (QueueSlotUpdateParamsSlot) MarshalJSON

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

type QueueSlotUpdateResponse

type QueueSlotUpdateResponse struct {
	// Queue schedule ID
	ID string `json:"id" api:"required"`
	// Created timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Whether this is the default schedule
	IsDefault bool `json:"is_default" api:"required"`
	// Time slots
	Slots []QueueSlotUpdateResponseSlot `json:"slots" api:"required"`
	// Updated timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Schedule name
	Name string                      `json:"name" api:"nullable"`
	JSON queueSlotUpdateResponseJSON `json:"-"`
}

func (*QueueSlotUpdateResponse) UnmarshalJSON

func (r *QueueSlotUpdateResponse) UnmarshalJSON(data []byte) (err error)

type QueueSlotUpdateResponseSlot

type QueueSlotUpdateResponseSlot struct {
	// Day of week (0=Sunday, 6=Saturday)
	DayOfWeek int64 `json:"day_of_week" api:"required"`
	// Time in HH:MM format
	Time string `json:"time" api:"required"`
	// IANA timezone (e.g. America/New_York)
	Timezone string                          `json:"timezone" api:"required"`
	JSON     queueSlotUpdateResponseSlotJSON `json:"-"`
}

func (*QueueSlotUpdateResponseSlot) UnmarshalJSON

func (r *QueueSlotUpdateResponseSlot) UnmarshalJSON(data []byte) (err error)

type RedditGetFeedParams

type RedditGetFeedParams struct {
	// Reddit account ID
	AccountID param.Field[string] `query:"account_id" api:"required"`
	// Subreddit name
	Subreddit param.Field[string] `query:"subreddit" api:"required"`
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Filter: start date (ISO 8601)
	From param.Field[time.Time] `query:"from" format:"date-time"`
	// Number of items per page
	Limit param.Field[int64] `query:"limit"`
	// Sort order
	Sort param.Field[RedditGetFeedParamsSort] `query:"sort"`
	// Time filter (for top sort)
	Time param.Field[RedditGetFeedParamsTime] `query:"time"`
	// Filter: end date (ISO 8601)
	To param.Field[time.Time] `query:"to" format:"date-time"`
}

func (RedditGetFeedParams) URLQuery

func (r RedditGetFeedParams) URLQuery() (v url.Values)

URLQuery serializes RedditGetFeedParams's query parameters as `url.Values`.

type RedditGetFeedParamsSort

type RedditGetFeedParamsSort string

Sort order

const (
	RedditGetFeedParamsSortHot    RedditGetFeedParamsSort = "hot"
	RedditGetFeedParamsSortNew    RedditGetFeedParamsSort = "new"
	RedditGetFeedParamsSortTop    RedditGetFeedParamsSort = "top"
	RedditGetFeedParamsSortRising RedditGetFeedParamsSort = "rising"
)

func (RedditGetFeedParamsSort) IsKnown

func (r RedditGetFeedParamsSort) IsKnown() bool

type RedditGetFeedParamsTime

type RedditGetFeedParamsTime string

Time filter (for top sort)

const (
	RedditGetFeedParamsTimeHour  RedditGetFeedParamsTime = "hour"
	RedditGetFeedParamsTimeDay   RedditGetFeedParamsTime = "day"
	RedditGetFeedParamsTimeWeek  RedditGetFeedParamsTime = "week"
	RedditGetFeedParamsTimeMonth RedditGetFeedParamsTime = "month"
	RedditGetFeedParamsTimeYear  RedditGetFeedParamsTime = "year"
	RedditGetFeedParamsTimeAll   RedditGetFeedParamsTime = "all"
)

func (RedditGetFeedParamsTime) IsKnown

func (r RedditGetFeedParamsTime) IsKnown() bool

type RedditGetFeedResponse

type RedditGetFeedResponse struct {
	Data       []RedditGetFeedResponseData `json:"data" api:"required"`
	HasMore    bool                        `json:"has_more" api:"required"`
	NextCursor string                      `json:"next_cursor" api:"required,nullable"`
	JSON       redditGetFeedResponseJSON   `json:"-"`
}

func (*RedditGetFeedResponse) UnmarshalJSON

func (r *RedditGetFeedResponse) UnmarshalJSON(data []byte) (err error)

type RedditGetFeedResponseData

type RedditGetFeedResponseData struct {
	// Reddit post ID
	ID string `json:"id" api:"required"`
	// Post author
	Author string `json:"author" api:"required"`
	// Created timestamp (Unix)
	CreatedUtc float64 `json:"created_utc" api:"required"`
	// Whether it's a self post
	IsSelf bool `json:"is_self" api:"required"`
	// Whether NSFW
	Nsfw bool `json:"nsfw" api:"required"`
	// Comment count
	NumComments float64 `json:"num_comments" api:"required"`
	// Post score
	Score float64 `json:"score" api:"required"`
	// Subreddit name
	Subreddit string `json:"subreddit" api:"required"`
	// Post title
	Title string `json:"title" api:"required"`
	// Post URL
	URL string `json:"url" api:"required"`
	// Self text
	Selftext string `json:"selftext" api:"nullable"`
	// Thumbnail URL
	Thumbnail string                        `json:"thumbnail" api:"nullable"`
	JSON      redditGetFeedResponseDataJSON `json:"-"`
}

func (*RedditGetFeedResponseData) UnmarshalJSON

func (r *RedditGetFeedResponseData) UnmarshalJSON(data []byte) (err error)

type RedditSearchParams

type RedditSearchParams struct {
	// Reddit account ID
	AccountID param.Field[string] `query:"account_id" api:"required"`
	// Search query
	Query param.Field[string] `query:"query" api:"required"`
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Filter: start date (ISO 8601)
	From param.Field[time.Time] `query:"from" format:"date-time"`
	// Number of items per page
	Limit param.Field[int64] `query:"limit"`
	// Sort order
	Sort param.Field[RedditSearchParamsSort] `query:"sort"`
	// Limit to subreddit
	Subreddit param.Field[string] `query:"subreddit"`
	// Time filter
	Time param.Field[RedditSearchParamsTime] `query:"time"`
	// Filter: end date (ISO 8601)
	To param.Field[time.Time] `query:"to" format:"date-time"`
}

func (RedditSearchParams) URLQuery

func (r RedditSearchParams) URLQuery() (v url.Values)

URLQuery serializes RedditSearchParams's query parameters as `url.Values`.

type RedditSearchParamsSort

type RedditSearchParamsSort string

Sort order

const (
	RedditSearchParamsSortRelevance RedditSearchParamsSort = "relevance"
	RedditSearchParamsSortHot       RedditSearchParamsSort = "hot"
	RedditSearchParamsSortTop       RedditSearchParamsSort = "top"
	RedditSearchParamsSortNew       RedditSearchParamsSort = "new"
	RedditSearchParamsSortComments  RedditSearchParamsSort = "comments"
)

func (RedditSearchParamsSort) IsKnown

func (r RedditSearchParamsSort) IsKnown() bool

type RedditSearchParamsTime

type RedditSearchParamsTime string

Time filter

const (
	RedditSearchParamsTimeHour  RedditSearchParamsTime = "hour"
	RedditSearchParamsTimeDay   RedditSearchParamsTime = "day"
	RedditSearchParamsTimeWeek  RedditSearchParamsTime = "week"
	RedditSearchParamsTimeMonth RedditSearchParamsTime = "month"
	RedditSearchParamsTimeYear  RedditSearchParamsTime = "year"
	RedditSearchParamsTimeAll   RedditSearchParamsTime = "all"
)

func (RedditSearchParamsTime) IsKnown

func (r RedditSearchParamsTime) IsKnown() bool

type RedditSearchResponse

type RedditSearchResponse struct {
	Data       []RedditSearchResponseData `json:"data" api:"required"`
	HasMore    bool                       `json:"has_more" api:"required"`
	NextCursor string                     `json:"next_cursor" api:"required,nullable"`
	JSON       redditSearchResponseJSON   `json:"-"`
}

func (*RedditSearchResponse) UnmarshalJSON

func (r *RedditSearchResponse) UnmarshalJSON(data []byte) (err error)

type RedditSearchResponseData

type RedditSearchResponseData struct {
	// Reddit post ID
	ID string `json:"id" api:"required"`
	// Post author
	Author string `json:"author" api:"required"`
	// Created timestamp (Unix)
	CreatedUtc float64 `json:"created_utc" api:"required"`
	// Whether it's a self post
	IsSelf bool `json:"is_self" api:"required"`
	// Whether NSFW
	Nsfw bool `json:"nsfw" api:"required"`
	// Comment count
	NumComments float64 `json:"num_comments" api:"required"`
	// Post score
	Score float64 `json:"score" api:"required"`
	// Subreddit name
	Subreddit string `json:"subreddit" api:"required"`
	// Post title
	Title string `json:"title" api:"required"`
	// Post URL
	URL string `json:"url" api:"required"`
	// Self text
	Selftext string `json:"selftext" api:"nullable"`
	// Thumbnail URL
	Thumbnail string                       `json:"thumbnail" api:"nullable"`
	JSON      redditSearchResponseDataJSON `json:"-"`
}

func (*RedditSearchResponseData) UnmarshalJSON

func (r *RedditSearchResponseData) UnmarshalJSON(data []byte) (err error)

type RedditService

type RedditService struct {
	Options []option.RequestOption
}

RedditService contains methods and other services that help with interacting with the relay 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 NewRedditService method instead.

func NewRedditService

func NewRedditService(opts ...option.RequestOption) (r *RedditService)

NewRedditService 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 (*RedditService) GetFeed

Get subreddit feed

func (*RedditService) Search

Search Reddit posts

type ToolInstagramCheckHashtagSafetyParams

type ToolInstagramCheckHashtagSafetyParams struct {
	// Hashtags to check (without # prefix)
	Hashtags param.Field[[]string] `json:"hashtags" api:"required"`
}

func (ToolInstagramCheckHashtagSafetyParams) MarshalJSON

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

type ToolInstagramCheckHashtagSafetyResponse

type ToolInstagramCheckHashtagSafetyResponse struct {
	Results []ToolInstagramCheckHashtagSafetyResponseResult `json:"results" api:"required"`
	JSON    toolInstagramCheckHashtagSafetyResponseJSON     `json:"-"`
}

func (*ToolInstagramCheckHashtagSafetyResponse) UnmarshalJSON

func (r *ToolInstagramCheckHashtagSafetyResponse) UnmarshalJSON(data []byte) (err error)

type ToolInstagramCheckHashtagSafetyResponseResult

type ToolInstagramCheckHashtagSafetyResponseResult struct {
	// Hashtag checked
	Hashtag string `json:"hashtag" api:"required"`
	// Hashtag safety status
	Status ToolInstagramCheckHashtagSafetyResponseResultsStatus `json:"status" api:"required"`
	JSON   toolInstagramCheckHashtagSafetyResponseResultJSON    `json:"-"`
}

func (*ToolInstagramCheckHashtagSafetyResponseResult) UnmarshalJSON

func (r *ToolInstagramCheckHashtagSafetyResponseResult) UnmarshalJSON(data []byte) (err error)

type ToolInstagramCheckHashtagSafetyResponseResultsStatus

type ToolInstagramCheckHashtagSafetyResponseResultsStatus string

Hashtag safety status

const (
	ToolInstagramCheckHashtagSafetyResponseResultsStatusSafe       ToolInstagramCheckHashtagSafetyResponseResultsStatus = "safe"
	ToolInstagramCheckHashtagSafetyResponseResultsStatusRestricted ToolInstagramCheckHashtagSafetyResponseResultsStatus = "restricted"
	ToolInstagramCheckHashtagSafetyResponseResultsStatusBanned     ToolInstagramCheckHashtagSafetyResponseResultsStatus = "banned"
)

func (ToolInstagramCheckHashtagSafetyResponseResultsStatus) IsKnown

type ToolInstagramService

type ToolInstagramService struct {
	Options []option.RequestOption
}

ToolInstagramService contains methods and other services that help with interacting with the relay 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 NewToolInstagramService method instead.

func NewToolInstagramService

func NewToolInstagramService(opts ...option.RequestOption) (r *ToolInstagramService)

NewToolInstagramService 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 (*ToolInstagramService) CheckHashtagSafety

Check Instagram hashtag safety status

type ToolService

type ToolService struct {
	Options   []option.RequestOption
	Validate  *ToolValidateService
	Instagram *ToolInstagramService
}

ToolService contains methods and other services that help with interacting with the relay 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 NewToolService method instead.

func NewToolService

func NewToolService(opts ...option.RequestOption) (r *ToolService)

NewToolService 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 ToolValidateCheckPostLengthParams

type ToolValidateCheckPostLengthParams struct {
	// Post content to check
	Content param.Field[string] `json:"content" api:"required"`
}

func (ToolValidateCheckPostLengthParams) MarshalJSON

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

type ToolValidateCheckPostLengthResponse

type ToolValidateCheckPostLengthResponse struct {
	// Character count per platform
	Platforms ToolValidateCheckPostLengthResponsePlatforms `json:"platforms" api:"required"`
	JSON      toolValidateCheckPostLengthResponseJSON      `json:"-"`
}

func (*ToolValidateCheckPostLengthResponse) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponse) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatforms

type ToolValidateCheckPostLengthResponsePlatforms struct {
	Bluesky        ToolValidateCheckPostLengthResponsePlatformsBluesky        `json:"bluesky"`
	Discord        ToolValidateCheckPostLengthResponsePlatformsDiscord        `json:"discord"`
	Facebook       ToolValidateCheckPostLengthResponsePlatformsFacebook       `json:"facebook"`
	Googlebusiness ToolValidateCheckPostLengthResponsePlatformsGooglebusiness `json:"googlebusiness"`
	Instagram      ToolValidateCheckPostLengthResponsePlatformsInstagram      `json:"instagram"`
	Linkedin       ToolValidateCheckPostLengthResponsePlatformsLinkedin       `json:"linkedin"`
	Mastodon       ToolValidateCheckPostLengthResponsePlatformsMastodon       `json:"mastodon"`
	Pinterest      ToolValidateCheckPostLengthResponsePlatformsPinterest      `json:"pinterest"`
	Reddit         ToolValidateCheckPostLengthResponsePlatformsReddit         `json:"reddit"`
	SMS            ToolValidateCheckPostLengthResponsePlatformsSMS            `json:"sms"`
	Snapchat       ToolValidateCheckPostLengthResponsePlatformsSnapchat       `json:"snapchat"`
	Telegram       ToolValidateCheckPostLengthResponsePlatformsTelegram       `json:"telegram"`
	Threads        ToolValidateCheckPostLengthResponsePlatformsThreads        `json:"threads"`
	Tiktok         ToolValidateCheckPostLengthResponsePlatformsTiktok         `json:"tiktok"`
	Twitter        ToolValidateCheckPostLengthResponsePlatformsTwitter        `json:"twitter"`
	Whatsapp       ToolValidateCheckPostLengthResponsePlatformsWhatsapp       `json:"whatsapp"`
	Youtube        ToolValidateCheckPostLengthResponsePlatformsYoutube        `json:"youtube"`
	JSON           toolValidateCheckPostLengthResponsePlatformsJSON           `json:"-"`
}

Character count per platform

func (*ToolValidateCheckPostLengthResponsePlatforms) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatforms) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsBluesky

type ToolValidateCheckPostLengthResponsePlatformsBluesky struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                    `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsBlueskyJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsBluesky) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsBluesky) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsDiscord

type ToolValidateCheckPostLengthResponsePlatformsDiscord struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                    `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsDiscordJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsDiscord) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsDiscord) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsFacebook

type ToolValidateCheckPostLengthResponsePlatformsFacebook struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                     `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsFacebookJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsFacebook) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsFacebook) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsGooglebusiness

type ToolValidateCheckPostLengthResponsePlatformsGooglebusiness struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                           `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsGooglebusinessJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsGooglebusiness) UnmarshalJSON

type ToolValidateCheckPostLengthResponsePlatformsInstagram

type ToolValidateCheckPostLengthResponsePlatformsInstagram struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                      `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsInstagramJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsInstagram) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsInstagram) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsLinkedin

type ToolValidateCheckPostLengthResponsePlatformsLinkedin struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                     `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsLinkedinJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsLinkedin) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsLinkedin) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsMastodon

type ToolValidateCheckPostLengthResponsePlatformsMastodon struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                     `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsMastodonJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsMastodon) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsMastodon) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsPinterest

type ToolValidateCheckPostLengthResponsePlatformsPinterest struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                      `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsPinterestJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsPinterest) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsPinterest) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsReddit

type ToolValidateCheckPostLengthResponsePlatformsReddit struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                   `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsRedditJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsReddit) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsReddit) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsSMS

type ToolValidateCheckPostLengthResponsePlatformsSMS struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsSMSJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsSMS) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsSMS) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsSnapchat

type ToolValidateCheckPostLengthResponsePlatformsSnapchat struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                     `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsSnapchatJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsSnapchat) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsSnapchat) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsTelegram

type ToolValidateCheckPostLengthResponsePlatformsTelegram struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                     `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsTelegramJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsTelegram) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsTelegram) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsThreads

type ToolValidateCheckPostLengthResponsePlatformsThreads struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                    `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsThreadsJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsThreads) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsThreads) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsTiktok

type ToolValidateCheckPostLengthResponsePlatformsTiktok struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                   `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsTiktokJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsTiktok) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsTiktok) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsTwitter

type ToolValidateCheckPostLengthResponsePlatformsTwitter struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                    `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsTwitterJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsTwitter) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsTwitter) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsWhatsapp

type ToolValidateCheckPostLengthResponsePlatformsWhatsapp struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                     `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsWhatsappJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsWhatsapp) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsWhatsapp) UnmarshalJSON(data []byte) (err error)

type ToolValidateCheckPostLengthResponsePlatformsYoutube

type ToolValidateCheckPostLengthResponsePlatformsYoutube struct {
	// Character count for this platform
	Count float64 `json:"count" api:"required"`
	// Character limit for this platform
	Limit float64 `json:"limit" api:"required"`
	// Whether content is within limit
	WithinLimit bool                                                    `json:"within_limit" api:"required"`
	JSON        toolValidateCheckPostLengthResponsePlatformsYoutubeJSON `json:"-"`
}

func (*ToolValidateCheckPostLengthResponsePlatformsYoutube) UnmarshalJSON

func (r *ToolValidateCheckPostLengthResponsePlatformsYoutube) UnmarshalJSON(data []byte) (err error)

type ToolValidateGetSubredditParams

type ToolValidateGetSubredditParams struct {
	// Subreddit name (without r/ prefix)
	Name param.Field[string] `query:"name" api:"required"`
}

func (ToolValidateGetSubredditParams) URLQuery

func (r ToolValidateGetSubredditParams) URLQuery() (v url.Values)

URLQuery serializes ToolValidateGetSubredditParams's query parameters as `url.Values`.

type ToolValidateGetSubredditResponse

type ToolValidateGetSubredditResponse struct {
	// Whether the subreddit exists
	Exists bool `json:"exists" api:"required"`
	// Canonical subreddit name
	Name string `json:"name" api:"nullable"`
	// Whether NSFW
	Nsfw bool `json:"nsfw" api:"nullable"`
	// Allowed post types
	PostTypes ToolValidateGetSubredditResponsePostTypes `json:"post_types"`
	// Subscriber count
	Subscribers float64 `json:"subscribers" api:"nullable"`
	// Subreddit title
	Title string                               `json:"title" api:"nullable"`
	JSON  toolValidateGetSubredditResponseJSON `json:"-"`
}

func (*ToolValidateGetSubredditResponse) UnmarshalJSON

func (r *ToolValidateGetSubredditResponse) UnmarshalJSON(data []byte) (err error)

type ToolValidateGetSubredditResponsePostTypes

type ToolValidateGetSubredditResponsePostTypes struct {
	// Allows image posts
	Image bool `json:"image" api:"required"`
	// Allows link posts
	Link bool `json:"link" api:"required"`
	// Allows text posts
	Self bool                                          `json:"self" api:"required"`
	JSON toolValidateGetSubredditResponsePostTypesJSON `json:"-"`
}

Allowed post types

func (*ToolValidateGetSubredditResponsePostTypes) UnmarshalJSON

func (r *ToolValidateGetSubredditResponsePostTypes) UnmarshalJSON(data []byte) (err error)

type ToolValidateService

type ToolValidateService struct {
	Options []option.RequestOption
}

ToolValidateService contains methods and other services that help with interacting with the relay 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 NewToolValidateService method instead.

func NewToolValidateService

func NewToolValidateService(opts ...option.RequestOption) (r *ToolValidateService)

NewToolValidateService 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 (*ToolValidateService) CheckPostLength

Check character counts against platform limits

func (*ToolValidateService) GetSubreddit

Check if a subreddit exists and get its details

func (*ToolValidateService) ValidateMedia

Validate a media URL for platform compatibility

func (*ToolValidateService) ValidatePost

Validate a post (dry-run without publishing)

type ToolValidateValidateMediaParams

type ToolValidateValidateMediaParams struct {
	// Media URL to validate
	URL param.Field[string] `json:"url" api:"required" format:"uri"`
}

func (ToolValidateValidateMediaParams) MarshalJSON

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

type ToolValidateValidateMediaResponse

type ToolValidateValidateMediaResponse struct {
	// Whether the URL is accessible
	Accessible bool `json:"accessible" api:"required"`
	// Per-platform size limits
	PlatformLimits ToolValidateValidateMediaResponsePlatformLimits `json:"platform_limits" api:"required"`
	// MIME type
	ContentType string `json:"content_type" api:"nullable"`
	// File size in bytes
	Size float64                               `json:"size" api:"nullable"`
	JSON toolValidateValidateMediaResponseJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponse) UnmarshalJSON

func (r *ToolValidateValidateMediaResponse) UnmarshalJSON(data []byte) (err error)

type ToolValidateValidateMediaResponsePlatformLimits

type ToolValidateValidateMediaResponsePlatformLimits struct {
	Bluesky        ToolValidateValidateMediaResponsePlatformLimitsBluesky        `json:"bluesky"`
	Discord        ToolValidateValidateMediaResponsePlatformLimitsDiscord        `json:"discord"`
	Facebook       ToolValidateValidateMediaResponsePlatformLimitsFacebook       `json:"facebook"`
	Googlebusiness ToolValidateValidateMediaResponsePlatformLimitsGooglebusiness `json:"googlebusiness"`
	Instagram      ToolValidateValidateMediaResponsePlatformLimitsInstagram      `json:"instagram"`
	Linkedin       ToolValidateValidateMediaResponsePlatformLimitsLinkedin       `json:"linkedin"`
	Mastodon       ToolValidateValidateMediaResponsePlatformLimitsMastodon       `json:"mastodon"`
	Pinterest      ToolValidateValidateMediaResponsePlatformLimitsPinterest      `json:"pinterest"`
	Reddit         ToolValidateValidateMediaResponsePlatformLimitsReddit         `json:"reddit"`
	SMS            ToolValidateValidateMediaResponsePlatformLimitsSMS            `json:"sms"`
	Snapchat       ToolValidateValidateMediaResponsePlatformLimitsSnapchat       `json:"snapchat"`
	Telegram       ToolValidateValidateMediaResponsePlatformLimitsTelegram       `json:"telegram"`
	Threads        ToolValidateValidateMediaResponsePlatformLimitsThreads        `json:"threads"`
	Tiktok         ToolValidateValidateMediaResponsePlatformLimitsTiktok         `json:"tiktok"`
	Twitter        ToolValidateValidateMediaResponsePlatformLimitsTwitter        `json:"twitter"`
	Whatsapp       ToolValidateValidateMediaResponsePlatformLimitsWhatsapp       `json:"whatsapp"`
	Youtube        ToolValidateValidateMediaResponsePlatformLimitsYoutube        `json:"youtube"`
	JSON           toolValidateValidateMediaResponsePlatformLimitsJSON           `json:"-"`
}

Per-platform size limits

func (*ToolValidateValidateMediaResponsePlatformLimits) UnmarshalJSON

func (r *ToolValidateValidateMediaResponsePlatformLimits) UnmarshalJSON(data []byte) (err error)

type ToolValidateValidateMediaResponsePlatformLimitsBluesky

type ToolValidateValidateMediaResponsePlatformLimitsBluesky struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                       `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsBlueskyJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsBluesky) UnmarshalJSON

func (r *ToolValidateValidateMediaResponsePlatformLimitsBluesky) UnmarshalJSON(data []byte) (err error)

type ToolValidateValidateMediaResponsePlatformLimitsDiscord

type ToolValidateValidateMediaResponsePlatformLimitsDiscord struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                       `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsDiscordJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsDiscord) UnmarshalJSON

func (r *ToolValidateValidateMediaResponsePlatformLimitsDiscord) UnmarshalJSON(data []byte) (err error)

type ToolValidateValidateMediaResponsePlatformLimitsFacebook

type ToolValidateValidateMediaResponsePlatformLimitsFacebook struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                        `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsFacebookJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsFacebook) UnmarshalJSON

type ToolValidateValidateMediaResponsePlatformLimitsGooglebusiness

type ToolValidateValidateMediaResponsePlatformLimitsGooglebusiness struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                              `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsGooglebusinessJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsGooglebusiness) UnmarshalJSON

type ToolValidateValidateMediaResponsePlatformLimitsInstagram

type ToolValidateValidateMediaResponsePlatformLimitsInstagram struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                         `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsInstagramJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsInstagram) UnmarshalJSON

type ToolValidateValidateMediaResponsePlatformLimitsLinkedin

type ToolValidateValidateMediaResponsePlatformLimitsLinkedin struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                        `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsLinkedinJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsLinkedin) UnmarshalJSON

type ToolValidateValidateMediaResponsePlatformLimitsMastodon

type ToolValidateValidateMediaResponsePlatformLimitsMastodon struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                        `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsMastodonJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsMastodon) UnmarshalJSON

type ToolValidateValidateMediaResponsePlatformLimitsPinterest

type ToolValidateValidateMediaResponsePlatformLimitsPinterest struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                         `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsPinterestJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsPinterest) UnmarshalJSON

type ToolValidateValidateMediaResponsePlatformLimitsReddit

type ToolValidateValidateMediaResponsePlatformLimitsReddit struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                      `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsRedditJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsReddit) UnmarshalJSON

func (r *ToolValidateValidateMediaResponsePlatformLimitsReddit) UnmarshalJSON(data []byte) (err error)

type ToolValidateValidateMediaResponsePlatformLimitsSMS

type ToolValidateValidateMediaResponsePlatformLimitsSMS struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                   `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsSMSJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsSMS) UnmarshalJSON

func (r *ToolValidateValidateMediaResponsePlatformLimitsSMS) UnmarshalJSON(data []byte) (err error)

type ToolValidateValidateMediaResponsePlatformLimitsSnapchat

type ToolValidateValidateMediaResponsePlatformLimitsSnapchat struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                        `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsSnapchatJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsSnapchat) UnmarshalJSON

type ToolValidateValidateMediaResponsePlatformLimitsTelegram

type ToolValidateValidateMediaResponsePlatformLimitsTelegram struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                        `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsTelegramJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsTelegram) UnmarshalJSON

type ToolValidateValidateMediaResponsePlatformLimitsThreads

type ToolValidateValidateMediaResponsePlatformLimitsThreads struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                       `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsThreadsJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsThreads) UnmarshalJSON

func (r *ToolValidateValidateMediaResponsePlatformLimitsThreads) UnmarshalJSON(data []byte) (err error)

type ToolValidateValidateMediaResponsePlatformLimitsTiktok

type ToolValidateValidateMediaResponsePlatformLimitsTiktok struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                      `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsTiktokJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsTiktok) UnmarshalJSON

func (r *ToolValidateValidateMediaResponsePlatformLimitsTiktok) UnmarshalJSON(data []byte) (err error)

type ToolValidateValidateMediaResponsePlatformLimitsTwitter

type ToolValidateValidateMediaResponsePlatformLimitsTwitter struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                       `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsTwitterJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsTwitter) UnmarshalJSON

func (r *ToolValidateValidateMediaResponsePlatformLimitsTwitter) UnmarshalJSON(data []byte) (err error)

type ToolValidateValidateMediaResponsePlatformLimitsWhatsapp

type ToolValidateValidateMediaResponsePlatformLimitsWhatsapp struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                        `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsWhatsappJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsWhatsapp) UnmarshalJSON

type ToolValidateValidateMediaResponsePlatformLimitsYoutube

type ToolValidateValidateMediaResponsePlatformLimitsYoutube struct {
	// Maximum file size in bytes
	MaxSize float64 `json:"max_size" api:"required"`
	// Whether file size is within limit
	WithinLimit bool                                                       `json:"within_limit" api:"required"`
	JSON        toolValidateValidateMediaResponsePlatformLimitsYoutubeJSON `json:"-"`
}

func (*ToolValidateValidateMediaResponsePlatformLimitsYoutube) UnmarshalJSON

func (r *ToolValidateValidateMediaResponsePlatformLimitsYoutube) UnmarshalJSON(data []byte) (err error)

type ToolValidateValidatePostParams

type ToolValidateValidatePostParams struct {
	// Publish intent. Use "now" to publish immediately, "draft" to save as draft, or
	// an ISO 8601 timestamp to schedule.
	ScheduledAt param.Field[string] `json:"scheduled_at" api:"required"`
	// Account IDs, platform names, or group IDs to publish to
	Targets param.Field[[]string] `json:"targets" api:"required"`
	// Post text. Optional if target_options provide per-target content.
	Content param.Field[string] `json:"content"`
	// Media attachments
	Media param.Field[[]ToolValidateValidatePostParamsMedia] `json:"media"`
	// Per-target customizations keyed by target value (account ID or platform name)
	TargetOptions param.Field[map[string]map[string]interface{}] `json:"target_options"`
	// IANA timezone for scheduling
	Timezone param.Field[string] `json:"timezone"`
}

func (ToolValidateValidatePostParams) MarshalJSON

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

type ToolValidateValidatePostParamsMedia

type ToolValidateValidatePostParamsMedia struct {
	// Public URL of the media file
	URL param.Field[string] `json:"url" api:"required" format:"uri"`
	// Media type. Inferred from URL extension if omitted.
	Type param.Field[ToolValidateValidatePostParamsMediaType] `json:"type"`
}

func (ToolValidateValidatePostParamsMedia) MarshalJSON

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

type ToolValidateValidatePostParamsMediaType

type ToolValidateValidatePostParamsMediaType string

Media type. Inferred from URL extension if omitted.

const (
	ToolValidateValidatePostParamsMediaTypeImage    ToolValidateValidatePostParamsMediaType = "image"
	ToolValidateValidatePostParamsMediaTypeVideo    ToolValidateValidatePostParamsMediaType = "video"
	ToolValidateValidatePostParamsMediaTypeGif      ToolValidateValidatePostParamsMediaType = "gif"
	ToolValidateValidatePostParamsMediaTypeDocument ToolValidateValidatePostParamsMediaType = "document"
)

func (ToolValidateValidatePostParamsMediaType) IsKnown

type ToolValidateValidatePostResponse

type ToolValidateValidatePostResponse struct {
	// Blocking errors
	Errors []ToolValidateValidatePostResponseError `json:"errors" api:"required"`
	// Whether the post is valid for all targets
	Valid bool `json:"valid" api:"required"`
	// Non-blocking warnings
	Warnings []ToolValidateValidatePostResponseWarning `json:"warnings" api:"required"`
	JSON     toolValidateValidatePostResponseJSON      `json:"-"`
}

func (*ToolValidateValidatePostResponse) UnmarshalJSON

func (r *ToolValidateValidatePostResponse) UnmarshalJSON(data []byte) (err error)

type ToolValidateValidatePostResponseError

type ToolValidateValidatePostResponseError struct {
	// Error code
	Code string `json:"code" api:"required"`
	// Human-readable error message
	Message string `json:"message" api:"required"`
	// Target identifier (account ID, platform, or field name)
	Target string                                    `json:"target" api:"required"`
	JSON   toolValidateValidatePostResponseErrorJSON `json:"-"`
}

func (*ToolValidateValidatePostResponseError) UnmarshalJSON

func (r *ToolValidateValidatePostResponseError) UnmarshalJSON(data []byte) (err error)

type ToolValidateValidatePostResponseWarning

type ToolValidateValidatePostResponseWarning struct {
	// Error code
	Code string `json:"code" api:"required"`
	// Human-readable error message
	Message string `json:"message" api:"required"`
	// Target identifier (account ID, platform, or field name)
	Target string                                      `json:"target" api:"required"`
	JSON   toolValidateValidatePostResponseWarningJSON `json:"-"`
}

func (*ToolValidateValidatePostResponseWarning) UnmarshalJSON

func (r *ToolValidateValidatePostResponseWarning) UnmarshalJSON(data []byte) (err error)

type TwitterBookmarkNewParams

type TwitterBookmarkNewParams struct {
	// Twitter account ID
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Tweet ID to bookmark
	TweetID param.Field[string] `json:"tweet_id" api:"required"`
}

func (TwitterBookmarkNewParams) MarshalJSON

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

type TwitterBookmarkNewResponse

type TwitterBookmarkNewResponse struct {
	// Whether the action succeeded
	Success bool                           `json:"success" api:"required"`
	JSON    twitterBookmarkNewResponseJSON `json:"-"`
}

func (*TwitterBookmarkNewResponse) UnmarshalJSON

func (r *TwitterBookmarkNewResponse) UnmarshalJSON(data []byte) (err error)

type TwitterBookmarkRemoveParams

type TwitterBookmarkRemoveParams struct {
	// Twitter account ID
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Tweet ID to bookmark
	TweetID param.Field[string] `json:"tweet_id" api:"required"`
}

func (TwitterBookmarkRemoveParams) MarshalJSON

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

type TwitterBookmarkRemoveResponse

type TwitterBookmarkRemoveResponse struct {
	// Whether the action succeeded
	Success bool                              `json:"success" api:"required"`
	JSON    twitterBookmarkRemoveResponseJSON `json:"-"`
}

func (*TwitterBookmarkRemoveResponse) UnmarshalJSON

func (r *TwitterBookmarkRemoveResponse) UnmarshalJSON(data []byte) (err error)

type TwitterBookmarkService

type TwitterBookmarkService struct {
	Options []option.RequestOption
}

TwitterBookmarkService contains methods and other services that help with interacting with the relay 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 NewTwitterBookmarkService method instead.

func NewTwitterBookmarkService

func NewTwitterBookmarkService(opts ...option.RequestOption) (r *TwitterBookmarkService)

NewTwitterBookmarkService 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 (*TwitterBookmarkService) New

Bookmark a tweet

func (*TwitterBookmarkService) Remove

Remove a bookmark

type TwitterFollowNewParams

type TwitterFollowNewParams struct {
	// Twitter account ID
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// User ID to follow
	TargetUserID param.Field[string] `json:"target_user_id" api:"required"`
}

func (TwitterFollowNewParams) MarshalJSON

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

type TwitterFollowNewResponse

type TwitterFollowNewResponse struct {
	// Whether the action succeeded
	Success bool                         `json:"success" api:"required"`
	JSON    twitterFollowNewResponseJSON `json:"-"`
}

func (*TwitterFollowNewResponse) UnmarshalJSON

func (r *TwitterFollowNewResponse) UnmarshalJSON(data []byte) (err error)

type TwitterFollowService

type TwitterFollowService struct {
	Options []option.RequestOption
}

TwitterFollowService contains methods and other services that help with interacting with the relay 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 NewTwitterFollowService method instead.

func NewTwitterFollowService

func NewTwitterFollowService(opts ...option.RequestOption) (r *TwitterFollowService)

NewTwitterFollowService 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 (*TwitterFollowService) New

Follow a user

func (*TwitterFollowService) Unfollow

Unfollow a user

type TwitterFollowUnfollowParams

type TwitterFollowUnfollowParams struct {
	// Twitter account ID
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// User ID to follow
	TargetUserID param.Field[string] `json:"target_user_id" api:"required"`
}

func (TwitterFollowUnfollowParams) MarshalJSON

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

type TwitterFollowUnfollowResponse

type TwitterFollowUnfollowResponse struct {
	// Whether the action succeeded
	Success bool                              `json:"success" api:"required"`
	JSON    twitterFollowUnfollowResponseJSON `json:"-"`
}

func (*TwitterFollowUnfollowResponse) UnmarshalJSON

func (r *TwitterFollowUnfollowResponse) UnmarshalJSON(data []byte) (err error)

type TwitterRetweetNewParams

type TwitterRetweetNewParams struct {
	// Twitter account ID
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Tweet ID to retweet
	TweetID param.Field[string] `json:"tweet_id" api:"required"`
}

func (TwitterRetweetNewParams) MarshalJSON

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

type TwitterRetweetNewResponse

type TwitterRetweetNewResponse struct {
	// Whether the action succeeded
	Success bool                          `json:"success" api:"required"`
	JSON    twitterRetweetNewResponseJSON `json:"-"`
}

func (*TwitterRetweetNewResponse) UnmarshalJSON

func (r *TwitterRetweetNewResponse) UnmarshalJSON(data []byte) (err error)

type TwitterRetweetService

type TwitterRetweetService struct {
	Options []option.RequestOption
}

TwitterRetweetService contains methods and other services that help with interacting with the relay 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 NewTwitterRetweetService method instead.

func NewTwitterRetweetService

func NewTwitterRetweetService(opts ...option.RequestOption) (r *TwitterRetweetService)

NewTwitterRetweetService 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 (*TwitterRetweetService) New

Retweet a tweet

func (*TwitterRetweetService) Undo

Undo a retweet

type TwitterRetweetUndoParams

type TwitterRetweetUndoParams struct {
	// Twitter account ID
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Tweet ID to retweet
	TweetID param.Field[string] `json:"tweet_id" api:"required"`
}

func (TwitterRetweetUndoParams) MarshalJSON

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

type TwitterRetweetUndoResponse

type TwitterRetweetUndoResponse struct {
	// Whether the action succeeded
	Success bool                           `json:"success" api:"required"`
	JSON    twitterRetweetUndoResponseJSON `json:"-"`
}

func (*TwitterRetweetUndoResponse) UnmarshalJSON

func (r *TwitterRetweetUndoResponse) UnmarshalJSON(data []byte) (err error)

type TwitterService

type TwitterService struct {
	Options  []option.RequestOption
	Retweet  *TwitterRetweetService
	Bookmark *TwitterBookmarkService
	Follow   *TwitterFollowService
}

TwitterService contains methods and other services that help with interacting with the relay 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 NewTwitterService method instead.

func NewTwitterService

func NewTwitterService(opts ...option.RequestOption) (r *TwitterService)

NewTwitterService 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 UsageGetResponse

type UsageGetResponse struct {
	Plan         UsageGetResponsePlan         `json:"plan" api:"required"`
	RateLimit    UsageGetResponseRateLimit    `json:"rate_limit" api:"required"`
	Subscription UsageGetResponseSubscription `json:"subscription" api:"required"`
	Usage        UsageGetResponseUsage        `json:"usage" api:"required"`
	JSON         usageGetResponseJSON         `json:"-"`
}

func (*UsageGetResponse) UnmarshalJSON

func (r *UsageGetResponse) UnmarshalJSON(data []byte) (err error)

type UsageGetResponsePlan

type UsageGetResponsePlan struct {
	// API calls included per billing cycle
	APICallsLimit float64 `json:"api_calls_limit" api:"required"`
	// API calls allowed per minute
	APICallsPerMin float64                      `json:"api_calls_per_min" api:"required"`
	Features       UsageGetResponsePlanFeatures `json:"features" api:"required"`
	// Current plan
	Name UsageGetResponsePlanName `json:"name" api:"required"`
	JSON usageGetResponsePlanJSON `json:"-"`
}

func (*UsageGetResponsePlan) UnmarshalJSON

func (r *UsageGetResponsePlan) UnmarshalJSON(data []byte) (err error)

type UsageGetResponsePlanFeatures

type UsageGetResponsePlanFeatures struct {
	// Access to /v1/analytics
	Analytics bool `json:"analytics" api:"required"`
	// Access to /v1/inbox
	Inbox bool                             `json:"inbox" api:"required"`
	JSON  usageGetResponsePlanFeaturesJSON `json:"-"`
}

func (*UsageGetResponsePlanFeatures) UnmarshalJSON

func (r *UsageGetResponsePlanFeatures) UnmarshalJSON(data []byte) (err error)

type UsageGetResponsePlanName

type UsageGetResponsePlanName string

Current plan

const (
	UsageGetResponsePlanNameFree UsageGetResponsePlanName = "free"
	UsageGetResponsePlanNamePro  UsageGetResponsePlanName = "pro"
)

func (UsageGetResponsePlanName) IsKnown

func (r UsageGetResponsePlanName) IsKnown() bool

type UsageGetResponseRateLimit

type UsageGetResponseRateLimit struct {
	// Max API calls per rate-limit window
	LimitPerMinute float64                       `json:"limit_per_minute" api:"required"`
	JSON           usageGetResponseRateLimitJSON `json:"-"`
}

func (*UsageGetResponseRateLimit) UnmarshalJSON

func (r *UsageGetResponseRateLimit) UnmarshalJSON(data []byte) (err error)

type UsageGetResponseSubscription

type UsageGetResponseSubscription struct {
	// Base monthly price in cents
	MonthlyPriceCents float64 `json:"monthly_price_cents" api:"required"`
	// Overage price per 1K API calls in cents
	PricePerThousandCallsCents float64 `json:"price_per_thousand_calls_cents" api:"required"`
	// Subscription status
	Status string                           `json:"status" api:"required"`
	JSON   usageGetResponseSubscriptionJSON `json:"-"`
}

func (*UsageGetResponseSubscription) UnmarshalJSON

func (r *UsageGetResponseSubscription) UnmarshalJSON(data []byte) (err error)

type UsageGetResponseUsage

type UsageGetResponseUsage struct {
	// API calls remaining this cycle (Infinity for pro overage)
	APICallsRemaining float64 `json:"api_calls_remaining" api:"required"`
	// API calls used this cycle
	APICallsUsed float64 `json:"api_calls_used" api:"required"`
	// Current billing cycle end
	CycleEnd time.Time `json:"cycle_end" api:"required" format:"date-time"`
	// Current billing cycle start
	CycleStart time.Time `json:"cycle_start" api:"required" format:"date-time"`
	// API calls exceeding included amount
	OverageCalls float64 `json:"overage_calls" api:"required"`
	// Overage cost in cents
	OverageCostCents float64                   `json:"overage_cost_cents" api:"required"`
	JSON             usageGetResponseUsageJSON `json:"-"`
}

func (*UsageGetResponseUsage) UnmarshalJSON

func (r *UsageGetResponseUsage) UnmarshalJSON(data []byte) (err error)

type UsageService

type UsageService struct {
	Options []option.RequestOption
}

UsageService contains methods and other services that help with interacting with the relay 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 NewUsageService method instead.

func NewUsageService

func NewUsageService(opts ...option.RequestOption) (r *UsageService)

NewUsageService 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 (*UsageService) Get

func (r *UsageService) Get(ctx context.Context, opts ...option.RequestOption) (res *UsageGetResponse, err error)

Returns current plan details and API call usage statistics for the organization.

type WebhookListLogsParams

type WebhookListLogsParams struct {
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Filter: start date (ISO 8601)
	From param.Field[time.Time] `query:"from" format:"date-time"`
	// Number of items per page
	Limit param.Field[int64] `query:"limit"`
	// Filter: end date (ISO 8601)
	To param.Field[time.Time] `query:"to" format:"date-time"`
}

func (WebhookListLogsParams) URLQuery

func (r WebhookListLogsParams) URLQuery() (v url.Values)

URLQuery serializes WebhookListLogsParams's query parameters as `url.Values`.

type WebhookListLogsResponse

type WebhookListLogsResponse struct {
	Data       []WebhookListLogsResponseData `json:"data" api:"required"`
	HasMore    bool                          `json:"has_more" api:"required"`
	NextCursor string                        `json:"next_cursor" api:"required,nullable"`
	JSON       webhookListLogsResponseJSON   `json:"-"`
}

func (*WebhookListLogsResponse) UnmarshalJSON

func (r *WebhookListLogsResponse) UnmarshalJSON(data []byte) (err error)

type WebhookListLogsResponseData

type WebhookListLogsResponseData struct {
	ID             string                          `json:"id" api:"required"`
	CreatedAt      time.Time                       `json:"created_at" api:"required" format:"date-time"`
	Error          string                          `json:"error" api:"required,nullable"`
	Event          string                          `json:"event" api:"required"`
	ResponseTimeMs float64                         `json:"response_time_ms" api:"required,nullable"`
	StatusCode     float64                         `json:"status_code" api:"required,nullable"`
	Success        bool                            `json:"success" api:"required"`
	WebhookID      string                          `json:"webhook_id" api:"required"`
	JSON           webhookListLogsResponseDataJSON `json:"-"`
}

func (*WebhookListLogsResponseData) UnmarshalJSON

func (r *WebhookListLogsResponseData) UnmarshalJSON(data []byte) (err error)

type WebhookListParams

type WebhookListParams struct {
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Filter: start date (ISO 8601)
	From param.Field[time.Time] `query:"from" format:"date-time"`
	// Number of items per page
	Limit param.Field[int64] `query:"limit"`
	// Filter: end date (ISO 8601)
	To param.Field[time.Time] `query:"to" format:"date-time"`
}

func (WebhookListParams) URLQuery

func (r WebhookListParams) URLQuery() (v url.Values)

URLQuery serializes WebhookListParams's query parameters as `url.Values`.

type WebhookListResponse

type WebhookListResponse struct {
	Data []WebhookListResponseData `json:"data" api:"required"`
	// Whether more items exist
	HasMore bool `json:"has_more" api:"required"`
	// Cursor for next page
	NextCursor string                  `json:"next_cursor" api:"required,nullable"`
	JSON       webhookListResponseJSON `json:"-"`
}

func (*WebhookListResponse) UnmarshalJSON

func (r *WebhookListResponse) UnmarshalJSON(data []byte) (err error)

type WebhookListResponseData

type WebhookListResponseData struct {
	// Webhook ID
	ID string `json:"id" api:"required"`
	// Creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Whether the webhook is active
	Enabled bool `json:"enabled" api:"required"`
	// Subscribed events
	Events []string `json:"events" api:"required"`
	// Last update timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Endpoint URL
	URL  string                      `json:"url" api:"required" format:"uri"`
	JSON webhookListResponseDataJSON `json:"-"`
}

func (*WebhookListResponseData) UnmarshalJSON

func (r *WebhookListResponseData) UnmarshalJSON(data []byte) (err error)

type WebhookNewParams

type WebhookNewParams struct {
	// Events to subscribe to
	Events param.Field[[]WebhookNewParamsEvent] `json:"events" api:"required"`
	// Webhook endpoint URL
	URL param.Field[string] `json:"url" api:"required" format:"uri"`
}

func (WebhookNewParams) MarshalJSON

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

type WebhookNewParamsEvent

type WebhookNewParamsEvent string
const (
	WebhookNewParamsEventPostPublished       WebhookNewParamsEvent = "post.published"
	WebhookNewParamsEventPostPartial         WebhookNewParamsEvent = "post.partial"
	WebhookNewParamsEventPostFailed          WebhookNewParamsEvent = "post.failed"
	WebhookNewParamsEventPostScheduled       WebhookNewParamsEvent = "post.scheduled"
	WebhookNewParamsEventAccountConnected    WebhookNewParamsEvent = "account.connected"
	WebhookNewParamsEventAccountDisconnected WebhookNewParamsEvent = "account.disconnected"
	WebhookNewParamsEventCommentReceived     WebhookNewParamsEvent = "comment.received"
	WebhookNewParamsEventMessageReceived     WebhookNewParamsEvent = "message.received"
)

func (WebhookNewParamsEvent) IsKnown

func (r WebhookNewParamsEvent) IsKnown() bool

type WebhookNewResponse

type WebhookNewResponse struct {
	// Webhook ID
	ID string `json:"id" api:"required"`
	// Creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Whether the webhook is active
	Enabled bool `json:"enabled" api:"required"`
	// Subscribed events
	Events []string `json:"events" api:"required"`
	// Webhook signing secret (shown only once)
	Secret string `json:"secret" api:"required"`
	// Endpoint URL
	URL  string                 `json:"url" api:"required" format:"uri"`
	JSON webhookNewResponseJSON `json:"-"`
}

func (*WebhookNewResponse) UnmarshalJSON

func (r *WebhookNewResponse) UnmarshalJSON(data []byte) (err error)

type WebhookSendTestParams

type WebhookSendTestParams struct {
	// ID of the webhook to test
	WebhookID param.Field[string] `json:"webhook_id" api:"required"`
}

func (WebhookSendTestParams) MarshalJSON

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

type WebhookSendTestResponse

type WebhookSendTestResponse struct {
	// Response time in milliseconds
	ResponseTimeMs int64 `json:"response_time_ms" api:"required,nullable"`
	// HTTP status code from the test delivery
	StatusCode int64 `json:"status_code" api:"required,nullable"`
	// Whether the test delivery succeeded
	Success bool                        `json:"success" api:"required"`
	JSON    webhookSendTestResponseJSON `json:"-"`
}

func (*WebhookSendTestResponse) UnmarshalJSON

func (r *WebhookSendTestResponse) UnmarshalJSON(data []byte) (err error)

type WebhookService

type WebhookService struct {
	Options []option.RequestOption
}

WebhookService contains methods and other services that help with interacting with the relay 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 NewWebhookService method instead.

func NewWebhookService

func NewWebhookService(opts ...option.RequestOption) (r *WebhookService)

NewWebhookService 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 (*WebhookService) Delete

func (r *WebhookService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)

Delete a webhook endpoint

func (*WebhookService) List

List webhook endpoints

func (*WebhookService) ListLogs

Returns delivery logs from the last 7 days.

func (*WebhookService) New

Create a new webhook endpoint. The signing secret is returned only once in the response.

func (*WebhookService) SendTest

Send a test POST request to the webhook URL to verify it is reachable.

func (*WebhookService) Update

Update a webhook endpoint

type WebhookUpdateParams

type WebhookUpdateParams struct {
	// Enable or disable the webhook
	Enabled param.Field[bool] `json:"enabled"`
	// Updated events
	Events param.Field[[]WebhookUpdateParamsEvent] `json:"events"`
	// Updated endpoint URL
	URL param.Field[string] `json:"url" format:"uri"`
}

func (WebhookUpdateParams) MarshalJSON

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

type WebhookUpdateParamsEvent

type WebhookUpdateParamsEvent string
const (
	WebhookUpdateParamsEventPostPublished       WebhookUpdateParamsEvent = "post.published"
	WebhookUpdateParamsEventPostPartial         WebhookUpdateParamsEvent = "post.partial"
	WebhookUpdateParamsEventPostFailed          WebhookUpdateParamsEvent = "post.failed"
	WebhookUpdateParamsEventPostScheduled       WebhookUpdateParamsEvent = "post.scheduled"
	WebhookUpdateParamsEventAccountConnected    WebhookUpdateParamsEvent = "account.connected"
	WebhookUpdateParamsEventAccountDisconnected WebhookUpdateParamsEvent = "account.disconnected"
	WebhookUpdateParamsEventCommentReceived     WebhookUpdateParamsEvent = "comment.received"
	WebhookUpdateParamsEventMessageReceived     WebhookUpdateParamsEvent = "message.received"
)

func (WebhookUpdateParamsEvent) IsKnown

func (r WebhookUpdateParamsEvent) IsKnown() bool

type WebhookUpdateResponse

type WebhookUpdateResponse struct {
	// Webhook ID
	ID string `json:"id" api:"required"`
	// Creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Whether the webhook is active
	Enabled bool `json:"enabled" api:"required"`
	// Subscribed events
	Events []string `json:"events" api:"required"`
	// Last update timestamp
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Endpoint URL
	URL  string                    `json:"url" api:"required" format:"uri"`
	JSON webhookUpdateResponseJSON `json:"-"`
}

func (*WebhookUpdateResponse) UnmarshalJSON

func (r *WebhookUpdateResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappBroadcastGetResponse

type WhatsappBroadcastGetResponse struct {
	// Broadcast ID
	ID string `json:"id" api:"required"`
	// Created timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Broadcast name
	Name string `json:"name" api:"required"`
	// Total recipients
	RecipientCount float64 `json:"recipient_count" api:"required"`
	// Broadcast status
	Status WhatsappBroadcastGetResponseStatus `json:"status" api:"required"`
	// Template name
	Template string `json:"template" api:"required"`
	// Failed sends
	Failed float64 `json:"failed"`
	// Scheduled time
	ScheduledAt time.Time `json:"scheduled_at" api:"nullable" format:"date-time"`
	// Successfully sent
	Sent float64                          `json:"sent"`
	JSON whatsappBroadcastGetResponseJSON `json:"-"`
}

func (*WhatsappBroadcastGetResponse) UnmarshalJSON

func (r *WhatsappBroadcastGetResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappBroadcastGetResponseStatus

type WhatsappBroadcastGetResponseStatus string

Broadcast status

const (
	WhatsappBroadcastGetResponseStatusDraft     WhatsappBroadcastGetResponseStatus = "draft"
	WhatsappBroadcastGetResponseStatusScheduled WhatsappBroadcastGetResponseStatus = "scheduled"
	WhatsappBroadcastGetResponseStatusSending   WhatsappBroadcastGetResponseStatus = "sending"
	WhatsappBroadcastGetResponseStatusSent      WhatsappBroadcastGetResponseStatus = "sent"
	WhatsappBroadcastGetResponseStatusFailed    WhatsappBroadcastGetResponseStatus = "failed"
)

func (WhatsappBroadcastGetResponseStatus) IsKnown

type WhatsappBroadcastListParams

type WhatsappBroadcastListParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `query:"account_id" api:"required"`
}

func (WhatsappBroadcastListParams) URLQuery

func (r WhatsappBroadcastListParams) URLQuery() (v url.Values)

URLQuery serializes WhatsappBroadcastListParams's query parameters as `url.Values`.

type WhatsappBroadcastListResponse

type WhatsappBroadcastListResponse struct {
	Data []WhatsappBroadcastListResponseData `json:"data" api:"required"`
	JSON whatsappBroadcastListResponseJSON   `json:"-"`
}

func (*WhatsappBroadcastListResponse) UnmarshalJSON

func (r *WhatsappBroadcastListResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappBroadcastListResponseData

type WhatsappBroadcastListResponseData struct {
	// Broadcast ID
	ID string `json:"id" api:"required"`
	// Created timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Broadcast name
	Name string `json:"name" api:"required"`
	// Total recipients
	RecipientCount float64 `json:"recipient_count" api:"required"`
	// Broadcast status
	Status WhatsappBroadcastListResponseDataStatus `json:"status" api:"required"`
	// Template name
	Template string `json:"template" api:"required"`
	// Failed sends
	Failed float64 `json:"failed"`
	// Scheduled time
	ScheduledAt time.Time `json:"scheduled_at" api:"nullable" format:"date-time"`
	// Successfully sent
	Sent float64                               `json:"sent"`
	JSON whatsappBroadcastListResponseDataJSON `json:"-"`
}

func (*WhatsappBroadcastListResponseData) UnmarshalJSON

func (r *WhatsappBroadcastListResponseData) UnmarshalJSON(data []byte) (err error)

type WhatsappBroadcastListResponseDataStatus

type WhatsappBroadcastListResponseDataStatus string

Broadcast status

const (
	WhatsappBroadcastListResponseDataStatusDraft     WhatsappBroadcastListResponseDataStatus = "draft"
	WhatsappBroadcastListResponseDataStatusScheduled WhatsappBroadcastListResponseDataStatus = "scheduled"
	WhatsappBroadcastListResponseDataStatusSending   WhatsappBroadcastListResponseDataStatus = "sending"
	WhatsappBroadcastListResponseDataStatusSent      WhatsappBroadcastListResponseDataStatus = "sent"
	WhatsappBroadcastListResponseDataStatusFailed    WhatsappBroadcastListResponseDataStatus = "failed"
)

func (WhatsappBroadcastListResponseDataStatus) IsKnown

type WhatsappBroadcastNewParams

type WhatsappBroadcastNewParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Broadcast name
	Name param.Field[string] `json:"name" api:"required"`
	// Recipient list
	Recipients param.Field[[]WhatsappBroadcastNewParamsRecipient] `json:"recipients" api:"required"`
	Template   param.Field[WhatsappBroadcastNewParamsTemplate]    `json:"template" api:"required"`
	// ISO 8601 timestamp to schedule send
	ScheduledAt param.Field[string] `json:"scheduled_at"`
}

func (WhatsappBroadcastNewParams) MarshalJSON

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

type WhatsappBroadcastNewParamsRecipient

type WhatsappBroadcastNewParamsRecipient struct {
	// Phone number in E.164 format
	Phone param.Field[string] `json:"phone" api:"required"`
	// Template variable substitutions
	Variables param.Field[map[string]string] `json:"variables"`
}

func (WhatsappBroadcastNewParamsRecipient) MarshalJSON

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

type WhatsappBroadcastNewParamsTemplate

type WhatsappBroadcastNewParamsTemplate struct {
	// Template language code
	Language param.Field[string] `json:"language" api:"required"`
	// Template name
	Name       param.Field[string]                                        `json:"name" api:"required"`
	Components param.Field[[]WhatsappBroadcastNewParamsTemplateComponent] `json:"components"`
}

func (WhatsappBroadcastNewParamsTemplate) MarshalJSON

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

type WhatsappBroadcastNewParamsTemplateComponent

type WhatsappBroadcastNewParamsTemplateComponent struct {
	// Component type
	Type param.Field[WhatsappBroadcastNewParamsTemplateComponentsType] `json:"type" api:"required"`
	// Component parameters
	Parameters param.Field[[]map[string]interface{}] `json:"parameters"`
}

func (WhatsappBroadcastNewParamsTemplateComponent) MarshalJSON

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

type WhatsappBroadcastNewParamsTemplateComponentsType

type WhatsappBroadcastNewParamsTemplateComponentsType string

Component type

const (
	WhatsappBroadcastNewParamsTemplateComponentsTypeHeader WhatsappBroadcastNewParamsTemplateComponentsType = "header"
	WhatsappBroadcastNewParamsTemplateComponentsTypeBody   WhatsappBroadcastNewParamsTemplateComponentsType = "body"
	WhatsappBroadcastNewParamsTemplateComponentsTypeButton WhatsappBroadcastNewParamsTemplateComponentsType = "button"
)

func (WhatsappBroadcastNewParamsTemplateComponentsType) IsKnown

type WhatsappBroadcastNewResponse

type WhatsappBroadcastNewResponse struct {
	// Broadcast ID
	ID string `json:"id" api:"required"`
	// Created timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Broadcast name
	Name string `json:"name" api:"required"`
	// Total recipients
	RecipientCount float64 `json:"recipient_count" api:"required"`
	// Broadcast status
	Status WhatsappBroadcastNewResponseStatus `json:"status" api:"required"`
	// Template name
	Template string `json:"template" api:"required"`
	// Failed sends
	Failed float64 `json:"failed"`
	// Scheduled time
	ScheduledAt time.Time `json:"scheduled_at" api:"nullable" format:"date-time"`
	// Successfully sent
	Sent float64                          `json:"sent"`
	JSON whatsappBroadcastNewResponseJSON `json:"-"`
}

func (*WhatsappBroadcastNewResponse) UnmarshalJSON

func (r *WhatsappBroadcastNewResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappBroadcastNewResponseStatus

type WhatsappBroadcastNewResponseStatus string

Broadcast status

const (
	WhatsappBroadcastNewResponseStatusDraft     WhatsappBroadcastNewResponseStatus = "draft"
	WhatsappBroadcastNewResponseStatusScheduled WhatsappBroadcastNewResponseStatus = "scheduled"
	WhatsappBroadcastNewResponseStatusSending   WhatsappBroadcastNewResponseStatus = "sending"
	WhatsappBroadcastNewResponseStatusSent      WhatsappBroadcastNewResponseStatus = "sent"
	WhatsappBroadcastNewResponseStatusFailed    WhatsappBroadcastNewResponseStatus = "failed"
)

func (WhatsappBroadcastNewResponseStatus) IsKnown

type WhatsappBroadcastScheduleResponse

type WhatsappBroadcastScheduleResponse struct {
	// Broadcast ID
	ID string `json:"id" api:"required"`
	// Created timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Broadcast name
	Name string `json:"name" api:"required"`
	// Total recipients
	RecipientCount float64 `json:"recipient_count" api:"required"`
	// Broadcast status
	Status WhatsappBroadcastScheduleResponseStatus `json:"status" api:"required"`
	// Template name
	Template string `json:"template" api:"required"`
	// Failed sends
	Failed float64 `json:"failed"`
	// Scheduled time
	ScheduledAt time.Time `json:"scheduled_at" api:"nullable" format:"date-time"`
	// Successfully sent
	Sent float64                               `json:"sent"`
	JSON whatsappBroadcastScheduleResponseJSON `json:"-"`
}

func (*WhatsappBroadcastScheduleResponse) UnmarshalJSON

func (r *WhatsappBroadcastScheduleResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappBroadcastScheduleResponseStatus

type WhatsappBroadcastScheduleResponseStatus string

Broadcast status

const (
	WhatsappBroadcastScheduleResponseStatusDraft     WhatsappBroadcastScheduleResponseStatus = "draft"
	WhatsappBroadcastScheduleResponseStatusScheduled WhatsappBroadcastScheduleResponseStatus = "scheduled"
	WhatsappBroadcastScheduleResponseStatusSending   WhatsappBroadcastScheduleResponseStatus = "sending"
	WhatsappBroadcastScheduleResponseStatusSent      WhatsappBroadcastScheduleResponseStatus = "sent"
	WhatsappBroadcastScheduleResponseStatusFailed    WhatsappBroadcastScheduleResponseStatus = "failed"
)

func (WhatsappBroadcastScheduleResponseStatus) IsKnown

type WhatsappBroadcastSendResponse

type WhatsappBroadcastSendResponse struct {
	// Broadcast ID
	ID string `json:"id" api:"required"`
	// Created timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Broadcast name
	Name string `json:"name" api:"required"`
	// Total recipients
	RecipientCount float64 `json:"recipient_count" api:"required"`
	// Broadcast status
	Status WhatsappBroadcastSendResponseStatus `json:"status" api:"required"`
	// Template name
	Template string `json:"template" api:"required"`
	// Failed sends
	Failed float64 `json:"failed"`
	// Scheduled time
	ScheduledAt time.Time `json:"scheduled_at" api:"nullable" format:"date-time"`
	// Successfully sent
	Sent float64                           `json:"sent"`
	JSON whatsappBroadcastSendResponseJSON `json:"-"`
}

func (*WhatsappBroadcastSendResponse) UnmarshalJSON

func (r *WhatsappBroadcastSendResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappBroadcastSendResponseStatus

type WhatsappBroadcastSendResponseStatus string

Broadcast status

const (
	WhatsappBroadcastSendResponseStatusDraft     WhatsappBroadcastSendResponseStatus = "draft"
	WhatsappBroadcastSendResponseStatusScheduled WhatsappBroadcastSendResponseStatus = "scheduled"
	WhatsappBroadcastSendResponseStatusSending   WhatsappBroadcastSendResponseStatus = "sending"
	WhatsappBroadcastSendResponseStatusSent      WhatsappBroadcastSendResponseStatus = "sent"
	WhatsappBroadcastSendResponseStatusFailed    WhatsappBroadcastSendResponseStatus = "failed"
)

func (WhatsappBroadcastSendResponseStatus) IsKnown

type WhatsappBroadcastService

type WhatsappBroadcastService struct {
	Options []option.RequestOption
}

WhatsappBroadcastService contains methods and other services that help with interacting with the relay 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 NewWhatsappBroadcastService method instead.

func NewWhatsappBroadcastService

func NewWhatsappBroadcastService(opts ...option.RequestOption) (r *WhatsappBroadcastService)

NewWhatsappBroadcastService 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 (*WhatsappBroadcastService) Delete

func (r *WhatsappBroadcastService) Delete(ctx context.Context, broadcastID string, opts ...option.RequestOption) (err error)

Delete a broadcast

func (*WhatsappBroadcastService) Get

Get broadcast details

func (*WhatsappBroadcastService) List

List broadcasts

func (*WhatsappBroadcastService) New

Create a broadcast

func (*WhatsappBroadcastService) Schedule

Schedule a broadcast

func (*WhatsappBroadcastService) Send

Send a broadcast immediately

type WhatsappBulkSendParams

type WhatsappBulkSendParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Recipients
	Recipients param.Field[[]WhatsappBulkSendParamsRecipient] `json:"recipients" api:"required"`
	Template   param.Field[WhatsappBulkSendParamsTemplate]    `json:"template" api:"required"`
}

func (WhatsappBulkSendParams) MarshalJSON

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

type WhatsappBulkSendParamsRecipient

type WhatsappBulkSendParamsRecipient struct {
	// Phone number in E.164 format
	Phone param.Field[string] `json:"phone" api:"required"`
	// Template variable substitutions
	Variables param.Field[map[string]string] `json:"variables"`
}

func (WhatsappBulkSendParamsRecipient) MarshalJSON

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

type WhatsappBulkSendParamsTemplate

type WhatsappBulkSendParamsTemplate struct {
	// Template language code
	Language param.Field[string] `json:"language" api:"required"`
	// Template name
	Name param.Field[string] `json:"name" api:"required"`
	// Template components
	Components param.Field[[]WhatsappBulkSendParamsTemplateComponent] `json:"components"`
}

func (WhatsappBulkSendParamsTemplate) MarshalJSON

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

type WhatsappBulkSendParamsTemplateComponent

type WhatsappBulkSendParamsTemplateComponent struct {
	// Component type
	Type param.Field[WhatsappBulkSendParamsTemplateComponentsType] `json:"type" api:"required"`
	// Component parameters
	Parameters param.Field[[]map[string]interface{}] `json:"parameters"`
}

func (WhatsappBulkSendParamsTemplateComponent) MarshalJSON

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

type WhatsappBulkSendParamsTemplateComponentsType

type WhatsappBulkSendParamsTemplateComponentsType string

Component type

const (
	WhatsappBulkSendParamsTemplateComponentsTypeHeader WhatsappBulkSendParamsTemplateComponentsType = "header"
	WhatsappBulkSendParamsTemplateComponentsTypeBody   WhatsappBulkSendParamsTemplateComponentsType = "body"
	WhatsappBulkSendParamsTemplateComponentsTypeButton WhatsappBulkSendParamsTemplateComponentsType = "button"
)

func (WhatsappBulkSendParamsTemplateComponentsType) IsKnown

type WhatsappBulkSendResponse

type WhatsappBulkSendResponse struct {
	Results []WhatsappBulkSendResponseResult `json:"results" api:"required"`
	Summary WhatsappBulkSendResponseSummary  `json:"summary" api:"required"`
	JSON    whatsappBulkSendResponseJSON     `json:"-"`
}

func (*WhatsappBulkSendResponse) UnmarshalJSON

func (r *WhatsappBulkSendResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappBulkSendResponseResult

type WhatsappBulkSendResponseResult struct {
	// Recipient phone number
	Phone string `json:"phone" api:"required"`
	// Send status
	Status WhatsappBulkSendResponseResultsStatus `json:"status" api:"required"`
	// Error message if failed
	Error string                             `json:"error" api:"nullable"`
	JSON  whatsappBulkSendResponseResultJSON `json:"-"`
}

func (*WhatsappBulkSendResponseResult) UnmarshalJSON

func (r *WhatsappBulkSendResponseResult) UnmarshalJSON(data []byte) (err error)

type WhatsappBulkSendResponseResultsStatus

type WhatsappBulkSendResponseResultsStatus string

Send status

const (
	WhatsappBulkSendResponseResultsStatusSent   WhatsappBulkSendResponseResultsStatus = "sent"
	WhatsappBulkSendResponseResultsStatusFailed WhatsappBulkSendResponseResultsStatus = "failed"
)

func (WhatsappBulkSendResponseResultsStatus) IsKnown

type WhatsappBulkSendResponseSummary

type WhatsappBulkSendResponseSummary struct {
	// Failed count
	Failed float64 `json:"failed" api:"required"`
	// Successfully sent count
	Sent float64                             `json:"sent" api:"required"`
	JSON whatsappBulkSendResponseSummaryJSON `json:"-"`
}

func (*WhatsappBulkSendResponseSummary) UnmarshalJSON

func (r *WhatsappBulkSendResponseSummary) UnmarshalJSON(data []byte) (err error)

type WhatsappBusinessProfileGetParams

type WhatsappBusinessProfileGetParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `query:"account_id" api:"required"`
}

func (WhatsappBusinessProfileGetParams) URLQuery

func (r WhatsappBusinessProfileGetParams) URLQuery() (v url.Values)

URLQuery serializes WhatsappBusinessProfileGetParams's query parameters as `url.Values`.

type WhatsappBusinessProfileGetResponse

type WhatsappBusinessProfileGetResponse struct {
	// About text
	About string `json:"about" api:"nullable"`
	// Business address
	Address string `json:"address" api:"nullable"`
	// Description
	Description string `json:"description" api:"nullable"`
	// Business email
	Email string `json:"email" api:"nullable"`
	// Profile picture URL
	ProfilePictureURL string `json:"profile_picture_url" api:"nullable"`
	// Website URLs
	Websites []string                               `json:"websites"`
	JSON     whatsappBusinessProfileGetResponseJSON `json:"-"`
}

func (*WhatsappBusinessProfileGetResponse) UnmarshalJSON

func (r *WhatsappBusinessProfileGetResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappBusinessProfileService

type WhatsappBusinessProfileService struct {
	Options []option.RequestOption
}

WhatsappBusinessProfileService contains methods and other services that help with interacting with the relay 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 NewWhatsappBusinessProfileService method instead.

func NewWhatsappBusinessProfileService

func NewWhatsappBusinessProfileService(opts ...option.RequestOption) (r *WhatsappBusinessProfileService)

NewWhatsappBusinessProfileService 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 (*WhatsappBusinessProfileService) Get

Get WhatsApp Business profile

func (*WhatsappBusinessProfileService) Update

Update WhatsApp Business profile

type WhatsappBusinessProfileUpdateParams

type WhatsappBusinessProfileUpdateParams struct {
	// WhatsApp account ID
	AccountID   param.Field[string]   `json:"account_id" api:"required"`
	About       param.Field[string]   `json:"about"`
	Address     param.Field[string]   `json:"address"`
	Description param.Field[string]   `json:"description"`
	Email       param.Field[string]   `json:"email"`
	Websites    param.Field[[]string] `json:"websites"`
}

func (WhatsappBusinessProfileUpdateParams) MarshalJSON

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

type WhatsappBusinessProfileUpdateResponse

type WhatsappBusinessProfileUpdateResponse struct {
	// About text
	About string `json:"about" api:"nullable"`
	// Business address
	Address string `json:"address" api:"nullable"`
	// Description
	Description string `json:"description" api:"nullable"`
	// Business email
	Email string `json:"email" api:"nullable"`
	// Profile picture URL
	ProfilePictureURL string `json:"profile_picture_url" api:"nullable"`
	// Website URLs
	Websites []string                                  `json:"websites"`
	JSON     whatsappBusinessProfileUpdateResponseJSON `json:"-"`
}

func (*WhatsappBusinessProfileUpdateResponse) UnmarshalJSON

func (r *WhatsappBusinessProfileUpdateResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappContactBulkOperationsParams

type WhatsappContactBulkOperationsParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Action
	Action param.Field[WhatsappContactBulkOperationsParamsAction] `json:"action" api:"required"`
	// Contact IDs
	ContactIDs param.Field[[]string] `json:"contact_ids" api:"required"`
	// Tags (for tag actions)
	Tags param.Field[[]string] `json:"tags"`
}

func (WhatsappContactBulkOperationsParams) MarshalJSON

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

type WhatsappContactBulkOperationsParamsAction

type WhatsappContactBulkOperationsParamsAction string

Action

const (
	WhatsappContactBulkOperationsParamsActionAddTags    WhatsappContactBulkOperationsParamsAction = "add_tags"
	WhatsappContactBulkOperationsParamsActionRemoveTags WhatsappContactBulkOperationsParamsAction = "remove_tags"
	WhatsappContactBulkOperationsParamsActionDelete     WhatsappContactBulkOperationsParamsAction = "delete"
)

func (WhatsappContactBulkOperationsParamsAction) IsKnown

type WhatsappContactBulkOperationsResponse

type WhatsappContactBulkOperationsResponse struct {
	// Number of contacts affected
	Affected float64                                   `json:"affected" api:"required"`
	JSON     whatsappContactBulkOperationsResponseJSON `json:"-"`
}

func (*WhatsappContactBulkOperationsResponse) UnmarshalJSON

func (r *WhatsappContactBulkOperationsResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappContactGetResponse

type WhatsappContactGetResponse struct {
	// Contact ID
	ID string `json:"id" api:"required"`
	// Created timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Whether contact has opted in
	OptedIn bool `json:"opted_in" api:"required"`
	// Phone number
	Phone string `json:"phone" api:"required"`
	// Email address
	Email string `json:"email" api:"nullable"`
	// Group IDs
	Groups []string `json:"groups"`
	// Contact name
	Name string `json:"name" api:"nullable"`
	// Tags
	Tags []string                       `json:"tags"`
	JSON whatsappContactGetResponseJSON `json:"-"`
}

func (*WhatsappContactGetResponse) UnmarshalJSON

func (r *WhatsappContactGetResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappContactImportParams

type WhatsappContactImportParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Contacts to import
	Contacts param.Field[[]WhatsappContactImportParamsContact] `json:"contacts" api:"required"`
}

func (WhatsappContactImportParams) MarshalJSON

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

type WhatsappContactImportParamsContact

type WhatsappContactImportParamsContact struct {
	// Phone number
	Phone param.Field[string]   `json:"phone" api:"required"`
	Email param.Field[string]   `json:"email"`
	Name  param.Field[string]   `json:"name"`
	Tags  param.Field[[]string] `json:"tags"`
}

func (WhatsappContactImportParamsContact) MarshalJSON

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

type WhatsappContactImportResponse

type WhatsappContactImportResponse struct {
	// Failed count
	Failed float64 `json:"failed" api:"required"`
	// Successfully imported count
	Imported float64 `json:"imported" api:"required"`
	// Skipped (duplicate) count
	Skipped float64                           `json:"skipped" api:"required"`
	JSON    whatsappContactImportResponseJSON `json:"-"`
}

func (*WhatsappContactImportResponse) UnmarshalJSON

func (r *WhatsappContactImportResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappContactListParams

type WhatsappContactListParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `query:"account_id" api:"required"`
	// Pagination cursor
	Cursor param.Field[string] `query:"cursor"`
	// Number of items
	Limit param.Field[int64] `query:"limit"`
	// Search by name or phone
	Search param.Field[string] `query:"search"`
	// Filter by tag
	Tag param.Field[string] `query:"tag"`
}

func (WhatsappContactListParams) URLQuery

func (r WhatsappContactListParams) URLQuery() (v url.Values)

URLQuery serializes WhatsappContactListParams's query parameters as `url.Values`.

type WhatsappContactListResponse

type WhatsappContactListResponse struct {
	Data []WhatsappContactListResponseData `json:"data" api:"required"`
	// Whether more items exist
	HasMore bool `json:"has_more" api:"required"`
	// Cursor for next page
	NextCursor string                          `json:"next_cursor" api:"required,nullable"`
	JSON       whatsappContactListResponseJSON `json:"-"`
}

func (*WhatsappContactListResponse) UnmarshalJSON

func (r *WhatsappContactListResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappContactListResponseData

type WhatsappContactListResponseData struct {
	// Contact ID
	ID string `json:"id" api:"required"`
	// Created timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Whether contact has opted in
	OptedIn bool `json:"opted_in" api:"required"`
	// Phone number
	Phone string `json:"phone" api:"required"`
	// Email address
	Email string `json:"email" api:"nullable"`
	// Group IDs
	Groups []string `json:"groups"`
	// Contact name
	Name string `json:"name" api:"nullable"`
	// Tags
	Tags []string                            `json:"tags"`
	JSON whatsappContactListResponseDataJSON `json:"-"`
}

func (*WhatsappContactListResponseData) UnmarshalJSON

func (r *WhatsappContactListResponseData) UnmarshalJSON(data []byte) (err error)

type WhatsappContactNewParams

type WhatsappContactNewParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Phone number in E.164 format
	Phone param.Field[string] `json:"phone" api:"required"`
	// Email address
	Email param.Field[string] `json:"email"`
	// Contact name
	Name param.Field[string] `json:"name"`
	// Tags
	Tags param.Field[[]string] `json:"tags"`
}

func (WhatsappContactNewParams) MarshalJSON

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

type WhatsappContactNewResponse

type WhatsappContactNewResponse struct {
	// Contact ID
	ID string `json:"id" api:"required"`
	// Created timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Whether contact has opted in
	OptedIn bool `json:"opted_in" api:"required"`
	// Phone number
	Phone string `json:"phone" api:"required"`
	// Email address
	Email string `json:"email" api:"nullable"`
	// Group IDs
	Groups []string `json:"groups"`
	// Contact name
	Name string `json:"name" api:"nullable"`
	// Tags
	Tags []string                       `json:"tags"`
	JSON whatsappContactNewResponseJSON `json:"-"`
}

func (*WhatsappContactNewResponse) UnmarshalJSON

func (r *WhatsappContactNewResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappContactService

type WhatsappContactService struct {
	Options []option.RequestOption
}

WhatsappContactService contains methods and other services that help with interacting with the relay 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 NewWhatsappContactService method instead.

func NewWhatsappContactService

func NewWhatsappContactService(opts ...option.RequestOption) (r *WhatsappContactService)

NewWhatsappContactService 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 (*WhatsappContactService) BulkOperations

Bulk contact operations (add/remove tags, delete)

func (*WhatsappContactService) Delete

func (r *WhatsappContactService) Delete(ctx context.Context, contactID string, opts ...option.RequestOption) (err error)

Delete a contact

func (*WhatsappContactService) Get

Get contact details

func (*WhatsappContactService) Import

Bulk import contacts

func (*WhatsappContactService) List

List contacts

func (*WhatsappContactService) New

Create a contact

type WhatsappGroupListParams

type WhatsappGroupListParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `query:"account_id" api:"required"`
}

func (WhatsappGroupListParams) URLQuery

func (r WhatsappGroupListParams) URLQuery() (v url.Values)

URLQuery serializes WhatsappGroupListParams's query parameters as `url.Values`.

type WhatsappGroupListResponse

type WhatsappGroupListResponse struct {
	Data []WhatsappGroupListResponseData `json:"data" api:"required"`
	JSON whatsappGroupListResponseJSON   `json:"-"`
}

func (*WhatsappGroupListResponse) UnmarshalJSON

func (r *WhatsappGroupListResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappGroupListResponseData

type WhatsappGroupListResponseData struct {
	// Group ID
	ID string `json:"id" api:"required"`
	// Number of contacts
	ContactCount float64 `json:"contact_count" api:"required"`
	// Created timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Group name
	Name        string                            `json:"name" api:"required"`
	Description string                            `json:"description" api:"nullable"`
	JSON        whatsappGroupListResponseDataJSON `json:"-"`
}

func (*WhatsappGroupListResponseData) UnmarshalJSON

func (r *WhatsappGroupListResponseData) UnmarshalJSON(data []byte) (err error)

type WhatsappGroupNewParams

type WhatsappGroupNewParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Group name
	Name param.Field[string] `json:"name" api:"required"`
	// Initial contact IDs
	ContactIDs param.Field[[]string] `json:"contact_ids"`
	// Group description
	Description param.Field[string] `json:"description"`
}

func (WhatsappGroupNewParams) MarshalJSON

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

type WhatsappGroupNewResponse

type WhatsappGroupNewResponse struct {
	// Group ID
	ID string `json:"id" api:"required"`
	// Number of contacts
	ContactCount float64 `json:"contact_count" api:"required"`
	// Created timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Group name
	Name        string                       `json:"name" api:"required"`
	Description string                       `json:"description" api:"nullable"`
	JSON        whatsappGroupNewResponseJSON `json:"-"`
}

func (*WhatsappGroupNewResponse) UnmarshalJSON

func (r *WhatsappGroupNewResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappGroupService

type WhatsappGroupService struct {
	Options []option.RequestOption
}

WhatsappGroupService contains methods and other services that help with interacting with the relay 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 NewWhatsappGroupService method instead.

func NewWhatsappGroupService

func NewWhatsappGroupService(opts ...option.RequestOption) (r *WhatsappGroupService)

NewWhatsappGroupService 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 (*WhatsappGroupService) Delete

func (r *WhatsappGroupService) Delete(ctx context.Context, groupID string, opts ...option.RequestOption) (err error)

Delete a contact group

func (*WhatsappGroupService) List

List contact groups

func (*WhatsappGroupService) New

Create a contact group

type WhatsappListPhoneNumbersParams

type WhatsappListPhoneNumbersParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `query:"account_id" api:"required"`
}

func (WhatsappListPhoneNumbersParams) URLQuery

func (r WhatsappListPhoneNumbersParams) URLQuery() (v url.Values)

URLQuery serializes WhatsappListPhoneNumbersParams's query parameters as `url.Values`.

type WhatsappListPhoneNumbersResponse

type WhatsappListPhoneNumbersResponse struct {
	Data []WhatsappListPhoneNumbersResponseData `json:"data" api:"required"`
	JSON whatsappListPhoneNumbersResponseJSON   `json:"-"`
}

func (*WhatsappListPhoneNumbersResponse) UnmarshalJSON

func (r *WhatsappListPhoneNumbersResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappListPhoneNumbersResponseData

type WhatsappListPhoneNumbersResponseData struct {
	// Phone number ID
	ID string `json:"id" api:"required"`
	// Phone number
	PhoneNumber string `json:"phone_number" api:"required"`
	// Registration status
	Status WhatsappListPhoneNumbersResponseDataStatus `json:"status" api:"required"`
	// Display name
	DisplayName string                                   `json:"display_name" api:"nullable"`
	JSON        whatsappListPhoneNumbersResponseDataJSON `json:"-"`
}

func (*WhatsappListPhoneNumbersResponseData) UnmarshalJSON

func (r *WhatsappListPhoneNumbersResponseData) UnmarshalJSON(data []byte) (err error)

type WhatsappListPhoneNumbersResponseDataStatus

type WhatsappListPhoneNumbersResponseDataStatus string

Registration status

const (
	WhatsappListPhoneNumbersResponseDataStatusActive   WhatsappListPhoneNumbersResponseDataStatus = "active"
	WhatsappListPhoneNumbersResponseDataStatusInactive WhatsappListPhoneNumbersResponseDataStatus = "inactive"
	WhatsappListPhoneNumbersResponseDataStatusPending  WhatsappListPhoneNumbersResponseDataStatus = "pending"
)

func (WhatsappListPhoneNumbersResponseDataStatus) IsKnown

type WhatsappService

type WhatsappService struct {
	Options         []option.RequestOption
	Broadcasts      *WhatsappBroadcastService
	Templates       *WhatsappTemplateService
	Contacts        *WhatsappContactService
	Groups          *WhatsappGroupService
	BusinessProfile *WhatsappBusinessProfileService
}

WhatsappService contains methods and other services that help with interacting with the relay 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 NewWhatsappService method instead.

func NewWhatsappService

func NewWhatsappService(opts ...option.RequestOption) (r *WhatsappService)

NewWhatsappService 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 (*WhatsappService) BulkSend

Send bulk WhatsApp messages via template

func (*WhatsappService) ListPhoneNumbers

List registered phone numbers

type WhatsappTemplateDeleteParams

type WhatsappTemplateDeleteParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `query:"account_id" api:"required"`
}

func (WhatsappTemplateDeleteParams) URLQuery

func (r WhatsappTemplateDeleteParams) URLQuery() (v url.Values)

URLQuery serializes WhatsappTemplateDeleteParams's query parameters as `url.Values`.

type WhatsappTemplateGetParams

type WhatsappTemplateGetParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `query:"account_id" api:"required"`
}

func (WhatsappTemplateGetParams) URLQuery

func (r WhatsappTemplateGetParams) URLQuery() (v url.Values)

URLQuery serializes WhatsappTemplateGetParams's query parameters as `url.Values`.

type WhatsappTemplateGetResponse

type WhatsappTemplateGetResponse struct {
	// Template category
	Category   WhatsappTemplateGetResponseCategory    `json:"category" api:"required"`
	Components []WhatsappTemplateGetResponseComponent `json:"components" api:"required"`
	// Template language code
	Language string `json:"language" api:"required"`
	// Template name
	Name string `json:"name" api:"required"`
	// Approval status
	Status WhatsappTemplateGetResponseStatus `json:"status" api:"required"`
	JSON   whatsappTemplateGetResponseJSON   `json:"-"`
}

func (*WhatsappTemplateGetResponse) UnmarshalJSON

func (r *WhatsappTemplateGetResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappTemplateGetResponseCategory

type WhatsappTemplateGetResponseCategory string

Template category

const (
	WhatsappTemplateGetResponseCategoryMarketing      WhatsappTemplateGetResponseCategory = "MARKETING"
	WhatsappTemplateGetResponseCategoryUtility        WhatsappTemplateGetResponseCategory = "UTILITY"
	WhatsappTemplateGetResponseCategoryAuthentication WhatsappTemplateGetResponseCategory = "AUTHENTICATION"
)

func (WhatsappTemplateGetResponseCategory) IsKnown

type WhatsappTemplateGetResponseComponent

type WhatsappTemplateGetResponseComponent struct {
	// Component type
	Type    WhatsappTemplateGetResponseComponentsType     `json:"type" api:"required"`
	Buttons []WhatsappTemplateGetResponseComponentsButton `json:"buttons"`
	// Header format (TEXT, IMAGE, etc.)
	Format string `json:"format"`
	// Component text
	Text string                                   `json:"text"`
	JSON whatsappTemplateGetResponseComponentJSON `json:"-"`
}

func (*WhatsappTemplateGetResponseComponent) UnmarshalJSON

func (r *WhatsappTemplateGetResponseComponent) UnmarshalJSON(data []byte) (err error)

type WhatsappTemplateGetResponseComponentsButton

type WhatsappTemplateGetResponseComponentsButton struct {
	// Button text
	Text string `json:"text" api:"required"`
	// Button type
	Type        string                                          `json:"type" api:"required"`
	PhoneNumber string                                          `json:"phone_number"`
	URL         string                                          `json:"url"`
	JSON        whatsappTemplateGetResponseComponentsButtonJSON `json:"-"`
}

func (*WhatsappTemplateGetResponseComponentsButton) UnmarshalJSON

func (r *WhatsappTemplateGetResponseComponentsButton) UnmarshalJSON(data []byte) (err error)

type WhatsappTemplateGetResponseComponentsType

type WhatsappTemplateGetResponseComponentsType string

Component type

const (
	WhatsappTemplateGetResponseComponentsTypeHeader  WhatsappTemplateGetResponseComponentsType = "HEADER"
	WhatsappTemplateGetResponseComponentsTypeBody    WhatsappTemplateGetResponseComponentsType = "BODY"
	WhatsappTemplateGetResponseComponentsTypeFooter  WhatsappTemplateGetResponseComponentsType = "FOOTER"
	WhatsappTemplateGetResponseComponentsTypeButtons WhatsappTemplateGetResponseComponentsType = "BUTTONS"
)

func (WhatsappTemplateGetResponseComponentsType) IsKnown

type WhatsappTemplateGetResponseStatus

type WhatsappTemplateGetResponseStatus string

Approval status

const (
	WhatsappTemplateGetResponseStatusApproved WhatsappTemplateGetResponseStatus = "APPROVED"
	WhatsappTemplateGetResponseStatusPending  WhatsappTemplateGetResponseStatus = "PENDING"
	WhatsappTemplateGetResponseStatusRejected WhatsappTemplateGetResponseStatus = "REJECTED"
)

func (WhatsappTemplateGetResponseStatus) IsKnown

type WhatsappTemplateListParams

type WhatsappTemplateListParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `query:"account_id" api:"required"`
}

func (WhatsappTemplateListParams) URLQuery

func (r WhatsappTemplateListParams) URLQuery() (v url.Values)

URLQuery serializes WhatsappTemplateListParams's query parameters as `url.Values`.

type WhatsappTemplateListResponse

type WhatsappTemplateListResponse struct {
	Data []WhatsappTemplateListResponseData `json:"data" api:"required"`
	JSON whatsappTemplateListResponseJSON   `json:"-"`
}

func (*WhatsappTemplateListResponse) UnmarshalJSON

func (r *WhatsappTemplateListResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappTemplateListResponseData

type WhatsappTemplateListResponseData struct {
	// Template category
	Category   WhatsappTemplateListResponseDataCategory    `json:"category" api:"required"`
	Components []WhatsappTemplateListResponseDataComponent `json:"components" api:"required"`
	// Template language code
	Language string `json:"language" api:"required"`
	// Template name
	Name string `json:"name" api:"required"`
	// Approval status
	Status WhatsappTemplateListResponseDataStatus `json:"status" api:"required"`
	JSON   whatsappTemplateListResponseDataJSON   `json:"-"`
}

func (*WhatsappTemplateListResponseData) UnmarshalJSON

func (r *WhatsappTemplateListResponseData) UnmarshalJSON(data []byte) (err error)

type WhatsappTemplateListResponseDataCategory

type WhatsappTemplateListResponseDataCategory string

Template category

const (
	WhatsappTemplateListResponseDataCategoryMarketing      WhatsappTemplateListResponseDataCategory = "MARKETING"
	WhatsappTemplateListResponseDataCategoryUtility        WhatsappTemplateListResponseDataCategory = "UTILITY"
	WhatsappTemplateListResponseDataCategoryAuthentication WhatsappTemplateListResponseDataCategory = "AUTHENTICATION"
)

func (WhatsappTemplateListResponseDataCategory) IsKnown

type WhatsappTemplateListResponseDataComponent

type WhatsappTemplateListResponseDataComponent struct {
	// Component type
	Type    WhatsappTemplateListResponseDataComponentsType     `json:"type" api:"required"`
	Buttons []WhatsappTemplateListResponseDataComponentsButton `json:"buttons"`
	// Header format (TEXT, IMAGE, etc.)
	Format string `json:"format"`
	// Component text
	Text string                                        `json:"text"`
	JSON whatsappTemplateListResponseDataComponentJSON `json:"-"`
}

func (*WhatsappTemplateListResponseDataComponent) UnmarshalJSON

func (r *WhatsappTemplateListResponseDataComponent) UnmarshalJSON(data []byte) (err error)

type WhatsappTemplateListResponseDataComponentsButton

type WhatsappTemplateListResponseDataComponentsButton struct {
	// Button text
	Text string `json:"text" api:"required"`
	// Button type
	Type        string                                               `json:"type" api:"required"`
	PhoneNumber string                                               `json:"phone_number"`
	URL         string                                               `json:"url"`
	JSON        whatsappTemplateListResponseDataComponentsButtonJSON `json:"-"`
}

func (*WhatsappTemplateListResponseDataComponentsButton) UnmarshalJSON

func (r *WhatsappTemplateListResponseDataComponentsButton) UnmarshalJSON(data []byte) (err error)

type WhatsappTemplateListResponseDataComponentsType

type WhatsappTemplateListResponseDataComponentsType string

Component type

const (
	WhatsappTemplateListResponseDataComponentsTypeHeader  WhatsappTemplateListResponseDataComponentsType = "HEADER"
	WhatsappTemplateListResponseDataComponentsTypeBody    WhatsappTemplateListResponseDataComponentsType = "BODY"
	WhatsappTemplateListResponseDataComponentsTypeFooter  WhatsappTemplateListResponseDataComponentsType = "FOOTER"
	WhatsappTemplateListResponseDataComponentsTypeButtons WhatsappTemplateListResponseDataComponentsType = "BUTTONS"
)

func (WhatsappTemplateListResponseDataComponentsType) IsKnown

type WhatsappTemplateListResponseDataStatus

type WhatsappTemplateListResponseDataStatus string

Approval status

const (
	WhatsappTemplateListResponseDataStatusApproved WhatsappTemplateListResponseDataStatus = "APPROVED"
	WhatsappTemplateListResponseDataStatusPending  WhatsappTemplateListResponseDataStatus = "PENDING"
	WhatsappTemplateListResponseDataStatusRejected WhatsappTemplateListResponseDataStatus = "REJECTED"
)

func (WhatsappTemplateListResponseDataStatus) IsKnown

type WhatsappTemplateNewParams

type WhatsappTemplateNewParams struct {
	// WhatsApp account ID
	AccountID param.Field[string] `json:"account_id" api:"required"`
	// Template category
	Category param.Field[WhatsappTemplateNewParamsCategory] `json:"category" api:"required"`
	// Template components
	Components param.Field[[]WhatsappTemplateNewParamsComponent] `json:"components" api:"required"`
	// Template language code
	Language param.Field[string] `json:"language" api:"required"`
	// Template name
	Name param.Field[string] `json:"name" api:"required"`
}

func (WhatsappTemplateNewParams) MarshalJSON

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

type WhatsappTemplateNewParamsCategory

type WhatsappTemplateNewParamsCategory string

Template category

const (
	WhatsappTemplateNewParamsCategoryMarketing      WhatsappTemplateNewParamsCategory = "MARKETING"
	WhatsappTemplateNewParamsCategoryUtility        WhatsappTemplateNewParamsCategory = "UTILITY"
	WhatsappTemplateNewParamsCategoryAuthentication WhatsappTemplateNewParamsCategory = "AUTHENTICATION"
)

func (WhatsappTemplateNewParamsCategory) IsKnown

type WhatsappTemplateNewParamsComponent

type WhatsappTemplateNewParamsComponent struct {
	// Component type
	Type    param.Field[WhatsappTemplateNewParamsComponentsType]     `json:"type" api:"required"`
	Buttons param.Field[[]WhatsappTemplateNewParamsComponentsButton] `json:"buttons"`
	// Header format (TEXT, IMAGE, etc.)
	Format param.Field[string] `json:"format"`
	// Component text
	Text param.Field[string] `json:"text"`
}

func (WhatsappTemplateNewParamsComponent) MarshalJSON

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

type WhatsappTemplateNewParamsComponentsButton

type WhatsappTemplateNewParamsComponentsButton struct {
	// Button text
	Text param.Field[string] `json:"text" api:"required"`
	// Button type
	Type        param.Field[string] `json:"type" api:"required"`
	PhoneNumber param.Field[string] `json:"phone_number"`
	URL         param.Field[string] `json:"url"`
}

func (WhatsappTemplateNewParamsComponentsButton) MarshalJSON

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

type WhatsappTemplateNewParamsComponentsType

type WhatsappTemplateNewParamsComponentsType string

Component type

const (
	WhatsappTemplateNewParamsComponentsTypeHeader  WhatsappTemplateNewParamsComponentsType = "HEADER"
	WhatsappTemplateNewParamsComponentsTypeBody    WhatsappTemplateNewParamsComponentsType = "BODY"
	WhatsappTemplateNewParamsComponentsTypeFooter  WhatsappTemplateNewParamsComponentsType = "FOOTER"
	WhatsappTemplateNewParamsComponentsTypeButtons WhatsappTemplateNewParamsComponentsType = "BUTTONS"
)

func (WhatsappTemplateNewParamsComponentsType) IsKnown

type WhatsappTemplateNewResponse

type WhatsappTemplateNewResponse struct {
	// Template category
	Category   WhatsappTemplateNewResponseCategory    `json:"category" api:"required"`
	Components []WhatsappTemplateNewResponseComponent `json:"components" api:"required"`
	// Template language code
	Language string `json:"language" api:"required"`
	// Template name
	Name string `json:"name" api:"required"`
	// Approval status
	Status WhatsappTemplateNewResponseStatus `json:"status" api:"required"`
	JSON   whatsappTemplateNewResponseJSON   `json:"-"`
}

func (*WhatsappTemplateNewResponse) UnmarshalJSON

func (r *WhatsappTemplateNewResponse) UnmarshalJSON(data []byte) (err error)

type WhatsappTemplateNewResponseCategory

type WhatsappTemplateNewResponseCategory string

Template category

const (
	WhatsappTemplateNewResponseCategoryMarketing      WhatsappTemplateNewResponseCategory = "MARKETING"
	WhatsappTemplateNewResponseCategoryUtility        WhatsappTemplateNewResponseCategory = "UTILITY"
	WhatsappTemplateNewResponseCategoryAuthentication WhatsappTemplateNewResponseCategory = "AUTHENTICATION"
)

func (WhatsappTemplateNewResponseCategory) IsKnown

type WhatsappTemplateNewResponseComponent

type WhatsappTemplateNewResponseComponent struct {
	// Component type
	Type    WhatsappTemplateNewResponseComponentsType     `json:"type" api:"required"`
	Buttons []WhatsappTemplateNewResponseComponentsButton `json:"buttons"`
	// Header format (TEXT, IMAGE, etc.)
	Format string `json:"format"`
	// Component text
	Text string                                   `json:"text"`
	JSON whatsappTemplateNewResponseComponentJSON `json:"-"`
}

func (*WhatsappTemplateNewResponseComponent) UnmarshalJSON

func (r *WhatsappTemplateNewResponseComponent) UnmarshalJSON(data []byte) (err error)

type WhatsappTemplateNewResponseComponentsButton

type WhatsappTemplateNewResponseComponentsButton struct {
	// Button text
	Text string `json:"text" api:"required"`
	// Button type
	Type        string                                          `json:"type" api:"required"`
	PhoneNumber string                                          `json:"phone_number"`
	URL         string                                          `json:"url"`
	JSON        whatsappTemplateNewResponseComponentsButtonJSON `json:"-"`
}

func (*WhatsappTemplateNewResponseComponentsButton) UnmarshalJSON

func (r *WhatsappTemplateNewResponseComponentsButton) UnmarshalJSON(data []byte) (err error)

type WhatsappTemplateNewResponseComponentsType

type WhatsappTemplateNewResponseComponentsType string

Component type

const (
	WhatsappTemplateNewResponseComponentsTypeHeader  WhatsappTemplateNewResponseComponentsType = "HEADER"
	WhatsappTemplateNewResponseComponentsTypeBody    WhatsappTemplateNewResponseComponentsType = "BODY"
	WhatsappTemplateNewResponseComponentsTypeFooter  WhatsappTemplateNewResponseComponentsType = "FOOTER"
	WhatsappTemplateNewResponseComponentsTypeButtons WhatsappTemplateNewResponseComponentsType = "BUTTONS"
)

func (WhatsappTemplateNewResponseComponentsType) IsKnown

type WhatsappTemplateNewResponseStatus

type WhatsappTemplateNewResponseStatus string

Approval status

const (
	WhatsappTemplateNewResponseStatusApproved WhatsappTemplateNewResponseStatus = "APPROVED"
	WhatsappTemplateNewResponseStatusPending  WhatsappTemplateNewResponseStatus = "PENDING"
	WhatsappTemplateNewResponseStatusRejected WhatsappTemplateNewResponseStatus = "REJECTED"
)

func (WhatsappTemplateNewResponseStatus) IsKnown

type WhatsappTemplateService

type WhatsappTemplateService struct {
	Options []option.RequestOption
}

WhatsappTemplateService contains methods and other services that help with interacting with the relay 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 NewWhatsappTemplateService method instead.

func NewWhatsappTemplateService

func NewWhatsappTemplateService(opts ...option.RequestOption) (r *WhatsappTemplateService)

NewWhatsappTemplateService 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 (*WhatsappTemplateService) Delete

func (r *WhatsappTemplateService) Delete(ctx context.Context, templateName string, body WhatsappTemplateDeleteParams, opts ...option.RequestOption) (err error)

Delete a message template

func (*WhatsappTemplateService) Get

Get template details

func (*WhatsappTemplateService) List

List message templates

func (*WhatsappTemplateService) New

Create a message template

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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