cloneforce

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

README

Cloneforce Go API Library

Go Reference

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

It is generated with Stainless.

Installation

import (
	"github.com/clone-global/cloneforce-go" // imported as cloneforce
)

Or to pin the version:

go get -u 'github.com/clone-global/[email protected]'

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/clone-global/cloneforce-go"
	"github.com/clone-global/cloneforce-go/option"
)

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

Request fields

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// Accessing regular fields

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

// Optional field checks

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

// Raw JSON values

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

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

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

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

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

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

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

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

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

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

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

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

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

See the full list of request options.

Pagination

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

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

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 *cloneforce.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.V1.Clones.List(context.TODO())
if err != nil {
	var apierr *cloneforce.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 "/public/v1/clones": 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.V1.Clones.List(
	ctx,
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

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

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

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

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

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

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

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

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

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

Undocumented endpoints

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

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

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

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

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

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

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

Middleware

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

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

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

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

    return res, err
}

client := cloneforce.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(b bool) param.Opt[bool]

func BoolPtr

func BoolPtr(v bool) *bool

func DefaultClientOptions

func DefaultClientOptions() []option.RequestOption

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

func File

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

func Float

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

func FloatPtr

func FloatPtr(v float64) *float64

func Int

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

func IntPtr

func IntPtr(v int64) *int64

func Opt

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

func Ptr

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

func String

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

func StringPtr

func StringPtr(v string) *string

func Time

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

func TimePtr

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

Types

type ChatCompletionChunk added in v0.1.0

type ChatCompletionChunk struct {
	ID    string                   `json:"id" api:"required"`
	Delta ChatCompletionChunkDelta `json:"delta"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Delta       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

SSE message.delta event payload

func (ChatCompletionChunk) RawJSON added in v0.1.0

func (r ChatCompletionChunk) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChatCompletionChunk) UnmarshalJSON added in v0.1.0

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

type ChatCompletionChunkDelta added in v0.1.0

type ChatCompletionChunkDelta struct {
	Content string `json:"content"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Content     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ChatCompletionChunkDelta) RawJSON added in v0.1.0

func (r ChatCompletionChunkDelta) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChatCompletionChunkDelta) UnmarshalJSON added in v0.1.0

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

type ChatCompletionResponse added in v0.1.0

type ChatCompletionResponse struct {
	ID        string    `json:"id" api:"required"`
	ChatID    string    `json:"chatId" api:"required"`
	Content   string    `json:"content" api:"required"`
	CreatedAt time.Time `json:"createdAt" api:"required" format:"date-time"`
	Role      string    `json:"role" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ChatID      respjson.Field
		Content     respjson.Field
		CreatedAt   respjson.Field
		Role        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ChatCompletionResponse) RawJSON added in v0.1.0

func (r ChatCompletionResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChatCompletionResponse) UnmarshalJSON added in v0.1.0

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

type Client

type Client struct {
	V1 V1Service
	// contains filtered or unexported fields
}

Client creates a struct with services and top level methods that help with interacting with the cloneforce 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 (CLONEFORCE_API_KEY, CLONEFORCE_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.

func (*Client) Delete

func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Execute

func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error

Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.

If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.

The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.

If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.

Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.

The response body will be deserialized into the res variable, depending on its type:

  • A pointer to a *http.Response is populated by the raw response.
  • A pointer to a byte array will be populated with the contents of the request body.
  • A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
  • A nil value will not read the response body.

For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.

func (*Client) Get

func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Patch

func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Post

func (r *Client) Post(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Put

func (r *Client) Put(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Put makes a PUT request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

type CloneHeadshot

type CloneHeadshot struct {
	Large  string `json:"large"`
	Medium string `json:"medium"`
	Small  string `json:"small"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Large       respjson.Field
		Medium      respjson.Field
		Small       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CloneHeadshot) RawJSON

func (r CloneHeadshot) RawJSON() string

Returns the unmodified JSON received from the API

func (*CloneHeadshot) UnmarshalJSON

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

type CloneProfile

type CloneProfile struct {
	ID                 string            `json:"id" api:"required"`
	CreatedAt          time.Time         `json:"createdAt" api:"required" format:"date-time"`
	Generation         string            `json:"generation" api:"required"`
	Name               string            `json:"name" api:"required"`
	ScreenName         string            `json:"screenName" api:"required"`
	Status             string            `json:"status" api:"required"`
	UpdatedAt          time.Time         `json:"updatedAt" api:"required" format:"date-time"`
	AppearanceDesc     string            `json:"appearanceDesc"`
	Birthdate          time.Time         `json:"birthdate" format:"date-time"`
	CareerDesc         string            `json:"careerDesc"`
	ChildhoodDesc      string            `json:"childhoodDesc"`
	CurrentCity        string            `json:"currentCity"`
	EducationDesc      string            `json:"educationDesc"`
	FamilyDesc         string            `json:"familyDesc"`
	FinancesDesc       string            `json:"financesDesc"`
	Gender             string            `json:"gender"`
	Headshot           CloneHeadshot     `json:"headshot"`
	Hometown           string            `json:"hometown"`
	InterestsDesc      string            `json:"interestsDesc"`
	IsEnabled          bool              `json:"isEnabled"`
	Language           string            `json:"language"`
	LifestyleDesc      string            `json:"lifestyleDesc"`
	MaritalStatus      string            `json:"maritalStatus"`
	Nationality        string            `json:"nationality"`
	Occupation         string            `json:"occupation"`
	PrinciplesDesc     string            `json:"principlesDesc"`
	Races              []string          `json:"races"`
	SocialCircleDesc   string            `json:"socialCircleDesc"`
	SocialHobbiesDesc  string            `json:"socialHobbiesDesc"`
	SportsDesc         string            `json:"sportsDesc"`
	State              CloneProfileState `json:"state"`
	TravelDesc         string            `json:"travelDesc"`
	UnusualHobbiesDesc string            `json:"unusualHobbiesDesc"`
	VoiceURL           string            `json:"voiceUrl"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		CreatedAt          respjson.Field
		Generation         respjson.Field
		Name               respjson.Field
		ScreenName         respjson.Field
		Status             respjson.Field
		UpdatedAt          respjson.Field
		AppearanceDesc     respjson.Field
		Birthdate          respjson.Field
		CareerDesc         respjson.Field
		ChildhoodDesc      respjson.Field
		CurrentCity        respjson.Field
		EducationDesc      respjson.Field
		FamilyDesc         respjson.Field
		FinancesDesc       respjson.Field
		Gender             respjson.Field
		Headshot           respjson.Field
		Hometown           respjson.Field
		InterestsDesc      respjson.Field
		IsEnabled          respjson.Field
		Language           respjson.Field
		LifestyleDesc      respjson.Field
		MaritalStatus      respjson.Field
		Nationality        respjson.Field
		Occupation         respjson.Field
		PrinciplesDesc     respjson.Field
		Races              respjson.Field
		SocialCircleDesc   respjson.Field
		SocialHobbiesDesc  respjson.Field
		SportsDesc         respjson.Field
		State              respjson.Field
		TravelDesc         respjson.Field
		UnusualHobbiesDesc respjson.Field
		VoiceURL           respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CloneProfile) RawJSON

func (r CloneProfile) RawJSON() string

Returns the unmodified JSON received from the API

func (*CloneProfile) UnmarshalJSON

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

type CloneProfileState

type CloneProfileState struct {
	// Generation status: none, generating, ready, error
	//
	// Any of "none", "generating", "ready", "error".
	Headshot string `json:"headshot" api:"required"`
	// Generation status: none, generating, ready, error
	//
	// Any of "none", "generating", "ready", "error".
	Voice string `json:"voice" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Headshot    respjson.Field
		Voice       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CloneProfileState) RawJSON

func (r CloneProfileState) RawJSON() string

Returns the unmodified JSON received from the API

func (*CloneProfileState) UnmarshalJSON

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

type ConnectionDetail

type ConnectionDetail struct {
	ID                  string            `json:"id" api:"required"`
	CreatedAt           time.Time         `json:"createdAt" api:"required" format:"date-time"`
	IsExpired           bool              `json:"isExpired" api:"required"`
	IsValid             bool              `json:"isValid" api:"required"`
	Name                string            `json:"name" api:"required"`
	SettingType         string            `json:"settingType" api:"required"`
	UpdatedAt           time.Time         `json:"updatedAt" api:"required" format:"date-time"`
	AcquiredPermissions []string          `json:"acquiredPermissions"`
	ErrorReason         string            `json:"errorReason"`
	ExpiresAt           time.Time         `json:"expiresAt" format:"date-time"`
	Metadata            map[string]string `json:"metadata"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		CreatedAt           respjson.Field
		IsExpired           respjson.Field
		IsValid             respjson.Field
		Name                respjson.Field
		SettingType         respjson.Field
		UpdatedAt           respjson.Field
		AcquiredPermissions respjson.Field
		ErrorReason         respjson.Field
		ExpiresAt           respjson.Field
		Metadata            respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ConnectionDetail) RawJSON

func (r ConnectionDetail) RawJSON() string

Returns the unmodified JSON received from the API

func (*ConnectionDetail) UnmarshalJSON

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

type ConnectionStatus

type ConnectionStatus struct {
	ID          string    `json:"id" api:"required"`
	IsExpired   bool      `json:"isExpired" api:"required"`
	IsValid     bool      `json:"isValid" api:"required"`
	ErrorReason string    `json:"errorReason"`
	ExpiresAt   time.Time `json:"expiresAt" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		IsExpired   respjson.Field
		IsValid     respjson.Field
		ErrorReason respjson.Field
		ExpiresAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ConnectionStatus) RawJSON

func (r ConnectionStatus) RawJSON() string

Returns the unmodified JSON received from the API

func (*ConnectionStatus) UnmarshalJSON

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

type CreateChatResponse added in v0.1.0

type CreateChatResponse struct {
	ID        string    `json:"id" api:"required"`
	CloneID   string    `json:"cloneId" api:"required"`
	CreatedAt time.Time `json:"createdAt" api:"required" format:"date-time"`
	Title     string    `json:"title" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CloneID     respjson.Field
		CreatedAt   respjson.Field
		Title       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CreateChatResponse) RawJSON added in v0.1.0

func (r CreateChatResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*CreateChatResponse) UnmarshalJSON added in v0.1.0

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

type Error

type Error = apierror.Error

type GalleryItemSummary

type GalleryItemSummary struct {
	ID        string    `json:"id" api:"required"`
	CreatedAt time.Time `json:"createdAt" api:"required" format:"date-time"`
	Name      string    `json:"name" api:"required"`
	// Any of "Video", "Audio", "Image".
	Type         GalleryItemSummaryType `json:"type" api:"required"`
	UpdatedAt    time.Time              `json:"updatedAt" api:"required" format:"date-time"`
	URL          string                 `json:"url" api:"required"`
	Description  string                 `json:"description"`
	IsHeroVideo  bool                   `json:"isHeroVideo"`
	ThumbnailURL string                 `json:"thumbnailUrl"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		CreatedAt    respjson.Field
		Name         respjson.Field
		Type         respjson.Field
		UpdatedAt    respjson.Field
		URL          respjson.Field
		Description  respjson.Field
		IsHeroVideo  respjson.Field
		ThumbnailURL respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (GalleryItemSummary) RawJSON

func (r GalleryItemSummary) RawJSON() string

Returns the unmodified JSON received from the API

func (*GalleryItemSummary) UnmarshalJSON

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

type GalleryItemSummaryType

type GalleryItemSummaryType string
const (
	GalleryItemSummaryTypeVideo GalleryItemSummaryType = "Video"
	GalleryItemSummaryTypeAudio GalleryItemSummaryType = "Audio"
	GalleryItemSummaryTypeImage GalleryItemSummaryType = "Image"
)

type GenerateRequestParam

type GenerateRequestParam struct {
	// Optional instructions to nudge the generation (e.g. "deeper voice", "longer
	// hair")
	AdditionalInstructions param.Opt[string] `json:"additionalInstructions,omitzero"`
	// contains filtered or unexported fields
}

func (GenerateRequestParam) MarshalJSON

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

func (*GenerateRequestParam) UnmarshalJSON

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

type GenerationStatus

type GenerationStatus struct {
	Status string `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Status      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (GenerationStatus) RawJSON

func (r GenerationStatus) RawJSON() string

Returns the unmodified JSON received from the API

func (*GenerationStatus) UnmarshalJSON

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

type IntegrationSummary

type IntegrationSummary struct {
	ID        string    `json:"id" api:"required"`
	CreatedAt time.Time `json:"createdAt" api:"required" format:"date-time"`
	// Any of "Pending", "Connected", "Error", "Provisioning".
	Status IntegrationSummaryStatus `json:"status" api:"required"`
	// Any of "Slack", "Email", "MsTeams", "Phone".
	Type      IntegrationSummaryType `json:"type" api:"required"`
	UpdatedAt time.Time              `json:"updatedAt" api:"required" format:"date-time"`
	// Type-specific integration details
	Detail       IntegrationSummaryDetailUnion `json:"detail"`
	ErrorMessage string                        `json:"errorMessage"`
	Name         string                        `json:"name"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		CreatedAt    respjson.Field
		Status       respjson.Field
		Type         respjson.Field
		UpdatedAt    respjson.Field
		Detail       respjson.Field
		ErrorMessage respjson.Field
		Name         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IntegrationSummary) RawJSON

func (r IntegrationSummary) RawJSON() string

Returns the unmodified JSON received from the API

func (*IntegrationSummary) UnmarshalJSON

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

type IntegrationSummaryDetailEmailDetail

type IntegrationSummaryDetailEmailDetail struct {
	Email          string `json:"email" api:"required"`
	ConnectionType string `json:"connectionType"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Email          respjson.Field
		ConnectionType respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IntegrationSummaryDetailEmailDetail) RawJSON

Returns the unmodified JSON received from the API

func (*IntegrationSummaryDetailEmailDetail) UnmarshalJSON

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

type IntegrationSummaryDetailMsTeamsDetail

type IntegrationSummaryDetailMsTeamsDetail struct {
	OrganizationName string           `json:"organizationName"`
	Teams            []MsTeamsTeamRef `json:"teams"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		OrganizationName respjson.Field
		Teams            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IntegrationSummaryDetailMsTeamsDetail) RawJSON

Returns the unmodified JSON received from the API

func (*IntegrationSummaryDetailMsTeamsDetail) UnmarshalJSON

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

type IntegrationSummaryDetailPhoneDetail

type IntegrationSummaryDetailPhoneDetail struct {
	PhoneNumber string `json:"phoneNumber"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		PhoneNumber respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IntegrationSummaryDetailPhoneDetail) RawJSON

Returns the unmodified JSON received from the API

func (*IntegrationSummaryDetailPhoneDetail) UnmarshalJSON

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

type IntegrationSummaryDetailSlackDetail

type IntegrationSummaryDetailSlackDetail struct {
	TeamID   string `json:"teamId"`
	TeamName string `json:"teamName"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		TeamID      respjson.Field
		TeamName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IntegrationSummaryDetailSlackDetail) RawJSON

Returns the unmodified JSON received from the API

func (*IntegrationSummaryDetailSlackDetail) UnmarshalJSON

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

type IntegrationSummaryDetailUnion

type IntegrationSummaryDetailUnion struct {
	// This field is from variant [IntegrationSummaryDetailSlackDetail].
	TeamID string `json:"teamId"`
	// This field is from variant [IntegrationSummaryDetailSlackDetail].
	TeamName string `json:"teamName"`
	// This field is from variant [IntegrationSummaryDetailEmailDetail].
	Email string `json:"email"`
	// This field is from variant [IntegrationSummaryDetailEmailDetail].
	ConnectionType string `json:"connectionType"`
	// This field is from variant [IntegrationSummaryDetailMsTeamsDetail].
	OrganizationName string `json:"organizationName"`
	// This field is from variant [IntegrationSummaryDetailMsTeamsDetail].
	Teams []MsTeamsTeamRef `json:"teams"`
	// This field is from variant [IntegrationSummaryDetailPhoneDetail].
	PhoneNumber string `json:"phoneNumber"`
	JSON        struct {
		TeamID           respjson.Field
		TeamName         respjson.Field
		Email            respjson.Field
		ConnectionType   respjson.Field
		OrganizationName respjson.Field
		Teams            respjson.Field
		PhoneNumber      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

IntegrationSummaryDetailUnion contains all possible properties and values from IntegrationSummaryDetailSlackDetail, IntegrationSummaryDetailEmailDetail, IntegrationSummaryDetailMsTeamsDetail, IntegrationSummaryDetailPhoneDetail.

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

func (IntegrationSummaryDetailUnion) AsIntegrationSummaryDetailEmailDetail

func (u IntegrationSummaryDetailUnion) AsIntegrationSummaryDetailEmailDetail() (v IntegrationSummaryDetailEmailDetail)

func (IntegrationSummaryDetailUnion) AsIntegrationSummaryDetailMsTeamsDetail

func (u IntegrationSummaryDetailUnion) AsIntegrationSummaryDetailMsTeamsDetail() (v IntegrationSummaryDetailMsTeamsDetail)

func (IntegrationSummaryDetailUnion) AsIntegrationSummaryDetailPhoneDetail

func (u IntegrationSummaryDetailUnion) AsIntegrationSummaryDetailPhoneDetail() (v IntegrationSummaryDetailPhoneDetail)

func (IntegrationSummaryDetailUnion) AsIntegrationSummaryDetailSlackDetail

func (u IntegrationSummaryDetailUnion) AsIntegrationSummaryDetailSlackDetail() (v IntegrationSummaryDetailSlackDetail)

func (IntegrationSummaryDetailUnion) RawJSON

Returns the unmodified JSON received from the API

func (*IntegrationSummaryDetailUnion) UnmarshalJSON

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

type IntegrationSummaryStatus

type IntegrationSummaryStatus string
const (
	IntegrationSummaryStatusPending      IntegrationSummaryStatus = "Pending"
	IntegrationSummaryStatusConnected    IntegrationSummaryStatus = "Connected"
	IntegrationSummaryStatusError        IntegrationSummaryStatus = "Error"
	IntegrationSummaryStatusProvisioning IntegrationSummaryStatus = "Provisioning"
)

type IntegrationSummaryType

type IntegrationSummaryType string
const (
	IntegrationSummaryTypeSlack   IntegrationSummaryType = "Slack"
	IntegrationSummaryTypeEmail   IntegrationSummaryType = "Email"
	IntegrationSummaryTypeMsTeams IntegrationSummaryType = "MsTeams"
	IntegrationSummaryTypePhone   IntegrationSummaryType = "Phone"
)

type KBFileSummary

type KBFileSummary struct {
	ID          string    `json:"id" api:"required"`
	ContentType string    `json:"contentType" api:"required"`
	CreatedAt   time.Time `json:"createdAt" api:"required" format:"date-time"`
	Name        string    `json:"name" api:"required"`
	URL         string    `json:"url" api:"required"`
	UploadURL   string    `json:"uploadUrl"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ContentType respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		URL         respjson.Field
		UploadURL   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (KBFileSummary) RawJSON

func (r KBFileSummary) RawJSON() string

Returns the unmodified JSON received from the API

func (*KBFileSummary) UnmarshalJSON

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

type MsTeamsTeamRef

type MsTeamsTeamRef struct {
	ID   string `json:"id" api:"required"`
	Name string `json:"name" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Name        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MsTeamsTeamRef) RawJSON

func (r MsTeamsTeamRef) RawJSON() string

Returns the unmodified JSON received from the API

func (*MsTeamsTeamRef) UnmarshalJSON

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

type OAuthProvision

type OAuthProvision struct {
	ConnectionID string `json:"connectionId" api:"required"`
	// URL to present to the user to complete the OAuth consent flow
	ProvisionURL string `json:"provisionUrl" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ConnectionID respjson.Field
		ProvisionURL respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OAuthProvision) RawJSON

func (r OAuthProvision) RawJSON() string

Returns the unmodified JSON received from the API

func (*OAuthProvision) UnmarshalJSON

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

type SkillConnectionInfo

type SkillConnectionInfo struct {
	IsConfigured bool   `json:"isConfigured" api:"required"`
	SettingName  string `json:"settingName" api:"required"`
	SettingType  string `json:"settingType" api:"required"`
	ConnectionID string `json:"connectionId"`
	IsValid      bool   `json:"isValid"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IsConfigured respjson.Field
		SettingName  respjson.Field
		SettingType  respjson.Field
		ConnectionID respjson.Field
		IsValid      respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SkillConnectionInfo) RawJSON

func (r SkillConnectionInfo) RawJSON() string

Returns the unmodified JSON received from the API

func (*SkillConnectionInfo) UnmarshalJSON

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

type SkillSummary

type SkillSummary struct {
	Accuracy      float64 `json:"accuracy" api:"required"`
	IsActive      bool    `json:"isActive" api:"required"`
	IsSystemSkill bool    `json:"isSystemSkill" api:"required"`
	Name          string  `json:"name" api:"required"`
	TotalRuns     int64   `json:"totalRuns" api:"required"`
	Category      string  `json:"category"`
	Description   string  `json:"description"`
	SkillID       string  `json:"skillId"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Accuracy      respjson.Field
		IsActive      respjson.Field
		IsSystemSkill respjson.Field
		Name          respjson.Field
		TotalRuns     respjson.Field
		Category      respjson.Field
		Description   respjson.Field
		SkillID       respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SkillSummary) RawJSON

func (r SkillSummary) RawJSON() string

Returns the unmodified JSON received from the API

func (*SkillSummary) UnmarshalJSON

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

type SlackIntegration

type SlackIntegration struct {
	ID       string `json:"id" api:"required"`
	Status   string `json:"status" api:"required"`
	Manifest string `json:"manifest"`
	TeamID   string `json:"teamId"`
	TeamName string `json:"teamName"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Status      respjson.Field
		Manifest    respjson.Field
		TeamID      respjson.Field
		TeamName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SlackIntegration) RawJSON

func (r SlackIntegration) RawJSON() string

Returns the unmodified JSON received from the API

func (*SlackIntegration) UnmarshalJSON

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

type TaskRecurrence

type TaskRecurrence struct {
	Interval int64 `json:"interval" api:"required"`
	// Any of "Minutely", "Hourly", "Daily", "Weekly", "Monthly", "Yearly".
	Pattern TaskRecurrencePattern `json:"pattern" api:"required"`
	EndsAt  time.Time             `json:"endsAt" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Interval    respjson.Field
		Pattern     respjson.Field
		EndsAt      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskRecurrence) RawJSON

func (r TaskRecurrence) RawJSON() string

Returns the unmodified JSON received from the API

func (TaskRecurrence) ToParam

func (r TaskRecurrence) ToParam() TaskRecurrenceParam

ToParam converts this TaskRecurrence to a TaskRecurrenceParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TaskRecurrenceParam.Overrides()

func (*TaskRecurrence) UnmarshalJSON

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

type TaskRecurrenceParam

type TaskRecurrenceParam struct {
	Interval int64 `json:"interval" api:"required"`
	// Any of "Minutely", "Hourly", "Daily", "Weekly", "Monthly", "Yearly".
	Pattern TaskRecurrencePattern `json:"pattern,omitzero" api:"required"`
	EndsAt  param.Opt[time.Time]  `json:"endsAt,omitzero" format:"date-time"`
	// contains filtered or unexported fields
}

The properties Interval, Pattern are required.

func (TaskRecurrenceParam) MarshalJSON

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

func (*TaskRecurrenceParam) UnmarshalJSON

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

type TaskRecurrencePattern

type TaskRecurrencePattern string
const (
	TaskRecurrencePatternMinutely TaskRecurrencePattern = "Minutely"
	TaskRecurrencePatternHourly   TaskRecurrencePattern = "Hourly"
	TaskRecurrencePatternDaily    TaskRecurrencePattern = "Daily"
	TaskRecurrencePatternWeekly   TaskRecurrencePattern = "Weekly"
	TaskRecurrencePatternMonthly  TaskRecurrencePattern = "Monthly"
	TaskRecurrencePatternYearly   TaskRecurrencePattern = "Yearly"
)

type TaskSummary

type TaskSummary struct {
	ID          string         `json:"id" api:"required"`
	CreatedAt   time.Time      `json:"createdAt" api:"required" format:"date-time"`
	IsRecurring bool           `json:"isRecurring" api:"required"`
	Prompt      string         `json:"prompt" api:"required"`
	StartsAt    time.Time      `json:"startsAt" api:"required" format:"date-time"`
	Title       string         `json:"title" api:"required"`
	UpdatedAt   time.Time      `json:"updatedAt" api:"required" format:"date-time"`
	Color       string         `json:"color"`
	LastRanAt   time.Time      `json:"lastRanAt" format:"date-time"`
	Recurrence  TaskRecurrence `json:"recurrence"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		IsRecurring respjson.Field
		Prompt      respjson.Field
		StartsAt    respjson.Field
		Title       respjson.Field
		UpdatedAt   respjson.Field
		Color       respjson.Field
		LastRanAt   respjson.Field
		Recurrence  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskSummary) RawJSON

func (r TaskSummary) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaskSummary) UnmarshalJSON

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

type V1CloneActivityDeleteParams

type V1CloneActivityDeleteParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type V1CloneActivityDeleteResponse

type V1CloneActivityDeleteResponse struct {
	Deleted bool `json:"deleted" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Deleted     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneActivityDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*V1CloneActivityDeleteResponse) UnmarshalJSON

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

type V1CloneActivityGetParams

type V1CloneActivityGetParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type V1CloneActivityGetResponse

type V1CloneActivityGetResponse struct {
	ID         string                            `json:"id" api:"required"`
	CreatedAt  time.Time                         `json:"createdAt" api:"required" format:"date-time"`
	IsSuccess  bool                              `json:"isSuccess" api:"required"`
	SkillCount int64                             `json:"skillCount" api:"required"`
	TaskID     string                            `json:"taskId" api:"required"`
	Response   string                            `json:"response"`
	Skills     []V1CloneActivityGetResponseSkill `json:"skills"`
	TaskTitle  string                            `json:"taskTitle"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		IsSuccess   respjson.Field
		SkillCount  respjson.Field
		TaskID      respjson.Field
		Response    respjson.Field
		Skills      respjson.Field
		TaskTitle   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneActivityGetResponse) RawJSON

func (r V1CloneActivityGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1CloneActivityGetResponse) UnmarshalJSON

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

type V1CloneActivityGetResponseSkill

type V1CloneActivityGetResponseSkill struct {
	IsSuccess bool   `json:"isSuccess" api:"required"`
	SkillName string `json:"skillName" api:"required"`
	Result    string `json:"result"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IsSuccess   respjson.Field
		SkillName   respjson.Field
		Result      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneActivityGetResponseSkill) RawJSON

Returns the unmodified JSON received from the API

func (*V1CloneActivityGetResponseSkill) UnmarshalJSON

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

type V1CloneActivityListResponse

type V1CloneActivityListResponse struct {
	Data []V1CloneActivityListResponseData `json:"data" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneActivityListResponse) RawJSON

func (r V1CloneActivityListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1CloneActivityListResponse) UnmarshalJSON

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

type V1CloneActivityListResponseData

type V1CloneActivityListResponseData struct {
	ID        string    `json:"id" api:"required"`
	CreatedAt time.Time `json:"createdAt" api:"required" format:"date-time"`
	IsSuccess bool      `json:"isSuccess" api:"required"`
	TaskID    string    `json:"taskId" api:"required"`
	Response  string    `json:"response"`
	TaskTitle string    `json:"taskTitle"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		IsSuccess   respjson.Field
		TaskID      respjson.Field
		Response    respjson.Field
		TaskTitle   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneActivityListResponseData) RawJSON

Returns the unmodified JSON received from the API

func (*V1CloneActivityListResponseData) UnmarshalJSON

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

type V1CloneActivityService

type V1CloneActivityService struct {
	// contains filtered or unexported fields
}

Task run history

V1CloneActivityService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneActivityService method instead.

func NewV1CloneActivityService

func NewV1CloneActivityService(opts ...option.RequestOption) (r V1CloneActivityService)

NewV1CloneActivityService 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 (*V1CloneActivityService) Delete

Delete a task run

func (*V1CloneActivityService) Get

Returns a single task run with skill execution details.

func (*V1CloneActivityService) List

Returns all task run records for a clone, ordered by creation date descending.

type V1CloneChatCompletionNewParams added in v0.1.0

type V1CloneChatCompletionNewParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	// The user message to send to the clone
	Message string `json:"message" api:"required"`
	// contains filtered or unexported fields
}

func (V1CloneChatCompletionNewParams) MarshalJSON added in v0.1.0

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

func (*V1CloneChatCompletionNewParams) UnmarshalJSON added in v0.1.0

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

type V1CloneChatCompletionService added in v0.1.0

type V1CloneChatCompletionService struct {
	// contains filtered or unexported fields
}

Chat sessions and completions

V1CloneChatCompletionService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneChatCompletionService method instead.

func NewV1CloneChatCompletionService added in v0.1.0

func NewV1CloneChatCompletionService(opts ...option.RequestOption) (r V1CloneChatCompletionService)

NewV1CloneChatCompletionService 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 (*V1CloneChatCompletionService) New added in v0.1.0

Sends a user message to the clone and returns the assistant's response.

Set `stream: true` to receive the response as Server-Sent Events (SSE). SSE events: `message.delta` (incremental text), `message.completed` (final message), `done` (stream end).

func (*V1CloneChatCompletionService) NewStreaming added in v0.1.0

Sends a user message to the clone and returns the assistant's response.

Set `stream: true` to receive the response as Server-Sent Events (SSE). SSE events: `message.delta` (incremental text), `message.completed` (final message), `done` (stream end).

type V1CloneChatNewParams added in v0.1.0

type V1CloneChatNewParams struct {
	// Optional title for the chat session
	Title param.Opt[string] `json:"title,omitzero"`
	// contains filtered or unexported fields
}

func (V1CloneChatNewParams) MarshalJSON added in v0.1.0

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

func (*V1CloneChatNewParams) UnmarshalJSON added in v0.1.0

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

type V1CloneChatService added in v0.1.0

type V1CloneChatService struct {

	// Chat sessions and completions
	Completions V1CloneChatCompletionService
	// contains filtered or unexported fields
}

Chat sessions and completions

V1CloneChatService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneChatService method instead.

func NewV1CloneChatService added in v0.1.0

func NewV1CloneChatService(opts ...option.RequestOption) (r V1CloneChatService)

NewV1CloneChatService 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 (*V1CloneChatService) New added in v0.1.0

Create a new chat session

type V1CloneFileDeleteParams

type V1CloneFileDeleteParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type V1CloneFileDeleteResponse

type V1CloneFileDeleteResponse struct {
	Deleted bool `json:"deleted" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Deleted     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneFileDeleteResponse) RawJSON

func (r V1CloneFileDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1CloneFileDeleteResponse) UnmarshalJSON

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

type V1CloneFileGetParams

type V1CloneFileGetParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type V1CloneFileListResponse

type V1CloneFileListResponse struct {
	Data []KBFileSummary `json:"data" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneFileListResponse) RawJSON

func (r V1CloneFileListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1CloneFileListResponse) UnmarshalJSON

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

type V1CloneFileNewParams

type V1CloneFileNewParams struct {
	URL         string            `json:"url" api:"required"`
	ContentType param.Opt[string] `json:"contentType,omitzero"`
	Name        param.Opt[string] `json:"name,omitzero"`
	// contains filtered or unexported fields
}

func (V1CloneFileNewParams) MarshalJSON

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

func (*V1CloneFileNewParams) UnmarshalJSON

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

type V1CloneFileService

type V1CloneFileService struct {
	// contains filtered or unexported fields
}

Clone knowledge base file management

V1CloneFileService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneFileService method instead.

func NewV1CloneFileService

func NewV1CloneFileService(opts ...option.RequestOption) (r V1CloneFileService)

NewV1CloneFileService 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 (*V1CloneFileService) Delete

**Not yet implemented.** Returns 501. Pending Pinecone migration.

func (*V1CloneFileService) Get

func (r *V1CloneFileService) Get(ctx context.Context, fileID string, query V1CloneFileGetParams, opts ...option.RequestOption) (res *KBFileSummary, err error)

Get a knowledge base file

func (*V1CloneFileService) List

func (r *V1CloneFileService) List(ctx context.Context, cloneID string, opts ...option.RequestOption) (res *V1CloneFileListResponse, err error)

List knowledge base files

func (*V1CloneFileService) New

func (r *V1CloneFileService) New(ctx context.Context, cloneID string, body V1CloneFileNewParams, opts ...option.RequestOption) (res *KBFileSummary, err error)

**Not yet implemented.** Returns 501. Pending Pinecone migration.

type V1CloneGalleryDeleteParams

type V1CloneGalleryDeleteParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type V1CloneGalleryDeleteResponse

type V1CloneGalleryDeleteResponse struct {
	Deleted bool `json:"deleted" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Deleted     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneGalleryDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*V1CloneGalleryDeleteResponse) UnmarshalJSON

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

type V1CloneGalleryGetParams

type V1CloneGalleryGetParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type V1CloneGalleryListParams

type V1CloneGalleryListParams struct {
	// Filter by media type
	//
	// Any of "Video", "Audio", "Image".
	Type V1CloneGalleryListParamsType `query:"type,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (V1CloneGalleryListParams) URLQuery

func (r V1CloneGalleryListParams) URLQuery() (v url.Values, err error)

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

type V1CloneGalleryListParamsType

type V1CloneGalleryListParamsType string

Filter by media type

const (
	V1CloneGalleryListParamsTypeVideo V1CloneGalleryListParamsType = "Video"
	V1CloneGalleryListParamsTypeAudio V1CloneGalleryListParamsType = "Audio"
	V1CloneGalleryListParamsTypeImage V1CloneGalleryListParamsType = "Image"
)

type V1CloneGalleryListResponse

type V1CloneGalleryListResponse struct {
	Data []GalleryItemSummary `json:"data" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneGalleryListResponse) RawJSON

func (r V1CloneGalleryListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1CloneGalleryListResponse) UnmarshalJSON

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

type V1CloneGalleryNewParams

type V1CloneGalleryNewParams struct {
	// URL of the media file to download and add to the gallery
	MediaURL string `json:"mediaUrl" api:"required"`
	// Any of "Video", "Audio", "Image".
	Type        V1CloneGalleryNewParamsType `json:"type,omitzero" api:"required"`
	Description param.Opt[string]           `json:"description,omitzero"`
	IsHeroVideo param.Opt[bool]             `json:"isHeroVideo,omitzero"`
	// contains filtered or unexported fields
}

func (V1CloneGalleryNewParams) MarshalJSON

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

func (*V1CloneGalleryNewParams) UnmarshalJSON

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

type V1CloneGalleryNewParamsType

type V1CloneGalleryNewParamsType string
const (
	V1CloneGalleryNewParamsTypeVideo V1CloneGalleryNewParamsType = "Video"
	V1CloneGalleryNewParamsTypeAudio V1CloneGalleryNewParamsType = "Audio"
	V1CloneGalleryNewParamsTypeImage V1CloneGalleryNewParamsType = "Image"
)

type V1CloneGalleryService

type V1CloneGalleryService struct {
	// contains filtered or unexported fields
}

Clone gallery media management

V1CloneGalleryService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneGalleryService method instead.

func NewV1CloneGalleryService

func NewV1CloneGalleryService(opts ...option.RequestOption) (r V1CloneGalleryService)

NewV1CloneGalleryService 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 (*V1CloneGalleryService) Delete

Delete a gallery item

func (*V1CloneGalleryService) Get

Get a gallery item

func (*V1CloneGalleryService) List

List gallery items

func (*V1CloneGalleryService) New

Downloads media from the provided URL and adds it to the clone's gallery.

type V1CloneHeadshotGenerateParams

type V1CloneHeadshotGenerateParams struct {
	GenerateRequest GenerateRequestParam
	// contains filtered or unexported fields
}

func (V1CloneHeadshotGenerateParams) MarshalJSON

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

func (*V1CloneHeadshotGenerateParams) UnmarshalJSON

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

type V1CloneHeadshotService

type V1CloneHeadshotService struct {
	// contains filtered or unexported fields
}

Clone profile management and asset generation

V1CloneHeadshotService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneHeadshotService method instead.

func NewV1CloneHeadshotService

func NewV1CloneHeadshotService(opts ...option.RequestOption) (r V1CloneHeadshotService)

NewV1CloneHeadshotService 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 (*V1CloneHeadshotService) Generate

Triggers asynchronous headshot regeneration for a clone. Returns immediately with 202 Accepted. Poll `GET /clones/{cloneId}/profile` and check `state.headshot` for progress.

An optional request body can include `additionalInstructions` to nudge the appearance (e.g. "longer hair", "wearing glasses"). An empty body performs a standard regeneration.

type V1CloneIntegrationDeleteParams

type V1CloneIntegrationDeleteParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type V1CloneIntegrationDeleteResponse

type V1CloneIntegrationDeleteResponse struct {
	Deleted bool `json:"deleted" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Deleted     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneIntegrationDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*V1CloneIntegrationDeleteResponse) UnmarshalJSON

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

type V1CloneIntegrationGetParams

type V1CloneIntegrationGetParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type V1CloneIntegrationGetSetupURLParams added in v0.1.0

type V1CloneIntegrationGetSetupURLParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type V1CloneIntegrationGetSetupURLResponse added in v0.1.0

type V1CloneIntegrationGetSetupURLResponse struct {
	SetupURL string `json:"setupUrl" api:"required"`
	Type     string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		SetupURL    respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneIntegrationGetSetupURLResponse) RawJSON added in v0.1.0

Returns the unmodified JSON received from the API

func (*V1CloneIntegrationGetSetupURLResponse) UnmarshalJSON added in v0.1.0

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

type V1CloneIntegrationListParams

type V1CloneIntegrationListParams struct {
	// Filter by integration type
	//
	// Any of "Slack", "Email", "MsTeams", "Phone".
	Type V1CloneIntegrationListParamsType `query:"type,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (V1CloneIntegrationListParams) URLQuery

func (r V1CloneIntegrationListParams) URLQuery() (v url.Values, err error)

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

type V1CloneIntegrationListParamsType

type V1CloneIntegrationListParamsType string

Filter by integration type

const (
	V1CloneIntegrationListParamsTypeSlack   V1CloneIntegrationListParamsType = "Slack"
	V1CloneIntegrationListParamsTypeEmail   V1CloneIntegrationListParamsType = "Email"
	V1CloneIntegrationListParamsTypeMsTeams V1CloneIntegrationListParamsType = "MsTeams"
	V1CloneIntegrationListParamsTypePhone   V1CloneIntegrationListParamsType = "Phone"
)

type V1CloneIntegrationListResponse

type V1CloneIntegrationListResponse struct {
	Data []IntegrationSummary `json:"data" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneIntegrationListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*V1CloneIntegrationListResponse) UnmarshalJSON

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

type V1CloneIntegrationMsteamService

type V1CloneIntegrationMsteamService struct {
	// contains filtered or unexported fields
}

Clone integration management (Slack, Email, MS Teams, Phone)

V1CloneIntegrationMsteamService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneIntegrationMsteamService method instead.

func NewV1CloneIntegrationMsteamService

func NewV1CloneIntegrationMsteamService(opts ...option.RequestOption) (r V1CloneIntegrationMsteamService)

NewV1CloneIntegrationMsteamService 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 (*V1CloneIntegrationMsteamService) Teams

Adds a team to an existing MS Teams integration. Validates team access via MS Graph.

type V1CloneIntegrationMsteamTeamsParams

type V1CloneIntegrationMsteamTeamsParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	TeamID  string `json:"teamId" api:"required"`
	// contains filtered or unexported fields
}

func (V1CloneIntegrationMsteamTeamsParams) MarshalJSON

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

func (*V1CloneIntegrationMsteamTeamsParams) UnmarshalJSON

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

type V1CloneIntegrationMsteamTeamsResponse

type V1CloneIntegrationMsteamTeamsResponse struct {
	ID               string           `json:"id" api:"required"`
	Status           string           `json:"status" api:"required"`
	OrganizationName string           `json:"organizationName"`
	Teams            []MsTeamsTeamRef `json:"teams"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		Status           respjson.Field
		OrganizationName respjson.Field
		Teams            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneIntegrationMsteamTeamsResponse) RawJSON

Returns the unmodified JSON received from the API

func (*V1CloneIntegrationMsteamTeamsResponse) UnmarshalJSON

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

type V1CloneIntegrationNewPhoneParams added in v0.1.0

type V1CloneIntegrationNewPhoneParams struct {
	// Phone number to purchase (from the available numbers search)
	Phone string `json:"phone" api:"required"`
	// contains filtered or unexported fields
}

func (V1CloneIntegrationNewPhoneParams) MarshalJSON added in v0.1.0

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

func (*V1CloneIntegrationNewPhoneParams) UnmarshalJSON added in v0.1.0

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

type V1CloneIntegrationNewPhoneResponse added in v0.1.0

type V1CloneIntegrationNewPhoneResponse struct {
	ID          string `json:"id" api:"required"`
	PhoneNumber string `json:"phoneNumber" api:"required"`
	Status      string `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		PhoneNumber respjson.Field
		Status      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneIntegrationNewPhoneResponse) RawJSON added in v0.1.0

Returns the unmodified JSON received from the API

func (*V1CloneIntegrationNewPhoneResponse) UnmarshalJSON added in v0.1.0

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

type V1CloneIntegrationService

type V1CloneIntegrationService struct {

	// Clone integration management (Slack, Email, MS Teams, Phone)
	Slack V1CloneIntegrationSlackService
	// Clone integration management (Slack, Email, MS Teams, Phone)
	Msteams V1CloneIntegrationMsteamService
	// contains filtered or unexported fields
}

Clone integration management (Slack, Email, MS Teams, Phone)

V1CloneIntegrationService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneIntegrationService method instead.

func NewV1CloneIntegrationService

func NewV1CloneIntegrationService(opts ...option.RequestOption) (r V1CloneIntegrationService)

NewV1CloneIntegrationService 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 (*V1CloneIntegrationService) Delete

Deletes an integration and performs type-specific cleanup (e.g. Twilio release for phone).

func (*V1CloneIntegrationService) Get

Get an integration

func (*V1CloneIntegrationService) GetSetupURL added in v0.1.0

Returns a browser URL for the OAuth-based setup flow. Supported types: `email`, `msteams`. Present this URL to the user and poll the integrations list to detect completion.

func (*V1CloneIntegrationService) List

Returns all integrations for a clone (Slack, Email, MS Teams, Phone).

func (*V1CloneIntegrationService) NewPhone added in v0.1.0

Purchases a phone number and provisions it for clone voice calls. Requires sufficient account credits. Creates a Twilio number, ElevenLabs voice agent, and billing subscription.

type V1CloneIntegrationSlackService

type V1CloneIntegrationSlackService struct {
	// contains filtered or unexported fields
}

Clone integration management (Slack, Email, MS Teams, Phone)

V1CloneIntegrationSlackService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneIntegrationSlackService method instead.

func NewV1CloneIntegrationSlackService

func NewV1CloneIntegrationSlackService(opts ...option.RequestOption) (r V1CloneIntegrationSlackService)

NewV1CloneIntegrationSlackService 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 (*V1CloneIntegrationSlackService) New

Creates a pending Slack integration and returns a Slack app manifest for installation.

func (*V1CloneIntegrationSlackService) Update

Configures bot token and signing secret. Tests the connection if the bot token changes.

type V1CloneIntegrationSlackUpdateParams

type V1CloneIntegrationSlackUpdateParams struct {
	CloneID       string            `path:"cloneId" api:"required" json:"-"`
	BotToken      param.Opt[string] `json:"botToken,omitzero"`
	SigningSecret param.Opt[string] `json:"signingSecret,omitzero"`
	// contains filtered or unexported fields
}

func (V1CloneIntegrationSlackUpdateParams) MarshalJSON

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

func (*V1CloneIntegrationSlackUpdateParams) UnmarshalJSON

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

type V1CloneListResponse

type V1CloneListResponse struct {
	Data []V1CloneListResponseData `json:"data" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneListResponse) RawJSON

func (r V1CloneListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1CloneListResponse) UnmarshalJSON

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

type V1CloneListResponseData

type V1CloneListResponseData struct {
	ID         string        `json:"id" api:"required"`
	CreatedAt  time.Time     `json:"createdAt" api:"required" format:"date-time"`
	Generation string        `json:"generation" api:"required"`
	Name       string        `json:"name" api:"required"`
	ScreenName string        `json:"screenName" api:"required"`
	Status     string        `json:"status" api:"required"`
	Headshot   CloneHeadshot `json:"headshot"`
	IsEnabled  bool          `json:"isEnabled"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Generation  respjson.Field
		Name        respjson.Field
		ScreenName  respjson.Field
		Status      respjson.Field
		Headshot    respjson.Field
		IsEnabled   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneListResponseData) RawJSON

func (r V1CloneListResponseData) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1CloneListResponseData) UnmarshalJSON

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

type V1CloneProfileService

type V1CloneProfileService struct {
	// contains filtered or unexported fields
}

Clone profile management and asset generation

V1CloneProfileService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneProfileService method instead.

func NewV1CloneProfileService

func NewV1CloneProfileService(opts ...option.RequestOption) (r V1CloneProfileService)

NewV1CloneProfileService 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 (*V1CloneProfileService) Get added in v0.1.0

func (r *V1CloneProfileService) Get(ctx context.Context, cloneID string, opts ...option.RequestOption) (res *CloneProfile, err error)

Returns the full profile and aesthetics for a clone.

func (*V1CloneProfileService) Update added in v0.1.0

Updates one or more fields on a clone's profile. Only provided fields are changed.

type V1CloneProfileUpdateParams added in v0.1.0

type V1CloneProfileUpdateParams struct {
	AppearanceDesc     param.Opt[string]    `json:"appearanceDesc,omitzero"`
	Birthdate          param.Opt[time.Time] `json:"birthdate,omitzero" format:"date-time"`
	CareerDesc         param.Opt[string]    `json:"careerDesc,omitzero"`
	ChildhoodDesc      param.Opt[string]    `json:"childhoodDesc,omitzero"`
	CurrentCity        param.Opt[string]    `json:"currentCity,omitzero"`
	EducationDesc      param.Opt[string]    `json:"educationDesc,omitzero"`
	FamilyDesc         param.Opt[string]    `json:"familyDesc,omitzero"`
	FinancesDesc       param.Opt[string]    `json:"financesDesc,omitzero"`
	Gender             param.Opt[string]    `json:"gender,omitzero"`
	Hometown           param.Opt[string]    `json:"hometown,omitzero"`
	InterestsDesc      param.Opt[string]    `json:"interestsDesc,omitzero"`
	IsEnabled          param.Opt[bool]      `json:"isEnabled,omitzero"`
	Language           param.Opt[string]    `json:"language,omitzero"`
	LifestyleDesc      param.Opt[string]    `json:"lifestyleDesc,omitzero"`
	MaritalStatus      param.Opt[string]    `json:"maritalStatus,omitzero"`
	Name               param.Opt[string]    `json:"name,omitzero"`
	Nationality        param.Opt[string]    `json:"nationality,omitzero"`
	Occupation         param.Opt[string]    `json:"occupation,omitzero"`
	PrinciplesDesc     param.Opt[string]    `json:"principlesDesc,omitzero"`
	ScreenName         param.Opt[string]    `json:"screenName,omitzero"`
	SocialCircleDesc   param.Opt[string]    `json:"socialCircleDesc,omitzero"`
	SocialHobbiesDesc  param.Opt[string]    `json:"socialHobbiesDesc,omitzero"`
	SportsDesc         param.Opt[string]    `json:"sportsDesc,omitzero"`
	TravelDesc         param.Opt[string]    `json:"travelDesc,omitzero"`
	UnusualHobbiesDesc param.Opt[string]    `json:"unusualHobbiesDesc,omitzero"`
	Races              []string             `json:"races,omitzero"`
	// contains filtered or unexported fields
}

func (V1CloneProfileUpdateParams) MarshalJSON added in v0.1.0

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

func (*V1CloneProfileUpdateParams) UnmarshalJSON added in v0.1.0

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

type V1CloneService

type V1CloneService struct {

	// Clone profile management and asset generation
	Profile V1CloneProfileService
	// Clone profile management and asset generation
	Voice V1CloneVoiceService
	// Clone profile management and asset generation
	Headshot V1CloneHeadshotService
	// Skill marketplace search and clone skill management
	Skills V1CloneSkillService
	// Scheduled task management
	Tasks V1CloneTaskService
	// Clone knowledge base file management
	Files V1CloneFileService
	// Clone gallery media management
	Gallery V1CloneGalleryService
	// Clone integration management (Slack, Email, MS Teams, Phone)
	Integrations V1CloneIntegrationService
	// Task run history
	Activity V1CloneActivityService
	// Chat sessions and completions
	Chats V1CloneChatService
	// contains filtered or unexported fields
}

Clone profile management and asset generation

V1CloneService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneService method instead.

func NewV1CloneService

func NewV1CloneService(opts ...option.RequestOption) (r V1CloneService)

NewV1CloneService 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 (*V1CloneService) List

func (r *V1CloneService) List(ctx context.Context, opts ...option.RequestOption) (res *V1CloneListResponse, err error)

Returns all clones in the organization, ordered by creation date descending.

type V1CloneSkillConnectionListParams

type V1CloneSkillConnectionListParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type V1CloneSkillConnectionListResponse

type V1CloneSkillConnectionListResponse struct {
	Data []SkillConnectionInfo `json:"data" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneSkillConnectionListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*V1CloneSkillConnectionListResponse) UnmarshalJSON

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

type V1CloneSkillConnectionService

type V1CloneSkillConnectionService struct {
	// contains filtered or unexported fields
}

Skill marketplace search and clone skill management

V1CloneSkillConnectionService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneSkillConnectionService method instead.

func NewV1CloneSkillConnectionService

func NewV1CloneSkillConnectionService(opts ...option.RequestOption) (r V1CloneSkillConnectionService)

NewV1CloneSkillConnectionService 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 (*V1CloneSkillConnectionService) List

Returns connection-type settings for a skill on a clone, with their configuration status.

func (*V1CloneSkillConnectionService) Update

Assigns a connection to a connection-type setting on a clone skill.

type V1CloneSkillConnectionUpdateParams

type V1CloneSkillConnectionUpdateParams struct {
	CloneID      string `path:"cloneId" api:"required" json:"-"`
	SkillName    string `path:"skillName" api:"required" json:"-"`
	ConnectionID string `json:"connectionId" api:"required"`
	// contains filtered or unexported fields
}

func (V1CloneSkillConnectionUpdateParams) MarshalJSON

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

func (*V1CloneSkillConnectionUpdateParams) UnmarshalJSON

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

type V1CloneSkillDeleteParams

type V1CloneSkillDeleteParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type V1CloneSkillDeleteResponse

type V1CloneSkillDeleteResponse struct {
	Deleted bool `json:"deleted" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Deleted     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneSkillDeleteResponse) RawJSON

func (r V1CloneSkillDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1CloneSkillDeleteResponse) UnmarshalJSON

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

type V1CloneSkillListParams

type V1CloneSkillListParams struct {
	// Filter by active status
	//
	// Any of "true", "false".
	Active V1CloneSkillListParamsActive `query:"active,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (V1CloneSkillListParams) URLQuery

func (r V1CloneSkillListParams) URLQuery() (v url.Values, err error)

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

type V1CloneSkillListParamsActive

type V1CloneSkillListParamsActive string

Filter by active status

const (
	V1CloneSkillListParamsActiveTrue  V1CloneSkillListParamsActive = "true"
	V1CloneSkillListParamsActiveFalse V1CloneSkillListParamsActive = "false"
)

type V1CloneSkillListResponse

type V1CloneSkillListResponse struct {
	Data []SkillSummary `json:"data" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneSkillListResponse) RawJSON

func (r V1CloneSkillListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1CloneSkillListResponse) UnmarshalJSON

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

type V1CloneSkillNewParams

type V1CloneSkillNewParams struct {
	SkillID  string          `json:"skillId" api:"required"`
	IsActive param.Opt[bool] `json:"isActive,omitzero"`
	// contains filtered or unexported fields
}

func (V1CloneSkillNewParams) MarshalJSON

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

func (*V1CloneSkillNewParams) UnmarshalJSON

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

type V1CloneSkillService

type V1CloneSkillService struct {

	// Skill marketplace search and clone skill management
	Connections V1CloneSkillConnectionService
	// contains filtered or unexported fields
}

Skill marketplace search and clone skill management

V1CloneSkillService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneSkillService method instead.

func NewV1CloneSkillService

func NewV1CloneSkillService(opts ...option.RequestOption) (r V1CloneSkillService)

NewV1CloneSkillService 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 (*V1CloneSkillService) Delete

Detaches a skill from a clone. System skills cannot be removed.

func (*V1CloneSkillService) List

Returns all skills attached to a clone, excluding hidden system skills.

func (*V1CloneSkillService) New

func (r *V1CloneSkillService) New(ctx context.Context, cloneID string, body V1CloneSkillNewParams, opts ...option.RequestOption) (res *SkillSummary, err error)

Attaches a marketplace skill to a clone. Returns 409 if already attached.

func (*V1CloneSkillService) Update

func (r *V1CloneSkillService) Update(ctx context.Context, skillName string, params V1CloneSkillUpdateParams, opts ...option.RequestOption) (res *SkillSummary, err error)

Updates settings and/or active status of a skill on a clone.

type V1CloneSkillUpdateParams

type V1CloneSkillUpdateParams struct {
	CloneID  string                            `path:"cloneId" api:"required" json:"-"`
	IsActive param.Opt[bool]                   `json:"isActive,omitzero"`
	Settings []V1CloneSkillUpdateParamsSetting `json:"settings,omitzero"`
	// contains filtered or unexported fields
}

func (V1CloneSkillUpdateParams) MarshalJSON

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

func (*V1CloneSkillUpdateParams) UnmarshalJSON

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

type V1CloneSkillUpdateParamsSetting

type V1CloneSkillUpdateParamsSetting struct {
	Name string `json:"name" api:"required"`
	// Required for connection-type settings
	ConnectionID param.Opt[string] `json:"connectionId,omitzero"`
	// Required for non-connection settings
	Value param.Opt[string] `json:"value,omitzero"`
	// contains filtered or unexported fields
}

The property Name is required.

func (V1CloneSkillUpdateParamsSetting) MarshalJSON

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

func (*V1CloneSkillUpdateParamsSetting) UnmarshalJSON

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

type V1CloneTaskDeleteParams

type V1CloneTaskDeleteParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type V1CloneTaskDeleteResponse

type V1CloneTaskDeleteResponse struct {
	Deleted bool `json:"deleted" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Deleted     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneTaskDeleteResponse) RawJSON

func (r V1CloneTaskDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1CloneTaskDeleteResponse) UnmarshalJSON

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

type V1CloneTaskGetParams

type V1CloneTaskGetParams struct {
	CloneID string `path:"cloneId" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type V1CloneTaskListParams

type V1CloneTaskListParams struct {
	// Filter by recurring status
	//
	// Any of "true", "false".
	IsRecurring V1CloneTaskListParamsIsRecurring `query:"isRecurring,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (V1CloneTaskListParams) URLQuery

func (r V1CloneTaskListParams) URLQuery() (v url.Values, err error)

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

type V1CloneTaskListParamsIsRecurring

type V1CloneTaskListParamsIsRecurring string

Filter by recurring status

const (
	V1CloneTaskListParamsIsRecurringTrue  V1CloneTaskListParamsIsRecurring = "true"
	V1CloneTaskListParamsIsRecurringFalse V1CloneTaskListParamsIsRecurring = "false"
)

type V1CloneTaskListResponse

type V1CloneTaskListResponse struct {
	Data []TaskSummary `json:"data" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1CloneTaskListResponse) RawJSON

func (r V1CloneTaskListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1CloneTaskListResponse) UnmarshalJSON

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

type V1CloneTaskNewParams

type V1CloneTaskNewParams struct {
	Prompt      string              `json:"prompt" api:"required"`
	StartsAt    time.Time           `json:"startsAt" api:"required" format:"date-time"`
	Title       string              `json:"title" api:"required"`
	Color       param.Opt[string]   `json:"color,omitzero"`
	IsRecurring param.Opt[bool]     `json:"isRecurring,omitzero"`
	Recurrence  TaskRecurrenceParam `json:"recurrence,omitzero"`
	// contains filtered or unexported fields
}

func (V1CloneTaskNewParams) MarshalJSON

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

func (*V1CloneTaskNewParams) UnmarshalJSON

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

type V1CloneTaskService

type V1CloneTaskService struct {
	// contains filtered or unexported fields
}

Scheduled task management

V1CloneTaskService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneTaskService method instead.

func NewV1CloneTaskService

func NewV1CloneTaskService(opts ...option.RequestOption) (r V1CloneTaskService)

NewV1CloneTaskService 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 (*V1CloneTaskService) Delete

Delete a scheduled task

func (*V1CloneTaskService) Get

func (r *V1CloneTaskService) Get(ctx context.Context, taskID string, query V1CloneTaskGetParams, opts ...option.RequestOption) (res *TaskSummary, err error)

Get a scheduled task

func (*V1CloneTaskService) List

Returns all scheduled tasks for a clone.

func (*V1CloneTaskService) New

func (r *V1CloneTaskService) New(ctx context.Context, cloneID string, body V1CloneTaskNewParams, opts ...option.RequestOption) (res *TaskSummary, err error)

Creates a new scheduled task for a clone.

func (*V1CloneTaskService) Update

func (r *V1CloneTaskService) Update(ctx context.Context, taskID string, params V1CloneTaskUpdateParams, opts ...option.RequestOption) (res *TaskSummary, err error)

Updates one or more fields on a scheduled task.

type V1CloneTaskUpdateParams

type V1CloneTaskUpdateParams struct {
	CloneID     string               `path:"cloneId" api:"required" json:"-"`
	Color       param.Opt[string]    `json:"color,omitzero"`
	IsRecurring param.Opt[bool]      `json:"isRecurring,omitzero"`
	Prompt      param.Opt[string]    `json:"prompt,omitzero"`
	StartsAt    param.Opt[time.Time] `json:"startsAt,omitzero" format:"date-time"`
	Title       param.Opt[string]    `json:"title,omitzero"`
	Recurrence  TaskRecurrenceParam  `json:"recurrence,omitzero"`
	// contains filtered or unexported fields
}

func (V1CloneTaskUpdateParams) MarshalJSON

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

func (*V1CloneTaskUpdateParams) UnmarshalJSON

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

type V1CloneVoiceGenerateParams

type V1CloneVoiceGenerateParams struct {
	GenerateRequest GenerateRequestParam
	// contains filtered or unexported fields
}

func (V1CloneVoiceGenerateParams) MarshalJSON

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

func (*V1CloneVoiceGenerateParams) UnmarshalJSON

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

type V1CloneVoiceService

type V1CloneVoiceService struct {
	// contains filtered or unexported fields
}

Clone profile management and asset generation

V1CloneVoiceService contains methods and other services that help with interacting with the cloneforce 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 NewV1CloneVoiceService method instead.

func NewV1CloneVoiceService

func NewV1CloneVoiceService(opts ...option.RequestOption) (r V1CloneVoiceService)

NewV1CloneVoiceService 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 (*V1CloneVoiceService) Generate

func (r *V1CloneVoiceService) Generate(ctx context.Context, cloneID string, body V1CloneVoiceGenerateParams, opts ...option.RequestOption) (res *GenerationStatus, err error)

Triggers asynchronous voice regeneration for a clone. Returns immediately with 202 Accepted. Poll `GET /clones/{cloneId}/profile` and check `state.voice` for progress.

An optional request body can include `additionalInstructions` to nudge the voice style (e.g. "deeper voice", "more energetic"). An empty body performs a standard regeneration.

type V1ConnectionDeleteResponse

type V1ConnectionDeleteResponse struct {
	Deleted bool `json:"deleted" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Deleted     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1ConnectionDeleteResponse) RawJSON

func (r V1ConnectionDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1ConnectionDeleteResponse) UnmarshalJSON

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

type V1ConnectionListParams

type V1ConnectionListParams struct {
	// Filter by setting type (e.g. Standard, or an OAuth provider type)
	Type param.Opt[string] `query:"type,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (V1ConnectionListParams) URLQuery

func (r V1ConnectionListParams) URLQuery() (v url.Values, err error)

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

type V1ConnectionListResponse

type V1ConnectionListResponse struct {
	Data []V1ConnectionListResponseData `json:"data" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1ConnectionListResponse) RawJSON

func (r V1ConnectionListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1ConnectionListResponse) UnmarshalJSON

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

type V1ConnectionListResponseData

type V1ConnectionListResponseData struct {
	ID          string    `json:"id" api:"required"`
	CreatedAt   time.Time `json:"createdAt" api:"required" format:"date-time"`
	IsExpired   bool      `json:"isExpired" api:"required"`
	IsValid     bool      `json:"isValid" api:"required"`
	Name        string    `json:"name" api:"required"`
	SettingType string    `json:"settingType" api:"required"`
	UpdatedAt   time.Time `json:"updatedAt" api:"required" format:"date-time"`
	ErrorReason string    `json:"errorReason"`
	ExpiresAt   time.Time `json:"expiresAt" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		IsExpired   respjson.Field
		IsValid     respjson.Field
		Name        respjson.Field
		SettingType respjson.Field
		UpdatedAt   respjson.Field
		ErrorReason respjson.Field
		ExpiresAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1ConnectionListResponseData) RawJSON

Returns the unmodified JSON received from the API

func (*V1ConnectionListResponseData) UnmarshalJSON

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

type V1ConnectionNewOAuthParams

type V1ConnectionNewOAuthParams struct {
	Name string `json:"name" api:"required"`
	// Must be an OAuth provider type
	SettingType string   `json:"settingType" api:"required"`
	Scopes      []string `json:"scopes,omitzero"`
	// contains filtered or unexported fields
}

func (V1ConnectionNewOAuthParams) MarshalJSON

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

func (*V1ConnectionNewOAuthParams) UnmarshalJSON

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

type V1ConnectionNewParams

type V1ConnectionNewParams struct {
	Key   string `json:"key" api:"required"`
	Name  string `json:"name" api:"required"`
	Value string `json:"value" api:"required"`
	// contains filtered or unexported fields
}

func (V1ConnectionNewParams) MarshalJSON

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

func (*V1ConnectionNewParams) UnmarshalJSON

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

type V1ConnectionService

type V1ConnectionService struct {
	// contains filtered or unexported fields
}

Organization-level connection credential management

V1ConnectionService contains methods and other services that help with interacting with the cloneforce 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 NewV1ConnectionService method instead.

func NewV1ConnectionService

func NewV1ConnectionService(opts ...option.RequestOption) (r V1ConnectionService)

NewV1ConnectionService 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 (*V1ConnectionService) Delete

func (r *V1ConnectionService) Delete(ctx context.Context, connectionID string, opts ...option.RequestOption) (res *V1ConnectionDeleteResponse, err error)

Delete a connection

func (*V1ConnectionService) Get

func (r *V1ConnectionService) Get(ctx context.Context, connectionID string, opts ...option.RequestOption) (res *ConnectionDetail, err error)

Get a connection

func (*V1ConnectionService) GetStatus

func (r *V1ConnectionService) GetStatus(ctx context.Context, connectionID string, opts ...option.RequestOption) (res *ConnectionStatus, err error)

Returns lightweight validity and expiration status.

func (*V1ConnectionService) List

Returns all connections in the organization.

func (*V1ConnectionService) New

Creates a new key-value connection credential.

func (*V1ConnectionService) NewOAuth

Creates a pending OAuth connection and returns a provision URL. Present the provision URL to the user to complete the OAuth consent flow.

func (*V1ConnectionService) Refresh

func (r *V1ConnectionService) Refresh(ctx context.Context, connectionID string, opts ...option.RequestOption) (res *ConnectionStatus, err error)

Refreshes OAuth tokens for a connection. Only supported for refreshable connection types.

func (*V1ConnectionService) ReprovisionOAuth

func (r *V1ConnectionService) ReprovisionOAuth(ctx context.Context, connectionID string, opts ...option.RequestOption) (res *OAuthProvision, err error)

Returns a new provision URL for an existing OAuth connection to re-authorize.

func (*V1ConnectionService) Update

func (r *V1ConnectionService) Update(ctx context.Context, connectionID string, body V1ConnectionUpdateParams, opts ...option.RequestOption) (res *ConnectionDetail, err error)

Updates name, key, and/or value on a standard connection. OAuth connections cannot be updated here.

type V1ConnectionUpdateParams

type V1ConnectionUpdateParams struct {
	Key   param.Opt[string] `json:"key,omitzero"`
	Name  param.Opt[string] `json:"name,omitzero"`
	Value param.Opt[string] `json:"value,omitzero"`
	// contains filtered or unexported fields
}

func (V1ConnectionUpdateParams) MarshalJSON

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

func (*V1ConnectionUpdateParams) UnmarshalJSON

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

type V1IntegrationPhoneListAvailableParams

type V1IntegrationPhoneListAvailableParams struct {
	// Area code filter
	AreaCode param.Opt[int64] `query:"areaCode,omitzero" json:"-"`
	// Country code (default US)
	Country param.Opt[string] `query:"country,omitzero" json:"-"`
	// Max results (default 20)
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (V1IntegrationPhoneListAvailableParams) URLQuery

func (r V1IntegrationPhoneListAvailableParams) URLQuery() (v url.Values, err error)

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

type V1IntegrationPhoneListAvailableResponse

type V1IntegrationPhoneListAvailableResponse struct {
	Data []V1IntegrationPhoneListAvailableResponseData `json:"data" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1IntegrationPhoneListAvailableResponse) RawJSON

Returns the unmodified JSON received from the API

func (*V1IntegrationPhoneListAvailableResponse) UnmarshalJSON

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

type V1IntegrationPhoneListAvailableResponseData

type V1IntegrationPhoneListAvailableResponseData struct {
	FriendlyName string `json:"friendlyName" api:"required"`
	Phone        string `json:"phone" api:"required"`
	Country      string `json:"country"`
	Locality     string `json:"locality"`
	PostalCode   string `json:"postalCode"`
	Region       string `json:"region"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FriendlyName respjson.Field
		Phone        respjson.Field
		Country      respjson.Field
		Locality     respjson.Field
		PostalCode   respjson.Field
		Region       respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1IntegrationPhoneListAvailableResponseData) RawJSON

Returns the unmodified JSON received from the API

func (*V1IntegrationPhoneListAvailableResponseData) UnmarshalJSON

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

type V1IntegrationPhoneService

type V1IntegrationPhoneService struct {
	// contains filtered or unexported fields
}

Clone integration management (Slack, Email, MS Teams, Phone)

V1IntegrationPhoneService contains methods and other services that help with interacting with the cloneforce 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 NewV1IntegrationPhoneService method instead.

func NewV1IntegrationPhoneService

func NewV1IntegrationPhoneService(opts ...option.RequestOption) (r V1IntegrationPhoneService)

NewV1IntegrationPhoneService 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 (*V1IntegrationPhoneService) ListAvailable

Searches for available phone numbers via Twilio that can be purchased.

type V1IntegrationService

type V1IntegrationService struct {

	// Clone integration management (Slack, Email, MS Teams, Phone)
	Phone V1IntegrationPhoneService
	// contains filtered or unexported fields
}

V1IntegrationService contains methods and other services that help with interacting with the cloneforce 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 NewV1IntegrationService method instead.

func NewV1IntegrationService

func NewV1IntegrationService(opts ...option.RequestOption) (r V1IntegrationService)

NewV1IntegrationService 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 V1Service

type V1Service struct {

	// Clone profile management and asset generation
	Clones V1CloneService
	// Skill marketplace search and clone skill management
	Skills       V1SkillService
	Integrations V1IntegrationService
	// Organization-level connection credential management
	Connections V1ConnectionService
	// contains filtered or unexported fields
}

V1Service contains methods and other services that help with interacting with the cloneforce 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 NewV1Service method instead.

func NewV1Service

func NewV1Service(opts ...option.RequestOption) (r V1Service)

NewV1Service 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 V1SkillGetParams

type V1SkillGetParams struct {
	// Clone ID to check attachment and configuration status
	CloneID param.Opt[string] `query:"cloneId,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (V1SkillGetParams) URLQuery

func (r V1SkillGetParams) URLQuery() (v url.Values, err error)

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

type V1SkillGetResponse

type V1SkillGetResponse struct {
	IsAttached            bool                                   `json:"isAttached" api:"required"`
	LogicType             string                                 `json:"logicType" api:"required"`
	Name                  string                                 `json:"name" api:"required"`
	RequiresConnections   bool                                   `json:"requiresConnections" api:"required"`
	SkillID               string                                 `json:"skillId" api:"required"`
	Category              string                                 `json:"category"`
	ConnectionsConfigured bool                                   `json:"connectionsConfigured"`
	Description           string                                 `json:"description"`
	IsActive              bool                                   `json:"isActive"`
	SettingDefinitions    []V1SkillGetResponseSettingDefinition  `json:"settingDefinitions"`
	SettingsConfigured    []V1SkillGetResponseSettingsConfigured `json:"settingsConfigured"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IsAttached            respjson.Field
		LogicType             respjson.Field
		Name                  respjson.Field
		RequiresConnections   respjson.Field
		SkillID               respjson.Field
		Category              respjson.Field
		ConnectionsConfigured respjson.Field
		Description           respjson.Field
		IsActive              respjson.Field
		SettingDefinitions    respjson.Field
		SettingsConfigured    respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1SkillGetResponse) RawJSON

func (r V1SkillGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1SkillGetResponse) UnmarshalJSON

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

type V1SkillGetResponseSettingDefinition

type V1SkillGetResponseSettingDefinition struct {
	IsConnection bool   `json:"isConnection" api:"required"`
	IsRequired   bool   `json:"isRequired" api:"required"`
	Name         string `json:"name" api:"required"`
	Description  string `json:"description"`
	SettingType  string `json:"settingType"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IsConnection respjson.Field
		IsRequired   respjson.Field
		Name         respjson.Field
		Description  respjson.Field
		SettingType  respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1SkillGetResponseSettingDefinition) RawJSON

Returns the unmodified JSON received from the API

func (*V1SkillGetResponseSettingDefinition) UnmarshalJSON

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

type V1SkillGetResponseSettingsConfigured

type V1SkillGetResponseSettingsConfigured struct {
	IsConfigured bool   `json:"isConfigured" api:"required"`
	IsConnection bool   `json:"isConnection" api:"required"`
	Name         string `json:"name" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IsConfigured respjson.Field
		IsConnection respjson.Field
		Name         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1SkillGetResponseSettingsConfigured) RawJSON

Returns the unmodified JSON received from the API

func (*V1SkillGetResponseSettingsConfigured) UnmarshalJSON

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

type V1SkillSearchParams

type V1SkillSearchParams struct {
	// Search query
	Q string `query:"q" api:"required" json:"-"`
	// Clone ID to check attachment status against
	CloneID param.Opt[string] `query:"cloneId,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (V1SkillSearchParams) URLQuery

func (r V1SkillSearchParams) URLQuery() (v url.Values, err error)

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

type V1SkillSearchResponse

type V1SkillSearchResponse struct {
	Data []V1SkillSearchResponseData `json:"data" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1SkillSearchResponse) RawJSON

func (r V1SkillSearchResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1SkillSearchResponse) UnmarshalJSON

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

type V1SkillSearchResponseData

type V1SkillSearchResponseData struct {
	IsAlreadyAttached bool    `json:"isAlreadyAttached" api:"required"`
	Name              string  `json:"name" api:"required"`
	SkillID           string  `json:"skillId" api:"required"`
	Description       string  `json:"description"`
	Score             float64 `json:"score"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IsAlreadyAttached respjson.Field
		Name              respjson.Field
		SkillID           respjson.Field
		Description       respjson.Field
		Score             respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (V1SkillSearchResponseData) RawJSON

func (r V1SkillSearchResponseData) RawJSON() string

Returns the unmodified JSON received from the API

func (*V1SkillSearchResponseData) UnmarshalJSON

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

type V1SkillService

type V1SkillService struct {
	// contains filtered or unexported fields
}

Skill marketplace search and clone skill management

V1SkillService contains methods and other services that help with interacting with the cloneforce 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 NewV1SkillService method instead.

func NewV1SkillService

func NewV1SkillService(opts ...option.RequestOption) (r V1SkillService)

NewV1SkillService 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 (*V1SkillService) Get

func (r *V1SkillService) Get(ctx context.Context, skillID string, query V1SkillGetParams, opts ...option.RequestOption) (res *V1SkillGetResponse, err error)

Returns full skill details including setting definitions. If `cloneId` is provided, also returns attachment and configuration status.

func (*V1SkillService) Search

Searches the skill marketplace. Optionally marks results already attached to a clone.

Directories

Path Synopsis
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
Package json implements encoding and decoding of JSON as defined in RFC 7159.
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
packages
shared

Jump to

Keyboard shortcuts

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