githubcomlightfldlightfieldgo

package module
v0.3.1-alpha Latest Latest
Warning

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

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

README

Lightfield Go API Library

Go Reference

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

It is generated with Stainless.

Installation

import (
	"github.com/Lightfld/lightfield-go" // imported as githubcomlightfldlightfieldgo
)

Or to pin the version:

go get -u 'github.com/Lightfld/lightfield-go@v0.3.1-alpha'

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/Lightfld/lightfield-go"
	"github.com/Lightfld/lightfield-go/option"
)

func main() {
	client := githubcomlightfldlightfieldgo.NewClient(
		option.WithAPIKey("My API Key"),
	)
	accountCreateResponse, err := client.Account.New(context.TODO(), githubcomlightfldlightfieldgo.AccountNewParams{
		Fields: githubcomlightfldlightfieldgo.AccountNewParamsFields{
			Name:     "Acme Corp",
			Industry: []string{"opt_01j0x6q3m9v2p4t7k8n5r1s2u"},
		},
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", accountCreateResponse.ID)
}

Request fields

The githubcomlightfldlightfieldgo 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 `json:"...,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, githubcomlightfldlightfieldgo.String(string), githubcomlightfldlightfieldgo.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 := githubcomlightfldlightfieldgo.ExampleParams{
	ID:   "id_xxx",                                    // required property
	Name: githubcomlightfldlightfieldgo.String("..."), // optional property

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

	Origin: githubcomlightfldlightfieldgo.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[githubcomlightfldlightfieldgo.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 := githubcomlightfldlightfieldgo.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Account.New(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 *githubcomlightfldlightfieldgo.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.Opportunity.New(context.TODO(), githubcomlightfldlightfieldgo.OpportunityNewParams{
	Fields: githubcomlightfldlightfieldgo.OpportunityNewParamsFields{
		Name:  "Enterprise Platform Deal",
		Stage: "opt_01abc2def3ghi4jkl5mno6pqr",
	},
	Relationships: githubcomlightfldlightfieldgo.OpportunityNewParamsRelationships{
		Account: githubcomlightfldlightfieldgo.OpportunityNewParamsRelationshipsAccountUnion{
			OfString: githubcomlightfldlightfieldgo.String("acc_cm4stu901uvw234"),
		},
	},
})
if err != nil {
	var apierr *githubcomlightfldlightfieldgo.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/v1/opportunities": 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.Account.New(
	ctx,
	githubcomlightfldlightfieldgo.AccountNewParams{
		Fields: githubcomlightfldlightfieldgo.AccountNewParamsFields{
			Name:      "Acme Corp",
			Website:   []string{"https://acme.com"},
			Industry:  []string{"opt_01j0x6q3m9v2p4t7k8n5r1s2u", "opt_01h4b7c9d2e5f8g1j3k6m0n4p"},
			Headcount: githubcomlightfldlightfieldgo.String("opt_01r5t8y2u6i9o3p7a1s4d6f8g"),
			LinkedIn:  githubcomlightfldlightfieldgo.String("https://linkedin.com/company/acme"),
			PrimaryAddress: githubcomlightfldlightfieldgo.AccountNewParamsFieldsPrimaryAddress{
				Street:  githubcomlightfldlightfieldgo.String("123 Market St"),
				City:    githubcomlightfldlightfieldgo.String("San Francisco"),
				State:   githubcomlightfldlightfieldgo.String("CA"),
				Country: githubcomlightfldlightfieldgo.String("US"),
			},
		},
		Relationships: githubcomlightfldlightfieldgo.AccountNewParamsRelationships{
			Owner: githubcomlightfldlightfieldgo.AccountNewParamsRelationshipsOwnerUnion{
				OfString: githubcomlightfldlightfieldgo.String("mem_cm1abc123def456"),
			},
			Contact: githubcomlightfldlightfieldgo.AccountNewParamsRelationshipsContactUnion{
				OfStringArray: []string{"con_cm2ghi789jkl012", "con_cm3mno345pqr678"},
			},
		},
	},
	// 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 githubcomlightfldlightfieldgo.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 := githubcomlightfldlightfieldgo.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Opportunity.Get(
	context.TODO(),
	"opp_cm9uvw890xyz123",
	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
accountRetrieveResponse, err := client.Account.Get(
	context.TODO(),
	"acc_cm4stu901uvw234",
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", accountRetrieveResponse)

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: githubcomlightfldlightfieldgo.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 := githubcomlightfldlightfieldgo.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 (LIGHTFIELD_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 AccountCreateResponse added in v0.4.1

type AccountCreateResponse struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the entity was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$email`); custom attributes use their bare slug.
	Fields map[string]AccountCreateResponseField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]AccountCreateResponseRelationship `json:"relationships" api:"required"`
	ExtraFields   map[string]AccountCreateResponseUnion        `json:"" api:"extrafields"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		Relationships respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountCreateResponse) RawJSON added in v0.4.1

func (r AccountCreateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountCreateResponse) UnmarshalJSON added in v0.4.1

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

type AccountCreateResponseArrayItemUnion

type AccountCreateResponseArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountCreateResponseArrayItemMapItem any `json:",inline"`
	JSON                                    struct {
		OfString                                respjson.Field
		OfFloat                                 respjson.Field
		OfBool                                  respjson.Field
		OfAnyArray                              respjson.Field
		OfAccountCreateResponseArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountCreateResponseArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountCreateResponseArrayItemMapItem]

func (AccountCreateResponseArrayItemUnion) AsAnyArray

func (u AccountCreateResponseArrayItemUnion) AsAnyArray() (v []any)

func (AccountCreateResponseArrayItemUnion) AsAnyMap

func (u AccountCreateResponseArrayItemUnion) AsAnyMap() (v map[string]any)

func (AccountCreateResponseArrayItemUnion) AsBool

func (AccountCreateResponseArrayItemUnion) AsFloat

func (AccountCreateResponseArrayItemUnion) AsString

func (AccountCreateResponseArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountCreateResponseArrayItemUnion) UnmarshalJSON

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

type AccountCreateResponseField added in v0.4.1

type AccountCreateResponseField struct {
	// The field value, or null if unset.
	Value AccountCreateResponseFieldValueUnion `json:"value" api:"required"`
	// The data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ValueType   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountCreateResponseField) RawJSON added in v0.4.1

func (r AccountCreateResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountCreateResponseField) UnmarshalJSON added in v0.4.1

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

type AccountCreateResponseFieldValueArrayItemUnion

type AccountCreateResponseFieldValueArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountCreateResponseFieldValueArrayItemMapItem any `json:",inline"`
	JSON                                              struct {
		OfString                                          respjson.Field
		OfFloat                                           respjson.Field
		OfBool                                            respjson.Field
		OfAnyArray                                        respjson.Field
		OfAccountCreateResponseFieldValueArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountCreateResponseFieldValueArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountCreateResponseFieldValueArrayItemMapItem]

func (AccountCreateResponseFieldValueArrayItemUnion) AsAnyArray

func (AccountCreateResponseFieldValueArrayItemUnion) AsAnyMap

func (AccountCreateResponseFieldValueArrayItemUnion) AsBool

func (AccountCreateResponseFieldValueArrayItemUnion) AsFloat

func (AccountCreateResponseFieldValueArrayItemUnion) AsString

func (AccountCreateResponseFieldValueArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountCreateResponseFieldValueArrayItemUnion) UnmarshalJSON

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

type AccountCreateResponseFieldValueMapItemUnion

type AccountCreateResponseFieldValueMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountCreateResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                            struct {
		OfString                                        respjson.Field
		OfFloat                                         respjson.Field
		OfBool                                          respjson.Field
		OfAnyArray                                      respjson.Field
		OfAccountCreateResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountCreateResponseFieldValueMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountCreateResponseFieldValueMapItemMapItem]

func (AccountCreateResponseFieldValueMapItemUnion) AsAnyArray

func (u AccountCreateResponseFieldValueMapItemUnion) AsAnyArray() (v []any)

func (AccountCreateResponseFieldValueMapItemUnion) AsAnyMap

func (AccountCreateResponseFieldValueMapItemUnion) AsBool

func (AccountCreateResponseFieldValueMapItemUnion) AsFloat

func (AccountCreateResponseFieldValueMapItemUnion) AsString

func (AccountCreateResponseFieldValueMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountCreateResponseFieldValueMapItemUnion) UnmarshalJSON

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

type AccountCreateResponseFieldValueUnion added in v0.4.1

type AccountCreateResponseFieldValueUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]AccountCreateResponseFieldValueArrayItemUnion] instead of an object.
	OfAccountCreateResponseFieldValueArray []AccountCreateResponseFieldValueArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountCreateResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                            struct {
		OfString                                        respjson.Field
		OfFloat                                         respjson.Field
		OfBool                                          respjson.Field
		OfAccountCreateResponseFieldValueArray          respjson.Field
		OfAnyArray                                      respjson.Field
		OfAccountCreateResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]AccountCreateResponseFieldValueArrayItemUnion], [map[string]AccountCreateResponseFieldValueMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAccountCreateResponseFieldValueArray OfAnyArray OfAccountCreateResponseFieldValueMapItemMapItem]

func (AccountCreateResponseFieldValueUnion) AsAccountCreateResponseFieldValueArray

func (u AccountCreateResponseFieldValueUnion) AsAccountCreateResponseFieldValueArray() (v []AccountCreateResponseFieldValueArrayItemUnion)

func (AccountCreateResponseFieldValueUnion) AsAccountCreateResponseFieldValueMapMap

func (u AccountCreateResponseFieldValueUnion) AsAccountCreateResponseFieldValueMapMap() (v map[string]AccountCreateResponseFieldValueMapItemUnion)

func (AccountCreateResponseFieldValueUnion) AsBool added in v0.4.1

func (AccountCreateResponseFieldValueUnion) AsFloat added in v0.4.1

func (AccountCreateResponseFieldValueUnion) AsString added in v0.4.1

func (AccountCreateResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountCreateResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type AccountCreateResponseMapItemUnion

type AccountCreateResponseMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountCreateResponseMapItemMapItem any `json:",inline"`
	JSON                                  struct {
		OfString                              respjson.Field
		OfFloat                               respjson.Field
		OfBool                                respjson.Field
		OfAnyArray                            respjson.Field
		OfAccountCreateResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountCreateResponseMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountCreateResponseMapItemMapItem]

func (AccountCreateResponseMapItemUnion) AsAnyArray

func (u AccountCreateResponseMapItemUnion) AsAnyArray() (v []any)

func (AccountCreateResponseMapItemUnion) AsAnyMap

func (u AccountCreateResponseMapItemUnion) AsAnyMap() (v map[string]any)

func (AccountCreateResponseMapItemUnion) AsBool

func (u AccountCreateResponseMapItemUnion) AsBool() (v bool)

func (AccountCreateResponseMapItemUnion) AsFloat

func (AccountCreateResponseMapItemUnion) AsString

func (u AccountCreateResponseMapItemUnion) AsString() (v string)

func (AccountCreateResponseMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountCreateResponseMapItemUnion) UnmarshalJSON

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

type AccountCreateResponseRelationship added in v0.4.1

type AccountCreateResponseRelationship struct {
	// Whether the relationship is `has_one` or `has_many`.
	Cardinality string `json:"cardinality" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// IDs of the related entities.
	Values []string `json:"values" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		ObjectType  respjson.Field
		Values      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountCreateResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountCreateResponseRelationship) UnmarshalJSON added in v0.4.1

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

type AccountCreateResponseUnion

type AccountCreateResponseUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]AccountCreateResponseArrayItemUnion] instead of an object.
	OfAccountCreateResponseArray []AccountCreateResponseArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountCreateResponseMapItemMapItem any `json:",inline"`
	JSON                                  struct {
		OfString                              respjson.Field
		OfFloat                               respjson.Field
		OfBool                                respjson.Field
		OfAccountCreateResponseArray          respjson.Field
		OfAnyArray                            respjson.Field
		OfAccountCreateResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountCreateResponseUnion contains all possible properties and values from [string], [float64], [bool], [[]AccountCreateResponseArrayItemUnion], [map[string]AccountCreateResponseMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAccountCreateResponseArray OfAnyArray OfAccountCreateResponseMapItemMapItem]

func (AccountCreateResponseUnion) AsAccountCreateResponseArray

func (u AccountCreateResponseUnion) AsAccountCreateResponseArray() (v []AccountCreateResponseArrayItemUnion)

func (AccountCreateResponseUnion) AsAccountCreateResponseMapMap

func (u AccountCreateResponseUnion) AsAccountCreateResponseMapMap() (v map[string]AccountCreateResponseMapItemUnion)

func (AccountCreateResponseUnion) AsBool

func (u AccountCreateResponseUnion) AsBool() (v bool)

func (AccountCreateResponseUnion) AsFloat

func (u AccountCreateResponseUnion) AsFloat() (v float64)

func (AccountCreateResponseUnion) AsString

func (u AccountCreateResponseUnion) AsString() (v string)

func (AccountCreateResponseUnion) RawJSON

func (u AccountCreateResponseUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountCreateResponseUnion) UnmarshalJSON

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

type AccountDefinitionsResponse added in v0.2.0

type AccountDefinitionsResponse struct {
	// Map of field keys to their definitions, including both system and custom fields.
	FieldDefinitions map[string]AccountDefinitionsResponseFieldDefinition `json:"fieldDefinitions" api:"required"`
	// The object type these definitions belong to (e.g. `account`).
	ObjectType string `json:"objectType" api:"required"`
	// Map of relationship keys to their definitions.
	RelationshipDefinitions map[string]AccountDefinitionsResponseRelationshipDefinition `json:"relationshipDefinitions" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FieldDefinitions        respjson.Field
		ObjectType              respjson.Field
		RelationshipDefinitions respjson.Field
		ExtraFields             map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountDefinitionsResponse) RawJSON added in v0.2.0

func (r AccountDefinitionsResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountDefinitionsResponse) UnmarshalJSON added in v0.2.0

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

type AccountDefinitionsResponseFieldDefinition added in v0.2.0

type AccountDefinitionsResponseFieldDefinition struct {
	// Description of the field, or null.
	Description string `json:"description" api:"required"`
	// Human-readable display name of the field.
	Label string `json:"label" api:"required"`
	// Type-specific configuration (e.g. select options, currency code).
	TypeConfiguration map[string]AccountDefinitionsResponseFieldDefinitionTypeConfigurationUnion `json:"typeConfiguration" api:"required"`
	// Data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// Unique identifier of the field definition.
	ID string `json:"id"`
	// `true` for fields that are not writable via the API (e.g. AI-generated
	// summaries). `false` or absent for writable fields.
	ReadOnly bool `json:"readOnly"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Description       respjson.Field
		Label             respjson.Field
		TypeConfiguration respjson.Field
		ValueType         respjson.Field
		ID                respjson.Field
		ReadOnly          respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountDefinitionsResponseFieldDefinition) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*AccountDefinitionsResponseFieldDefinition) UnmarshalJSON added in v0.2.0

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

type AccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion added in v0.2.0

type AccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemMapItem any `json:",inline"`
	JSON                                                                         struct {
		OfString                                                                     respjson.Field
		OfFloat                                                                      respjson.Field
		OfBool                                                                       respjson.Field
		OfAnyArray                                                                   respjson.Field
		OfAccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemMapItem]

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsAnyArray added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsAnyMap added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsBool added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsFloat added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsString added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*AccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) UnmarshalJSON added in v0.2.0

type AccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion added in v0.2.0

type AccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem any `json:",inline"`
	JSON                                                                       struct {
		OfString                                                                   respjson.Field
		OfFloat                                                                    respjson.Field
		OfBool                                                                     respjson.Field
		OfAnyArray                                                                 respjson.Field
		OfAccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem]

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsAnyArray added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsAnyMap added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsBool added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsFloat added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsString added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*AccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) UnmarshalJSON added in v0.2.0

type AccountDefinitionsResponseFieldDefinitionTypeConfigurationUnion added in v0.2.0

type AccountDefinitionsResponseFieldDefinitionTypeConfigurationUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]AccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion]
	// instead of an object.
	OfAccountDefinitionsResponseFieldDefinitionTypeConfigurationArray []AccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem any `json:",inline"`
	JSON                                                                       struct {
		OfString                                                                   respjson.Field
		OfFloat                                                                    respjson.Field
		OfBool                                                                     respjson.Field
		OfAccountDefinitionsResponseFieldDefinitionTypeConfigurationArray          respjson.Field
		OfAnyArray                                                                 respjson.Field
		OfAccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountDefinitionsResponseFieldDefinitionTypeConfigurationUnion contains all possible properties and values from [string], [float64], [bool], [[]AccountDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion], [map[string]AccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAccountDefinitionsResponseFieldDefinitionTypeConfigurationArray OfAnyArray OfAccountDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem]

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsAccountDefinitionsResponseFieldDefinitionTypeConfigurationArray added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsAccountDefinitionsResponseFieldDefinitionTypeConfigurationMapMap added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsBool added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsFloat added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsString added in v0.2.0

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationUnion) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*AccountDefinitionsResponseFieldDefinitionTypeConfigurationUnion) UnmarshalJSON added in v0.2.0

type AccountDefinitionsResponseRelationshipDefinition added in v0.2.0

type AccountDefinitionsResponseRelationshipDefinition struct {
	// Whether this is a `has_one` or `has_many` relationship.
	//
	// Any of "HAS_ONE", "HAS_MANY".
	Cardinality string `json:"cardinality" api:"required"`
	// Description of the relationship, or null.
	Description string `json:"description" api:"required"`
	// Human-readable display name of the relationship.
	Label string `json:"label" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// Unique identifier of the relationship definition.
	ID string `json:"id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		Description respjson.Field
		Label       respjson.Field
		ObjectType  respjson.Field
		ID          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountDefinitionsResponseRelationshipDefinition) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*AccountDefinitionsResponseRelationshipDefinition) UnmarshalJSON added in v0.2.0

type AccountListParams

type AccountListParams struct {
	// Maximum number of records to return. Defaults to 25, maximum 25.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Number of records to skip for pagination. Defaults to 0.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AccountListParams) URLQuery

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

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

type AccountListResponse

type AccountListResponse struct {
	// Array of entity objects for the current page.
	Data []AccountListResponseData `json:"data" api:"required"`
	// The object type, always `"list"`.
	Object string `json:"object" api:"required"`
	// Total number of entities matching the query.
	TotalCount int64 `json:"totalCount" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		TotalCount  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountListResponse) RawJSON

func (r AccountListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountListResponse) UnmarshalJSON

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

type AccountListResponseData

type AccountListResponseData struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the entity was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$email`); custom attributes use their bare slug.
	Fields map[string]AccountListResponseDataField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]AccountListResponseDataRelationship `json:"relationships" api:"required"`
	ExtraFields   map[string]AccountListResponseDataUnion        `json:"" api:"extrafields"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		Relationships respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountListResponseData) RawJSON

func (r AccountListResponseData) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountListResponseData) UnmarshalJSON

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

type AccountListResponseDataArrayItemUnion

type AccountListResponseDataArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountListResponseDataArrayItemMapItem any `json:",inline"`
	JSON                                      struct {
		OfString                                  respjson.Field
		OfFloat                                   respjson.Field
		OfBool                                    respjson.Field
		OfAnyArray                                respjson.Field
		OfAccountListResponseDataArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountListResponseDataArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountListResponseDataArrayItemMapItem]

func (AccountListResponseDataArrayItemUnion) AsAnyArray

func (u AccountListResponseDataArrayItemUnion) AsAnyArray() (v []any)

func (AccountListResponseDataArrayItemUnion) AsAnyMap

func (u AccountListResponseDataArrayItemUnion) AsAnyMap() (v map[string]any)

func (AccountListResponseDataArrayItemUnion) AsBool

func (AccountListResponseDataArrayItemUnion) AsFloat

func (AccountListResponseDataArrayItemUnion) AsString

func (AccountListResponseDataArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountListResponseDataArrayItemUnion) UnmarshalJSON

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

type AccountListResponseDataField

type AccountListResponseDataField struct {
	// The field value, or null if unset.
	Value AccountListResponseDataFieldValueUnion `json:"value" api:"required"`
	// The data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ValueType   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountListResponseDataField) RawJSON

Returns the unmodified JSON received from the API

func (*AccountListResponseDataField) UnmarshalJSON

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

type AccountListResponseDataFieldValueArrayItemUnion

type AccountListResponseDataFieldValueArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountListResponseDataFieldValueArrayItemMapItem any `json:",inline"`
	JSON                                                struct {
		OfString                                            respjson.Field
		OfFloat                                             respjson.Field
		OfBool                                              respjson.Field
		OfAnyArray                                          respjson.Field
		OfAccountListResponseDataFieldValueArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountListResponseDataFieldValueArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountListResponseDataFieldValueArrayItemMapItem]

func (AccountListResponseDataFieldValueArrayItemUnion) AsAnyArray

func (AccountListResponseDataFieldValueArrayItemUnion) AsAnyMap

func (AccountListResponseDataFieldValueArrayItemUnion) AsBool

func (AccountListResponseDataFieldValueArrayItemUnion) AsFloat

func (AccountListResponseDataFieldValueArrayItemUnion) AsString

func (AccountListResponseDataFieldValueArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountListResponseDataFieldValueArrayItemUnion) UnmarshalJSON

type AccountListResponseDataFieldValueMapItemUnion

type AccountListResponseDataFieldValueMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountListResponseDataFieldValueMapItemMapItem any `json:",inline"`
	JSON                                              struct {
		OfString                                          respjson.Field
		OfFloat                                           respjson.Field
		OfBool                                            respjson.Field
		OfAnyArray                                        respjson.Field
		OfAccountListResponseDataFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountListResponseDataFieldValueMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountListResponseDataFieldValueMapItemMapItem]

func (AccountListResponseDataFieldValueMapItemUnion) AsAnyArray

func (AccountListResponseDataFieldValueMapItemUnion) AsAnyMap

func (AccountListResponseDataFieldValueMapItemUnion) AsBool

func (AccountListResponseDataFieldValueMapItemUnion) AsFloat

func (AccountListResponseDataFieldValueMapItemUnion) AsString

func (AccountListResponseDataFieldValueMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountListResponseDataFieldValueMapItemUnion) UnmarshalJSON

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

type AccountListResponseDataFieldValueUnion

type AccountListResponseDataFieldValueUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]AccountListResponseDataFieldValueArrayItemUnion] instead of an object.
	OfAccountListResponseDataFieldValueArray []AccountListResponseDataFieldValueArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountListResponseDataFieldValueMapItemMapItem any `json:",inline"`
	JSON                                              struct {
		OfString                                          respjson.Field
		OfFloat                                           respjson.Field
		OfBool                                            respjson.Field
		OfAccountListResponseDataFieldValueArray          respjson.Field
		OfAnyArray                                        respjson.Field
		OfAccountListResponseDataFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]AccountListResponseDataFieldValueArrayItemUnion], [map[string]AccountListResponseDataFieldValueMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAccountListResponseDataFieldValueArray OfAnyArray OfAccountListResponseDataFieldValueMapItemMapItem]

func (AccountListResponseDataFieldValueUnion) AsAccountListResponseDataFieldValueArray

func (u AccountListResponseDataFieldValueUnion) AsAccountListResponseDataFieldValueArray() (v []AccountListResponseDataFieldValueArrayItemUnion)

func (AccountListResponseDataFieldValueUnion) AsAccountListResponseDataFieldValueMapMap

func (u AccountListResponseDataFieldValueUnion) AsAccountListResponseDataFieldValueMapMap() (v map[string]AccountListResponseDataFieldValueMapItemUnion)

func (AccountListResponseDataFieldValueUnion) AsBool

func (AccountListResponseDataFieldValueUnion) AsFloat

func (AccountListResponseDataFieldValueUnion) AsString

func (AccountListResponseDataFieldValueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountListResponseDataFieldValueUnion) UnmarshalJSON

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

type AccountListResponseDataMapItemUnion

type AccountListResponseDataMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountListResponseDataMapItemMapItem any `json:",inline"`
	JSON                                    struct {
		OfString                                respjson.Field
		OfFloat                                 respjson.Field
		OfBool                                  respjson.Field
		OfAnyArray                              respjson.Field
		OfAccountListResponseDataMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountListResponseDataMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountListResponseDataMapItemMapItem]

func (AccountListResponseDataMapItemUnion) AsAnyArray

func (u AccountListResponseDataMapItemUnion) AsAnyArray() (v []any)

func (AccountListResponseDataMapItemUnion) AsAnyMap

func (u AccountListResponseDataMapItemUnion) AsAnyMap() (v map[string]any)

func (AccountListResponseDataMapItemUnion) AsBool

func (AccountListResponseDataMapItemUnion) AsFloat

func (AccountListResponseDataMapItemUnion) AsString

func (AccountListResponseDataMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountListResponseDataMapItemUnion) UnmarshalJSON

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

type AccountListResponseDataRelationship

type AccountListResponseDataRelationship struct {
	// Whether the relationship is `has_one` or `has_many`.
	Cardinality string `json:"cardinality" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// IDs of the related entities.
	Values []string `json:"values" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		ObjectType  respjson.Field
		Values      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountListResponseDataRelationship) RawJSON

Returns the unmodified JSON received from the API

func (*AccountListResponseDataRelationship) UnmarshalJSON

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

type AccountListResponseDataUnion

type AccountListResponseDataUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]AccountListResponseDataArrayItemUnion] instead of an object.
	OfAccountListResponseDataArray []AccountListResponseDataArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountListResponseDataMapItemMapItem any `json:",inline"`
	JSON                                    struct {
		OfString                                respjson.Field
		OfFloat                                 respjson.Field
		OfBool                                  respjson.Field
		OfAccountListResponseDataArray          respjson.Field
		OfAnyArray                              respjson.Field
		OfAccountListResponseDataMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountListResponseDataUnion contains all possible properties and values from [string], [float64], [bool], [[]AccountListResponseDataArrayItemUnion], [map[string]AccountListResponseDataMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAccountListResponseDataArray OfAnyArray OfAccountListResponseDataMapItemMapItem]

func (AccountListResponseDataUnion) AsAccountListResponseDataArray

func (u AccountListResponseDataUnion) AsAccountListResponseDataArray() (v []AccountListResponseDataArrayItemUnion)

func (AccountListResponseDataUnion) AsAccountListResponseDataMapMap

func (u AccountListResponseDataUnion) AsAccountListResponseDataMapMap() (v map[string]AccountListResponseDataMapItemUnion)

func (AccountListResponseDataUnion) AsBool

func (u AccountListResponseDataUnion) AsBool() (v bool)

func (AccountListResponseDataUnion) AsFloat

func (u AccountListResponseDataUnion) AsFloat() (v float64)

func (AccountListResponseDataUnion) AsString

func (u AccountListResponseDataUnion) AsString() (v string)

func (AccountListResponseDataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountListResponseDataUnion) UnmarshalJSON

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

type AccountNewParams

type AccountNewParams struct {
	// Field values for the new account. System fields use a `$` prefix (e.g. `$name`,
	// `$website`); custom attributes use their bare slug (e.g. `tier`, `renewalDate`).
	// Required: `$name` (string). Fields of type `SINGLE_SELECT` or `MULTI_SELECT`
	// accept either an option ID or label from the field's `typeConfiguration.options`
	// — call the
	// <u>[definitions endpoint](/api/resources/account/methods/definitions)</u> to
	// discover available fields and options. See
	// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
	// value type details.
	Fields AccountNewParamsFields `json:"fields,omitzero" api:"required"`
	// Relationships to set on the new account. System relationships use a `$` prefix
	// (e.g. `$owner`, `$contact`); custom relationships use their bare slug. Each
	// value is a single entity ID or an array of IDs. Call the
	// <u>[definitions endpoint](/api/resources/account/methods/definitions)</u> to
	// list available relationship keys.
	Relationships AccountNewParamsRelationships `json:"relationships,omitzero"`
	// contains filtered or unexported fields
}

func (AccountNewParams) MarshalJSON

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

func (*AccountNewParams) UnmarshalJSON

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

type AccountNewParamsFieldArrayItemUnion

type AccountNewParamsFieldArrayItemUnion struct {
	OfString   param.Opt[string]  `json:",omitzero,inline"`
	OfFloat    param.Opt[float64] `json:",omitzero,inline"`
	OfBool     param.Opt[bool]    `json:",omitzero,inline"`
	OfAnyArray []any              `json:",omitzero,inline"`
	OfAnyMap   map[string]any     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountNewParamsFieldArrayItemUnion) MarshalJSON

func (u AccountNewParamsFieldArrayItemUnion) MarshalJSON() ([]byte, error)

func (*AccountNewParamsFieldArrayItemUnion) UnmarshalJSON

func (u *AccountNewParamsFieldArrayItemUnion) UnmarshalJSON(data []byte) error

type AccountNewParamsFieldMapItemUnion

type AccountNewParamsFieldMapItemUnion struct {
	OfString   param.Opt[string]  `json:",omitzero,inline"`
	OfFloat    param.Opt[float64] `json:",omitzero,inline"`
	OfBool     param.Opt[bool]    `json:",omitzero,inline"`
	OfAnyArray []any              `json:",omitzero,inline"`
	OfAnyMap   map[string]any     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountNewParamsFieldMapItemUnion) MarshalJSON

func (u AccountNewParamsFieldMapItemUnion) MarshalJSON() ([]byte, error)

func (*AccountNewParamsFieldMapItemUnion) UnmarshalJSON

func (u *AccountNewParamsFieldMapItemUnion) UnmarshalJSON(data []byte) error

type AccountNewParamsFieldUnion

type AccountNewParamsFieldUnion struct {
	OfString                 param.Opt[string]                            `json:",omitzero,inline"`
	OfFloat                  param.Opt[float64]                           `json:",omitzero,inline"`
	OfBool                   param.Opt[bool]                              `json:",omitzero,inline"`
	OfAccountNewsFieldArray  []AccountNewParamsFieldArrayItemUnion        `json:",omitzero,inline"`
	OfAccountNewsFieldMapMap map[string]AccountNewParamsFieldMapItemUnion `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountNewParamsFieldUnion) MarshalJSON

func (u AccountNewParamsFieldUnion) MarshalJSON() ([]byte, error)

func (*AccountNewParamsFieldUnion) UnmarshalJSON

func (u *AccountNewParamsFieldUnion) UnmarshalJSON(data []byte) error

type AccountNewParamsFields

type AccountNewParamsFields struct {
	// Display name of the account.
	Name string `json:"$name" api:"required"`
	// Facebook handle or profile identifier (`SOCIAL_HANDLE`).
	Facebook param.Opt[string] `json:"$facebook,omitzero"`
	// Employee count range (`SINGLE_SELECT`). Pass the option ID or label from the
	// field definition.
	Headcount param.Opt[string] `json:"$headcount,omitzero"`
	// Instagram handle or profile identifier (`SOCIAL_HANDLE`).
	Instagram param.Opt[string] `json:"$instagram,omitzero"`
	// Most recent funding round type (`SINGLE_SELECT`). Pass the option ID or label
	// from the field definition.
	LastFundingType param.Opt[string] `json:"$lastFundingType,omitzero"`
	// LinkedIn handle or profile identifier (`SOCIAL_HANDLE`).
	LinkedIn param.Opt[string] `json:"$linkedIn,omitzero"`
	// Twitter/X handle (`SOCIAL_HANDLE`).
	Twitter param.Opt[string] `json:"$twitter,omitzero"`
	// Industries the account operates in (`MULTI_SELECT`). Pass option IDs or labels
	// from the field definition.
	Industry []string `json:"$industry,omitzero"`
	// Primary address (`ADDRESS`).
	PrimaryAddress AccountNewParamsFieldsPrimaryAddress `json:"$primaryAddress,omitzero"`
	// Website URLs associated with the account (`URL`, multi-value).
	Website     []string                              `json:"$website,omitzero"`
	ExtraFields map[string]AccountNewParamsFieldUnion `json:"-"`
	// contains filtered or unexported fields
}

Field values for the new account. System fields use a `$` prefix (e.g. `$name`, `$website`); custom attributes use their bare slug (e.g. `tier`, `renewalDate`). Required: `$name` (string). Fields of type `SINGLE_SELECT` or `MULTI_SELECT` accept either an option ID or label from the field's `typeConfiguration.options` — call the <u>[definitions endpoint](/api/resources/account/methods/definitions)</u> to discover available fields and options. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for value type details.

The property Name is required.

func (AccountNewParamsFields) MarshalJSON

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

func (*AccountNewParamsFields) UnmarshalJSON

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

type AccountNewParamsFieldsPrimaryAddress

type AccountNewParamsFieldsPrimaryAddress struct {
	// City name.
	City param.Opt[string] `json:"city,omitzero"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country param.Opt[string] `json:"country,omitzero"`
	// Latitude coordinate.
	Latitude param.Opt[float64] `json:"latitude,omitzero"`
	// Longitude coordinate.
	Longitude param.Opt[float64] `json:"longitude,omitzero"`
	// Postal or ZIP code.
	PostalCode param.Opt[string] `json:"postalCode,omitzero"`
	// State or province.
	State param.Opt[string] `json:"state,omitzero"`
	// Street address line 1.
	Street param.Opt[string] `json:"street,omitzero"`
	// Street address line 2.
	Street2 param.Opt[string] `json:"street2,omitzero"`
	// contains filtered or unexported fields
}

Primary address (`ADDRESS`).

func (AccountNewParamsFieldsPrimaryAddress) MarshalJSON

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

func (*AccountNewParamsFieldsPrimaryAddress) UnmarshalJSON

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

type AccountNewParamsRelationshipUnion

type AccountNewParamsRelationshipUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountNewParamsRelationshipUnion) MarshalJSON

func (u AccountNewParamsRelationshipUnion) MarshalJSON() ([]byte, error)

func (*AccountNewParamsRelationshipUnion) UnmarshalJSON

func (u *AccountNewParamsRelationshipUnion) UnmarshalJSON(data []byte) error

type AccountNewParamsRelationships

type AccountNewParamsRelationships struct {
	// ID(s) of contacts to associate with this account.
	Contact AccountNewParamsRelationshipsContactUnion `json:"$contact,omitzero"`
	// ID of the user who owns this account.
	Owner       AccountNewParamsRelationshipsOwnerUnion      `json:"$owner,omitzero"`
	ExtraFields map[string]AccountNewParamsRelationshipUnion `json:"-"`
	// contains filtered or unexported fields
}

Relationships to set on the new account. System relationships use a `$` prefix (e.g. `$owner`, `$contact`); custom relationships use their bare slug. Each value is a single entity ID or an array of IDs. Call the <u>[definitions endpoint](/api/resources/account/methods/definitions)</u> to list available relationship keys.

func (AccountNewParamsRelationships) MarshalJSON

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

func (*AccountNewParamsRelationships) UnmarshalJSON

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

type AccountNewParamsRelationshipsContactUnion

type AccountNewParamsRelationshipsContactUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountNewParamsRelationshipsContactUnion) MarshalJSON

func (*AccountNewParamsRelationshipsContactUnion) UnmarshalJSON

func (u *AccountNewParamsRelationshipsContactUnion) UnmarshalJSON(data []byte) error

type AccountNewParamsRelationshipsOwnerUnion added in v0.2.0

type AccountNewParamsRelationshipsOwnerUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountNewParamsRelationshipsOwnerUnion) MarshalJSON added in v0.2.0

func (u AccountNewParamsRelationshipsOwnerUnion) MarshalJSON() ([]byte, error)

func (*AccountNewParamsRelationshipsOwnerUnion) UnmarshalJSON added in v0.2.0

func (u *AccountNewParamsRelationshipsOwnerUnion) UnmarshalJSON(data []byte) error

type AccountRetrieveResponse added in v0.4.1

type AccountRetrieveResponse struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the entity was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$email`); custom attributes use their bare slug.
	Fields map[string]AccountRetrieveResponseField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]AccountRetrieveResponseRelationship `json:"relationships" api:"required"`
	ExtraFields   map[string]AccountRetrieveResponseUnion        `json:"" api:"extrafields"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		Relationships respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountRetrieveResponse) RawJSON added in v0.4.1

func (r AccountRetrieveResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountRetrieveResponse) UnmarshalJSON added in v0.4.1

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

type AccountRetrieveResponseArrayItemUnion

type AccountRetrieveResponseArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountRetrieveResponseArrayItemMapItem any `json:",inline"`
	JSON                                      struct {
		OfString                                  respjson.Field
		OfFloat                                   respjson.Field
		OfBool                                    respjson.Field
		OfAnyArray                                respjson.Field
		OfAccountRetrieveResponseArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountRetrieveResponseArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountRetrieveResponseArrayItemMapItem]

func (AccountRetrieveResponseArrayItemUnion) AsAnyArray

func (u AccountRetrieveResponseArrayItemUnion) AsAnyArray() (v []any)

func (AccountRetrieveResponseArrayItemUnion) AsAnyMap

func (u AccountRetrieveResponseArrayItemUnion) AsAnyMap() (v map[string]any)

func (AccountRetrieveResponseArrayItemUnion) AsBool

func (AccountRetrieveResponseArrayItemUnion) AsFloat

func (AccountRetrieveResponseArrayItemUnion) AsString

func (AccountRetrieveResponseArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountRetrieveResponseArrayItemUnion) UnmarshalJSON

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

type AccountRetrieveResponseField added in v0.4.1

type AccountRetrieveResponseField struct {
	// The field value, or null if unset.
	Value AccountRetrieveResponseFieldValueUnion `json:"value" api:"required"`
	// The data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ValueType   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountRetrieveResponseField) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountRetrieveResponseField) UnmarshalJSON added in v0.4.1

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

type AccountRetrieveResponseFieldValueArrayItemUnion

type AccountRetrieveResponseFieldValueArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountRetrieveResponseFieldValueArrayItemMapItem any `json:",inline"`
	JSON                                                struct {
		OfString                                            respjson.Field
		OfFloat                                             respjson.Field
		OfBool                                              respjson.Field
		OfAnyArray                                          respjson.Field
		OfAccountRetrieveResponseFieldValueArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountRetrieveResponseFieldValueArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountRetrieveResponseFieldValueArrayItemMapItem]

func (AccountRetrieveResponseFieldValueArrayItemUnion) AsAnyArray

func (AccountRetrieveResponseFieldValueArrayItemUnion) AsAnyMap

func (AccountRetrieveResponseFieldValueArrayItemUnion) AsBool

func (AccountRetrieveResponseFieldValueArrayItemUnion) AsFloat

func (AccountRetrieveResponseFieldValueArrayItemUnion) AsString

func (AccountRetrieveResponseFieldValueArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountRetrieveResponseFieldValueArrayItemUnion) UnmarshalJSON

type AccountRetrieveResponseFieldValueMapItemUnion

type AccountRetrieveResponseFieldValueMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountRetrieveResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                              struct {
		OfString                                          respjson.Field
		OfFloat                                           respjson.Field
		OfBool                                            respjson.Field
		OfAnyArray                                        respjson.Field
		OfAccountRetrieveResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountRetrieveResponseFieldValueMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountRetrieveResponseFieldValueMapItemMapItem]

func (AccountRetrieveResponseFieldValueMapItemUnion) AsAnyArray

func (AccountRetrieveResponseFieldValueMapItemUnion) AsAnyMap

func (AccountRetrieveResponseFieldValueMapItemUnion) AsBool

func (AccountRetrieveResponseFieldValueMapItemUnion) AsFloat

func (AccountRetrieveResponseFieldValueMapItemUnion) AsString

func (AccountRetrieveResponseFieldValueMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountRetrieveResponseFieldValueMapItemUnion) UnmarshalJSON

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

type AccountRetrieveResponseFieldValueUnion added in v0.4.1

type AccountRetrieveResponseFieldValueUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]AccountRetrieveResponseFieldValueArrayItemUnion] instead of an object.
	OfAccountRetrieveResponseFieldValueArray []AccountRetrieveResponseFieldValueArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountRetrieveResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                              struct {
		OfString                                          respjson.Field
		OfFloat                                           respjson.Field
		OfBool                                            respjson.Field
		OfAccountRetrieveResponseFieldValueArray          respjson.Field
		OfAnyArray                                        respjson.Field
		OfAccountRetrieveResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]AccountRetrieveResponseFieldValueArrayItemUnion], [map[string]AccountRetrieveResponseFieldValueMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAccountRetrieveResponseFieldValueArray OfAnyArray OfAccountRetrieveResponseFieldValueMapItemMapItem]

func (AccountRetrieveResponseFieldValueUnion) AsAccountRetrieveResponseFieldValueArray

func (u AccountRetrieveResponseFieldValueUnion) AsAccountRetrieveResponseFieldValueArray() (v []AccountRetrieveResponseFieldValueArrayItemUnion)

func (AccountRetrieveResponseFieldValueUnion) AsAccountRetrieveResponseFieldValueMapMap

func (u AccountRetrieveResponseFieldValueUnion) AsAccountRetrieveResponseFieldValueMapMap() (v map[string]AccountRetrieveResponseFieldValueMapItemUnion)

func (AccountRetrieveResponseFieldValueUnion) AsBool added in v0.4.1

func (AccountRetrieveResponseFieldValueUnion) AsFloat added in v0.4.1

func (AccountRetrieveResponseFieldValueUnion) AsString added in v0.4.1

func (AccountRetrieveResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountRetrieveResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type AccountRetrieveResponseMapItemUnion

type AccountRetrieveResponseMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountRetrieveResponseMapItemMapItem any `json:",inline"`
	JSON                                    struct {
		OfString                                respjson.Field
		OfFloat                                 respjson.Field
		OfBool                                  respjson.Field
		OfAnyArray                              respjson.Field
		OfAccountRetrieveResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountRetrieveResponseMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountRetrieveResponseMapItemMapItem]

func (AccountRetrieveResponseMapItemUnion) AsAnyArray

func (u AccountRetrieveResponseMapItemUnion) AsAnyArray() (v []any)

func (AccountRetrieveResponseMapItemUnion) AsAnyMap

func (u AccountRetrieveResponseMapItemUnion) AsAnyMap() (v map[string]any)

func (AccountRetrieveResponseMapItemUnion) AsBool

func (AccountRetrieveResponseMapItemUnion) AsFloat

func (AccountRetrieveResponseMapItemUnion) AsString

func (AccountRetrieveResponseMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountRetrieveResponseMapItemUnion) UnmarshalJSON

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

type AccountRetrieveResponseRelationship added in v0.4.1

type AccountRetrieveResponseRelationship struct {
	// Whether the relationship is `has_one` or `has_many`.
	Cardinality string `json:"cardinality" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// IDs of the related entities.
	Values []string `json:"values" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		ObjectType  respjson.Field
		Values      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountRetrieveResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountRetrieveResponseRelationship) UnmarshalJSON added in v0.4.1

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

type AccountRetrieveResponseUnion

type AccountRetrieveResponseUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]AccountRetrieveResponseArrayItemUnion] instead of an object.
	OfAccountRetrieveResponseArray []AccountRetrieveResponseArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountRetrieveResponseMapItemMapItem any `json:",inline"`
	JSON                                    struct {
		OfString                                respjson.Field
		OfFloat                                 respjson.Field
		OfBool                                  respjson.Field
		OfAccountRetrieveResponseArray          respjson.Field
		OfAnyArray                              respjson.Field
		OfAccountRetrieveResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountRetrieveResponseUnion contains all possible properties and values from [string], [float64], [bool], [[]AccountRetrieveResponseArrayItemUnion], [map[string]AccountRetrieveResponseMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAccountRetrieveResponseArray OfAnyArray OfAccountRetrieveResponseMapItemMapItem]

func (AccountRetrieveResponseUnion) AsAccountRetrieveResponseArray

func (u AccountRetrieveResponseUnion) AsAccountRetrieveResponseArray() (v []AccountRetrieveResponseArrayItemUnion)

func (AccountRetrieveResponseUnion) AsAccountRetrieveResponseMapMap

func (u AccountRetrieveResponseUnion) AsAccountRetrieveResponseMapMap() (v map[string]AccountRetrieveResponseMapItemUnion)

func (AccountRetrieveResponseUnion) AsBool

func (u AccountRetrieveResponseUnion) AsBool() (v bool)

func (AccountRetrieveResponseUnion) AsFloat

func (u AccountRetrieveResponseUnion) AsFloat() (v float64)

func (AccountRetrieveResponseUnion) AsString

func (u AccountRetrieveResponseUnion) AsString() (v string)

func (AccountRetrieveResponseUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountRetrieveResponseUnion) UnmarshalJSON

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

type AccountService

type AccountService struct {
	Options []option.RequestOption
}

Accounts represent companies or organizations in Lightfield. Each account can have contacts, opportunities, tasks, and notes associated with it.

AccountService contains methods and other services that help with interacting with the Lightfield API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountService method instead.

func NewAccountService

func NewAccountService(opts ...option.RequestOption) (r AccountService)

NewAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AccountService) Definitions added in v0.2.0

func (r *AccountService) Definitions(ctx context.Context, opts ...option.RequestOption) (res *AccountDefinitionsResponse, err error)

Returns the schema for all field and relationship definitions available on accounts, including both system-defined and custom fields. Useful for understanding the shape of account data before creating or updating records. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for more details.

**[Required scope](/using-the-api/scopes/):** `accounts:read`

**[Rate limit category](/using-the-api/rate-limits/):** Read

func (*AccountService) Get

Retrieves a single account by its ID.

**[Required scope](/using-the-api/scopes/):** `accounts:read`

**[Rate limit category](/using-the-api/rate-limits/):** Read

func (*AccountService) List

Returns a paginated list of accounts. Use `offset` and `limit` to paginate through results. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.

**[Required scope](/using-the-api/scopes/):** `accounts:read`

**[Rate limit category](/using-the-api/rate-limits/):** Search

func (*AccountService) New

Creates a new account record. The `$name` field is required.

If a `$website` is provided, Lightfield automatically enriches the account in the background. The `$howTheyMakeMoney` and `$accountStatus` fields are read-only and cannot be set via the API. The `$opportunity`, `$task`, and `$note` relationships are also read-only — manage them via the `$account` relationship on the opportunity or task, or the `$account`/`$opportunity` note relationships instead.

Supports idempotency via the `Idempotency-Key` header.

**[Required scope](/using-the-api/scopes/):** `accounts:create`

**[Rate limit category](/using-the-api/rate-limits/):** Write

func (*AccountService) Update

Updates an existing account by ID. Only included fields and relationships are modified.

The `$howTheyMakeMoney` and `$accountStatus` fields are read-only and cannot be updated. The `$opportunity`, `$task`, and `$note` relationships are also read-only — manage them via the `$account` relationship on the opportunity or task, or the `$account`/`$opportunity` note relationships instead.

Supports idempotency via the `Idempotency-Key` header.

**[Required scope](/using-the-api/scopes/):** `accounts:update`

**[Rate limit category](/using-the-api/rate-limits/):** Write

type AccountUpdateParams

type AccountUpdateParams struct {
	// Field values to update — only provided fields are modified; omitted fields are
	// left unchanged. System fields use a `$` prefix (e.g. `$name`); custom attributes
	// use their bare slug. `SINGLE_SELECT` and `MULTI_SELECT` fields accept an option
	// ID or label — call the
	// <u>[definitions endpoint](/api/resources/account/methods/definitions)</u> for
	// available options. See
	// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
	// value type details.
	Fields AccountUpdateParamsFields `json:"fields,omitzero"`
	// Relationship operations to apply. System relationships use a `$` prefix (e.g.
	// `$owner`, `$contact`). Each value is an operation object with `add`, `remove`,
	// or `replace`.
	Relationships AccountUpdateParamsRelationships `json:"relationships,omitzero"`
	// contains filtered or unexported fields
}

func (AccountUpdateParams) MarshalJSON

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

func (*AccountUpdateParams) UnmarshalJSON

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

type AccountUpdateParamsFieldArrayItemUnion

type AccountUpdateParamsFieldArrayItemUnion struct {
	OfString   param.Opt[string]  `json:",omitzero,inline"`
	OfFloat    param.Opt[float64] `json:",omitzero,inline"`
	OfBool     param.Opt[bool]    `json:",omitzero,inline"`
	OfAnyArray []any              `json:",omitzero,inline"`
	OfAnyMap   map[string]any     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountUpdateParamsFieldArrayItemUnion) MarshalJSON

func (u AccountUpdateParamsFieldArrayItemUnion) MarshalJSON() ([]byte, error)

func (*AccountUpdateParamsFieldArrayItemUnion) UnmarshalJSON

func (u *AccountUpdateParamsFieldArrayItemUnion) UnmarshalJSON(data []byte) error

type AccountUpdateParamsFieldMapItemUnion

type AccountUpdateParamsFieldMapItemUnion struct {
	OfString   param.Opt[string]  `json:",omitzero,inline"`
	OfFloat    param.Opt[float64] `json:",omitzero,inline"`
	OfBool     param.Opt[bool]    `json:",omitzero,inline"`
	OfAnyArray []any              `json:",omitzero,inline"`
	OfAnyMap   map[string]any     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountUpdateParamsFieldMapItemUnion) MarshalJSON

func (u AccountUpdateParamsFieldMapItemUnion) MarshalJSON() ([]byte, error)

func (*AccountUpdateParamsFieldMapItemUnion) UnmarshalJSON

func (u *AccountUpdateParamsFieldMapItemUnion) UnmarshalJSON(data []byte) error

type AccountUpdateParamsFieldUnion

type AccountUpdateParamsFieldUnion struct {
	OfString                    param.Opt[string]                               `json:",omitzero,inline"`
	OfFloat                     param.Opt[float64]                              `json:",omitzero,inline"`
	OfBool                      param.Opt[bool]                                 `json:",omitzero,inline"`
	OfAccountUpdatesFieldArray  []AccountUpdateParamsFieldArrayItemUnion        `json:",omitzero,inline"`
	OfAccountUpdatesFieldMapMap map[string]AccountUpdateParamsFieldMapItemUnion `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountUpdateParamsFieldUnion) MarshalJSON

func (u AccountUpdateParamsFieldUnion) MarshalJSON() ([]byte, error)

func (*AccountUpdateParamsFieldUnion) UnmarshalJSON

func (u *AccountUpdateParamsFieldUnion) UnmarshalJSON(data []byte) error

type AccountUpdateParamsFields

type AccountUpdateParamsFields struct {
	// Facebook handle or profile identifier (`SOCIAL_HANDLE`).
	Facebook param.Opt[string] `json:"$facebook,omitzero"`
	// Employee count range (`SINGLE_SELECT`). Pass the option ID or label from the
	// field definition.
	Headcount param.Opt[string] `json:"$headcount,omitzero"`
	// Instagram handle or profile identifier (`SOCIAL_HANDLE`).
	Instagram param.Opt[string] `json:"$instagram,omitzero"`
	// Most recent funding round type (`SINGLE_SELECT`). Pass the option ID or label
	// from the field definition.
	LastFundingType param.Opt[string] `json:"$lastFundingType,omitzero"`
	// LinkedIn handle or profile identifier (`SOCIAL_HANDLE`).
	LinkedIn param.Opt[string] `json:"$linkedIn,omitzero"`
	// Display name of the account.
	Name param.Opt[string] `json:"$name,omitzero"`
	// Twitter/X handle (`SOCIAL_HANDLE`).
	Twitter param.Opt[string] `json:"$twitter,omitzero"`
	// Industries the account operates in (`MULTI_SELECT`). Pass option IDs or labels
	// from the field definition.
	Industry []string `json:"$industry,omitzero"`
	// Primary address (`ADDRESS`).
	PrimaryAddress AccountUpdateParamsFieldsPrimaryAddress `json:"$primaryAddress,omitzero"`
	// Website URLs associated with the account (`URL`, multi-value).
	Website     []string                                 `json:"$website,omitzero"`
	ExtraFields map[string]AccountUpdateParamsFieldUnion `json:"-"`
	// contains filtered or unexported fields
}

Field values to update — only provided fields are modified; omitted fields are left unchanged. System fields use a `$` prefix (e.g. `$name`); custom attributes use their bare slug. `SINGLE_SELECT` and `MULTI_SELECT` fields accept an option ID or label — call the <u>[definitions endpoint](/api/resources/account/methods/definitions)</u> for available options. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for value type details.

func (AccountUpdateParamsFields) MarshalJSON

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

func (*AccountUpdateParamsFields) UnmarshalJSON

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

type AccountUpdateParamsFieldsPrimaryAddress

type AccountUpdateParamsFieldsPrimaryAddress struct {
	// City name.
	City param.Opt[string] `json:"city,omitzero"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country param.Opt[string] `json:"country,omitzero"`
	// Latitude coordinate.
	Latitude param.Opt[float64] `json:"latitude,omitzero"`
	// Longitude coordinate.
	Longitude param.Opt[float64] `json:"longitude,omitzero"`
	// Postal or ZIP code.
	PostalCode param.Opt[string] `json:"postalCode,omitzero"`
	// State or province.
	State param.Opt[string] `json:"state,omitzero"`
	// Street address line 1.
	Street param.Opt[string] `json:"street,omitzero"`
	// Street address line 2.
	Street2 param.Opt[string] `json:"street2,omitzero"`
	// contains filtered or unexported fields
}

Primary address (`ADDRESS`).

func (AccountUpdateParamsFieldsPrimaryAddress) MarshalJSON

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

func (*AccountUpdateParamsFieldsPrimaryAddress) UnmarshalJSON

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

type AccountUpdateParamsRelationship

type AccountUpdateParamsRelationship struct {
	// Entity ID(s) to add to the relationship.
	Add AccountUpdateParamsRelationshipAddUnion `json:"add,omitzero"`
	// Entity ID(s) to remove from the relationship.
	Remove AccountUpdateParamsRelationshipRemoveUnion `json:"remove,omitzero"`
	// Entity ID(s) to set as the entire relationship, replacing all existing
	// associations.
	Replace AccountUpdateParamsRelationshipReplaceUnion `json:"replace,omitzero"`
	// contains filtered or unexported fields
}

An operation to modify a relationship. Provide one of `add`, `remove`, or `replace`.

func (AccountUpdateParamsRelationship) MarshalJSON

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

func (*AccountUpdateParamsRelationship) UnmarshalJSON

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

type AccountUpdateParamsRelationshipAddUnion

type AccountUpdateParamsRelationshipAddUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountUpdateParamsRelationshipAddUnion) MarshalJSON

func (u AccountUpdateParamsRelationshipAddUnion) MarshalJSON() ([]byte, error)

func (*AccountUpdateParamsRelationshipAddUnion) UnmarshalJSON

func (u *AccountUpdateParamsRelationshipAddUnion) UnmarshalJSON(data []byte) error

type AccountUpdateParamsRelationshipRemoveUnion

type AccountUpdateParamsRelationshipRemoveUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountUpdateParamsRelationshipRemoveUnion) MarshalJSON

func (*AccountUpdateParamsRelationshipRemoveUnion) UnmarshalJSON

func (u *AccountUpdateParamsRelationshipRemoveUnion) UnmarshalJSON(data []byte) error

type AccountUpdateParamsRelationshipReplaceUnion

type AccountUpdateParamsRelationshipReplaceUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountUpdateParamsRelationshipReplaceUnion) MarshalJSON

func (*AccountUpdateParamsRelationshipReplaceUnion) UnmarshalJSON

func (u *AccountUpdateParamsRelationshipReplaceUnion) UnmarshalJSON(data []byte) error

type AccountUpdateParamsRelationships

type AccountUpdateParamsRelationships struct {
	// Operation to modify associated contacts.
	Contact AccountUpdateParamsRelationshipsContact `json:"$contact,omitzero"`
	// Operation to modify the account owner.
	Owner       AccountUpdateParamsRelationshipsOwner      `json:"$owner,omitzero"`
	ExtraFields map[string]AccountUpdateParamsRelationship `json:"-"`
	// contains filtered or unexported fields
}

Relationship operations to apply. System relationships use a `$` prefix (e.g. `$owner`, `$contact`). Each value is an operation object with `add`, `remove`, or `replace`.

func (AccountUpdateParamsRelationships) MarshalJSON

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

func (*AccountUpdateParamsRelationships) UnmarshalJSON

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

type AccountUpdateParamsRelationshipsContact

type AccountUpdateParamsRelationshipsContact struct {
	// Entity ID(s) to add to the relationship.
	Add AccountUpdateParamsRelationshipsContactAddUnion `json:"add,omitzero"`
	// Entity ID(s) to remove from the relationship.
	Remove AccountUpdateParamsRelationshipsContactRemoveUnion `json:"remove,omitzero"`
	// Entity ID(s) to set as the entire relationship, replacing all existing
	// associations.
	Replace AccountUpdateParamsRelationshipsContactReplaceUnion `json:"replace,omitzero"`
	// contains filtered or unexported fields
}

Operation to modify associated contacts.

func (AccountUpdateParamsRelationshipsContact) MarshalJSON

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

func (*AccountUpdateParamsRelationshipsContact) UnmarshalJSON

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

type AccountUpdateParamsRelationshipsContactAddUnion

type AccountUpdateParamsRelationshipsContactAddUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountUpdateParamsRelationshipsContactAddUnion) MarshalJSON

func (*AccountUpdateParamsRelationshipsContactAddUnion) UnmarshalJSON

type AccountUpdateParamsRelationshipsContactRemoveUnion

type AccountUpdateParamsRelationshipsContactRemoveUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountUpdateParamsRelationshipsContactRemoveUnion) MarshalJSON

func (*AccountUpdateParamsRelationshipsContactRemoveUnion) UnmarshalJSON

type AccountUpdateParamsRelationshipsContactReplaceUnion

type AccountUpdateParamsRelationshipsContactReplaceUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountUpdateParamsRelationshipsContactReplaceUnion) MarshalJSON

func (*AccountUpdateParamsRelationshipsContactReplaceUnion) UnmarshalJSON

type AccountUpdateParamsRelationshipsOwner added in v0.2.0

type AccountUpdateParamsRelationshipsOwner struct {
	// Entity ID(s) to add to the relationship.
	Add AccountUpdateParamsRelationshipsOwnerAddUnion `json:"add,omitzero"`
	// Entity ID(s) to remove from the relationship.
	Remove AccountUpdateParamsRelationshipsOwnerRemoveUnion `json:"remove,omitzero"`
	// Entity ID(s) to set as the entire relationship, replacing all existing
	// associations.
	Replace AccountUpdateParamsRelationshipsOwnerReplaceUnion `json:"replace,omitzero"`
	// contains filtered or unexported fields
}

Operation to modify the account owner.

func (AccountUpdateParamsRelationshipsOwner) MarshalJSON added in v0.2.0

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

func (*AccountUpdateParamsRelationshipsOwner) UnmarshalJSON added in v0.2.0

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

type AccountUpdateParamsRelationshipsOwnerAddUnion added in v0.2.0

type AccountUpdateParamsRelationshipsOwnerAddUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountUpdateParamsRelationshipsOwnerAddUnion) MarshalJSON added in v0.2.0

func (*AccountUpdateParamsRelationshipsOwnerAddUnion) UnmarshalJSON added in v0.2.0

func (u *AccountUpdateParamsRelationshipsOwnerAddUnion) UnmarshalJSON(data []byte) error

type AccountUpdateParamsRelationshipsOwnerRemoveUnion added in v0.2.0

type AccountUpdateParamsRelationshipsOwnerRemoveUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountUpdateParamsRelationshipsOwnerRemoveUnion) MarshalJSON added in v0.2.0

func (*AccountUpdateParamsRelationshipsOwnerRemoveUnion) UnmarshalJSON added in v0.2.0

type AccountUpdateParamsRelationshipsOwnerReplaceUnion added in v0.2.0

type AccountUpdateParamsRelationshipsOwnerReplaceUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AccountUpdateParamsRelationshipsOwnerReplaceUnion) MarshalJSON added in v0.2.0

func (*AccountUpdateParamsRelationshipsOwnerReplaceUnion) UnmarshalJSON added in v0.2.0

type AccountUpdateResponse

type AccountUpdateResponse struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the entity was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$email`); custom attributes use their bare slug.
	Fields map[string]AccountUpdateResponseField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]AccountUpdateResponseRelationship `json:"relationships" api:"required"`
	ExtraFields   map[string]AccountUpdateResponseUnion        `json:"" api:"extrafields"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		Relationships respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountUpdateResponse) RawJSON

func (r AccountUpdateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountUpdateResponse) UnmarshalJSON

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

type AccountUpdateResponseArrayItemUnion

type AccountUpdateResponseArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountUpdateResponseArrayItemMapItem any `json:",inline"`
	JSON                                    struct {
		OfString                                respjson.Field
		OfFloat                                 respjson.Field
		OfBool                                  respjson.Field
		OfAnyArray                              respjson.Field
		OfAccountUpdateResponseArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountUpdateResponseArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountUpdateResponseArrayItemMapItem]

func (AccountUpdateResponseArrayItemUnion) AsAnyArray

func (u AccountUpdateResponseArrayItemUnion) AsAnyArray() (v []any)

func (AccountUpdateResponseArrayItemUnion) AsAnyMap

func (u AccountUpdateResponseArrayItemUnion) AsAnyMap() (v map[string]any)

func (AccountUpdateResponseArrayItemUnion) AsBool

func (AccountUpdateResponseArrayItemUnion) AsFloat

func (AccountUpdateResponseArrayItemUnion) AsString

func (AccountUpdateResponseArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountUpdateResponseArrayItemUnion) UnmarshalJSON

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

type AccountUpdateResponseField

type AccountUpdateResponseField struct {
	// The field value, or null if unset.
	Value AccountUpdateResponseFieldValueUnion `json:"value" api:"required"`
	// The data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ValueType   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountUpdateResponseField) RawJSON

func (r AccountUpdateResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountUpdateResponseField) UnmarshalJSON

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

type AccountUpdateResponseFieldValueArrayItemUnion

type AccountUpdateResponseFieldValueArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountUpdateResponseFieldValueArrayItemMapItem any `json:",inline"`
	JSON                                              struct {
		OfString                                          respjson.Field
		OfFloat                                           respjson.Field
		OfBool                                            respjson.Field
		OfAnyArray                                        respjson.Field
		OfAccountUpdateResponseFieldValueArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountUpdateResponseFieldValueArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountUpdateResponseFieldValueArrayItemMapItem]

func (AccountUpdateResponseFieldValueArrayItemUnion) AsAnyArray

func (AccountUpdateResponseFieldValueArrayItemUnion) AsAnyMap

func (AccountUpdateResponseFieldValueArrayItemUnion) AsBool

func (AccountUpdateResponseFieldValueArrayItemUnion) AsFloat

func (AccountUpdateResponseFieldValueArrayItemUnion) AsString

func (AccountUpdateResponseFieldValueArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountUpdateResponseFieldValueArrayItemUnion) UnmarshalJSON

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

type AccountUpdateResponseFieldValueMapItemUnion

type AccountUpdateResponseFieldValueMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountUpdateResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                            struct {
		OfString                                        respjson.Field
		OfFloat                                         respjson.Field
		OfBool                                          respjson.Field
		OfAnyArray                                      respjson.Field
		OfAccountUpdateResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountUpdateResponseFieldValueMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountUpdateResponseFieldValueMapItemMapItem]

func (AccountUpdateResponseFieldValueMapItemUnion) AsAnyArray

func (u AccountUpdateResponseFieldValueMapItemUnion) AsAnyArray() (v []any)

func (AccountUpdateResponseFieldValueMapItemUnion) AsAnyMap

func (AccountUpdateResponseFieldValueMapItemUnion) AsBool

func (AccountUpdateResponseFieldValueMapItemUnion) AsFloat

func (AccountUpdateResponseFieldValueMapItemUnion) AsString

func (AccountUpdateResponseFieldValueMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountUpdateResponseFieldValueMapItemUnion) UnmarshalJSON

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

type AccountUpdateResponseFieldValueUnion

type AccountUpdateResponseFieldValueUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]AccountUpdateResponseFieldValueArrayItemUnion] instead of an object.
	OfAccountUpdateResponseFieldValueArray []AccountUpdateResponseFieldValueArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountUpdateResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                            struct {
		OfString                                        respjson.Field
		OfFloat                                         respjson.Field
		OfBool                                          respjson.Field
		OfAccountUpdateResponseFieldValueArray          respjson.Field
		OfAnyArray                                      respjson.Field
		OfAccountUpdateResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]AccountUpdateResponseFieldValueArrayItemUnion], [map[string]AccountUpdateResponseFieldValueMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAccountUpdateResponseFieldValueArray OfAnyArray OfAccountUpdateResponseFieldValueMapItemMapItem]

func (AccountUpdateResponseFieldValueUnion) AsAccountUpdateResponseFieldValueArray

func (u AccountUpdateResponseFieldValueUnion) AsAccountUpdateResponseFieldValueArray() (v []AccountUpdateResponseFieldValueArrayItemUnion)

func (AccountUpdateResponseFieldValueUnion) AsAccountUpdateResponseFieldValueMapMap

func (u AccountUpdateResponseFieldValueUnion) AsAccountUpdateResponseFieldValueMapMap() (v map[string]AccountUpdateResponseFieldValueMapItemUnion)

func (AccountUpdateResponseFieldValueUnion) AsBool

func (AccountUpdateResponseFieldValueUnion) AsFloat

func (AccountUpdateResponseFieldValueUnion) AsString

func (AccountUpdateResponseFieldValueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountUpdateResponseFieldValueUnion) UnmarshalJSON

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

type AccountUpdateResponseMapItemUnion

type AccountUpdateResponseMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountUpdateResponseMapItemMapItem any `json:",inline"`
	JSON                                  struct {
		OfString                              respjson.Field
		OfFloat                               respjson.Field
		OfBool                                respjson.Field
		OfAnyArray                            respjson.Field
		OfAccountUpdateResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountUpdateResponseMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfAccountUpdateResponseMapItemMapItem]

func (AccountUpdateResponseMapItemUnion) AsAnyArray

func (u AccountUpdateResponseMapItemUnion) AsAnyArray() (v []any)

func (AccountUpdateResponseMapItemUnion) AsAnyMap

func (u AccountUpdateResponseMapItemUnion) AsAnyMap() (v map[string]any)

func (AccountUpdateResponseMapItemUnion) AsBool

func (u AccountUpdateResponseMapItemUnion) AsBool() (v bool)

func (AccountUpdateResponseMapItemUnion) AsFloat

func (AccountUpdateResponseMapItemUnion) AsString

func (u AccountUpdateResponseMapItemUnion) AsString() (v string)

func (AccountUpdateResponseMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountUpdateResponseMapItemUnion) UnmarshalJSON

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

type AccountUpdateResponseRelationship

type AccountUpdateResponseRelationship struct {
	// Whether the relationship is `has_one` or `has_many`.
	Cardinality string `json:"cardinality" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// IDs of the related entities.
	Values []string `json:"values" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		ObjectType  respjson.Field
		Values      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountUpdateResponseRelationship) RawJSON

Returns the unmodified JSON received from the API

func (*AccountUpdateResponseRelationship) UnmarshalJSON

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

type AccountUpdateResponseUnion

type AccountUpdateResponseUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]AccountUpdateResponseArrayItemUnion] instead of an object.
	OfAccountUpdateResponseArray []AccountUpdateResponseArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfAccountUpdateResponseMapItemMapItem any `json:",inline"`
	JSON                                  struct {
		OfString                              respjson.Field
		OfFloat                               respjson.Field
		OfBool                                respjson.Field
		OfAccountUpdateResponseArray          respjson.Field
		OfAnyArray                            respjson.Field
		OfAccountUpdateResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountUpdateResponseUnion contains all possible properties and values from [string], [float64], [bool], [[]AccountUpdateResponseArrayItemUnion], [map[string]AccountUpdateResponseMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAccountUpdateResponseArray OfAnyArray OfAccountUpdateResponseMapItemMapItem]

func (AccountUpdateResponseUnion) AsAccountUpdateResponseArray

func (u AccountUpdateResponseUnion) AsAccountUpdateResponseArray() (v []AccountUpdateResponseArrayItemUnion)

func (AccountUpdateResponseUnion) AsAccountUpdateResponseMapMap

func (u AccountUpdateResponseUnion) AsAccountUpdateResponseMapMap() (v map[string]AccountUpdateResponseMapItemUnion)

func (AccountUpdateResponseUnion) AsBool

func (u AccountUpdateResponseUnion) AsBool() (v bool)

func (AccountUpdateResponseUnion) AsFloat

func (u AccountUpdateResponseUnion) AsFloat() (v float64)

func (AccountUpdateResponseUnion) AsString

func (u AccountUpdateResponseUnion) AsString() (v string)

func (AccountUpdateResponseUnion) RawJSON

func (u AccountUpdateResponseUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountUpdateResponseUnion) UnmarshalJSON

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

type Client

type Client struct {
	Options []option.RequestOption
	// Accounts represent companies or organizations in Lightfield. Each account can
	// have contacts, opportunities, tasks, and notes associated with it.
	Account AccountService
	// Contacts represent individual people in Lightfield. Contacts can be associated
	// with one or more accounts.
	Contact ContactService
	// Opportunities represent potential deals or sales in Lightfield. Each opportunity
	// belongs to an account and can have tasks and notes associated with it.
	Opportunity OpportunityService
	// Members represent users in your Lightfield workspace. Members can own accounts
	// and opportunities, and are referenced in relationships like `$owner` and
	// `$createdBy`.
	Member MemberService
	// Workflow runs represent executions of automated workflows.
	WorkflowRun WorkflowRunService
}

Client creates a struct with services and top level methods that help with interacting with the Lightfield 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 (LIGHTFIELD_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 ContactCreateResponse added in v0.4.1

type ContactCreateResponse struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the entity was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$email`); custom attributes use their bare slug.
	Fields map[string]ContactCreateResponseField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]ContactCreateResponseRelationship `json:"relationships" api:"required"`
	ExtraFields   map[string]ContactCreateResponseUnion        `json:"" api:"extrafields"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		Relationships respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactCreateResponse) RawJSON added in v0.4.1

func (r ContactCreateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContactCreateResponse) UnmarshalJSON added in v0.4.1

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

type ContactCreateResponseArrayItemUnion

type ContactCreateResponseArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactCreateResponseArrayItemMapItem any `json:",inline"`
	JSON                                    struct {
		OfString                                respjson.Field
		OfFloat                                 respjson.Field
		OfBool                                  respjson.Field
		OfAnyArray                              respjson.Field
		OfContactCreateResponseArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactCreateResponseArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactCreateResponseArrayItemMapItem]

func (ContactCreateResponseArrayItemUnion) AsAnyArray

func (u ContactCreateResponseArrayItemUnion) AsAnyArray() (v []any)

func (ContactCreateResponseArrayItemUnion) AsAnyMap

func (u ContactCreateResponseArrayItemUnion) AsAnyMap() (v map[string]any)

func (ContactCreateResponseArrayItemUnion) AsBool

func (ContactCreateResponseArrayItemUnion) AsFloat

func (ContactCreateResponseArrayItemUnion) AsString

func (ContactCreateResponseArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactCreateResponseArrayItemUnion) UnmarshalJSON

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

type ContactCreateResponseField added in v0.4.1

type ContactCreateResponseField struct {
	// The field value, or null if unset.
	Value ContactCreateResponseFieldValueUnion `json:"value" api:"required"`
	// The data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ValueType   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactCreateResponseField) RawJSON added in v0.4.1

func (r ContactCreateResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContactCreateResponseField) UnmarshalJSON added in v0.4.1

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

type ContactCreateResponseFieldValueArrayItemUnion

type ContactCreateResponseFieldValueArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactCreateResponseFieldValueArrayItemMapItem any `json:",inline"`
	JSON                                              struct {
		OfString                                          respjson.Field
		OfFloat                                           respjson.Field
		OfBool                                            respjson.Field
		OfAnyArray                                        respjson.Field
		OfContactCreateResponseFieldValueArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactCreateResponseFieldValueArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactCreateResponseFieldValueArrayItemMapItem]

func (ContactCreateResponseFieldValueArrayItemUnion) AsAnyArray

func (ContactCreateResponseFieldValueArrayItemUnion) AsAnyMap

func (ContactCreateResponseFieldValueArrayItemUnion) AsBool

func (ContactCreateResponseFieldValueArrayItemUnion) AsFloat

func (ContactCreateResponseFieldValueArrayItemUnion) AsString

func (ContactCreateResponseFieldValueArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactCreateResponseFieldValueArrayItemUnion) UnmarshalJSON

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

type ContactCreateResponseFieldValueMapItemUnion

type ContactCreateResponseFieldValueMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactCreateResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                            struct {
		OfString                                        respjson.Field
		OfFloat                                         respjson.Field
		OfBool                                          respjson.Field
		OfAnyArray                                      respjson.Field
		OfContactCreateResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactCreateResponseFieldValueMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactCreateResponseFieldValueMapItemMapItem]

func (ContactCreateResponseFieldValueMapItemUnion) AsAnyArray

func (u ContactCreateResponseFieldValueMapItemUnion) AsAnyArray() (v []any)

func (ContactCreateResponseFieldValueMapItemUnion) AsAnyMap

func (ContactCreateResponseFieldValueMapItemUnion) AsBool

func (ContactCreateResponseFieldValueMapItemUnion) AsFloat

func (ContactCreateResponseFieldValueMapItemUnion) AsString

func (ContactCreateResponseFieldValueMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactCreateResponseFieldValueMapItemUnion) UnmarshalJSON

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

type ContactCreateResponseFieldValueUnion added in v0.4.1

type ContactCreateResponseFieldValueUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]ContactCreateResponseFieldValueArrayItemUnion] instead of an object.
	OfContactCreateResponseFieldValueArray []ContactCreateResponseFieldValueArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactCreateResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                            struct {
		OfString                                        respjson.Field
		OfFloat                                         respjson.Field
		OfBool                                          respjson.Field
		OfContactCreateResponseFieldValueArray          respjson.Field
		OfAnyArray                                      respjson.Field
		OfContactCreateResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]ContactCreateResponseFieldValueArrayItemUnion], [map[string]ContactCreateResponseFieldValueMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfContactCreateResponseFieldValueArray OfAnyArray OfContactCreateResponseFieldValueMapItemMapItem]

func (ContactCreateResponseFieldValueUnion) AsBool added in v0.4.1

func (ContactCreateResponseFieldValueUnion) AsContactCreateResponseFieldValueArray

func (u ContactCreateResponseFieldValueUnion) AsContactCreateResponseFieldValueArray() (v []ContactCreateResponseFieldValueArrayItemUnion)

func (ContactCreateResponseFieldValueUnion) AsContactCreateResponseFieldValueMapMap

func (u ContactCreateResponseFieldValueUnion) AsContactCreateResponseFieldValueMapMap() (v map[string]ContactCreateResponseFieldValueMapItemUnion)

func (ContactCreateResponseFieldValueUnion) AsFloat added in v0.4.1

func (ContactCreateResponseFieldValueUnion) AsString added in v0.4.1

func (ContactCreateResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactCreateResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type ContactCreateResponseMapItemUnion

type ContactCreateResponseMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactCreateResponseMapItemMapItem any `json:",inline"`
	JSON                                  struct {
		OfString                              respjson.Field
		OfFloat                               respjson.Field
		OfBool                                respjson.Field
		OfAnyArray                            respjson.Field
		OfContactCreateResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactCreateResponseMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactCreateResponseMapItemMapItem]

func (ContactCreateResponseMapItemUnion) AsAnyArray

func (u ContactCreateResponseMapItemUnion) AsAnyArray() (v []any)

func (ContactCreateResponseMapItemUnion) AsAnyMap

func (u ContactCreateResponseMapItemUnion) AsAnyMap() (v map[string]any)

func (ContactCreateResponseMapItemUnion) AsBool

func (u ContactCreateResponseMapItemUnion) AsBool() (v bool)

func (ContactCreateResponseMapItemUnion) AsFloat

func (ContactCreateResponseMapItemUnion) AsString

func (u ContactCreateResponseMapItemUnion) AsString() (v string)

func (ContactCreateResponseMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactCreateResponseMapItemUnion) UnmarshalJSON

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

type ContactCreateResponseRelationship added in v0.4.1

type ContactCreateResponseRelationship struct {
	// Whether the relationship is `has_one` or `has_many`.
	Cardinality string `json:"cardinality" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// IDs of the related entities.
	Values []string `json:"values" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		ObjectType  respjson.Field
		Values      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactCreateResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactCreateResponseRelationship) UnmarshalJSON added in v0.4.1

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

type ContactCreateResponseUnion

type ContactCreateResponseUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]ContactCreateResponseArrayItemUnion] instead of an object.
	OfContactCreateResponseArray []ContactCreateResponseArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactCreateResponseMapItemMapItem any `json:",inline"`
	JSON                                  struct {
		OfString                              respjson.Field
		OfFloat                               respjson.Field
		OfBool                                respjson.Field
		OfContactCreateResponseArray          respjson.Field
		OfAnyArray                            respjson.Field
		OfContactCreateResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactCreateResponseUnion contains all possible properties and values from [string], [float64], [bool], [[]ContactCreateResponseArrayItemUnion], [map[string]ContactCreateResponseMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfContactCreateResponseArray OfAnyArray OfContactCreateResponseMapItemMapItem]

func (ContactCreateResponseUnion) AsBool

func (u ContactCreateResponseUnion) AsBool() (v bool)

func (ContactCreateResponseUnion) AsContactCreateResponseArray

func (u ContactCreateResponseUnion) AsContactCreateResponseArray() (v []ContactCreateResponseArrayItemUnion)

func (ContactCreateResponseUnion) AsContactCreateResponseMapMap

func (u ContactCreateResponseUnion) AsContactCreateResponseMapMap() (v map[string]ContactCreateResponseMapItemUnion)

func (ContactCreateResponseUnion) AsFloat

func (u ContactCreateResponseUnion) AsFloat() (v float64)

func (ContactCreateResponseUnion) AsString

func (u ContactCreateResponseUnion) AsString() (v string)

func (ContactCreateResponseUnion) RawJSON

func (u ContactCreateResponseUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContactCreateResponseUnion) UnmarshalJSON

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

type ContactDefinitionsResponse added in v0.2.0

type ContactDefinitionsResponse struct {
	// Map of field keys to their definitions, including both system and custom fields.
	FieldDefinitions map[string]ContactDefinitionsResponseFieldDefinition `json:"fieldDefinitions" api:"required"`
	// The object type these definitions belong to (e.g. `account`).
	ObjectType string `json:"objectType" api:"required"`
	// Map of relationship keys to their definitions.
	RelationshipDefinitions map[string]ContactDefinitionsResponseRelationshipDefinition `json:"relationshipDefinitions" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FieldDefinitions        respjson.Field
		ObjectType              respjson.Field
		RelationshipDefinitions respjson.Field
		ExtraFields             map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactDefinitionsResponse) RawJSON added in v0.2.0

func (r ContactDefinitionsResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContactDefinitionsResponse) UnmarshalJSON added in v0.2.0

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

type ContactDefinitionsResponseFieldDefinition added in v0.2.0

type ContactDefinitionsResponseFieldDefinition struct {
	// Description of the field, or null.
	Description string `json:"description" api:"required"`
	// Human-readable display name of the field.
	Label string `json:"label" api:"required"`
	// Type-specific configuration (e.g. select options, currency code).
	TypeConfiguration map[string]ContactDefinitionsResponseFieldDefinitionTypeConfigurationUnion `json:"typeConfiguration" api:"required"`
	// Data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// Unique identifier of the field definition.
	ID string `json:"id"`
	// `true` for fields that are not writable via the API (e.g. AI-generated
	// summaries). `false` or absent for writable fields.
	ReadOnly bool `json:"readOnly"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Description       respjson.Field
		Label             respjson.Field
		TypeConfiguration respjson.Field
		ValueType         respjson.Field
		ID                respjson.Field
		ReadOnly          respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactDefinitionsResponseFieldDefinition) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*ContactDefinitionsResponseFieldDefinition) UnmarshalJSON added in v0.2.0

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

type ContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion added in v0.2.0

type ContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemMapItem any `json:",inline"`
	JSON                                                                         struct {
		OfString                                                                     respjson.Field
		OfFloat                                                                      respjson.Field
		OfBool                                                                       respjson.Field
		OfAnyArray                                                                   respjson.Field
		OfContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemMapItem]

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsAnyArray added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsAnyMap added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsBool added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsFloat added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsString added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*ContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) UnmarshalJSON added in v0.2.0

type ContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion added in v0.2.0

type ContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem any `json:",inline"`
	JSON                                                                       struct {
		OfString                                                                   respjson.Field
		OfFloat                                                                    respjson.Field
		OfBool                                                                     respjson.Field
		OfAnyArray                                                                 respjson.Field
		OfContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem]

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsAnyArray added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsAnyMap added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsBool added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsFloat added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsString added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*ContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) UnmarshalJSON added in v0.2.0

type ContactDefinitionsResponseFieldDefinitionTypeConfigurationUnion added in v0.2.0

type ContactDefinitionsResponseFieldDefinitionTypeConfigurationUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]ContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion]
	// instead of an object.
	OfContactDefinitionsResponseFieldDefinitionTypeConfigurationArray []ContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem any `json:",inline"`
	JSON                                                                       struct {
		OfString                                                                   respjson.Field
		OfFloat                                                                    respjson.Field
		OfBool                                                                     respjson.Field
		OfContactDefinitionsResponseFieldDefinitionTypeConfigurationArray          respjson.Field
		OfAnyArray                                                                 respjson.Field
		OfContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactDefinitionsResponseFieldDefinitionTypeConfigurationUnion contains all possible properties and values from [string], [float64], [bool], [[]ContactDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion], [map[string]ContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfContactDefinitionsResponseFieldDefinitionTypeConfigurationArray OfAnyArray OfContactDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem]

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsBool added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsContactDefinitionsResponseFieldDefinitionTypeConfigurationArray added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsContactDefinitionsResponseFieldDefinitionTypeConfigurationMapMap added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsFloat added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsString added in v0.2.0

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationUnion) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*ContactDefinitionsResponseFieldDefinitionTypeConfigurationUnion) UnmarshalJSON added in v0.2.0

type ContactDefinitionsResponseRelationshipDefinition added in v0.2.0

type ContactDefinitionsResponseRelationshipDefinition struct {
	// Whether this is a `has_one` or `has_many` relationship.
	//
	// Any of "HAS_ONE", "HAS_MANY".
	Cardinality string `json:"cardinality" api:"required"`
	// Description of the relationship, or null.
	Description string `json:"description" api:"required"`
	// Human-readable display name of the relationship.
	Label string `json:"label" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// Unique identifier of the relationship definition.
	ID string `json:"id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		Description respjson.Field
		Label       respjson.Field
		ObjectType  respjson.Field
		ID          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactDefinitionsResponseRelationshipDefinition) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*ContactDefinitionsResponseRelationshipDefinition) UnmarshalJSON added in v0.2.0

type ContactListParams

type ContactListParams struct {
	// Maximum number of records to return. Defaults to 25, maximum 25.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Number of records to skip for pagination. Defaults to 0.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ContactListParams) URLQuery

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

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

type ContactListResponse

type ContactListResponse struct {
	// Array of entity objects for the current page.
	Data []ContactListResponseData `json:"data" api:"required"`
	// The object type, always `"list"`.
	Object string `json:"object" api:"required"`
	// Total number of entities matching the query.
	TotalCount int64 `json:"totalCount" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		TotalCount  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactListResponse) RawJSON

func (r ContactListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContactListResponse) UnmarshalJSON

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

type ContactListResponseData

type ContactListResponseData struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the entity was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$email`); custom attributes use their bare slug.
	Fields map[string]ContactListResponseDataField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]ContactListResponseDataRelationship `json:"relationships" api:"required"`
	ExtraFields   map[string]ContactListResponseDataUnion        `json:"" api:"extrafields"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		Relationships respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactListResponseData) RawJSON

func (r ContactListResponseData) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContactListResponseData) UnmarshalJSON

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

type ContactListResponseDataArrayItemUnion

type ContactListResponseDataArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactListResponseDataArrayItemMapItem any `json:",inline"`
	JSON                                      struct {
		OfString                                  respjson.Field
		OfFloat                                   respjson.Field
		OfBool                                    respjson.Field
		OfAnyArray                                respjson.Field
		OfContactListResponseDataArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactListResponseDataArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactListResponseDataArrayItemMapItem]

func (ContactListResponseDataArrayItemUnion) AsAnyArray

func (u ContactListResponseDataArrayItemUnion) AsAnyArray() (v []any)

func (ContactListResponseDataArrayItemUnion) AsAnyMap

func (u ContactListResponseDataArrayItemUnion) AsAnyMap() (v map[string]any)

func (ContactListResponseDataArrayItemUnion) AsBool

func (ContactListResponseDataArrayItemUnion) AsFloat

func (ContactListResponseDataArrayItemUnion) AsString

func (ContactListResponseDataArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactListResponseDataArrayItemUnion) UnmarshalJSON

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

type ContactListResponseDataField

type ContactListResponseDataField struct {
	// The field value, or null if unset.
	Value ContactListResponseDataFieldValueUnion `json:"value" api:"required"`
	// The data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ValueType   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactListResponseDataField) RawJSON

Returns the unmodified JSON received from the API

func (*ContactListResponseDataField) UnmarshalJSON

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

type ContactListResponseDataFieldValueArrayItemUnion

type ContactListResponseDataFieldValueArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactListResponseDataFieldValueArrayItemMapItem any `json:",inline"`
	JSON                                                struct {
		OfString                                            respjson.Field
		OfFloat                                             respjson.Field
		OfBool                                              respjson.Field
		OfAnyArray                                          respjson.Field
		OfContactListResponseDataFieldValueArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactListResponseDataFieldValueArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactListResponseDataFieldValueArrayItemMapItem]

func (ContactListResponseDataFieldValueArrayItemUnion) AsAnyArray

func (ContactListResponseDataFieldValueArrayItemUnion) AsAnyMap

func (ContactListResponseDataFieldValueArrayItemUnion) AsBool

func (ContactListResponseDataFieldValueArrayItemUnion) AsFloat

func (ContactListResponseDataFieldValueArrayItemUnion) AsString

func (ContactListResponseDataFieldValueArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactListResponseDataFieldValueArrayItemUnion) UnmarshalJSON

type ContactListResponseDataFieldValueMapItemUnion

type ContactListResponseDataFieldValueMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactListResponseDataFieldValueMapItemMapItem any `json:",inline"`
	JSON                                              struct {
		OfString                                          respjson.Field
		OfFloat                                           respjson.Field
		OfBool                                            respjson.Field
		OfAnyArray                                        respjson.Field
		OfContactListResponseDataFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactListResponseDataFieldValueMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactListResponseDataFieldValueMapItemMapItem]

func (ContactListResponseDataFieldValueMapItemUnion) AsAnyArray

func (ContactListResponseDataFieldValueMapItemUnion) AsAnyMap

func (ContactListResponseDataFieldValueMapItemUnion) AsBool

func (ContactListResponseDataFieldValueMapItemUnion) AsFloat

func (ContactListResponseDataFieldValueMapItemUnion) AsString

func (ContactListResponseDataFieldValueMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactListResponseDataFieldValueMapItemUnion) UnmarshalJSON

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

type ContactListResponseDataFieldValueUnion

type ContactListResponseDataFieldValueUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]ContactListResponseDataFieldValueArrayItemUnion] instead of an object.
	OfContactListResponseDataFieldValueArray []ContactListResponseDataFieldValueArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactListResponseDataFieldValueMapItemMapItem any `json:",inline"`
	JSON                                              struct {
		OfString                                          respjson.Field
		OfFloat                                           respjson.Field
		OfBool                                            respjson.Field
		OfContactListResponseDataFieldValueArray          respjson.Field
		OfAnyArray                                        respjson.Field
		OfContactListResponseDataFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]ContactListResponseDataFieldValueArrayItemUnion], [map[string]ContactListResponseDataFieldValueMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfContactListResponseDataFieldValueArray OfAnyArray OfContactListResponseDataFieldValueMapItemMapItem]

func (ContactListResponseDataFieldValueUnion) AsBool

func (ContactListResponseDataFieldValueUnion) AsContactListResponseDataFieldValueArray

func (u ContactListResponseDataFieldValueUnion) AsContactListResponseDataFieldValueArray() (v []ContactListResponseDataFieldValueArrayItemUnion)

func (ContactListResponseDataFieldValueUnion) AsContactListResponseDataFieldValueMapMap

func (u ContactListResponseDataFieldValueUnion) AsContactListResponseDataFieldValueMapMap() (v map[string]ContactListResponseDataFieldValueMapItemUnion)

func (ContactListResponseDataFieldValueUnion) AsFloat

func (ContactListResponseDataFieldValueUnion) AsString

func (ContactListResponseDataFieldValueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactListResponseDataFieldValueUnion) UnmarshalJSON

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

type ContactListResponseDataMapItemUnion

type ContactListResponseDataMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactListResponseDataMapItemMapItem any `json:",inline"`
	JSON                                    struct {
		OfString                                respjson.Field
		OfFloat                                 respjson.Field
		OfBool                                  respjson.Field
		OfAnyArray                              respjson.Field
		OfContactListResponseDataMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactListResponseDataMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactListResponseDataMapItemMapItem]

func (ContactListResponseDataMapItemUnion) AsAnyArray

func (u ContactListResponseDataMapItemUnion) AsAnyArray() (v []any)

func (ContactListResponseDataMapItemUnion) AsAnyMap

func (u ContactListResponseDataMapItemUnion) AsAnyMap() (v map[string]any)

func (ContactListResponseDataMapItemUnion) AsBool

func (ContactListResponseDataMapItemUnion) AsFloat

func (ContactListResponseDataMapItemUnion) AsString

func (ContactListResponseDataMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactListResponseDataMapItemUnion) UnmarshalJSON

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

type ContactListResponseDataRelationship

type ContactListResponseDataRelationship struct {
	// Whether the relationship is `has_one` or `has_many`.
	Cardinality string `json:"cardinality" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// IDs of the related entities.
	Values []string `json:"values" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		ObjectType  respjson.Field
		Values      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactListResponseDataRelationship) RawJSON

Returns the unmodified JSON received from the API

func (*ContactListResponseDataRelationship) UnmarshalJSON

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

type ContactListResponseDataUnion

type ContactListResponseDataUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]ContactListResponseDataArrayItemUnion] instead of an object.
	OfContactListResponseDataArray []ContactListResponseDataArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactListResponseDataMapItemMapItem any `json:",inline"`
	JSON                                    struct {
		OfString                                respjson.Field
		OfFloat                                 respjson.Field
		OfBool                                  respjson.Field
		OfContactListResponseDataArray          respjson.Field
		OfAnyArray                              respjson.Field
		OfContactListResponseDataMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactListResponseDataUnion contains all possible properties and values from [string], [float64], [bool], [[]ContactListResponseDataArrayItemUnion], [map[string]ContactListResponseDataMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfContactListResponseDataArray OfAnyArray OfContactListResponseDataMapItemMapItem]

func (ContactListResponseDataUnion) AsBool

func (u ContactListResponseDataUnion) AsBool() (v bool)

func (ContactListResponseDataUnion) AsContactListResponseDataArray

func (u ContactListResponseDataUnion) AsContactListResponseDataArray() (v []ContactListResponseDataArrayItemUnion)

func (ContactListResponseDataUnion) AsContactListResponseDataMapMap

func (u ContactListResponseDataUnion) AsContactListResponseDataMapMap() (v map[string]ContactListResponseDataMapItemUnion)

func (ContactListResponseDataUnion) AsFloat

func (u ContactListResponseDataUnion) AsFloat() (v float64)

func (ContactListResponseDataUnion) AsString

func (u ContactListResponseDataUnion) AsString() (v string)

func (ContactListResponseDataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactListResponseDataUnion) UnmarshalJSON

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

type ContactNewParams

type ContactNewParams struct {
	// Field values for the new contact. System fields use a `$` prefix (e.g. `$email`,
	// `$name`); custom attributes use their bare slug. Note: `$name` is an object
	// `{ firstName, lastName }`, not a plain string. Call the
	// <u>[definitions endpoint](/api/resources/contact/methods/definitions)</u> to
	// discover available fields and their types. See
	// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
	// value type details.
	Fields ContactNewParamsFields `json:"fields,omitzero" api:"required"`
	// Relationships to set on the new contact. System relationships use a `$` prefix
	// (e.g. `$account`); custom relationships use their bare slug. Each value is a
	// single entity ID or an array of IDs. Call the
	// <u>[definitions endpoint](/api/resources/contact/methods/definitions)</u> to
	// list available relationship keys.
	Relationships ContactNewParamsRelationships `json:"relationships,omitzero"`
	// contains filtered or unexported fields
}

func (ContactNewParams) MarshalJSON

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

func (*ContactNewParams) UnmarshalJSON

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

type ContactNewParamsFieldArrayItemUnion

type ContactNewParamsFieldArrayItemUnion struct {
	OfString   param.Opt[string]  `json:",omitzero,inline"`
	OfFloat    param.Opt[float64] `json:",omitzero,inline"`
	OfBool     param.Opt[bool]    `json:",omitzero,inline"`
	OfAnyArray []any              `json:",omitzero,inline"`
	OfAnyMap   map[string]any     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContactNewParamsFieldArrayItemUnion) MarshalJSON

func (u ContactNewParamsFieldArrayItemUnion) MarshalJSON() ([]byte, error)

func (*ContactNewParamsFieldArrayItemUnion) UnmarshalJSON

func (u *ContactNewParamsFieldArrayItemUnion) UnmarshalJSON(data []byte) error

type ContactNewParamsFieldMapItemUnion

type ContactNewParamsFieldMapItemUnion struct {
	OfString   param.Opt[string]  `json:",omitzero,inline"`
	OfFloat    param.Opt[float64] `json:",omitzero,inline"`
	OfBool     param.Opt[bool]    `json:",omitzero,inline"`
	OfAnyArray []any              `json:",omitzero,inline"`
	OfAnyMap   map[string]any     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContactNewParamsFieldMapItemUnion) MarshalJSON

func (u ContactNewParamsFieldMapItemUnion) MarshalJSON() ([]byte, error)

func (*ContactNewParamsFieldMapItemUnion) UnmarshalJSON

func (u *ContactNewParamsFieldMapItemUnion) UnmarshalJSON(data []byte) error

type ContactNewParamsFieldUnion

type ContactNewParamsFieldUnion struct {
	OfString                 param.Opt[string]                            `json:",omitzero,inline"`
	OfFloat                  param.Opt[float64]                           `json:",omitzero,inline"`
	OfBool                   param.Opt[bool]                              `json:",omitzero,inline"`
	OfContactNewsFieldArray  []ContactNewParamsFieldArrayItemUnion        `json:",omitzero,inline"`
	OfContactNewsFieldMapMap map[string]ContactNewParamsFieldMapItemUnion `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContactNewParamsFieldUnion) MarshalJSON

func (u ContactNewParamsFieldUnion) MarshalJSON() ([]byte, error)

func (*ContactNewParamsFieldUnion) UnmarshalJSON

func (u *ContactNewParamsFieldUnion) UnmarshalJSON(data []byte) error

type ContactNewParamsFields

type ContactNewParamsFields struct {
	// URL of the contact's profile photo (`URL`).
	ProfilePhotoURL param.Opt[string] `json:"$profilePhotoUrl,omitzero"`
	// List of email addresses for the contact (`EMAIL`, multi-value).
	Email []string `json:"$email,omitzero"`
	// The contact's name. Unlike other resources, this is an object:
	// `{ firstName?: string, lastName?: string }`, not a plain string.
	Name        ContactNewParamsFieldsName            `json:"$name,omitzero"`
	ExtraFields map[string]ContactNewParamsFieldUnion `json:"-"`
	// contains filtered or unexported fields
}

Field values for the new contact. System fields use a `$` prefix (e.g. `$email`, `$name`); custom attributes use their bare slug. Note: `$name` is an object `{ firstName, lastName }`, not a plain string. Call the <u>[definitions endpoint](/api/resources/contact/methods/definitions)</u> to discover available fields and their types. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for value type details.

func (ContactNewParamsFields) MarshalJSON

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

func (*ContactNewParamsFields) UnmarshalJSON

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

type ContactNewParamsFieldsName added in v0.2.0

type ContactNewParamsFieldsName struct {
	// The contact's first name.
	FirstName param.Opt[string] `json:"firstName,omitzero"`
	// The contact's last name.
	LastName param.Opt[string] `json:"lastName,omitzero"`
	// contains filtered or unexported fields
}

The contact's name. Unlike other resources, this is an object: `{ firstName?: string, lastName?: string }`, not a plain string.

func (ContactNewParamsFieldsName) MarshalJSON added in v0.2.0

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

func (*ContactNewParamsFieldsName) UnmarshalJSON added in v0.2.0

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

type ContactNewParamsRelationshipUnion

type ContactNewParamsRelationshipUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContactNewParamsRelationshipUnion) MarshalJSON

func (u ContactNewParamsRelationshipUnion) MarshalJSON() ([]byte, error)

func (*ContactNewParamsRelationshipUnion) UnmarshalJSON

func (u *ContactNewParamsRelationshipUnion) UnmarshalJSON(data []byte) error

type ContactNewParamsRelationships

type ContactNewParamsRelationships struct {
	// ID(s) of accounts to associate with this contact.
	Account     ContactNewParamsRelationshipsAccountUnion    `json:"$account,omitzero"`
	ExtraFields map[string]ContactNewParamsRelationshipUnion `json:"-"`
	// contains filtered or unexported fields
}

Relationships to set on the new contact. System relationships use a `$` prefix (e.g. `$account`); custom relationships use their bare slug. Each value is a single entity ID or an array of IDs. Call the <u>[definitions endpoint](/api/resources/contact/methods/definitions)</u> to list available relationship keys.

func (ContactNewParamsRelationships) MarshalJSON

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

func (*ContactNewParamsRelationships) UnmarshalJSON

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

type ContactNewParamsRelationshipsAccountUnion

type ContactNewParamsRelationshipsAccountUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContactNewParamsRelationshipsAccountUnion) MarshalJSON

func (*ContactNewParamsRelationshipsAccountUnion) UnmarshalJSON

func (u *ContactNewParamsRelationshipsAccountUnion) UnmarshalJSON(data []byte) error

type ContactRetrieveResponse added in v0.4.1

type ContactRetrieveResponse struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the entity was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$email`); custom attributes use their bare slug.
	Fields map[string]ContactRetrieveResponseField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]ContactRetrieveResponseRelationship `json:"relationships" api:"required"`
	ExtraFields   map[string]ContactRetrieveResponseUnion        `json:"" api:"extrafields"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		Relationships respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactRetrieveResponse) RawJSON added in v0.4.1

func (r ContactRetrieveResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContactRetrieveResponse) UnmarshalJSON added in v0.4.1

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

type ContactRetrieveResponseArrayItemUnion

type ContactRetrieveResponseArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactRetrieveResponseArrayItemMapItem any `json:",inline"`
	JSON                                      struct {
		OfString                                  respjson.Field
		OfFloat                                   respjson.Field
		OfBool                                    respjson.Field
		OfAnyArray                                respjson.Field
		OfContactRetrieveResponseArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactRetrieveResponseArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactRetrieveResponseArrayItemMapItem]

func (ContactRetrieveResponseArrayItemUnion) AsAnyArray

func (u ContactRetrieveResponseArrayItemUnion) AsAnyArray() (v []any)

func (ContactRetrieveResponseArrayItemUnion) AsAnyMap

func (u ContactRetrieveResponseArrayItemUnion) AsAnyMap() (v map[string]any)

func (ContactRetrieveResponseArrayItemUnion) AsBool

func (ContactRetrieveResponseArrayItemUnion) AsFloat

func (ContactRetrieveResponseArrayItemUnion) AsString

func (ContactRetrieveResponseArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactRetrieveResponseArrayItemUnion) UnmarshalJSON

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

type ContactRetrieveResponseField added in v0.4.1

type ContactRetrieveResponseField struct {
	// The field value, or null if unset.
	Value ContactRetrieveResponseFieldValueUnion `json:"value" api:"required"`
	// The data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ValueType   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactRetrieveResponseField) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactRetrieveResponseField) UnmarshalJSON added in v0.4.1

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

type ContactRetrieveResponseFieldValueArrayItemUnion

type ContactRetrieveResponseFieldValueArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactRetrieveResponseFieldValueArrayItemMapItem any `json:",inline"`
	JSON                                                struct {
		OfString                                            respjson.Field
		OfFloat                                             respjson.Field
		OfBool                                              respjson.Field
		OfAnyArray                                          respjson.Field
		OfContactRetrieveResponseFieldValueArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactRetrieveResponseFieldValueArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactRetrieveResponseFieldValueArrayItemMapItem]

func (ContactRetrieveResponseFieldValueArrayItemUnion) AsAnyArray

func (ContactRetrieveResponseFieldValueArrayItemUnion) AsAnyMap

func (ContactRetrieveResponseFieldValueArrayItemUnion) AsBool

func (ContactRetrieveResponseFieldValueArrayItemUnion) AsFloat

func (ContactRetrieveResponseFieldValueArrayItemUnion) AsString

func (ContactRetrieveResponseFieldValueArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactRetrieveResponseFieldValueArrayItemUnion) UnmarshalJSON

type ContactRetrieveResponseFieldValueMapItemUnion

type ContactRetrieveResponseFieldValueMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactRetrieveResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                              struct {
		OfString                                          respjson.Field
		OfFloat                                           respjson.Field
		OfBool                                            respjson.Field
		OfAnyArray                                        respjson.Field
		OfContactRetrieveResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactRetrieveResponseFieldValueMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactRetrieveResponseFieldValueMapItemMapItem]

func (ContactRetrieveResponseFieldValueMapItemUnion) AsAnyArray

func (ContactRetrieveResponseFieldValueMapItemUnion) AsAnyMap

func (ContactRetrieveResponseFieldValueMapItemUnion) AsBool

func (ContactRetrieveResponseFieldValueMapItemUnion) AsFloat

func (ContactRetrieveResponseFieldValueMapItemUnion) AsString

func (ContactRetrieveResponseFieldValueMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactRetrieveResponseFieldValueMapItemUnion) UnmarshalJSON

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

type ContactRetrieveResponseFieldValueUnion added in v0.4.1

type ContactRetrieveResponseFieldValueUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]ContactRetrieveResponseFieldValueArrayItemUnion] instead of an object.
	OfContactRetrieveResponseFieldValueArray []ContactRetrieveResponseFieldValueArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactRetrieveResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                              struct {
		OfString                                          respjson.Field
		OfFloat                                           respjson.Field
		OfBool                                            respjson.Field
		OfContactRetrieveResponseFieldValueArray          respjson.Field
		OfAnyArray                                        respjson.Field
		OfContactRetrieveResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]ContactRetrieveResponseFieldValueArrayItemUnion], [map[string]ContactRetrieveResponseFieldValueMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfContactRetrieveResponseFieldValueArray OfAnyArray OfContactRetrieveResponseFieldValueMapItemMapItem]

func (ContactRetrieveResponseFieldValueUnion) AsBool added in v0.4.1

func (ContactRetrieveResponseFieldValueUnion) AsContactRetrieveResponseFieldValueArray

func (u ContactRetrieveResponseFieldValueUnion) AsContactRetrieveResponseFieldValueArray() (v []ContactRetrieveResponseFieldValueArrayItemUnion)

func (ContactRetrieveResponseFieldValueUnion) AsContactRetrieveResponseFieldValueMapMap

func (u ContactRetrieveResponseFieldValueUnion) AsContactRetrieveResponseFieldValueMapMap() (v map[string]ContactRetrieveResponseFieldValueMapItemUnion)

func (ContactRetrieveResponseFieldValueUnion) AsFloat added in v0.4.1

func (ContactRetrieveResponseFieldValueUnion) AsString added in v0.4.1

func (ContactRetrieveResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactRetrieveResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type ContactRetrieveResponseMapItemUnion

type ContactRetrieveResponseMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactRetrieveResponseMapItemMapItem any `json:",inline"`
	JSON                                    struct {
		OfString                                respjson.Field
		OfFloat                                 respjson.Field
		OfBool                                  respjson.Field
		OfAnyArray                              respjson.Field
		OfContactRetrieveResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactRetrieveResponseMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactRetrieveResponseMapItemMapItem]

func (ContactRetrieveResponseMapItemUnion) AsAnyArray

func (u ContactRetrieveResponseMapItemUnion) AsAnyArray() (v []any)

func (ContactRetrieveResponseMapItemUnion) AsAnyMap

func (u ContactRetrieveResponseMapItemUnion) AsAnyMap() (v map[string]any)

func (ContactRetrieveResponseMapItemUnion) AsBool

func (ContactRetrieveResponseMapItemUnion) AsFloat

func (ContactRetrieveResponseMapItemUnion) AsString

func (ContactRetrieveResponseMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactRetrieveResponseMapItemUnion) UnmarshalJSON

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

type ContactRetrieveResponseRelationship added in v0.4.1

type ContactRetrieveResponseRelationship struct {
	// Whether the relationship is `has_one` or `has_many`.
	Cardinality string `json:"cardinality" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// IDs of the related entities.
	Values []string `json:"values" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		ObjectType  respjson.Field
		Values      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactRetrieveResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactRetrieveResponseRelationship) UnmarshalJSON added in v0.4.1

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

type ContactRetrieveResponseUnion

type ContactRetrieveResponseUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]ContactRetrieveResponseArrayItemUnion] instead of an object.
	OfContactRetrieveResponseArray []ContactRetrieveResponseArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactRetrieveResponseMapItemMapItem any `json:",inline"`
	JSON                                    struct {
		OfString                                respjson.Field
		OfFloat                                 respjson.Field
		OfBool                                  respjson.Field
		OfContactRetrieveResponseArray          respjson.Field
		OfAnyArray                              respjson.Field
		OfContactRetrieveResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactRetrieveResponseUnion contains all possible properties and values from [string], [float64], [bool], [[]ContactRetrieveResponseArrayItemUnion], [map[string]ContactRetrieveResponseMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfContactRetrieveResponseArray OfAnyArray OfContactRetrieveResponseMapItemMapItem]

func (ContactRetrieveResponseUnion) AsBool

func (u ContactRetrieveResponseUnion) AsBool() (v bool)

func (ContactRetrieveResponseUnion) AsContactRetrieveResponseArray

func (u ContactRetrieveResponseUnion) AsContactRetrieveResponseArray() (v []ContactRetrieveResponseArrayItemUnion)

func (ContactRetrieveResponseUnion) AsContactRetrieveResponseMapMap

func (u ContactRetrieveResponseUnion) AsContactRetrieveResponseMapMap() (v map[string]ContactRetrieveResponseMapItemUnion)

func (ContactRetrieveResponseUnion) AsFloat

func (u ContactRetrieveResponseUnion) AsFloat() (v float64)

func (ContactRetrieveResponseUnion) AsString

func (u ContactRetrieveResponseUnion) AsString() (v string)

func (ContactRetrieveResponseUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactRetrieveResponseUnion) UnmarshalJSON

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

type ContactService

type ContactService struct {
	Options []option.RequestOption
}

Contacts represent individual people in Lightfield. Contacts can be associated with one or more accounts.

ContactService contains methods and other services that help with interacting with the Lightfield 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 NewContactService method instead.

func NewContactService

func NewContactService(opts ...option.RequestOption) (r ContactService)

NewContactService 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 (*ContactService) Definitions added in v0.2.0

func (r *ContactService) Definitions(ctx context.Context, opts ...option.RequestOption) (res *ContactDefinitionsResponse, err error)

Returns the schema for all field and relationship definitions available on contacts, including both system-defined and custom fields. Useful for understanding the shape of contact data before creating or updating records. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for more details.

**[Required scope](/using-the-api/scopes/):** `contacts:read`

**[Rate limit category](/using-the-api/rate-limits/):** Read

func (*ContactService) Get

Retrieves a single contact by its ID.

**[Required scope](/using-the-api/scopes/):** `contacts:read`

**[Rate limit category](/using-the-api/rate-limits/):** Read

func (*ContactService) List

Returns a paginated list of contacts. Use `offset` and `limit` to paginate through results. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.

**[Required scope](/using-the-api/scopes/):** `contacts:read`

**[Rate limit category](/using-the-api/rate-limits/):** Search

func (*ContactService) New

Creates a new contact record.

After creation, Lightfield automatically enriches the contact in the background.

Supports idempotency via the `Idempotency-Key` header.

**[Required scope](/using-the-api/scopes/):** `contacts:create`

**[Rate limit category](/using-the-api/rate-limits/):** Write

func (*ContactService) Update

Updates an existing contact by ID. Only included fields and relationships are modified.

Supports idempotency via the `Idempotency-Key` header.

**[Required scope](/using-the-api/scopes/):** `contacts:update`

**[Rate limit category](/using-the-api/rate-limits/):** Write

type ContactUpdateParams

type ContactUpdateParams struct {
	// Field values to update — only provided fields are modified; omitted fields are
	// left unchanged. System fields use a `$` prefix (e.g. `$email`); custom
	// attributes use their bare slug. Note: `$name` is an object
	// `{ firstName, lastName }`, not a plain string. Call the
	// <u>[definitions endpoint](/api/resources/contact/methods/definitions)</u> for
	// available fields and types. See
	// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
	// value type details.
	Fields ContactUpdateParamsFields `json:"fields,omitzero"`
	// Relationship operations to apply. System relationships use a `$` prefix (e.g.
	// `$account`). Each value is an operation object with `add`, `remove`, or
	// `replace`.
	Relationships ContactUpdateParamsRelationships `json:"relationships,omitzero"`
	// contains filtered or unexported fields
}

func (ContactUpdateParams) MarshalJSON

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

func (*ContactUpdateParams) UnmarshalJSON

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

type ContactUpdateParamsFieldArrayItemUnion

type ContactUpdateParamsFieldArrayItemUnion struct {
	OfString   param.Opt[string]  `json:",omitzero,inline"`
	OfFloat    param.Opt[float64] `json:",omitzero,inline"`
	OfBool     param.Opt[bool]    `json:",omitzero,inline"`
	OfAnyArray []any              `json:",omitzero,inline"`
	OfAnyMap   map[string]any     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContactUpdateParamsFieldArrayItemUnion) MarshalJSON

func (u ContactUpdateParamsFieldArrayItemUnion) MarshalJSON() ([]byte, error)

func (*ContactUpdateParamsFieldArrayItemUnion) UnmarshalJSON

func (u *ContactUpdateParamsFieldArrayItemUnion) UnmarshalJSON(data []byte) error

type ContactUpdateParamsFieldMapItemUnion

type ContactUpdateParamsFieldMapItemUnion struct {
	OfString   param.Opt[string]  `json:",omitzero,inline"`
	OfFloat    param.Opt[float64] `json:",omitzero,inline"`
	OfBool     param.Opt[bool]    `json:",omitzero,inline"`
	OfAnyArray []any              `json:",omitzero,inline"`
	OfAnyMap   map[string]any     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContactUpdateParamsFieldMapItemUnion) MarshalJSON

func (u ContactUpdateParamsFieldMapItemUnion) MarshalJSON() ([]byte, error)

func (*ContactUpdateParamsFieldMapItemUnion) UnmarshalJSON

func (u *ContactUpdateParamsFieldMapItemUnion) UnmarshalJSON(data []byte) error

type ContactUpdateParamsFieldUnion

type ContactUpdateParamsFieldUnion struct {
	OfString                    param.Opt[string]                               `json:",omitzero,inline"`
	OfFloat                     param.Opt[float64]                              `json:",omitzero,inline"`
	OfBool                      param.Opt[bool]                                 `json:",omitzero,inline"`
	OfContactUpdatesFieldArray  []ContactUpdateParamsFieldArrayItemUnion        `json:",omitzero,inline"`
	OfContactUpdatesFieldMapMap map[string]ContactUpdateParamsFieldMapItemUnion `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContactUpdateParamsFieldUnion) MarshalJSON

func (u ContactUpdateParamsFieldUnion) MarshalJSON() ([]byte, error)

func (*ContactUpdateParamsFieldUnion) UnmarshalJSON

func (u *ContactUpdateParamsFieldUnion) UnmarshalJSON(data []byte) error

type ContactUpdateParamsFields

type ContactUpdateParamsFields struct {
	// URL of the contact's profile photo (`URL`).
	ProfilePhotoURL param.Opt[string] `json:"$profilePhotoUrl,omitzero"`
	// List of email addresses for the contact (`EMAIL`, multi-value).
	Email []string `json:"$email,omitzero"`
	// The contact's name. Unlike other resources, this is an object:
	// `{ firstName?: string, lastName?: string }`, not a plain string.
	Name        ContactUpdateParamsFieldsName            `json:"$name,omitzero"`
	ExtraFields map[string]ContactUpdateParamsFieldUnion `json:"-"`
	// contains filtered or unexported fields
}

Field values to update — only provided fields are modified; omitted fields are left unchanged. System fields use a `$` prefix (e.g. `$email`); custom attributes use their bare slug. Note: `$name` is an object `{ firstName, lastName }`, not a plain string. Call the <u>[definitions endpoint](/api/resources/contact/methods/definitions)</u> for available fields and types. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for value type details.

func (ContactUpdateParamsFields) MarshalJSON

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

func (*ContactUpdateParamsFields) UnmarshalJSON

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

type ContactUpdateParamsFieldsName added in v0.2.0

type ContactUpdateParamsFieldsName struct {
	// The contact's first name.
	FirstName param.Opt[string] `json:"firstName,omitzero"`
	// The contact's last name.
	LastName param.Opt[string] `json:"lastName,omitzero"`
	// contains filtered or unexported fields
}

The contact's name. Unlike other resources, this is an object: `{ firstName?: string, lastName?: string }`, not a plain string.

func (ContactUpdateParamsFieldsName) MarshalJSON added in v0.2.0

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

func (*ContactUpdateParamsFieldsName) UnmarshalJSON added in v0.2.0

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

type ContactUpdateParamsRelationship

type ContactUpdateParamsRelationship struct {
	// Entity ID(s) to add to the relationship.
	Add ContactUpdateParamsRelationshipAddUnion `json:"add,omitzero"`
	// Entity ID(s) to remove from the relationship.
	Remove ContactUpdateParamsRelationshipRemoveUnion `json:"remove,omitzero"`
	// Entity ID(s) to set as the entire relationship, replacing all existing
	// associations.
	Replace ContactUpdateParamsRelationshipReplaceUnion `json:"replace,omitzero"`
	// contains filtered or unexported fields
}

An operation to modify a relationship. Provide one of `add`, `remove`, or `replace`.

func (ContactUpdateParamsRelationship) MarshalJSON

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

func (*ContactUpdateParamsRelationship) UnmarshalJSON

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

type ContactUpdateParamsRelationshipAddUnion

type ContactUpdateParamsRelationshipAddUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContactUpdateParamsRelationshipAddUnion) MarshalJSON

func (u ContactUpdateParamsRelationshipAddUnion) MarshalJSON() ([]byte, error)

func (*ContactUpdateParamsRelationshipAddUnion) UnmarshalJSON

func (u *ContactUpdateParamsRelationshipAddUnion) UnmarshalJSON(data []byte) error

type ContactUpdateParamsRelationshipRemoveUnion

type ContactUpdateParamsRelationshipRemoveUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContactUpdateParamsRelationshipRemoveUnion) MarshalJSON

func (*ContactUpdateParamsRelationshipRemoveUnion) UnmarshalJSON

func (u *ContactUpdateParamsRelationshipRemoveUnion) UnmarshalJSON(data []byte) error

type ContactUpdateParamsRelationshipReplaceUnion

type ContactUpdateParamsRelationshipReplaceUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContactUpdateParamsRelationshipReplaceUnion) MarshalJSON

func (*ContactUpdateParamsRelationshipReplaceUnion) UnmarshalJSON

func (u *ContactUpdateParamsRelationshipReplaceUnion) UnmarshalJSON(data []byte) error

type ContactUpdateParamsRelationships

type ContactUpdateParamsRelationships struct {
	// Operation to modify associated accounts.
	Account     ContactUpdateParamsRelationshipsAccount    `json:"$account,omitzero"`
	ExtraFields map[string]ContactUpdateParamsRelationship `json:"-"`
	// contains filtered or unexported fields
}

Relationship operations to apply. System relationships use a `$` prefix (e.g. `$account`). Each value is an operation object with `add`, `remove`, or `replace`.

func (ContactUpdateParamsRelationships) MarshalJSON

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

func (*ContactUpdateParamsRelationships) UnmarshalJSON

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

type ContactUpdateParamsRelationshipsAccount

type ContactUpdateParamsRelationshipsAccount struct {
	// Entity ID(s) to add to the relationship.
	Add ContactUpdateParamsRelationshipsAccountAddUnion `json:"add,omitzero"`
	// Entity ID(s) to remove from the relationship.
	Remove ContactUpdateParamsRelationshipsAccountRemoveUnion `json:"remove,omitzero"`
	// Entity ID(s) to set as the entire relationship, replacing all existing
	// associations.
	Replace ContactUpdateParamsRelationshipsAccountReplaceUnion `json:"replace,omitzero"`
	// contains filtered or unexported fields
}

Operation to modify associated accounts.

func (ContactUpdateParamsRelationshipsAccount) MarshalJSON

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

func (*ContactUpdateParamsRelationshipsAccount) UnmarshalJSON

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

type ContactUpdateParamsRelationshipsAccountAddUnion

type ContactUpdateParamsRelationshipsAccountAddUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContactUpdateParamsRelationshipsAccountAddUnion) MarshalJSON

func (*ContactUpdateParamsRelationshipsAccountAddUnion) UnmarshalJSON

type ContactUpdateParamsRelationshipsAccountRemoveUnion

type ContactUpdateParamsRelationshipsAccountRemoveUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContactUpdateParamsRelationshipsAccountRemoveUnion) MarshalJSON

func (*ContactUpdateParamsRelationshipsAccountRemoveUnion) UnmarshalJSON

type ContactUpdateParamsRelationshipsAccountReplaceUnion

type ContactUpdateParamsRelationshipsAccountReplaceUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContactUpdateParamsRelationshipsAccountReplaceUnion) MarshalJSON

func (*ContactUpdateParamsRelationshipsAccountReplaceUnion) UnmarshalJSON

type ContactUpdateResponse

type ContactUpdateResponse struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the entity was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$email`); custom attributes use their bare slug.
	Fields map[string]ContactUpdateResponseField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]ContactUpdateResponseRelationship `json:"relationships" api:"required"`
	ExtraFields   map[string]ContactUpdateResponseUnion        `json:"" api:"extrafields"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		Relationships respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactUpdateResponse) RawJSON

func (r ContactUpdateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContactUpdateResponse) UnmarshalJSON

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

type ContactUpdateResponseArrayItemUnion

type ContactUpdateResponseArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactUpdateResponseArrayItemMapItem any `json:",inline"`
	JSON                                    struct {
		OfString                                respjson.Field
		OfFloat                                 respjson.Field
		OfBool                                  respjson.Field
		OfAnyArray                              respjson.Field
		OfContactUpdateResponseArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactUpdateResponseArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactUpdateResponseArrayItemMapItem]

func (ContactUpdateResponseArrayItemUnion) AsAnyArray

func (u ContactUpdateResponseArrayItemUnion) AsAnyArray() (v []any)

func (ContactUpdateResponseArrayItemUnion) AsAnyMap

func (u ContactUpdateResponseArrayItemUnion) AsAnyMap() (v map[string]any)

func (ContactUpdateResponseArrayItemUnion) AsBool

func (ContactUpdateResponseArrayItemUnion) AsFloat

func (ContactUpdateResponseArrayItemUnion) AsString

func (ContactUpdateResponseArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactUpdateResponseArrayItemUnion) UnmarshalJSON

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

type ContactUpdateResponseField

type ContactUpdateResponseField struct {
	// The field value, or null if unset.
	Value ContactUpdateResponseFieldValueUnion `json:"value" api:"required"`
	// The data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ValueType   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactUpdateResponseField) RawJSON

func (r ContactUpdateResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContactUpdateResponseField) UnmarshalJSON

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

type ContactUpdateResponseFieldValueArrayItemUnion

type ContactUpdateResponseFieldValueArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactUpdateResponseFieldValueArrayItemMapItem any `json:",inline"`
	JSON                                              struct {
		OfString                                          respjson.Field
		OfFloat                                           respjson.Field
		OfBool                                            respjson.Field
		OfAnyArray                                        respjson.Field
		OfContactUpdateResponseFieldValueArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactUpdateResponseFieldValueArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactUpdateResponseFieldValueArrayItemMapItem]

func (ContactUpdateResponseFieldValueArrayItemUnion) AsAnyArray

func (ContactUpdateResponseFieldValueArrayItemUnion) AsAnyMap

func (ContactUpdateResponseFieldValueArrayItemUnion) AsBool

func (ContactUpdateResponseFieldValueArrayItemUnion) AsFloat

func (ContactUpdateResponseFieldValueArrayItemUnion) AsString

func (ContactUpdateResponseFieldValueArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactUpdateResponseFieldValueArrayItemUnion) UnmarshalJSON

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

type ContactUpdateResponseFieldValueMapItemUnion

type ContactUpdateResponseFieldValueMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactUpdateResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                            struct {
		OfString                                        respjson.Field
		OfFloat                                         respjson.Field
		OfBool                                          respjson.Field
		OfAnyArray                                      respjson.Field
		OfContactUpdateResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactUpdateResponseFieldValueMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactUpdateResponseFieldValueMapItemMapItem]

func (ContactUpdateResponseFieldValueMapItemUnion) AsAnyArray

func (u ContactUpdateResponseFieldValueMapItemUnion) AsAnyArray() (v []any)

func (ContactUpdateResponseFieldValueMapItemUnion) AsAnyMap

func (ContactUpdateResponseFieldValueMapItemUnion) AsBool

func (ContactUpdateResponseFieldValueMapItemUnion) AsFloat

func (ContactUpdateResponseFieldValueMapItemUnion) AsString

func (ContactUpdateResponseFieldValueMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactUpdateResponseFieldValueMapItemUnion) UnmarshalJSON

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

type ContactUpdateResponseFieldValueUnion

type ContactUpdateResponseFieldValueUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]ContactUpdateResponseFieldValueArrayItemUnion] instead of an object.
	OfContactUpdateResponseFieldValueArray []ContactUpdateResponseFieldValueArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactUpdateResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                            struct {
		OfString                                        respjson.Field
		OfFloat                                         respjson.Field
		OfBool                                          respjson.Field
		OfContactUpdateResponseFieldValueArray          respjson.Field
		OfAnyArray                                      respjson.Field
		OfContactUpdateResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]ContactUpdateResponseFieldValueArrayItemUnion], [map[string]ContactUpdateResponseFieldValueMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfContactUpdateResponseFieldValueArray OfAnyArray OfContactUpdateResponseFieldValueMapItemMapItem]

func (ContactUpdateResponseFieldValueUnion) AsBool

func (ContactUpdateResponseFieldValueUnion) AsContactUpdateResponseFieldValueArray

func (u ContactUpdateResponseFieldValueUnion) AsContactUpdateResponseFieldValueArray() (v []ContactUpdateResponseFieldValueArrayItemUnion)

func (ContactUpdateResponseFieldValueUnion) AsContactUpdateResponseFieldValueMapMap

func (u ContactUpdateResponseFieldValueUnion) AsContactUpdateResponseFieldValueMapMap() (v map[string]ContactUpdateResponseFieldValueMapItemUnion)

func (ContactUpdateResponseFieldValueUnion) AsFloat

func (ContactUpdateResponseFieldValueUnion) AsString

func (ContactUpdateResponseFieldValueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactUpdateResponseFieldValueUnion) UnmarshalJSON

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

type ContactUpdateResponseMapItemUnion

type ContactUpdateResponseMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactUpdateResponseMapItemMapItem any `json:",inline"`
	JSON                                  struct {
		OfString                              respjson.Field
		OfFloat                               respjson.Field
		OfBool                                respjson.Field
		OfAnyArray                            respjson.Field
		OfContactUpdateResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactUpdateResponseMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfContactUpdateResponseMapItemMapItem]

func (ContactUpdateResponseMapItemUnion) AsAnyArray

func (u ContactUpdateResponseMapItemUnion) AsAnyArray() (v []any)

func (ContactUpdateResponseMapItemUnion) AsAnyMap

func (u ContactUpdateResponseMapItemUnion) AsAnyMap() (v map[string]any)

func (ContactUpdateResponseMapItemUnion) AsBool

func (u ContactUpdateResponseMapItemUnion) AsBool() (v bool)

func (ContactUpdateResponseMapItemUnion) AsFloat

func (ContactUpdateResponseMapItemUnion) AsString

func (u ContactUpdateResponseMapItemUnion) AsString() (v string)

func (ContactUpdateResponseMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactUpdateResponseMapItemUnion) UnmarshalJSON

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

type ContactUpdateResponseRelationship

type ContactUpdateResponseRelationship struct {
	// Whether the relationship is `has_one` or `has_many`.
	Cardinality string `json:"cardinality" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// IDs of the related entities.
	Values []string `json:"values" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		ObjectType  respjson.Field
		Values      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactUpdateResponseRelationship) RawJSON

Returns the unmodified JSON received from the API

func (*ContactUpdateResponseRelationship) UnmarshalJSON

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

type ContactUpdateResponseUnion

type ContactUpdateResponseUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]ContactUpdateResponseArrayItemUnion] instead of an object.
	OfContactUpdateResponseArray []ContactUpdateResponseArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfContactUpdateResponseMapItemMapItem any `json:",inline"`
	JSON                                  struct {
		OfString                              respjson.Field
		OfFloat                               respjson.Field
		OfBool                                respjson.Field
		OfContactUpdateResponseArray          respjson.Field
		OfAnyArray                            respjson.Field
		OfContactUpdateResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactUpdateResponseUnion contains all possible properties and values from [string], [float64], [bool], [[]ContactUpdateResponseArrayItemUnion], [map[string]ContactUpdateResponseMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfContactUpdateResponseArray OfAnyArray OfContactUpdateResponseMapItemMapItem]

func (ContactUpdateResponseUnion) AsBool

func (u ContactUpdateResponseUnion) AsBool() (v bool)

func (ContactUpdateResponseUnion) AsContactUpdateResponseArray

func (u ContactUpdateResponseUnion) AsContactUpdateResponseArray() (v []ContactUpdateResponseArrayItemUnion)

func (ContactUpdateResponseUnion) AsContactUpdateResponseMapMap

func (u ContactUpdateResponseUnion) AsContactUpdateResponseMapMap() (v map[string]ContactUpdateResponseMapItemUnion)

func (ContactUpdateResponseUnion) AsFloat

func (u ContactUpdateResponseUnion) AsFloat() (v float64)

func (ContactUpdateResponseUnion) AsString

func (u ContactUpdateResponseUnion) AsString() (v string)

func (ContactUpdateResponseUnion) RawJSON

func (u ContactUpdateResponseUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContactUpdateResponseUnion) UnmarshalJSON

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

type Error

type Error = apierror.Error

type MemberListParams added in v0.4.1

type MemberListParams struct {
	// Maximum number of records to return. Defaults to 25, maximum 25.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Number of records to skip for pagination. Defaults to 0.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MemberListParams) URLQuery added in v0.4.1

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

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

type MemberListResponse added in v0.4.1

type MemberListResponse struct {
	// Array of member objects for the current page.
	Data []MemberListResponseData `json:"data" api:"required"`
	// The object type, always `"list"`.
	Object string `json:"object" api:"required"`
	// Total number of members in the workspace.
	TotalCount int64 `json:"totalCount" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		TotalCount  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MemberListResponse) RawJSON added in v0.4.1

func (r MemberListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MemberListResponse) UnmarshalJSON added in v0.4.1

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

type MemberListResponseData added in v0.4.1

type MemberListResponseData struct {
	// Unique identifier for the member.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the member was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values.
	Fields map[string]MemberListResponseDataField `json:"fields" api:"required"`
	// URL to view the member in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Fields      respjson.Field
		HTTPLink    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MemberListResponseData) RawJSON added in v0.4.1

func (r MemberListResponseData) RawJSON() string

Returns the unmodified JSON received from the API

func (*MemberListResponseData) UnmarshalJSON added in v0.4.1

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

type MemberListResponseDataField

type MemberListResponseDataField struct {
	// The field value, or null if unset.
	Value MemberListResponseDataFieldValueUnion `json:"value" api:"required"`
	// The data type of the field value.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ValueType   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MemberListResponseDataField) RawJSON

func (r MemberListResponseDataField) RawJSON() string

Returns the unmodified JSON received from the API

func (*MemberListResponseDataField) UnmarshalJSON

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

type MemberListResponseDataFieldValueArrayItemUnion

type MemberListResponseDataFieldValueArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfMemberListResponseDataFieldValueArrayItemMapItem any `json:",inline"`
	JSON                                               struct {
		OfString                                           respjson.Field
		OfFloat                                            respjson.Field
		OfBool                                             respjson.Field
		OfAnyArray                                         respjson.Field
		OfMemberListResponseDataFieldValueArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MemberListResponseDataFieldValueArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfMemberListResponseDataFieldValueArrayItemMapItem]

func (MemberListResponseDataFieldValueArrayItemUnion) AsAnyArray

func (MemberListResponseDataFieldValueArrayItemUnion) AsAnyMap

func (MemberListResponseDataFieldValueArrayItemUnion) AsBool

func (MemberListResponseDataFieldValueArrayItemUnion) AsFloat

func (MemberListResponseDataFieldValueArrayItemUnion) AsString

func (MemberListResponseDataFieldValueArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*MemberListResponseDataFieldValueArrayItemUnion) UnmarshalJSON

type MemberListResponseDataFieldValueMapItemUnion

type MemberListResponseDataFieldValueMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfMemberListResponseDataFieldValueMapItemMapItem any `json:",inline"`
	JSON                                             struct {
		OfString                                         respjson.Field
		OfFloat                                          respjson.Field
		OfBool                                           respjson.Field
		OfAnyArray                                       respjson.Field
		OfMemberListResponseDataFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MemberListResponseDataFieldValueMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfMemberListResponseDataFieldValueMapItemMapItem]

func (MemberListResponseDataFieldValueMapItemUnion) AsAnyArray

func (MemberListResponseDataFieldValueMapItemUnion) AsAnyMap

func (MemberListResponseDataFieldValueMapItemUnion) AsBool

func (MemberListResponseDataFieldValueMapItemUnion) AsFloat

func (MemberListResponseDataFieldValueMapItemUnion) AsString

func (MemberListResponseDataFieldValueMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*MemberListResponseDataFieldValueMapItemUnion) UnmarshalJSON

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

type MemberListResponseDataFieldValueUnion

type MemberListResponseDataFieldValueUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]MemberListResponseDataFieldValueArrayItemUnion] instead of an object.
	OfMemberListResponseDataFieldValueArray []MemberListResponseDataFieldValueArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfMemberListResponseDataFieldValueMapItemMapItem any `json:",inline"`
	JSON                                             struct {
		OfString                                         respjson.Field
		OfFloat                                          respjson.Field
		OfBool                                           respjson.Field
		OfMemberListResponseDataFieldValueArray          respjson.Field
		OfAnyArray                                       respjson.Field
		OfMemberListResponseDataFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MemberListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]MemberListResponseDataFieldValueArrayItemUnion], [map[string]MemberListResponseDataFieldValueMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfMemberListResponseDataFieldValueArray OfAnyArray OfMemberListResponseDataFieldValueMapItemMapItem]

func (MemberListResponseDataFieldValueUnion) AsBool

func (MemberListResponseDataFieldValueUnion) AsFloat

func (MemberListResponseDataFieldValueUnion) AsMemberListResponseDataFieldValueArray

func (u MemberListResponseDataFieldValueUnion) AsMemberListResponseDataFieldValueArray() (v []MemberListResponseDataFieldValueArrayItemUnion)

func (MemberListResponseDataFieldValueUnion) AsMemberListResponseDataFieldValueMapMap

func (u MemberListResponseDataFieldValueUnion) AsMemberListResponseDataFieldValueMapMap() (v map[string]MemberListResponseDataFieldValueMapItemUnion)

func (MemberListResponseDataFieldValueUnion) AsString

func (MemberListResponseDataFieldValueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*MemberListResponseDataFieldValueUnion) UnmarshalJSON

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

type MemberRetrieveResponse added in v0.4.1

type MemberRetrieveResponse struct {
	// Unique identifier for the member.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the member was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values.
	Fields map[string]MemberRetrieveResponseField `json:"fields" api:"required"`
	// URL to view the member in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Fields      respjson.Field
		HTTPLink    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MemberRetrieveResponse) RawJSON added in v0.4.1

func (r MemberRetrieveResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MemberRetrieveResponse) UnmarshalJSON added in v0.4.1

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

type MemberRetrieveResponseField

type MemberRetrieveResponseField struct {
	// The field value, or null if unset.
	Value MemberRetrieveResponseFieldValueUnion `json:"value" api:"required"`
	// The data type of the field value.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ValueType   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MemberRetrieveResponseField) RawJSON

func (r MemberRetrieveResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*MemberRetrieveResponseField) UnmarshalJSON

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

type MemberRetrieveResponseFieldValueArrayItemUnion

type MemberRetrieveResponseFieldValueArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfMemberRetrieveResponseFieldValueArrayItemMapItem any `json:",inline"`
	JSON                                               struct {
		OfString                                           respjson.Field
		OfFloat                                            respjson.Field
		OfBool                                             respjson.Field
		OfAnyArray                                         respjson.Field
		OfMemberRetrieveResponseFieldValueArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MemberRetrieveResponseFieldValueArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfMemberRetrieveResponseFieldValueArrayItemMapItem]

func (MemberRetrieveResponseFieldValueArrayItemUnion) AsAnyArray

func (MemberRetrieveResponseFieldValueArrayItemUnion) AsAnyMap

func (MemberRetrieveResponseFieldValueArrayItemUnion) AsBool

func (MemberRetrieveResponseFieldValueArrayItemUnion) AsFloat

func (MemberRetrieveResponseFieldValueArrayItemUnion) AsString

func (MemberRetrieveResponseFieldValueArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*MemberRetrieveResponseFieldValueArrayItemUnion) UnmarshalJSON

type MemberRetrieveResponseFieldValueMapItemUnion

type MemberRetrieveResponseFieldValueMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfMemberRetrieveResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                             struct {
		OfString                                         respjson.Field
		OfFloat                                          respjson.Field
		OfBool                                           respjson.Field
		OfAnyArray                                       respjson.Field
		OfMemberRetrieveResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MemberRetrieveResponseFieldValueMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfMemberRetrieveResponseFieldValueMapItemMapItem]

func (MemberRetrieveResponseFieldValueMapItemUnion) AsAnyArray

func (MemberRetrieveResponseFieldValueMapItemUnion) AsAnyMap

func (MemberRetrieveResponseFieldValueMapItemUnion) AsBool

func (MemberRetrieveResponseFieldValueMapItemUnion) AsFloat

func (MemberRetrieveResponseFieldValueMapItemUnion) AsString

func (MemberRetrieveResponseFieldValueMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*MemberRetrieveResponseFieldValueMapItemUnion) UnmarshalJSON

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

type MemberRetrieveResponseFieldValueUnion

type MemberRetrieveResponseFieldValueUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]MemberRetrieveResponseFieldValueArrayItemUnion] instead of an object.
	OfMemberRetrieveResponseFieldValueArray []MemberRetrieveResponseFieldValueArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfMemberRetrieveResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                             struct {
		OfString                                         respjson.Field
		OfFloat                                          respjson.Field
		OfBool                                           respjson.Field
		OfMemberRetrieveResponseFieldValueArray          respjson.Field
		OfAnyArray                                       respjson.Field
		OfMemberRetrieveResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MemberRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]MemberRetrieveResponseFieldValueArrayItemUnion], [map[string]MemberRetrieveResponseFieldValueMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfMemberRetrieveResponseFieldValueArray OfAnyArray OfMemberRetrieveResponseFieldValueMapItemMapItem]

func (MemberRetrieveResponseFieldValueUnion) AsBool

func (MemberRetrieveResponseFieldValueUnion) AsFloat

func (MemberRetrieveResponseFieldValueUnion) AsMemberRetrieveResponseFieldValueArray

func (u MemberRetrieveResponseFieldValueUnion) AsMemberRetrieveResponseFieldValueArray() (v []MemberRetrieveResponseFieldValueArrayItemUnion)

func (MemberRetrieveResponseFieldValueUnion) AsMemberRetrieveResponseFieldValueMapMap

func (u MemberRetrieveResponseFieldValueUnion) AsMemberRetrieveResponseFieldValueMapMap() (v map[string]MemberRetrieveResponseFieldValueMapItemUnion)

func (MemberRetrieveResponseFieldValueUnion) AsString

func (MemberRetrieveResponseFieldValueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*MemberRetrieveResponseFieldValueUnion) UnmarshalJSON

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

type MemberService added in v0.4.1

type MemberService struct {
	Options []option.RequestOption
}

Members represent users in your Lightfield workspace. Members can own accounts and opportunities, and are referenced in relationships like `$owner` and `$createdBy`.

MemberService contains methods and other services that help with interacting with the Lightfield 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 NewMemberService method instead.

func NewMemberService added in v0.4.1

func NewMemberService(opts ...option.RequestOption) (r MemberService)

NewMemberService 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 (*MemberService) Get added in v0.4.1

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

Retrieves a single member by their ID.

**[Required scope](/using-the-api/scopes/):** `members:read`

**[Rate limit category](/using-the-api/rate-limits/):** Read

func (*MemberService) List added in v0.4.1

func (r *MemberService) List(ctx context.Context, query MemberListParams, opts ...option.RequestOption) (res *MemberListResponse, err error)

Returns a paginated list of members in your workspace. Use `offset` and `limit` to paginate through results. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.

**[Required scope](/using-the-api/scopes/):** `members:read`

**[Rate limit category](/using-the-api/rate-limits/):** Search

type OpportunityCreateResponse added in v0.4.1

type OpportunityCreateResponse struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the entity was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$email`); custom attributes use their bare slug.
	Fields map[string]OpportunityCreateResponseField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]OpportunityCreateResponseRelationship `json:"relationships" api:"required"`
	ExtraFields   map[string]OpportunityCreateResponseUnion        `json:"" api:"extrafields"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		Relationships respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityCreateResponse) RawJSON added in v0.4.1

func (r OpportunityCreateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*OpportunityCreateResponse) UnmarshalJSON added in v0.4.1

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

type OpportunityCreateResponseArrayItemUnion

type OpportunityCreateResponseArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityCreateResponseArrayItemMapItem any `json:",inline"`
	JSON                                        struct {
		OfString                                    respjson.Field
		OfFloat                                     respjson.Field
		OfBool                                      respjson.Field
		OfAnyArray                                  respjson.Field
		OfOpportunityCreateResponseArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityCreateResponseArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityCreateResponseArrayItemMapItem]

func (OpportunityCreateResponseArrayItemUnion) AsAnyArray

func (u OpportunityCreateResponseArrayItemUnion) AsAnyArray() (v []any)

func (OpportunityCreateResponseArrayItemUnion) AsAnyMap

func (u OpportunityCreateResponseArrayItemUnion) AsAnyMap() (v map[string]any)

func (OpportunityCreateResponseArrayItemUnion) AsBool

func (OpportunityCreateResponseArrayItemUnion) AsFloat

func (OpportunityCreateResponseArrayItemUnion) AsString

func (OpportunityCreateResponseArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityCreateResponseArrayItemUnion) UnmarshalJSON

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

type OpportunityCreateResponseField added in v0.4.1

type OpportunityCreateResponseField struct {
	// The field value, or null if unset.
	Value OpportunityCreateResponseFieldValueUnion `json:"value" api:"required"`
	// The data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ValueType   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityCreateResponseField) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityCreateResponseField) UnmarshalJSON added in v0.4.1

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

type OpportunityCreateResponseFieldValueArrayItemUnion

type OpportunityCreateResponseFieldValueArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityCreateResponseFieldValueArrayItemMapItem any `json:",inline"`
	JSON                                                  struct {
		OfString                                              respjson.Field
		OfFloat                                               respjson.Field
		OfBool                                                respjson.Field
		OfAnyArray                                            respjson.Field
		OfOpportunityCreateResponseFieldValueArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityCreateResponseFieldValueArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityCreateResponseFieldValueArrayItemMapItem]

func (OpportunityCreateResponseFieldValueArrayItemUnion) AsAnyArray

func (OpportunityCreateResponseFieldValueArrayItemUnion) AsAnyMap

func (OpportunityCreateResponseFieldValueArrayItemUnion) AsBool

func (OpportunityCreateResponseFieldValueArrayItemUnion) AsFloat

func (OpportunityCreateResponseFieldValueArrayItemUnion) AsString

func (OpportunityCreateResponseFieldValueArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityCreateResponseFieldValueArrayItemUnion) UnmarshalJSON

type OpportunityCreateResponseFieldValueMapItemUnion

type OpportunityCreateResponseFieldValueMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityCreateResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                                struct {
		OfString                                            respjson.Field
		OfFloat                                             respjson.Field
		OfBool                                              respjson.Field
		OfAnyArray                                          respjson.Field
		OfOpportunityCreateResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityCreateResponseFieldValueMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityCreateResponseFieldValueMapItemMapItem]

func (OpportunityCreateResponseFieldValueMapItemUnion) AsAnyArray

func (OpportunityCreateResponseFieldValueMapItemUnion) AsAnyMap

func (OpportunityCreateResponseFieldValueMapItemUnion) AsBool

func (OpportunityCreateResponseFieldValueMapItemUnion) AsFloat

func (OpportunityCreateResponseFieldValueMapItemUnion) AsString

func (OpportunityCreateResponseFieldValueMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityCreateResponseFieldValueMapItemUnion) UnmarshalJSON

type OpportunityCreateResponseFieldValueUnion added in v0.4.1

type OpportunityCreateResponseFieldValueUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]OpportunityCreateResponseFieldValueArrayItemUnion] instead of an object.
	OfOpportunityCreateResponseFieldValueArray []OpportunityCreateResponseFieldValueArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityCreateResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                                struct {
		OfString                                            respjson.Field
		OfFloat                                             respjson.Field
		OfBool                                              respjson.Field
		OfOpportunityCreateResponseFieldValueArray          respjson.Field
		OfAnyArray                                          respjson.Field
		OfOpportunityCreateResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]OpportunityCreateResponseFieldValueArrayItemUnion], [map[string]OpportunityCreateResponseFieldValueMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfOpportunityCreateResponseFieldValueArray OfAnyArray OfOpportunityCreateResponseFieldValueMapItemMapItem]

func (OpportunityCreateResponseFieldValueUnion) AsBool added in v0.4.1

func (OpportunityCreateResponseFieldValueUnion) AsFloat added in v0.4.1

func (OpportunityCreateResponseFieldValueUnion) AsOpportunityCreateResponseFieldValueArray

func (u OpportunityCreateResponseFieldValueUnion) AsOpportunityCreateResponseFieldValueArray() (v []OpportunityCreateResponseFieldValueArrayItemUnion)

func (OpportunityCreateResponseFieldValueUnion) AsOpportunityCreateResponseFieldValueMapMap

func (u OpportunityCreateResponseFieldValueUnion) AsOpportunityCreateResponseFieldValueMapMap() (v map[string]OpportunityCreateResponseFieldValueMapItemUnion)

func (OpportunityCreateResponseFieldValueUnion) AsString added in v0.4.1

func (OpportunityCreateResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityCreateResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type OpportunityCreateResponseMapItemUnion

type OpportunityCreateResponseMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityCreateResponseMapItemMapItem any `json:",inline"`
	JSON                                      struct {
		OfString                                  respjson.Field
		OfFloat                                   respjson.Field
		OfBool                                    respjson.Field
		OfAnyArray                                respjson.Field
		OfOpportunityCreateResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityCreateResponseMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityCreateResponseMapItemMapItem]

func (OpportunityCreateResponseMapItemUnion) AsAnyArray

func (u OpportunityCreateResponseMapItemUnion) AsAnyArray() (v []any)

func (OpportunityCreateResponseMapItemUnion) AsAnyMap

func (u OpportunityCreateResponseMapItemUnion) AsAnyMap() (v map[string]any)

func (OpportunityCreateResponseMapItemUnion) AsBool

func (OpportunityCreateResponseMapItemUnion) AsFloat

func (OpportunityCreateResponseMapItemUnion) AsString

func (OpportunityCreateResponseMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityCreateResponseMapItemUnion) UnmarshalJSON

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

type OpportunityCreateResponseRelationship added in v0.4.1

type OpportunityCreateResponseRelationship struct {
	// Whether the relationship is `has_one` or `has_many`.
	Cardinality string `json:"cardinality" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// IDs of the related entities.
	Values []string `json:"values" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		ObjectType  respjson.Field
		Values      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityCreateResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityCreateResponseRelationship) UnmarshalJSON added in v0.4.1

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

type OpportunityCreateResponseUnion

type OpportunityCreateResponseUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]OpportunityCreateResponseArrayItemUnion] instead of an object.
	OfOpportunityCreateResponseArray []OpportunityCreateResponseArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityCreateResponseMapItemMapItem any `json:",inline"`
	JSON                                      struct {
		OfString                                  respjson.Field
		OfFloat                                   respjson.Field
		OfBool                                    respjson.Field
		OfOpportunityCreateResponseArray          respjson.Field
		OfAnyArray                                respjson.Field
		OfOpportunityCreateResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityCreateResponseUnion contains all possible properties and values from [string], [float64], [bool], [[]OpportunityCreateResponseArrayItemUnion], [map[string]OpportunityCreateResponseMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfOpportunityCreateResponseArray OfAnyArray OfOpportunityCreateResponseMapItemMapItem]

func (OpportunityCreateResponseUnion) AsBool

func (u OpportunityCreateResponseUnion) AsBool() (v bool)

func (OpportunityCreateResponseUnion) AsFloat

func (u OpportunityCreateResponseUnion) AsFloat() (v float64)

func (OpportunityCreateResponseUnion) AsOpportunityCreateResponseArray

func (u OpportunityCreateResponseUnion) AsOpportunityCreateResponseArray() (v []OpportunityCreateResponseArrayItemUnion)

func (OpportunityCreateResponseUnion) AsOpportunityCreateResponseMapMap

func (u OpportunityCreateResponseUnion) AsOpportunityCreateResponseMapMap() (v map[string]OpportunityCreateResponseMapItemUnion)

func (OpportunityCreateResponseUnion) AsString

func (u OpportunityCreateResponseUnion) AsString() (v string)

func (OpportunityCreateResponseUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityCreateResponseUnion) UnmarshalJSON

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

type OpportunityDefinitionsResponse added in v0.2.0

type OpportunityDefinitionsResponse struct {
	// Map of field keys to their definitions, including both system and custom fields.
	FieldDefinitions map[string]OpportunityDefinitionsResponseFieldDefinition `json:"fieldDefinitions" api:"required"`
	// The object type these definitions belong to (e.g. `account`).
	ObjectType string `json:"objectType" api:"required"`
	// Map of relationship keys to their definitions.
	RelationshipDefinitions map[string]OpportunityDefinitionsResponseRelationshipDefinition `json:"relationshipDefinitions" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FieldDefinitions        respjson.Field
		ObjectType              respjson.Field
		RelationshipDefinitions respjson.Field
		ExtraFields             map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityDefinitionsResponse) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*OpportunityDefinitionsResponse) UnmarshalJSON added in v0.2.0

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

type OpportunityDefinitionsResponseFieldDefinition added in v0.2.0

type OpportunityDefinitionsResponseFieldDefinition struct {
	// Description of the field, or null.
	Description string `json:"description" api:"required"`
	// Human-readable display name of the field.
	Label string `json:"label" api:"required"`
	// Type-specific configuration (e.g. select options, currency code).
	TypeConfiguration map[string]OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationUnion `json:"typeConfiguration" api:"required"`
	// Data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// Unique identifier of the field definition.
	ID string `json:"id"`
	// `true` for fields that are not writable via the API (e.g. AI-generated
	// summaries). `false` or absent for writable fields.
	ReadOnly bool `json:"readOnly"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Description       respjson.Field
		Label             respjson.Field
		TypeConfiguration respjson.Field
		ValueType         respjson.Field
		ID                respjson.Field
		ReadOnly          respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityDefinitionsResponseFieldDefinition) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*OpportunityDefinitionsResponseFieldDefinition) UnmarshalJSON added in v0.2.0

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

type OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion added in v0.2.0

type OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemMapItem any `json:",inline"`
	JSON                                                                             struct {
		OfString                                                                         respjson.Field
		OfFloat                                                                          respjson.Field
		OfBool                                                                           respjson.Field
		OfAnyArray                                                                       respjson.Field
		OfOpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemMapItem]

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsAnyArray added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsAnyMap added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsBool added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsFloat added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) AsString added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion) UnmarshalJSON added in v0.2.0

type OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion added in v0.2.0

type OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem any `json:",inline"`
	JSON                                                                           struct {
		OfString                                                                       respjson.Field
		OfFloat                                                                        respjson.Field
		OfBool                                                                         respjson.Field
		OfAnyArray                                                                     respjson.Field
		OfOpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem]

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsAnyArray added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsAnyMap added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsBool added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsFloat added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) AsString added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion) UnmarshalJSON added in v0.2.0

type OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationUnion added in v0.2.0

type OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion]
	// instead of an object.
	OfOpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArray []OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem any `json:",inline"`
	JSON                                                                           struct {
		OfString                                                                       respjson.Field
		OfFloat                                                                        respjson.Field
		OfBool                                                                         respjson.Field
		OfOpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArray          respjson.Field
		OfAnyArray                                                                     respjson.Field
		OfOpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationUnion contains all possible properties and values from [string], [float64], [bool], [[]OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArrayItemUnion], [map[string]OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfOpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArray OfAnyArray OfOpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapItemMapItem]

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsBool added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsFloat added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsOpportunityDefinitionsResponseFieldDefinitionTypeConfigurationArray added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsOpportunityDefinitionsResponseFieldDefinitionTypeConfigurationMapMap added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationUnion) AsString added in v0.2.0

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationUnion) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationUnion) UnmarshalJSON added in v0.2.0

type OpportunityDefinitionsResponseRelationshipDefinition added in v0.2.0

type OpportunityDefinitionsResponseRelationshipDefinition struct {
	// Whether this is a `has_one` or `has_many` relationship.
	//
	// Any of "HAS_ONE", "HAS_MANY".
	Cardinality string `json:"cardinality" api:"required"`
	// Description of the relationship, or null.
	Description string `json:"description" api:"required"`
	// Human-readable display name of the relationship.
	Label string `json:"label" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// Unique identifier of the relationship definition.
	ID string `json:"id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		Description respjson.Field
		Label       respjson.Field
		ObjectType  respjson.Field
		ID          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityDefinitionsResponseRelationshipDefinition) RawJSON added in v0.2.0

Returns the unmodified JSON received from the API

func (*OpportunityDefinitionsResponseRelationshipDefinition) UnmarshalJSON added in v0.2.0

type OpportunityListParams

type OpportunityListParams struct {
	// Maximum number of records to return. Defaults to 25, maximum 25.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Number of records to skip for pagination. Defaults to 0.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OpportunityListParams) URLQuery

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

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

type OpportunityListResponse

type OpportunityListResponse struct {
	// Array of entity objects for the current page.
	Data []OpportunityListResponseData `json:"data" api:"required"`
	// The object type, always `"list"`.
	Object string `json:"object" api:"required"`
	// Total number of entities matching the query.
	TotalCount int64 `json:"totalCount" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		TotalCount  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityListResponse) RawJSON

func (r OpportunityListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*OpportunityListResponse) UnmarshalJSON

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

type OpportunityListResponseData

type OpportunityListResponseData struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the entity was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$email`); custom attributes use their bare slug.
	Fields map[string]OpportunityListResponseDataField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]OpportunityListResponseDataRelationship `json:"relationships" api:"required"`
	ExtraFields   map[string]OpportunityListResponseDataUnion        `json:"" api:"extrafields"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		Relationships respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityListResponseData) RawJSON

func (r OpportunityListResponseData) RawJSON() string

Returns the unmodified JSON received from the API

func (*OpportunityListResponseData) UnmarshalJSON

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

type OpportunityListResponseDataArrayItemUnion

type OpportunityListResponseDataArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityListResponseDataArrayItemMapItem any `json:",inline"`
	JSON                                          struct {
		OfString                                      respjson.Field
		OfFloat                                       respjson.Field
		OfBool                                        respjson.Field
		OfAnyArray                                    respjson.Field
		OfOpportunityListResponseDataArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityListResponseDataArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityListResponseDataArrayItemMapItem]

func (OpportunityListResponseDataArrayItemUnion) AsAnyArray

func (u OpportunityListResponseDataArrayItemUnion) AsAnyArray() (v []any)

func (OpportunityListResponseDataArrayItemUnion) AsAnyMap

func (OpportunityListResponseDataArrayItemUnion) AsBool

func (OpportunityListResponseDataArrayItemUnion) AsFloat

func (OpportunityListResponseDataArrayItemUnion) AsString

func (OpportunityListResponseDataArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityListResponseDataArrayItemUnion) UnmarshalJSON

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

type OpportunityListResponseDataField

type OpportunityListResponseDataField struct {
	// The field value, or null if unset.
	Value OpportunityListResponseDataFieldValueUnion `json:"value" api:"required"`
	// The data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ValueType   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityListResponseDataField) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityListResponseDataField) UnmarshalJSON

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

type OpportunityListResponseDataFieldValueArrayItemUnion

type OpportunityListResponseDataFieldValueArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityListResponseDataFieldValueArrayItemMapItem any `json:",inline"`
	JSON                                                    struct {
		OfString                                                respjson.Field
		OfFloat                                                 respjson.Field
		OfBool                                                  respjson.Field
		OfAnyArray                                              respjson.Field
		OfOpportunityListResponseDataFieldValueArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityListResponseDataFieldValueArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityListResponseDataFieldValueArrayItemMapItem]

func (OpportunityListResponseDataFieldValueArrayItemUnion) AsAnyArray

func (OpportunityListResponseDataFieldValueArrayItemUnion) AsAnyMap

func (OpportunityListResponseDataFieldValueArrayItemUnion) AsBool

func (OpportunityListResponseDataFieldValueArrayItemUnion) AsFloat

func (OpportunityListResponseDataFieldValueArrayItemUnion) AsString

func (OpportunityListResponseDataFieldValueArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityListResponseDataFieldValueArrayItemUnion) UnmarshalJSON

type OpportunityListResponseDataFieldValueMapItemUnion

type OpportunityListResponseDataFieldValueMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityListResponseDataFieldValueMapItemMapItem any `json:",inline"`
	JSON                                                  struct {
		OfString                                              respjson.Field
		OfFloat                                               respjson.Field
		OfBool                                                respjson.Field
		OfAnyArray                                            respjson.Field
		OfOpportunityListResponseDataFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityListResponseDataFieldValueMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityListResponseDataFieldValueMapItemMapItem]

func (OpportunityListResponseDataFieldValueMapItemUnion) AsAnyArray

func (OpportunityListResponseDataFieldValueMapItemUnion) AsAnyMap

func (OpportunityListResponseDataFieldValueMapItemUnion) AsBool

func (OpportunityListResponseDataFieldValueMapItemUnion) AsFloat

func (OpportunityListResponseDataFieldValueMapItemUnion) AsString

func (OpportunityListResponseDataFieldValueMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityListResponseDataFieldValueMapItemUnion) UnmarshalJSON

type OpportunityListResponseDataFieldValueUnion

type OpportunityListResponseDataFieldValueUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]OpportunityListResponseDataFieldValueArrayItemUnion] instead of an object.
	OfOpportunityListResponseDataFieldValueArray []OpportunityListResponseDataFieldValueArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityListResponseDataFieldValueMapItemMapItem any `json:",inline"`
	JSON                                                  struct {
		OfString                                              respjson.Field
		OfFloat                                               respjson.Field
		OfBool                                                respjson.Field
		OfOpportunityListResponseDataFieldValueArray          respjson.Field
		OfAnyArray                                            respjson.Field
		OfOpportunityListResponseDataFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]OpportunityListResponseDataFieldValueArrayItemUnion], [map[string]OpportunityListResponseDataFieldValueMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfOpportunityListResponseDataFieldValueArray OfAnyArray OfOpportunityListResponseDataFieldValueMapItemMapItem]

func (OpportunityListResponseDataFieldValueUnion) AsBool

func (OpportunityListResponseDataFieldValueUnion) AsFloat

func (OpportunityListResponseDataFieldValueUnion) AsOpportunityListResponseDataFieldValueArray

func (u OpportunityListResponseDataFieldValueUnion) AsOpportunityListResponseDataFieldValueArray() (v []OpportunityListResponseDataFieldValueArrayItemUnion)

func (OpportunityListResponseDataFieldValueUnion) AsOpportunityListResponseDataFieldValueMapMap

func (u OpportunityListResponseDataFieldValueUnion) AsOpportunityListResponseDataFieldValueMapMap() (v map[string]OpportunityListResponseDataFieldValueMapItemUnion)

func (OpportunityListResponseDataFieldValueUnion) AsString

func (OpportunityListResponseDataFieldValueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityListResponseDataFieldValueUnion) UnmarshalJSON

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

type OpportunityListResponseDataMapItemUnion

type OpportunityListResponseDataMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityListResponseDataMapItemMapItem any `json:",inline"`
	JSON                                        struct {
		OfString                                    respjson.Field
		OfFloat                                     respjson.Field
		OfBool                                      respjson.Field
		OfAnyArray                                  respjson.Field
		OfOpportunityListResponseDataMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityListResponseDataMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityListResponseDataMapItemMapItem]

func (OpportunityListResponseDataMapItemUnion) AsAnyArray

func (u OpportunityListResponseDataMapItemUnion) AsAnyArray() (v []any)

func (OpportunityListResponseDataMapItemUnion) AsAnyMap

func (u OpportunityListResponseDataMapItemUnion) AsAnyMap() (v map[string]any)

func (OpportunityListResponseDataMapItemUnion) AsBool

func (OpportunityListResponseDataMapItemUnion) AsFloat

func (OpportunityListResponseDataMapItemUnion) AsString

func (OpportunityListResponseDataMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityListResponseDataMapItemUnion) UnmarshalJSON

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

type OpportunityListResponseDataRelationship

type OpportunityListResponseDataRelationship struct {
	// Whether the relationship is `has_one` or `has_many`.
	Cardinality string `json:"cardinality" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// IDs of the related entities.
	Values []string `json:"values" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		ObjectType  respjson.Field
		Values      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityListResponseDataRelationship) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityListResponseDataRelationship) UnmarshalJSON

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

type OpportunityListResponseDataUnion

type OpportunityListResponseDataUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]OpportunityListResponseDataArrayItemUnion] instead of an object.
	OfOpportunityListResponseDataArray []OpportunityListResponseDataArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityListResponseDataMapItemMapItem any `json:",inline"`
	JSON                                        struct {
		OfString                                    respjson.Field
		OfFloat                                     respjson.Field
		OfBool                                      respjson.Field
		OfOpportunityListResponseDataArray          respjson.Field
		OfAnyArray                                  respjson.Field
		OfOpportunityListResponseDataMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityListResponseDataUnion contains all possible properties and values from [string], [float64], [bool], [[]OpportunityListResponseDataArrayItemUnion], [map[string]OpportunityListResponseDataMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfOpportunityListResponseDataArray OfAnyArray OfOpportunityListResponseDataMapItemMapItem]

func (OpportunityListResponseDataUnion) AsBool

func (u OpportunityListResponseDataUnion) AsBool() (v bool)

func (OpportunityListResponseDataUnion) AsFloat

func (u OpportunityListResponseDataUnion) AsFloat() (v float64)

func (OpportunityListResponseDataUnion) AsOpportunityListResponseDataArray

func (u OpportunityListResponseDataUnion) AsOpportunityListResponseDataArray() (v []OpportunityListResponseDataArrayItemUnion)

func (OpportunityListResponseDataUnion) AsOpportunityListResponseDataMapMap

func (u OpportunityListResponseDataUnion) AsOpportunityListResponseDataMapMap() (v map[string]OpportunityListResponseDataMapItemUnion)

func (OpportunityListResponseDataUnion) AsString

func (u OpportunityListResponseDataUnion) AsString() (v string)

func (OpportunityListResponseDataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityListResponseDataUnion) UnmarshalJSON

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

type OpportunityNewParams

type OpportunityNewParams struct {
	// Field values for the new opportunity. System fields use a `$` prefix (e.g.
	// `$name`, `$stage`); custom attributes use their bare slug. Required: `$name`
	// (string) and `$stage` (option ID or label). Fields of type `SINGLE_SELECT` or
	// `MULTI_SELECT` accept either an option ID or label from the field's
	// `typeConfiguration.options` — call the
	// <u>[definitions endpoint](/api/resources/opportunity/methods/definitions)</u> to
	// discover available fields and options. See
	// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
	// value type details.
	Fields OpportunityNewParamsFields `json:"fields,omitzero" api:"required"`
	// Relationships to set on the new opportunity. System relationships use a `$`
	// prefix (e.g. `$account`, `$owner`); custom relationships use their bare slug.
	// `$account` is required. Each value is a single entity ID or an array of IDs.
	// Call the
	// <u>[definitions endpoint](/api/resources/opportunity/methods/definitions)</u> to
	// list available relationship keys.
	Relationships OpportunityNewParamsRelationships `json:"relationships,omitzero" api:"required"`
	// contains filtered or unexported fields
}

func (OpportunityNewParams) MarshalJSON

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

func (*OpportunityNewParams) UnmarshalJSON

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

type OpportunityNewParamsFieldArrayItemUnion

type OpportunityNewParamsFieldArrayItemUnion struct {
	OfString   param.Opt[string]  `json:",omitzero,inline"`
	OfFloat    param.Opt[float64] `json:",omitzero,inline"`
	OfBool     param.Opt[bool]    `json:",omitzero,inline"`
	OfAnyArray []any              `json:",omitzero,inline"`
	OfAnyMap   map[string]any     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityNewParamsFieldArrayItemUnion) MarshalJSON

func (u OpportunityNewParamsFieldArrayItemUnion) MarshalJSON() ([]byte, error)

func (*OpportunityNewParamsFieldArrayItemUnion) UnmarshalJSON

func (u *OpportunityNewParamsFieldArrayItemUnion) UnmarshalJSON(data []byte) error

type OpportunityNewParamsFieldMapItemUnion

type OpportunityNewParamsFieldMapItemUnion struct {
	OfString   param.Opt[string]  `json:",omitzero,inline"`
	OfFloat    param.Opt[float64] `json:",omitzero,inline"`
	OfBool     param.Opt[bool]    `json:",omitzero,inline"`
	OfAnyArray []any              `json:",omitzero,inline"`
	OfAnyMap   map[string]any     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityNewParamsFieldMapItemUnion) MarshalJSON

func (u OpportunityNewParamsFieldMapItemUnion) MarshalJSON() ([]byte, error)

func (*OpportunityNewParamsFieldMapItemUnion) UnmarshalJSON

func (u *OpportunityNewParamsFieldMapItemUnion) UnmarshalJSON(data []byte) error

type OpportunityNewParamsFieldUnion

type OpportunityNewParamsFieldUnion struct {
	OfString                     param.Opt[string]                                `json:",omitzero,inline"`
	OfFloat                      param.Opt[float64]                               `json:",omitzero,inline"`
	OfBool                       param.Opt[bool]                                  `json:",omitzero,inline"`
	OfOpportunityNewsFieldArray  []OpportunityNewParamsFieldArrayItemUnion        `json:",omitzero,inline"`
	OfOpportunityNewsFieldMapMap map[string]OpportunityNewParamsFieldMapItemUnion `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityNewParamsFieldUnion) MarshalJSON

func (u OpportunityNewParamsFieldUnion) MarshalJSON() ([]byte, error)

func (*OpportunityNewParamsFieldUnion) UnmarshalJSON

func (u *OpportunityNewParamsFieldUnion) UnmarshalJSON(data []byte) error

type OpportunityNewParamsFields

type OpportunityNewParamsFields struct {
	// Display name of the opportunity.
	Name string `json:"$name" api:"required"`
	// Pipeline stage (`SINGLE_SELECT`). Pass the option ID or label from the field
	// definition.
	Stage       string                                    `json:"$stage" api:"required"`
	ExtraFields map[string]OpportunityNewParamsFieldUnion `json:"-"`
	// contains filtered or unexported fields
}

Field values for the new opportunity. System fields use a `$` prefix (e.g. `$name`, `$stage`); custom attributes use their bare slug. Required: `$name` (string) and `$stage` (option ID or label). Fields of type `SINGLE_SELECT` or `MULTI_SELECT` accept either an option ID or label from the field's `typeConfiguration.options` — call the <u>[definitions endpoint](/api/resources/opportunity/methods/definitions)</u> to discover available fields and options. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for value type details.

The properties Name, Stage are required.

func (OpportunityNewParamsFields) MarshalJSON

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

func (*OpportunityNewParamsFields) UnmarshalJSON

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

type OpportunityNewParamsRelationshipUnion

type OpportunityNewParamsRelationshipUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityNewParamsRelationshipUnion) MarshalJSON

func (u OpportunityNewParamsRelationshipUnion) MarshalJSON() ([]byte, error)

func (*OpportunityNewParamsRelationshipUnion) UnmarshalJSON

func (u *OpportunityNewParamsRelationshipUnion) UnmarshalJSON(data []byte) error

type OpportunityNewParamsRelationships

type OpportunityNewParamsRelationships struct {
	// ID of the account this opportunity belongs to.
	Account OpportunityNewParamsRelationshipsAccountUnion `json:"$account,omitzero" api:"required"`
	// ID of the contact who is the internal champion.
	Champion OpportunityNewParamsRelationshipsChampionUnion `json:"$champion,omitzero"`
	// ID of the user who created this opportunity.
	CreatedBy OpportunityNewParamsRelationshipsCreatedByUnion `json:"$createdBy,omitzero"`
	// ID of the contact who is the evaluator.
	Evaluator OpportunityNewParamsRelationshipsEvaluatorUnion `json:"$evaluator,omitzero"`
	// ID of the user who owns this opportunity.
	Owner       OpportunityNewParamsRelationshipsOwnerUnion      `json:"$owner,omitzero"`
	ExtraFields map[string]OpportunityNewParamsRelationshipUnion `json:"-"`
	// contains filtered or unexported fields
}

Relationships to set on the new opportunity. System relationships use a `$` prefix (e.g. `$account`, `$owner`); custom relationships use their bare slug. `$account` is required. Each value is a single entity ID or an array of IDs. Call the <u>[definitions endpoint](/api/resources/opportunity/methods/definitions)</u> to list available relationship keys.

The property Account is required.

func (OpportunityNewParamsRelationships) MarshalJSON

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

func (*OpportunityNewParamsRelationships) UnmarshalJSON

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

type OpportunityNewParamsRelationshipsAccountUnion added in v0.2.0

type OpportunityNewParamsRelationshipsAccountUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityNewParamsRelationshipsAccountUnion) MarshalJSON added in v0.2.0

func (*OpportunityNewParamsRelationshipsAccountUnion) UnmarshalJSON added in v0.2.0

func (u *OpportunityNewParamsRelationshipsAccountUnion) UnmarshalJSON(data []byte) error

type OpportunityNewParamsRelationshipsChampionUnion added in v0.2.0

type OpportunityNewParamsRelationshipsChampionUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityNewParamsRelationshipsChampionUnion) MarshalJSON added in v0.2.0

func (*OpportunityNewParamsRelationshipsChampionUnion) UnmarshalJSON added in v0.2.0

type OpportunityNewParamsRelationshipsCreatedByUnion added in v0.2.0

type OpportunityNewParamsRelationshipsCreatedByUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityNewParamsRelationshipsCreatedByUnion) MarshalJSON added in v0.2.0

func (*OpportunityNewParamsRelationshipsCreatedByUnion) UnmarshalJSON added in v0.2.0

type OpportunityNewParamsRelationshipsEvaluatorUnion added in v0.2.0

type OpportunityNewParamsRelationshipsEvaluatorUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityNewParamsRelationshipsEvaluatorUnion) MarshalJSON added in v0.2.0

func (*OpportunityNewParamsRelationshipsEvaluatorUnion) UnmarshalJSON added in v0.2.0

type OpportunityNewParamsRelationshipsOwnerUnion added in v0.2.0

type OpportunityNewParamsRelationshipsOwnerUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityNewParamsRelationshipsOwnerUnion) MarshalJSON added in v0.2.0

func (*OpportunityNewParamsRelationshipsOwnerUnion) UnmarshalJSON added in v0.2.0

func (u *OpportunityNewParamsRelationshipsOwnerUnion) UnmarshalJSON(data []byte) error

type OpportunityRetrieveResponse added in v0.4.1

type OpportunityRetrieveResponse struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the entity was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$email`); custom attributes use their bare slug.
	Fields map[string]OpportunityRetrieveResponseField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]OpportunityRetrieveResponseRelationship `json:"relationships" api:"required"`
	ExtraFields   map[string]OpportunityRetrieveResponseUnion        `json:"" api:"extrafields"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		Relationships respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityRetrieveResponse) RawJSON added in v0.4.1

func (r OpportunityRetrieveResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*OpportunityRetrieveResponse) UnmarshalJSON added in v0.4.1

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

type OpportunityRetrieveResponseArrayItemUnion

type OpportunityRetrieveResponseArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityRetrieveResponseArrayItemMapItem any `json:",inline"`
	JSON                                          struct {
		OfString                                      respjson.Field
		OfFloat                                       respjson.Field
		OfBool                                        respjson.Field
		OfAnyArray                                    respjson.Field
		OfOpportunityRetrieveResponseArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityRetrieveResponseArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityRetrieveResponseArrayItemMapItem]

func (OpportunityRetrieveResponseArrayItemUnion) AsAnyArray

func (u OpportunityRetrieveResponseArrayItemUnion) AsAnyArray() (v []any)

func (OpportunityRetrieveResponseArrayItemUnion) AsAnyMap

func (OpportunityRetrieveResponseArrayItemUnion) AsBool

func (OpportunityRetrieveResponseArrayItemUnion) AsFloat

func (OpportunityRetrieveResponseArrayItemUnion) AsString

func (OpportunityRetrieveResponseArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityRetrieveResponseArrayItemUnion) UnmarshalJSON

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

type OpportunityRetrieveResponseField added in v0.4.1

type OpportunityRetrieveResponseField struct {
	// The field value, or null if unset.
	Value OpportunityRetrieveResponseFieldValueUnion `json:"value" api:"required"`
	// The data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ValueType   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityRetrieveResponseField) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityRetrieveResponseField) UnmarshalJSON added in v0.4.1

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

type OpportunityRetrieveResponseFieldValueArrayItemUnion

type OpportunityRetrieveResponseFieldValueArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityRetrieveResponseFieldValueArrayItemMapItem any `json:",inline"`
	JSON                                                    struct {
		OfString                                                respjson.Field
		OfFloat                                                 respjson.Field
		OfBool                                                  respjson.Field
		OfAnyArray                                              respjson.Field
		OfOpportunityRetrieveResponseFieldValueArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityRetrieveResponseFieldValueArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityRetrieveResponseFieldValueArrayItemMapItem]

func (OpportunityRetrieveResponseFieldValueArrayItemUnion) AsAnyArray

func (OpportunityRetrieveResponseFieldValueArrayItemUnion) AsAnyMap

func (OpportunityRetrieveResponseFieldValueArrayItemUnion) AsBool

func (OpportunityRetrieveResponseFieldValueArrayItemUnion) AsFloat

func (OpportunityRetrieveResponseFieldValueArrayItemUnion) AsString

func (OpportunityRetrieveResponseFieldValueArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityRetrieveResponseFieldValueArrayItemUnion) UnmarshalJSON

type OpportunityRetrieveResponseFieldValueMapItemUnion

type OpportunityRetrieveResponseFieldValueMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityRetrieveResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                                  struct {
		OfString                                              respjson.Field
		OfFloat                                               respjson.Field
		OfBool                                                respjson.Field
		OfAnyArray                                            respjson.Field
		OfOpportunityRetrieveResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityRetrieveResponseFieldValueMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityRetrieveResponseFieldValueMapItemMapItem]

func (OpportunityRetrieveResponseFieldValueMapItemUnion) AsAnyArray

func (OpportunityRetrieveResponseFieldValueMapItemUnion) AsAnyMap

func (OpportunityRetrieveResponseFieldValueMapItemUnion) AsBool

func (OpportunityRetrieveResponseFieldValueMapItemUnion) AsFloat

func (OpportunityRetrieveResponseFieldValueMapItemUnion) AsString

func (OpportunityRetrieveResponseFieldValueMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityRetrieveResponseFieldValueMapItemUnion) UnmarshalJSON

type OpportunityRetrieveResponseFieldValueUnion added in v0.4.1

type OpportunityRetrieveResponseFieldValueUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]OpportunityRetrieveResponseFieldValueArrayItemUnion] instead of an object.
	OfOpportunityRetrieveResponseFieldValueArray []OpportunityRetrieveResponseFieldValueArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityRetrieveResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                                  struct {
		OfString                                              respjson.Field
		OfFloat                                               respjson.Field
		OfBool                                                respjson.Field
		OfOpportunityRetrieveResponseFieldValueArray          respjson.Field
		OfAnyArray                                            respjson.Field
		OfOpportunityRetrieveResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]OpportunityRetrieveResponseFieldValueArrayItemUnion], [map[string]OpportunityRetrieveResponseFieldValueMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfOpportunityRetrieveResponseFieldValueArray OfAnyArray OfOpportunityRetrieveResponseFieldValueMapItemMapItem]

func (OpportunityRetrieveResponseFieldValueUnion) AsBool added in v0.4.1

func (OpportunityRetrieveResponseFieldValueUnion) AsFloat added in v0.4.1

func (OpportunityRetrieveResponseFieldValueUnion) AsOpportunityRetrieveResponseFieldValueArray

func (u OpportunityRetrieveResponseFieldValueUnion) AsOpportunityRetrieveResponseFieldValueArray() (v []OpportunityRetrieveResponseFieldValueArrayItemUnion)

func (OpportunityRetrieveResponseFieldValueUnion) AsOpportunityRetrieveResponseFieldValueMapMap

func (u OpportunityRetrieveResponseFieldValueUnion) AsOpportunityRetrieveResponseFieldValueMapMap() (v map[string]OpportunityRetrieveResponseFieldValueMapItemUnion)

func (OpportunityRetrieveResponseFieldValueUnion) AsString added in v0.4.1

func (OpportunityRetrieveResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityRetrieveResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type OpportunityRetrieveResponseMapItemUnion

type OpportunityRetrieveResponseMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityRetrieveResponseMapItemMapItem any `json:",inline"`
	JSON                                        struct {
		OfString                                    respjson.Field
		OfFloat                                     respjson.Field
		OfBool                                      respjson.Field
		OfAnyArray                                  respjson.Field
		OfOpportunityRetrieveResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityRetrieveResponseMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityRetrieveResponseMapItemMapItem]

func (OpportunityRetrieveResponseMapItemUnion) AsAnyArray

func (u OpportunityRetrieveResponseMapItemUnion) AsAnyArray() (v []any)

func (OpportunityRetrieveResponseMapItemUnion) AsAnyMap

func (u OpportunityRetrieveResponseMapItemUnion) AsAnyMap() (v map[string]any)

func (OpportunityRetrieveResponseMapItemUnion) AsBool

func (OpportunityRetrieveResponseMapItemUnion) AsFloat

func (OpportunityRetrieveResponseMapItemUnion) AsString

func (OpportunityRetrieveResponseMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityRetrieveResponseMapItemUnion) UnmarshalJSON

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

type OpportunityRetrieveResponseRelationship added in v0.4.1

type OpportunityRetrieveResponseRelationship struct {
	// Whether the relationship is `has_one` or `has_many`.
	Cardinality string `json:"cardinality" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// IDs of the related entities.
	Values []string `json:"values" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		ObjectType  respjson.Field
		Values      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityRetrieveResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityRetrieveResponseRelationship) UnmarshalJSON added in v0.4.1

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

type OpportunityRetrieveResponseUnion

type OpportunityRetrieveResponseUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]OpportunityRetrieveResponseArrayItemUnion] instead of an object.
	OfOpportunityRetrieveResponseArray []OpportunityRetrieveResponseArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityRetrieveResponseMapItemMapItem any `json:",inline"`
	JSON                                        struct {
		OfString                                    respjson.Field
		OfFloat                                     respjson.Field
		OfBool                                      respjson.Field
		OfOpportunityRetrieveResponseArray          respjson.Field
		OfAnyArray                                  respjson.Field
		OfOpportunityRetrieveResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityRetrieveResponseUnion contains all possible properties and values from [string], [float64], [bool], [[]OpportunityRetrieveResponseArrayItemUnion], [map[string]OpportunityRetrieveResponseMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfOpportunityRetrieveResponseArray OfAnyArray OfOpportunityRetrieveResponseMapItemMapItem]

func (OpportunityRetrieveResponseUnion) AsBool

func (u OpportunityRetrieveResponseUnion) AsBool() (v bool)

func (OpportunityRetrieveResponseUnion) AsFloat

func (u OpportunityRetrieveResponseUnion) AsFloat() (v float64)

func (OpportunityRetrieveResponseUnion) AsOpportunityRetrieveResponseArray

func (u OpportunityRetrieveResponseUnion) AsOpportunityRetrieveResponseArray() (v []OpportunityRetrieveResponseArrayItemUnion)

func (OpportunityRetrieveResponseUnion) AsOpportunityRetrieveResponseMapMap

func (u OpportunityRetrieveResponseUnion) AsOpportunityRetrieveResponseMapMap() (v map[string]OpportunityRetrieveResponseMapItemUnion)

func (OpportunityRetrieveResponseUnion) AsString

func (u OpportunityRetrieveResponseUnion) AsString() (v string)

func (OpportunityRetrieveResponseUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityRetrieveResponseUnion) UnmarshalJSON

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

type OpportunityService

type OpportunityService struct {
	Options []option.RequestOption
}

Opportunities represent potential deals or sales in Lightfield. Each opportunity belongs to an account and can have tasks and notes associated with it.

OpportunityService contains methods and other services that help with interacting with the Lightfield 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 NewOpportunityService method instead.

func NewOpportunityService

func NewOpportunityService(opts ...option.RequestOption) (r OpportunityService)

NewOpportunityService 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 (*OpportunityService) Definitions added in v0.2.0

Returns the schema for all field and relationship definitions available on opportunities, including both system-defined and custom fields. Useful for understanding the shape of opportunity data before creating or updating records. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for more details.

**[Required scope](/using-the-api/scopes/):** `opportunities:read`

**[Rate limit category](/using-the-api/rate-limits/):** Read

func (*OpportunityService) Get

Retrieves a single opportunity by its ID.

**[Required scope](/using-the-api/scopes/):** `opportunities:read`

**[Rate limit category](/using-the-api/rate-limits/):** Read

func (*OpportunityService) List

Returns a paginated list of opportunities. Use `offset` and `limit` to paginate through results. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.

**[Required scope](/using-the-api/scopes/):** `opportunities:read`

**[Rate limit category](/using-the-api/rate-limits/):** Search

func (*OpportunityService) New

Creates a new opportunity record. The `$name` and `$stage` fields and the `$account` relationship are required.

After creation, Lightfield automatically generates an opportunity summary in the background. The `$opportunityStatus` field is read-only and cannot be set via the API. The `$task` and `$note` relationships are also read-only — manage them via the `$opportunity` relationship on the task, or the `$account`/`$opportunity` note relationships instead.

Supports idempotency via the `Idempotency-Key` header.

**[Required scope](/using-the-api/scopes/):** `opportunities:create`

**[Rate limit category](/using-the-api/rate-limits/):** Write

func (*OpportunityService) Update

Updates an existing opportunity by ID. Only included fields and relationships are modified.

The `$opportunityStatus` field is read-only and cannot be updated. The `$task` and `$note` relationships are also read-only — manage them via the `$opportunity` relationship on the task, or the `$account`/`$opportunity` note relationships instead.

Supports idempotency via the `Idempotency-Key` header.

**[Required scope](/using-the-api/scopes/):** `opportunities:update`

**[Rate limit category](/using-the-api/rate-limits/):** Write

type OpportunityUpdateParams

type OpportunityUpdateParams struct {
	// Field values to update — only provided fields are modified; omitted fields are
	// left unchanged. System fields use a `$` prefix (e.g. `$name`, `$stage`); custom
	// attributes use their bare slug. `SINGLE_SELECT` and `MULTI_SELECT` fields accept
	// an option ID or label — call the
	// <u>[definitions endpoint](/api/resources/opportunity/methods/definitions)</u>
	// for available options. See
	// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
	// value type details.
	Fields OpportunityUpdateParamsFields `json:"fields,omitzero"`
	// Relationship operations to apply. System relationships use a `$` prefix (e.g.
	// `$owner`, `$champion`). Each value is an operation object with `add`, `remove`,
	// or `replace`.
	Relationships OpportunityUpdateParamsRelationships `json:"relationships,omitzero"`
	// contains filtered or unexported fields
}

func (OpportunityUpdateParams) MarshalJSON

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

func (*OpportunityUpdateParams) UnmarshalJSON

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

type OpportunityUpdateParamsFieldArrayItemUnion

type OpportunityUpdateParamsFieldArrayItemUnion struct {
	OfString   param.Opt[string]  `json:",omitzero,inline"`
	OfFloat    param.Opt[float64] `json:",omitzero,inline"`
	OfBool     param.Opt[bool]    `json:",omitzero,inline"`
	OfAnyArray []any              `json:",omitzero,inline"`
	OfAnyMap   map[string]any     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsFieldArrayItemUnion) MarshalJSON

func (*OpportunityUpdateParamsFieldArrayItemUnion) UnmarshalJSON

func (u *OpportunityUpdateParamsFieldArrayItemUnion) UnmarshalJSON(data []byte) error

type OpportunityUpdateParamsFieldMapItemUnion

type OpportunityUpdateParamsFieldMapItemUnion struct {
	OfString   param.Opt[string]  `json:",omitzero,inline"`
	OfFloat    param.Opt[float64] `json:",omitzero,inline"`
	OfBool     param.Opt[bool]    `json:",omitzero,inline"`
	OfAnyArray []any              `json:",omitzero,inline"`
	OfAnyMap   map[string]any     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsFieldMapItemUnion) MarshalJSON

func (*OpportunityUpdateParamsFieldMapItemUnion) UnmarshalJSON

func (u *OpportunityUpdateParamsFieldMapItemUnion) UnmarshalJSON(data []byte) error

type OpportunityUpdateParamsFieldUnion

type OpportunityUpdateParamsFieldUnion struct {
	OfString                        param.Opt[string]                                   `json:",omitzero,inline"`
	OfFloat                         param.Opt[float64]                                  `json:",omitzero,inline"`
	OfBool                          param.Opt[bool]                                     `json:",omitzero,inline"`
	OfOpportunityUpdatesFieldArray  []OpportunityUpdateParamsFieldArrayItemUnion        `json:",omitzero,inline"`
	OfOpportunityUpdatesFieldMapMap map[string]OpportunityUpdateParamsFieldMapItemUnion `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsFieldUnion) MarshalJSON

func (u OpportunityUpdateParamsFieldUnion) MarshalJSON() ([]byte, error)

func (*OpportunityUpdateParamsFieldUnion) UnmarshalJSON

func (u *OpportunityUpdateParamsFieldUnion) UnmarshalJSON(data []byte) error

type OpportunityUpdateParamsFields

type OpportunityUpdateParamsFields struct {
	// Display name of the opportunity.
	Name param.Opt[string] `json:"$name,omitzero"`
	// Pipeline stage (`SINGLE_SELECT`). Pass the option ID or label from the field
	// definition.
	Stage       param.Opt[string]                            `json:"$stage,omitzero"`
	ExtraFields map[string]OpportunityUpdateParamsFieldUnion `json:"-"`
	// contains filtered or unexported fields
}

Field values to update — only provided fields are modified; omitted fields are left unchanged. System fields use a `$` prefix (e.g. `$name`, `$stage`); custom attributes use their bare slug. `SINGLE_SELECT` and `MULTI_SELECT` fields accept an option ID or label — call the <u>[definitions endpoint](/api/resources/opportunity/methods/definitions)</u> for available options. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for value type details.

func (OpportunityUpdateParamsFields) MarshalJSON

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

func (*OpportunityUpdateParamsFields) UnmarshalJSON

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

type OpportunityUpdateParamsRelationship

type OpportunityUpdateParamsRelationship struct {
	// Entity ID(s) to add to the relationship.
	Add OpportunityUpdateParamsRelationshipAddUnion `json:"add,omitzero"`
	// Entity ID(s) to remove from the relationship.
	Remove OpportunityUpdateParamsRelationshipRemoveUnion `json:"remove,omitzero"`
	// Entity ID(s) to set as the entire relationship, replacing all existing
	// associations.
	Replace OpportunityUpdateParamsRelationshipReplaceUnion `json:"replace,omitzero"`
	// contains filtered or unexported fields
}

An operation to modify a relationship. Provide one of `add`, `remove`, or `replace`.

func (OpportunityUpdateParamsRelationship) MarshalJSON

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

func (*OpportunityUpdateParamsRelationship) UnmarshalJSON

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

type OpportunityUpdateParamsRelationshipAddUnion

type OpportunityUpdateParamsRelationshipAddUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsRelationshipAddUnion) MarshalJSON

func (*OpportunityUpdateParamsRelationshipAddUnion) UnmarshalJSON

func (u *OpportunityUpdateParamsRelationshipAddUnion) UnmarshalJSON(data []byte) error

type OpportunityUpdateParamsRelationshipRemoveUnion

type OpportunityUpdateParamsRelationshipRemoveUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsRelationshipRemoveUnion) MarshalJSON

func (*OpportunityUpdateParamsRelationshipRemoveUnion) UnmarshalJSON

type OpportunityUpdateParamsRelationshipReplaceUnion

type OpportunityUpdateParamsRelationshipReplaceUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsRelationshipReplaceUnion) MarshalJSON

func (*OpportunityUpdateParamsRelationshipReplaceUnion) UnmarshalJSON

type OpportunityUpdateParamsRelationships

type OpportunityUpdateParamsRelationships struct {
	// Operation to modify the internal champion.
	Champion OpportunityUpdateParamsRelationshipsChampion `json:"$champion,omitzero"`
	// Operation to modify the evaluator.
	Evaluator OpportunityUpdateParamsRelationshipsEvaluator `json:"$evaluator,omitzero"`
	// Operation to modify the opportunity owner.
	Owner       OpportunityUpdateParamsRelationshipsOwner      `json:"$owner,omitzero"`
	ExtraFields map[string]OpportunityUpdateParamsRelationship `json:"-"`
	// contains filtered or unexported fields
}

Relationship operations to apply. System relationships use a `$` prefix (e.g. `$owner`, `$champion`). Each value is an operation object with `add`, `remove`, or `replace`.

func (OpportunityUpdateParamsRelationships) MarshalJSON

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

func (*OpportunityUpdateParamsRelationships) UnmarshalJSON

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

type OpportunityUpdateParamsRelationshipsChampion added in v0.2.0

type OpportunityUpdateParamsRelationshipsChampion struct {
	// Entity ID(s) to add to the relationship.
	Add OpportunityUpdateParamsRelationshipsChampionAddUnion `json:"add,omitzero"`
	// Entity ID(s) to remove from the relationship.
	Remove OpportunityUpdateParamsRelationshipsChampionRemoveUnion `json:"remove,omitzero"`
	// Entity ID(s) to set as the entire relationship, replacing all existing
	// associations.
	Replace OpportunityUpdateParamsRelationshipsChampionReplaceUnion `json:"replace,omitzero"`
	// contains filtered or unexported fields
}

Operation to modify the internal champion.

func (OpportunityUpdateParamsRelationshipsChampion) MarshalJSON added in v0.2.0

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

func (*OpportunityUpdateParamsRelationshipsChampion) UnmarshalJSON added in v0.2.0

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

type OpportunityUpdateParamsRelationshipsChampionAddUnion added in v0.2.0

type OpportunityUpdateParamsRelationshipsChampionAddUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsRelationshipsChampionAddUnion) MarshalJSON added in v0.2.0

func (*OpportunityUpdateParamsRelationshipsChampionAddUnion) UnmarshalJSON added in v0.2.0

type OpportunityUpdateParamsRelationshipsChampionRemoveUnion added in v0.2.0

type OpportunityUpdateParamsRelationshipsChampionRemoveUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsRelationshipsChampionRemoveUnion) MarshalJSON added in v0.2.0

func (*OpportunityUpdateParamsRelationshipsChampionRemoveUnion) UnmarshalJSON added in v0.2.0

type OpportunityUpdateParamsRelationshipsChampionReplaceUnion added in v0.2.0

type OpportunityUpdateParamsRelationshipsChampionReplaceUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsRelationshipsChampionReplaceUnion) MarshalJSON added in v0.2.0

func (*OpportunityUpdateParamsRelationshipsChampionReplaceUnion) UnmarshalJSON added in v0.2.0

type OpportunityUpdateParamsRelationshipsEvaluator added in v0.2.0

type OpportunityUpdateParamsRelationshipsEvaluator struct {
	// Entity ID(s) to add to the relationship.
	Add OpportunityUpdateParamsRelationshipsEvaluatorAddUnion `json:"add,omitzero"`
	// Entity ID(s) to remove from the relationship.
	Remove OpportunityUpdateParamsRelationshipsEvaluatorRemoveUnion `json:"remove,omitzero"`
	// Entity ID(s) to set as the entire relationship, replacing all existing
	// associations.
	Replace OpportunityUpdateParamsRelationshipsEvaluatorReplaceUnion `json:"replace,omitzero"`
	// contains filtered or unexported fields
}

Operation to modify the evaluator.

func (OpportunityUpdateParamsRelationshipsEvaluator) MarshalJSON added in v0.2.0

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

func (*OpportunityUpdateParamsRelationshipsEvaluator) UnmarshalJSON added in v0.2.0

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

type OpportunityUpdateParamsRelationshipsEvaluatorAddUnion added in v0.2.0

type OpportunityUpdateParamsRelationshipsEvaluatorAddUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsRelationshipsEvaluatorAddUnion) MarshalJSON added in v0.2.0

func (*OpportunityUpdateParamsRelationshipsEvaluatorAddUnion) UnmarshalJSON added in v0.2.0

type OpportunityUpdateParamsRelationshipsEvaluatorRemoveUnion added in v0.2.0

type OpportunityUpdateParamsRelationshipsEvaluatorRemoveUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsRelationshipsEvaluatorRemoveUnion) MarshalJSON added in v0.2.0

func (*OpportunityUpdateParamsRelationshipsEvaluatorRemoveUnion) UnmarshalJSON added in v0.2.0

type OpportunityUpdateParamsRelationshipsEvaluatorReplaceUnion added in v0.2.0

type OpportunityUpdateParamsRelationshipsEvaluatorReplaceUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsRelationshipsEvaluatorReplaceUnion) MarshalJSON added in v0.2.0

func (*OpportunityUpdateParamsRelationshipsEvaluatorReplaceUnion) UnmarshalJSON added in v0.2.0

type OpportunityUpdateParamsRelationshipsOwner added in v0.2.0

type OpportunityUpdateParamsRelationshipsOwner struct {
	// Entity ID(s) to add to the relationship.
	Add OpportunityUpdateParamsRelationshipsOwnerAddUnion `json:"add,omitzero"`
	// Entity ID(s) to remove from the relationship.
	Remove OpportunityUpdateParamsRelationshipsOwnerRemoveUnion `json:"remove,omitzero"`
	// Entity ID(s) to set as the entire relationship, replacing all existing
	// associations.
	Replace OpportunityUpdateParamsRelationshipsOwnerReplaceUnion `json:"replace,omitzero"`
	// contains filtered or unexported fields
}

Operation to modify the opportunity owner.

func (OpportunityUpdateParamsRelationshipsOwner) MarshalJSON added in v0.2.0

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

func (*OpportunityUpdateParamsRelationshipsOwner) UnmarshalJSON added in v0.2.0

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

type OpportunityUpdateParamsRelationshipsOwnerAddUnion added in v0.2.0

type OpportunityUpdateParamsRelationshipsOwnerAddUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsRelationshipsOwnerAddUnion) MarshalJSON added in v0.2.0

func (*OpportunityUpdateParamsRelationshipsOwnerAddUnion) UnmarshalJSON added in v0.2.0

type OpportunityUpdateParamsRelationshipsOwnerRemoveUnion added in v0.2.0

type OpportunityUpdateParamsRelationshipsOwnerRemoveUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsRelationshipsOwnerRemoveUnion) MarshalJSON added in v0.2.0

func (*OpportunityUpdateParamsRelationshipsOwnerRemoveUnion) UnmarshalJSON added in v0.2.0

type OpportunityUpdateParamsRelationshipsOwnerReplaceUnion added in v0.2.0

type OpportunityUpdateParamsRelationshipsOwnerReplaceUnion struct {
	OfString      param.Opt[string] `json:",omitzero,inline"`
	OfStringArray []string          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (OpportunityUpdateParamsRelationshipsOwnerReplaceUnion) MarshalJSON added in v0.2.0

func (*OpportunityUpdateParamsRelationshipsOwnerReplaceUnion) UnmarshalJSON added in v0.2.0

type OpportunityUpdateResponse

type OpportunityUpdateResponse struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the entity was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$email`); custom attributes use their bare slug.
	Fields map[string]OpportunityUpdateResponseField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]OpportunityUpdateResponseRelationship `json:"relationships" api:"required"`
	ExtraFields   map[string]OpportunityUpdateResponseUnion        `json:"" api:"extrafields"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		Relationships respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityUpdateResponse) RawJSON

func (r OpportunityUpdateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*OpportunityUpdateResponse) UnmarshalJSON

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

type OpportunityUpdateResponseArrayItemUnion

type OpportunityUpdateResponseArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityUpdateResponseArrayItemMapItem any `json:",inline"`
	JSON                                        struct {
		OfString                                    respjson.Field
		OfFloat                                     respjson.Field
		OfBool                                      respjson.Field
		OfAnyArray                                  respjson.Field
		OfOpportunityUpdateResponseArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityUpdateResponseArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityUpdateResponseArrayItemMapItem]

func (OpportunityUpdateResponseArrayItemUnion) AsAnyArray

func (u OpportunityUpdateResponseArrayItemUnion) AsAnyArray() (v []any)

func (OpportunityUpdateResponseArrayItemUnion) AsAnyMap

func (u OpportunityUpdateResponseArrayItemUnion) AsAnyMap() (v map[string]any)

func (OpportunityUpdateResponseArrayItemUnion) AsBool

func (OpportunityUpdateResponseArrayItemUnion) AsFloat

func (OpportunityUpdateResponseArrayItemUnion) AsString

func (OpportunityUpdateResponseArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityUpdateResponseArrayItemUnion) UnmarshalJSON

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

type OpportunityUpdateResponseField

type OpportunityUpdateResponseField struct {
	// The field value, or null if unset.
	Value OpportunityUpdateResponseFieldValueUnion `json:"value" api:"required"`
	// The data type of the field.
	//
	// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
	// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
	// "TELEPHONE", "TEXT", "URL".
	ValueType string `json:"valueType" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Value       respjson.Field
		ValueType   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityUpdateResponseField) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityUpdateResponseField) UnmarshalJSON

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

type OpportunityUpdateResponseFieldValueArrayItemUnion

type OpportunityUpdateResponseFieldValueArrayItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityUpdateResponseFieldValueArrayItemMapItem any `json:",inline"`
	JSON                                                  struct {
		OfString                                              respjson.Field
		OfFloat                                               respjson.Field
		OfBool                                                respjson.Field
		OfAnyArray                                            respjson.Field
		OfOpportunityUpdateResponseFieldValueArrayItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityUpdateResponseFieldValueArrayItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityUpdateResponseFieldValueArrayItemMapItem]

func (OpportunityUpdateResponseFieldValueArrayItemUnion) AsAnyArray

func (OpportunityUpdateResponseFieldValueArrayItemUnion) AsAnyMap

func (OpportunityUpdateResponseFieldValueArrayItemUnion) AsBool

func (OpportunityUpdateResponseFieldValueArrayItemUnion) AsFloat

func (OpportunityUpdateResponseFieldValueArrayItemUnion) AsString

func (OpportunityUpdateResponseFieldValueArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityUpdateResponseFieldValueArrayItemUnion) UnmarshalJSON

type OpportunityUpdateResponseFieldValueMapItemUnion

type OpportunityUpdateResponseFieldValueMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityUpdateResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                                struct {
		OfString                                            respjson.Field
		OfFloat                                             respjson.Field
		OfBool                                              respjson.Field
		OfAnyArray                                          respjson.Field
		OfOpportunityUpdateResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityUpdateResponseFieldValueMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityUpdateResponseFieldValueMapItemMapItem]

func (OpportunityUpdateResponseFieldValueMapItemUnion) AsAnyArray

func (OpportunityUpdateResponseFieldValueMapItemUnion) AsAnyMap

func (OpportunityUpdateResponseFieldValueMapItemUnion) AsBool

func (OpportunityUpdateResponseFieldValueMapItemUnion) AsFloat

func (OpportunityUpdateResponseFieldValueMapItemUnion) AsString

func (OpportunityUpdateResponseFieldValueMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityUpdateResponseFieldValueMapItemUnion) UnmarshalJSON

type OpportunityUpdateResponseFieldValueUnion

type OpportunityUpdateResponseFieldValueUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]OpportunityUpdateResponseFieldValueArrayItemUnion] instead of an object.
	OfOpportunityUpdateResponseFieldValueArray []OpportunityUpdateResponseFieldValueArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityUpdateResponseFieldValueMapItemMapItem any `json:",inline"`
	JSON                                                struct {
		OfString                                            respjson.Field
		OfFloat                                             respjson.Field
		OfBool                                              respjson.Field
		OfOpportunityUpdateResponseFieldValueArray          respjson.Field
		OfAnyArray                                          respjson.Field
		OfOpportunityUpdateResponseFieldValueMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]OpportunityUpdateResponseFieldValueArrayItemUnion], [map[string]OpportunityUpdateResponseFieldValueMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfOpportunityUpdateResponseFieldValueArray OfAnyArray OfOpportunityUpdateResponseFieldValueMapItemMapItem]

func (OpportunityUpdateResponseFieldValueUnion) AsBool

func (OpportunityUpdateResponseFieldValueUnion) AsFloat

func (OpportunityUpdateResponseFieldValueUnion) AsOpportunityUpdateResponseFieldValueArray

func (u OpportunityUpdateResponseFieldValueUnion) AsOpportunityUpdateResponseFieldValueArray() (v []OpportunityUpdateResponseFieldValueArrayItemUnion)

func (OpportunityUpdateResponseFieldValueUnion) AsOpportunityUpdateResponseFieldValueMapMap

func (u OpportunityUpdateResponseFieldValueUnion) AsOpportunityUpdateResponseFieldValueMapMap() (v map[string]OpportunityUpdateResponseFieldValueMapItemUnion)

func (OpportunityUpdateResponseFieldValueUnion) AsString

func (OpportunityUpdateResponseFieldValueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityUpdateResponseFieldValueUnion) UnmarshalJSON

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

type OpportunityUpdateResponseMapItemUnion

type OpportunityUpdateResponseMapItemUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityUpdateResponseMapItemMapItem any `json:",inline"`
	JSON                                      struct {
		OfString                                  respjson.Field
		OfFloat                                   respjson.Field
		OfBool                                    respjson.Field
		OfAnyArray                                respjson.Field
		OfOpportunityUpdateResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityUpdateResponseMapItemUnion contains all possible properties and values from [string], [float64], [bool], [[]any], [map[string]any].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfAnyArray OfOpportunityUpdateResponseMapItemMapItem]

func (OpportunityUpdateResponseMapItemUnion) AsAnyArray

func (u OpportunityUpdateResponseMapItemUnion) AsAnyArray() (v []any)

func (OpportunityUpdateResponseMapItemUnion) AsAnyMap

func (u OpportunityUpdateResponseMapItemUnion) AsAnyMap() (v map[string]any)

func (OpportunityUpdateResponseMapItemUnion) AsBool

func (OpportunityUpdateResponseMapItemUnion) AsFloat

func (OpportunityUpdateResponseMapItemUnion) AsString

func (OpportunityUpdateResponseMapItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityUpdateResponseMapItemUnion) UnmarshalJSON

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

type OpportunityUpdateResponseRelationship

type OpportunityUpdateResponseRelationship struct {
	// Whether the relationship is `has_one` or `has_many`.
	Cardinality string `json:"cardinality" api:"required"`
	// The type of the related object (e.g. `account`, `contact`).
	ObjectType string `json:"objectType" api:"required"`
	// IDs of the related entities.
	Values []string `json:"values" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cardinality respjson.Field
		ObjectType  respjson.Field
		Values      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityUpdateResponseRelationship) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityUpdateResponseRelationship) UnmarshalJSON

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

type OpportunityUpdateResponseUnion

type OpportunityUpdateResponseUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field will be present if the value is a [float64] instead of an object.
	OfFloat float64 `json:",inline"`
	// This field will be present if the value is a [bool] instead of an object.
	OfBool bool `json:",inline"`
	// This field will be present if the value is a
	// [[]OpportunityUpdateResponseArrayItemUnion] instead of an object.
	OfOpportunityUpdateResponseArray []OpportunityUpdateResponseArrayItemUnion `json:",inline"`
	// This field will be present if the value is a [[]any] instead of an object.
	OfAnyArray []any `json:",inline"`
	// This field will be present if the value is a [any] instead of an object.
	OfOpportunityUpdateResponseMapItemMapItem any `json:",inline"`
	JSON                                      struct {
		OfString                                  respjson.Field
		OfFloat                                   respjson.Field
		OfBool                                    respjson.Field
		OfOpportunityUpdateResponseArray          respjson.Field
		OfAnyArray                                respjson.Field
		OfOpportunityUpdateResponseMapItemMapItem respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityUpdateResponseUnion contains all possible properties and values from [string], [float64], [bool], [[]OpportunityUpdateResponseArrayItemUnion], [map[string]OpportunityUpdateResponseMapItemUnion].

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

If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfOpportunityUpdateResponseArray OfAnyArray OfOpportunityUpdateResponseMapItemMapItem]

func (OpportunityUpdateResponseUnion) AsBool

func (u OpportunityUpdateResponseUnion) AsBool() (v bool)

func (OpportunityUpdateResponseUnion) AsFloat

func (u OpportunityUpdateResponseUnion) AsFloat() (v float64)

func (OpportunityUpdateResponseUnion) AsOpportunityUpdateResponseArray

func (u OpportunityUpdateResponseUnion) AsOpportunityUpdateResponseArray() (v []OpportunityUpdateResponseArrayItemUnion)

func (OpportunityUpdateResponseUnion) AsOpportunityUpdateResponseMapMap

func (u OpportunityUpdateResponseUnion) AsOpportunityUpdateResponseMapMap() (v map[string]OpportunityUpdateResponseMapItemUnion)

func (OpportunityUpdateResponseUnion) AsString

func (u OpportunityUpdateResponseUnion) AsString() (v string)

func (OpportunityUpdateResponseUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityUpdateResponseUnion) UnmarshalJSON

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

type WorkflowRunService added in v0.4.1

type WorkflowRunService struct {
	Options []option.RequestOption
}

Workflow runs represent executions of automated workflows.

WorkflowRunService contains methods and other services that help with interacting with the Lightfield 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 NewWorkflowRunService method instead.

func NewWorkflowRunService added in v0.4.1

func NewWorkflowRunService(opts ...option.RequestOption) (r WorkflowRunService)

NewWorkflowRunService 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 (*WorkflowRunService) Status added in v0.4.1

func (r *WorkflowRunService) Status(ctx context.Context, runID string, opts ...option.RequestOption) (res *WorkflowRunStatusResponse, err error)

Returns the current status of a workflow run.

type WorkflowRunStatusResponse added in v0.4.1

type WorkflowRunStatusResponse struct {
	// Current status of the workflow run (e.g. `running`, `completed`, `failed`).
	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 (WorkflowRunStatusResponse) RawJSON added in v0.4.1

func (r WorkflowRunStatusResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*WorkflowRunStatusResponse) UnmarshalJSON added in v0.4.1

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

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