githubcomlightfldlightfieldgo

package module
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: Apache-2.0 Imports: 18 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.6.0-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: map[string]githubcomlightfldlightfieldgo.AccountNewParamsFieldUnion{
			"$name": {
				OfString: githubcomlightfldlightfieldgo.String("Acme Corp"),
			},
			"$industry": {
				OfStringArray: []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 `api:"required"`. These fields are always serialized, even their zero values.

Optional primitive types are wrapped in a param.Opt[T]. These fields can be set with the provided constructors, 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: map[string]githubcomlightfldlightfieldgo.OpportunityNewParamsFieldUnion{
		"$name": {
			OfString: githubcomlightfldlightfieldgo.String("Enterprise Platform Deal"),
		},
		"$stage": {
			OfString: githubcomlightfldlightfieldgo.String("opt_01abc2def3ghi4jkl5mno6pqr"),
		},
	},
	Relationships: map[string]githubcomlightfldlightfieldgo.OpportunityNewParamsRelationshipUnion{
		"$account": {
			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: map[string]githubcomlightfldlightfieldgo.AccountNewParamsFieldUnion{
			"$name": {
				OfString: githubcomlightfldlightfieldgo.String("Acme Corp"),
			},
			"$website": {
				OfStringArray: []string{"https://acme.com"},
			},
			"$industry": {
				OfStringArray: []string{"opt_01j0x6q3m9v2p4t7k8n5r1s2u", "opt_01h4b7c9d2e5f8g1j3k6m0n4p"},
			},
			"$headcount": {
				OfString: githubcomlightfldlightfieldgo.String("opt_01r5t8y2u6i9o3p7a1s4d6f8g"),
			},
			"$linkedIn": {
				OfString: githubcomlightfldlightfieldgo.String("https://linkedin.com/company/acme"),
			},
			"$primaryAddress": {
				OfAddress: &githubcomlightfldlightfieldgo.AccountNewParamsFieldAddress{
					Street:  githubcomlightfldlightfieldgo.String("123 Market St"),
					City:    githubcomlightfldlightfieldgo.String("San Francisco"),
					State:   githubcomlightfldlightfieldgo.String("CA"),
					Country: githubcomlightfldlightfieldgo.String("US"),
				},
			},
		},
		Relationships: map[string]githubcomlightfldlightfieldgo.AccountNewParamsRelationshipUnion{
			"$owner": {
				OfString: githubcomlightfldlightfieldgo.String("mem_cm1abc123def456"),
			},
			"$contact": {
				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"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    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 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 AccountCreateResponseFieldValueAddress added in v0.4.1

type AccountCreateResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountCreateResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountCreateResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type AccountCreateResponseFieldValueFullName added in v0.4.1

type AccountCreateResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountCreateResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountCreateResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

func (r *AccountCreateResponseFieldValueFullName) 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [AccountCreateResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [AccountCreateResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [AccountCreateResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [AccountCreateResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [AccountCreateResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [AccountCreateResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [AccountCreateResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [AccountCreateResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [AccountCreateResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [AccountCreateResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], AccountCreateResponseFieldValueAddress, AccountCreateResponseFieldValueFullName.

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 OfStringArray]

func (AccountCreateResponseFieldValueUnion) AsAddress added in v0.4.1

func (AccountCreateResponseFieldValueUnion) AsBool added in v0.4.1

func (AccountCreateResponseFieldValueUnion) AsFloat added in v0.4.1

func (AccountCreateResponseFieldValueUnion) AsFullName added in v0.4.1

func (AccountCreateResponseFieldValueUnion) AsString added in v0.4.1

func (AccountCreateResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u AccountCreateResponseFieldValueUnion) AsStringArray() (v []string)

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 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 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 AccountDefinitionsResponseFieldDefinitionTypeConfiguration `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 AccountDefinitionsResponseFieldDefinitionTypeConfiguration added in v0.4.1

type AccountDefinitionsResponseFieldDefinitionTypeConfiguration struct {
	// ISO 4217 3-letter currency code.
	Currency string `json:"currency"`
	// Social platform associated with this handle field.
	//
	// Any of "TWITTER", "LINKEDIN", "FACEBOOK", "INSTAGRAM".
	HandleService string `json:"handleService"`
	// Whether this field accepts multiple values.
	MultipleValues bool `json:"multipleValues"`
	// Available options for select fields.
	Options []AccountDefinitionsResponseFieldDefinitionTypeConfigurationOption `json:"options"`
	// Whether values for this field must be unique.
	Unique bool `json:"unique"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Currency       respjson.Field
		HandleService  respjson.Field
		MultipleValues respjson.Field
		Options        respjson.Field
		Unique         respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Type-specific configuration (e.g. select options, currency code).

func (AccountDefinitionsResponseFieldDefinitionTypeConfiguration) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountDefinitionsResponseFieldDefinitionTypeConfiguration) UnmarshalJSON added in v0.4.1

type AccountDefinitionsResponseFieldDefinitionTypeConfigurationOption added in v0.4.1

type AccountDefinitionsResponseFieldDefinitionTypeConfigurationOption struct {
	// Unique identifier of the select option.
	ID string `json:"id" api:"required"`
	// Human-readable display name of the option.
	Label string `json:"label" api:"required"`
	// Description of the option, or null.
	Description string `json:"description" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Label       respjson.Field
		Description respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationOption) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountDefinitionsResponseFieldDefinitionTypeConfigurationOption) UnmarshalJSON added in v0.4.1

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"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    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 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 AccountListResponseDataFieldValueAddress added in v0.4.1

type AccountListResponseDataFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountListResponseDataFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountListResponseDataFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type AccountListResponseDataFieldValueFullName added in v0.4.1

type AccountListResponseDataFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountListResponseDataFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountListResponseDataFieldValueFullName) UnmarshalJSON added in v0.4.1

func (r *AccountListResponseDataFieldValueFullName) 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [AccountListResponseDataFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [AccountListResponseDataFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [AccountListResponseDataFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [AccountListResponseDataFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [AccountListResponseDataFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [AccountListResponseDataFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [AccountListResponseDataFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [AccountListResponseDataFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [AccountListResponseDataFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [AccountListResponseDataFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], AccountListResponseDataFieldValueAddress, AccountListResponseDataFieldValueFullName.

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 OfStringArray]

func (AccountListResponseDataFieldValueUnion) AsAddress added in v0.4.1

func (AccountListResponseDataFieldValueUnion) AsBool

func (AccountListResponseDataFieldValueUnion) AsFloat

func (AccountListResponseDataFieldValueUnion) AsFullName added in v0.4.1

func (AccountListResponseDataFieldValueUnion) AsString

func (AccountListResponseDataFieldValueUnion) AsStringArray added in v0.4.1

func (u AccountListResponseDataFieldValueUnion) AsStringArray() (v []string)

func (AccountListResponseDataFieldValueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountListResponseDataFieldValueUnion) UnmarshalJSON

func (r *AccountListResponseDataFieldValueUnion) 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 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 map[string]AccountNewParamsFieldUnion `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 map[string]AccountNewParamsRelationshipUnion `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 AccountNewParamsFieldAddress added in v0.4.1

type AccountNewParamsFieldAddress 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
}

func (AccountNewParamsFieldAddress) MarshalJSON added in v0.4.1

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

func (*AccountNewParamsFieldAddress) UnmarshalJSON added in v0.4.1

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

type AccountNewParamsFieldFullName added in v0.4.1

type AccountNewParamsFieldFullName 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
}

func (AccountNewParamsFieldFullName) MarshalJSON added in v0.4.1

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

func (*AccountNewParamsFieldFullName) UnmarshalJSON added in v0.4.1

func (r *AccountNewParamsFieldFullName) 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"`
	OfStringArray []string                       `json:",omitzero,inline"`
	OfAddress     *AccountNewParamsFieldAddress  `json:",omitzero,inline"`
	OfFullName    *AccountNewParamsFieldFullName `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 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 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"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    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 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 AccountRetrieveResponseFieldValueAddress added in v0.4.1

type AccountRetrieveResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountRetrieveResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountRetrieveResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type AccountRetrieveResponseFieldValueFullName added in v0.4.1

type AccountRetrieveResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountRetrieveResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountRetrieveResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

func (r *AccountRetrieveResponseFieldValueFullName) 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [AccountRetrieveResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [AccountRetrieveResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [AccountRetrieveResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [AccountRetrieveResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [AccountRetrieveResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [AccountRetrieveResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [AccountRetrieveResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [AccountRetrieveResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [AccountRetrieveResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [AccountRetrieveResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], AccountRetrieveResponseFieldValueAddress, AccountRetrieveResponseFieldValueFullName.

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 OfStringArray]

func (AccountRetrieveResponseFieldValueUnion) AsAddress added in v0.4.1

func (AccountRetrieveResponseFieldValueUnion) AsBool added in v0.4.1

func (AccountRetrieveResponseFieldValueUnion) AsFloat added in v0.4.1

func (AccountRetrieveResponseFieldValueUnion) AsFullName added in v0.4.1

func (AccountRetrieveResponseFieldValueUnion) AsString added in v0.4.1

func (AccountRetrieveResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u AccountRetrieveResponseFieldValueUnion) AsStringArray() (v []string)

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 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 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, and `$field` query parameters to filter. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about <u>[pagination](/using-the-api/list-endpoints/#pagination)</u> and <u>[filtering](/using-the-api/list-endpoints/#filtering)</u>.

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

To avoid duplicates, we recommend a find-or-create pattern — use <u>[list filtering](/using-the-api/list-endpoints/#filtering)</u> to check if a record exists before creating.

**[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 map[string]AccountUpdateParamsFieldUnion `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 map[string]AccountUpdateParamsRelationship `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 AccountUpdateParamsFieldAddress added in v0.4.1

type AccountUpdateParamsFieldAddress 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
}

func (AccountUpdateParamsFieldAddress) MarshalJSON added in v0.4.1

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

func (*AccountUpdateParamsFieldAddress) UnmarshalJSON added in v0.4.1

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

type AccountUpdateParamsFieldFullName added in v0.4.1

type AccountUpdateParamsFieldFullName 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
}

func (AccountUpdateParamsFieldFullName) MarshalJSON added in v0.4.1

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

func (*AccountUpdateParamsFieldFullName) UnmarshalJSON added in v0.4.1

func (r *AccountUpdateParamsFieldFullName) 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"`
	OfStringArray []string                          `json:",omitzero,inline"`
	OfAddress     *AccountUpdateParamsFieldAddress  `json:",omitzero,inline"`
	OfFullName    *AccountUpdateParamsFieldFullName `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 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 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"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    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 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 AccountUpdateResponseFieldValueAddress added in v0.4.1

type AccountUpdateResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountUpdateResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountUpdateResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type AccountUpdateResponseFieldValueFullName added in v0.4.1

type AccountUpdateResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccountUpdateResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*AccountUpdateResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

func (r *AccountUpdateResponseFieldValueFullName) 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [AccountUpdateResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [AccountUpdateResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [AccountUpdateResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [AccountUpdateResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [AccountUpdateResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [AccountUpdateResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [AccountUpdateResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [AccountUpdateResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [AccountUpdateResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [AccountUpdateResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], AccountUpdateResponseFieldValueAddress, AccountUpdateResponseFieldValueFullName.

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 OfStringArray]

func (AccountUpdateResponseFieldValueUnion) AsAddress added in v0.4.1

func (AccountUpdateResponseFieldValueUnion) AsBool

func (AccountUpdateResponseFieldValueUnion) AsFloat

func (AccountUpdateResponseFieldValueUnion) AsFullName added in v0.4.1

func (AccountUpdateResponseFieldValueUnion) AsString

func (AccountUpdateResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u AccountUpdateResponseFieldValueUnion) AsStringArray() (v []string)

func (AccountUpdateResponseFieldValueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AccountUpdateResponseFieldValueUnion) UnmarshalJSON

func (r *AccountUpdateResponseFieldValueUnion) 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 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
	// Lists are curated collections of accounts, contacts, or opportunities in
	// Lightfield. Each list contains entities of a single type.
	List ListService
	// Meetings represent synced or manually created interactions in Lightfield. Read
	// responses are privacy-aware and may be redacted based on the caller. For
	// transcript uploads and attachment flows, see
	// <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u>.
	Meeting MeetingService
	// Notes represent free-form text records in Lightfield. Each note can be
	// associated with zero or more accounts and opportunities.
	Note NoteService
	// 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
	// Tasks represent action items in Lightfield. Each task belongs to an account, is
	// assigned to a member, and can optionally be associated with an opportunity.
	Task TaskService
	// 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
	// Files are used to upload documents via presigned URLs. After uploading and
	// completing a file, link it to resources through their own APIs (e.g. attach a
	// transcript to a meeting). See
	// <u>[File uploads](/using-the-api/file-uploads/)</u> for the full upload flow and
	// supported purposes. For meeting transcript attachments, see
	// <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u>.
	File FileService
}

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"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    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 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 ContactCreateResponseFieldValueAddress added in v0.4.1

type ContactCreateResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactCreateResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactCreateResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type ContactCreateResponseFieldValueFullName added in v0.4.1

type ContactCreateResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactCreateResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactCreateResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

func (r *ContactCreateResponseFieldValueFullName) 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [ContactCreateResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [ContactCreateResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [ContactCreateResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [ContactCreateResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [ContactCreateResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [ContactCreateResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [ContactCreateResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [ContactCreateResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [ContactCreateResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [ContactCreateResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ContactCreateResponseFieldValueAddress, ContactCreateResponseFieldValueFullName.

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 OfStringArray]

func (ContactCreateResponseFieldValueUnion) AsAddress added in v0.4.1

func (ContactCreateResponseFieldValueUnion) AsBool added in v0.4.1

func (ContactCreateResponseFieldValueUnion) AsFloat added in v0.4.1

func (ContactCreateResponseFieldValueUnion) AsFullName added in v0.4.1

func (ContactCreateResponseFieldValueUnion) AsString added in v0.4.1

func (ContactCreateResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u ContactCreateResponseFieldValueUnion) AsStringArray() (v []string)

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 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 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 ContactDefinitionsResponseFieldDefinitionTypeConfiguration `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 ContactDefinitionsResponseFieldDefinitionTypeConfiguration added in v0.4.1

type ContactDefinitionsResponseFieldDefinitionTypeConfiguration struct {
	// ISO 4217 3-letter currency code.
	Currency string `json:"currency"`
	// Social platform associated with this handle field.
	//
	// Any of "TWITTER", "LINKEDIN", "FACEBOOK", "INSTAGRAM".
	HandleService string `json:"handleService"`
	// Whether this field accepts multiple values.
	MultipleValues bool `json:"multipleValues"`
	// Available options for select fields.
	Options []ContactDefinitionsResponseFieldDefinitionTypeConfigurationOption `json:"options"`
	// Whether values for this field must be unique.
	Unique bool `json:"unique"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Currency       respjson.Field
		HandleService  respjson.Field
		MultipleValues respjson.Field
		Options        respjson.Field
		Unique         respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Type-specific configuration (e.g. select options, currency code).

func (ContactDefinitionsResponseFieldDefinitionTypeConfiguration) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactDefinitionsResponseFieldDefinitionTypeConfiguration) UnmarshalJSON added in v0.4.1

type ContactDefinitionsResponseFieldDefinitionTypeConfigurationOption added in v0.4.1

type ContactDefinitionsResponseFieldDefinitionTypeConfigurationOption struct {
	// Unique identifier of the select option.
	ID string `json:"id" api:"required"`
	// Human-readable display name of the option.
	Label string `json:"label" api:"required"`
	// Description of the option, or null.
	Description string `json:"description" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Label       respjson.Field
		Description respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationOption) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactDefinitionsResponseFieldDefinitionTypeConfigurationOption) UnmarshalJSON added in v0.4.1

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"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    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 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 ContactListResponseDataFieldValueAddress added in v0.4.1

type ContactListResponseDataFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactListResponseDataFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactListResponseDataFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type ContactListResponseDataFieldValueFullName added in v0.4.1

type ContactListResponseDataFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactListResponseDataFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactListResponseDataFieldValueFullName) UnmarshalJSON added in v0.4.1

func (r *ContactListResponseDataFieldValueFullName) 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [ContactListResponseDataFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [ContactListResponseDataFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [ContactListResponseDataFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [ContactListResponseDataFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [ContactListResponseDataFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [ContactListResponseDataFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [ContactListResponseDataFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [ContactListResponseDataFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [ContactListResponseDataFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [ContactListResponseDataFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ContactListResponseDataFieldValueAddress, ContactListResponseDataFieldValueFullName.

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 OfStringArray]

func (ContactListResponseDataFieldValueUnion) AsAddress added in v0.4.1

func (ContactListResponseDataFieldValueUnion) AsBool

func (ContactListResponseDataFieldValueUnion) AsFloat

func (ContactListResponseDataFieldValueUnion) AsFullName added in v0.4.1

func (ContactListResponseDataFieldValueUnion) AsString

func (ContactListResponseDataFieldValueUnion) AsStringArray added in v0.4.1

func (u ContactListResponseDataFieldValueUnion) AsStringArray() (v []string)

func (ContactListResponseDataFieldValueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactListResponseDataFieldValueUnion) UnmarshalJSON

func (r *ContactListResponseDataFieldValueUnion) 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 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 map[string]ContactNewParamsFieldUnion `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 map[string]ContactNewParamsRelationshipUnion `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 ContactNewParamsFieldAddress added in v0.4.1

type ContactNewParamsFieldAddress 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
}

func (ContactNewParamsFieldAddress) MarshalJSON added in v0.4.1

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

func (*ContactNewParamsFieldAddress) UnmarshalJSON added in v0.4.1

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

type ContactNewParamsFieldFullName added in v0.4.1

type ContactNewParamsFieldFullName 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
}

func (ContactNewParamsFieldFullName) MarshalJSON added in v0.4.1

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

func (*ContactNewParamsFieldFullName) UnmarshalJSON added in v0.4.1

func (r *ContactNewParamsFieldFullName) 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"`
	OfStringArray []string                       `json:",omitzero,inline"`
	OfAddress     *ContactNewParamsFieldAddress  `json:",omitzero,inline"`
	OfFullName    *ContactNewParamsFieldFullName `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 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 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"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    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 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 ContactRetrieveResponseFieldValueAddress added in v0.4.1

type ContactRetrieveResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactRetrieveResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactRetrieveResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type ContactRetrieveResponseFieldValueFullName added in v0.4.1

type ContactRetrieveResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactRetrieveResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactRetrieveResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

func (r *ContactRetrieveResponseFieldValueFullName) 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [ContactRetrieveResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [ContactRetrieveResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [ContactRetrieveResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [ContactRetrieveResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [ContactRetrieveResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [ContactRetrieveResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [ContactRetrieveResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [ContactRetrieveResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [ContactRetrieveResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [ContactRetrieveResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ContactRetrieveResponseFieldValueAddress, ContactRetrieveResponseFieldValueFullName.

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 OfStringArray]

func (ContactRetrieveResponseFieldValueUnion) AsAddress added in v0.4.1

func (ContactRetrieveResponseFieldValueUnion) AsBool added in v0.4.1

func (ContactRetrieveResponseFieldValueUnion) AsFloat added in v0.4.1

func (ContactRetrieveResponseFieldValueUnion) AsFullName added in v0.4.1

func (ContactRetrieveResponseFieldValueUnion) AsString added in v0.4.1

func (ContactRetrieveResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u ContactRetrieveResponseFieldValueUnion) AsStringArray() (v []string)

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 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 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, and `$field` query parameters to filter. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about <u>[pagination](/using-the-api/list-endpoints/#pagination)</u> and <u>[filtering](/using-the-api/list-endpoints/#filtering)</u>.

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

To avoid duplicates, we recommend a find-or-create pattern — use <u>[list filtering](/using-the-api/list-endpoints/#filtering)</u> to check if a record exists before creating.

**[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 map[string]ContactUpdateParamsFieldUnion `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 map[string]ContactUpdateParamsRelationship `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 ContactUpdateParamsFieldAddress added in v0.4.1

type ContactUpdateParamsFieldAddress 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
}

func (ContactUpdateParamsFieldAddress) MarshalJSON added in v0.4.1

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

func (*ContactUpdateParamsFieldAddress) UnmarshalJSON added in v0.4.1

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

type ContactUpdateParamsFieldFullName added in v0.4.1

type ContactUpdateParamsFieldFullName 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
}

func (ContactUpdateParamsFieldFullName) MarshalJSON added in v0.4.1

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

func (*ContactUpdateParamsFieldFullName) UnmarshalJSON added in v0.4.1

func (r *ContactUpdateParamsFieldFullName) 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"`
	OfStringArray []string                          `json:",omitzero,inline"`
	OfAddress     *ContactUpdateParamsFieldAddress  `json:",omitzero,inline"`
	OfFullName    *ContactUpdateParamsFieldFullName `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 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 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"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    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 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 ContactUpdateResponseFieldValueAddress added in v0.4.1

type ContactUpdateResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactUpdateResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactUpdateResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type ContactUpdateResponseFieldValueFullName added in v0.4.1

type ContactUpdateResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContactUpdateResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ContactUpdateResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

func (r *ContactUpdateResponseFieldValueFullName) 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [ContactUpdateResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [ContactUpdateResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [ContactUpdateResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [ContactUpdateResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [ContactUpdateResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [ContactUpdateResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [ContactUpdateResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [ContactUpdateResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [ContactUpdateResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [ContactUpdateResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ContactUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ContactUpdateResponseFieldValueAddress, ContactUpdateResponseFieldValueFullName.

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 OfStringArray]

func (ContactUpdateResponseFieldValueUnion) AsAddress added in v0.4.1

func (ContactUpdateResponseFieldValueUnion) AsBool

func (ContactUpdateResponseFieldValueUnion) AsFloat

func (ContactUpdateResponseFieldValueUnion) AsFullName added in v0.4.1

func (ContactUpdateResponseFieldValueUnion) AsString

func (ContactUpdateResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u ContactUpdateResponseFieldValueUnion) AsStringArray() (v []string)

func (ContactUpdateResponseFieldValueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ContactUpdateResponseFieldValueUnion) UnmarshalJSON

func (r *ContactUpdateResponseFieldValueUnion) 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 Error

type Error = apierror.Error

type FileCancelParams added in v0.4.1

type FileCancelParams struct {
	Body FileCancelParamsBody
	// contains filtered or unexported fields
}

func (FileCancelParams) MarshalJSON added in v0.4.1

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

func (*FileCancelParams) UnmarshalJSON added in v0.4.1

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

type FileCancelParamsBody added in v0.4.1

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

func (FileCancelParamsBody) MarshalJSON added in v0.4.1

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

func (*FileCancelParamsBody) UnmarshalJSON added in v0.4.1

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

type FileCancelResponse added in v0.4.1

type FileCancelResponse struct {
	// Unique identifier for the file.
	ID string `json:"id" api:"required"`
	// When the file upload was completed.
	CompletedAt string `json:"completedAt" api:"required"`
	// When the file upload session was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// When the upload session expires. Null once completed, cancelled, or expired.
	ExpiresAt string `json:"expiresAt" api:"required"`
	// Original filename.
	Filename string `json:"filename" api:"required"`
	// MIME type of the file.
	MimeType string `json:"mimeType" api:"required"`
	// File size in bytes.
	SizeBytes int64 `json:"sizeBytes" api:"required"`
	// Current upload status of the file.
	//
	// Any of "PENDING", "COMPLETED", "CANCELLED", "EXPIRED".
	Status FileCancelResponseStatus `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CompletedAt respjson.Field
		CreatedAt   respjson.Field
		ExpiresAt   respjson.Field
		Filename    respjson.Field
		MimeType    respjson.Field
		SizeBytes   respjson.Field
		Status      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FileCancelResponse) RawJSON added in v0.4.1

func (r FileCancelResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*FileCancelResponse) UnmarshalJSON added in v0.4.1

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

type FileCancelResponseStatus added in v0.4.1

type FileCancelResponseStatus string

Current upload status of the file.

const (
	FileCancelResponseStatusPending   FileCancelResponseStatus = "PENDING"
	FileCancelResponseStatusCompleted FileCancelResponseStatus = "COMPLETED"
	FileCancelResponseStatusCancelled FileCancelResponseStatus = "CANCELLED"
	FileCancelResponseStatusExpired   FileCancelResponseStatus = "EXPIRED"
)

type FileCompleteParams added in v0.4.1

type FileCompleteParams struct {
	// Optional MD5 hex digest of the uploaded file for checksum verification.
	Md5 param.Opt[string] `json:"md5,omitzero"`
	// contains filtered or unexported fields
}

func (FileCompleteParams) MarshalJSON added in v0.4.1

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

func (*FileCompleteParams) UnmarshalJSON added in v0.4.1

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

type FileCompleteResponse added in v0.4.1

type FileCompleteResponse struct {
	// Unique identifier for the file.
	ID string `json:"id" api:"required"`
	// When the file upload was completed.
	CompletedAt string `json:"completedAt" api:"required"`
	// When the file upload session was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// When the upload session expires. Null once completed, cancelled, or expired.
	ExpiresAt string `json:"expiresAt" api:"required"`
	// Original filename.
	Filename string `json:"filename" api:"required"`
	// MIME type of the file.
	MimeType string `json:"mimeType" api:"required"`
	// File size in bytes.
	SizeBytes int64 `json:"sizeBytes" api:"required"`
	// Current upload status of the file.
	//
	// Any of "PENDING", "COMPLETED", "CANCELLED", "EXPIRED".
	Status FileCompleteResponseStatus `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CompletedAt respjson.Field
		CreatedAt   respjson.Field
		ExpiresAt   respjson.Field
		Filename    respjson.Field
		MimeType    respjson.Field
		SizeBytes   respjson.Field
		Status      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FileCompleteResponse) RawJSON added in v0.4.1

func (r FileCompleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*FileCompleteResponse) UnmarshalJSON added in v0.4.1

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

type FileCompleteResponseStatus added in v0.4.1

type FileCompleteResponseStatus string

Current upload status of the file.

const (
	FileCompleteResponseStatusPending   FileCompleteResponseStatus = "PENDING"
	FileCompleteResponseStatusCompleted FileCompleteResponseStatus = "COMPLETED"
	FileCompleteResponseStatusCancelled FileCompleteResponseStatus = "CANCELLED"
	FileCompleteResponseStatusExpired   FileCompleteResponseStatus = "EXPIRED"
)

type FileCreateResponse added in v0.4.1

type FileCreateResponse struct {
	// Unique identifier for the file.
	ID string `json:"id" api:"required"`
	// When the file upload was completed.
	CompletedAt string `json:"completedAt" api:"required"`
	// When the file upload session was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// When the upload session expires. Null once completed, cancelled, or expired.
	ExpiresAt string `json:"expiresAt" api:"required"`
	// Original filename.
	Filename string `json:"filename" api:"required"`
	// MIME type of the file.
	MimeType string `json:"mimeType" api:"required"`
	// File size in bytes.
	SizeBytes int64 `json:"sizeBytes" api:"required"`
	// Current upload status of the file.
	//
	// Any of "PENDING", "COMPLETED", "CANCELLED", "EXPIRED".
	Status FileCreateResponseStatus `json:"status" api:"required"`
	// Headers to include in the upload request.
	UploadHeaders map[string]string `json:"uploadHeaders" api:"required"`
	// Upload URL. Upload the file bytes directly to this URL.
	UploadURL string `json:"uploadUrl" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CompletedAt   respjson.Field
		CreatedAt     respjson.Field
		ExpiresAt     respjson.Field
		Filename      respjson.Field
		MimeType      respjson.Field
		SizeBytes     respjson.Field
		Status        respjson.Field
		UploadHeaders respjson.Field
		UploadURL     respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FileCreateResponse) RawJSON added in v0.4.1

func (r FileCreateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*FileCreateResponse) UnmarshalJSON added in v0.4.1

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

type FileCreateResponseStatus added in v0.4.1

type FileCreateResponseStatus string

Current upload status of the file.

const (
	FileCreateResponseStatusPending   FileCreateResponseStatus = "PENDING"
	FileCreateResponseStatusCompleted FileCreateResponseStatus = "COMPLETED"
	FileCreateResponseStatusCancelled FileCreateResponseStatus = "CANCELLED"
	FileCreateResponseStatusExpired   FileCreateResponseStatus = "EXPIRED"
)

type FileListParams added in v0.4.1

type FileListParams 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 (FileListParams) URLQuery added in v0.4.1

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

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

type FileListResponse added in v0.4.1

type FileListResponse struct {
	// Array of file objects for the current page.
	Data []FileListResponseData `json:"data" api:"required"`
	// The object type, always `"list"`.
	Object string `json:"object" api:"required"`
	// Total number of matching files.
	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 (FileListResponse) RawJSON added in v0.4.1

func (r FileListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*FileListResponse) UnmarshalJSON added in v0.4.1

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

type FileListResponseData added in v0.4.1

type FileListResponseData struct {
	// Unique identifier for the file.
	ID string `json:"id" api:"required"`
	// When the file upload was completed.
	CompletedAt string `json:"completedAt" api:"required"`
	// When the file upload session was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// When the upload session expires. Null once completed, cancelled, or expired.
	ExpiresAt string `json:"expiresAt" api:"required"`
	// Original filename.
	Filename string `json:"filename" api:"required"`
	// MIME type of the file.
	MimeType string `json:"mimeType" api:"required"`
	// File size in bytes.
	SizeBytes int64 `json:"sizeBytes" api:"required"`
	// Current upload status of the file.
	//
	// Any of "PENDING", "COMPLETED", "CANCELLED", "EXPIRED".
	Status string `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CompletedAt respjson.Field
		CreatedAt   respjson.Field
		ExpiresAt   respjson.Field
		Filename    respjson.Field
		MimeType    respjson.Field
		SizeBytes   respjson.Field
		Status      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FileListResponseData) RawJSON added in v0.4.1

func (r FileListResponseData) RawJSON() string

Returns the unmodified JSON received from the API

func (*FileListResponseData) UnmarshalJSON added in v0.4.1

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

type FileNewParams added in v0.4.1

type FileNewParams struct {
	// Original filename.
	Filename string `json:"filename" api:"required"`
	// MIME type of the file. Must be allowed for the given purpose (if specified).
	MimeType string `json:"mimeType" api:"required"`
	// Expected file size in bytes. Maximum 512 MB.
	SizeBytes int64 `json:"sizeBytes" api:"required"`
	// Optional validation hint. When provided, the server enforces purpose-specific
	// MIME type and file size constraints. Use `meeting_transcript` for files that
	// will be attached to a meeting as its transcript. Use `knowledge_user` or
	// `knowledge_workspace` to add the file to the authenticated user's or workspace's
	// Knowledge, making it available to the AI assistant. Not persisted or returned in
	// responses.
	//
	// Any of "meeting_transcript", "knowledge_user", "knowledge_workspace".
	Purpose FileNewParamsPurpose `json:"purpose,omitzero"`
	// contains filtered or unexported fields
}

func (FileNewParams) MarshalJSON added in v0.4.1

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

func (*FileNewParams) UnmarshalJSON added in v0.4.1

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

type FileNewParamsPurpose added in v0.4.1

type FileNewParamsPurpose string

Optional validation hint. When provided, the server enforces purpose-specific MIME type and file size constraints. Use `meeting_transcript` for files that will be attached to a meeting as its transcript. Use `knowledge_user` or `knowledge_workspace` to add the file to the authenticated user's or workspace's Knowledge, making it available to the AI assistant. Not persisted or returned in responses.

const (
	FileNewParamsPurposeMeetingTranscript  FileNewParamsPurpose = "meeting_transcript"
	FileNewParamsPurposeKnowledgeUser      FileNewParamsPurpose = "knowledge_user"
	FileNewParamsPurposeKnowledgeWorkspace FileNewParamsPurpose = "knowledge_workspace"
)

type FileRetrieveResponse added in v0.4.1

type FileRetrieveResponse struct {
	// Unique identifier for the file.
	ID string `json:"id" api:"required"`
	// When the file upload was completed.
	CompletedAt string `json:"completedAt" api:"required"`
	// When the file upload session was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// When the upload session expires. Null once completed, cancelled, or expired.
	ExpiresAt string `json:"expiresAt" api:"required"`
	// Original filename.
	Filename string `json:"filename" api:"required"`
	// MIME type of the file.
	MimeType string `json:"mimeType" api:"required"`
	// File size in bytes.
	SizeBytes int64 `json:"sizeBytes" api:"required"`
	// Current upload status of the file.
	//
	// Any of "PENDING", "COMPLETED", "CANCELLED", "EXPIRED".
	Status FileRetrieveResponseStatus `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CompletedAt respjson.Field
		CreatedAt   respjson.Field
		ExpiresAt   respjson.Field
		Filename    respjson.Field
		MimeType    respjson.Field
		SizeBytes   respjson.Field
		Status      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FileRetrieveResponse) RawJSON added in v0.4.1

func (r FileRetrieveResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*FileRetrieveResponse) UnmarshalJSON added in v0.4.1

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

type FileRetrieveResponseStatus added in v0.4.1

type FileRetrieveResponseStatus string

Current upload status of the file.

const (
	FileRetrieveResponseStatusPending   FileRetrieveResponseStatus = "PENDING"
	FileRetrieveResponseStatusCompleted FileRetrieveResponseStatus = "COMPLETED"
	FileRetrieveResponseStatusCancelled FileRetrieveResponseStatus = "CANCELLED"
	FileRetrieveResponseStatusExpired   FileRetrieveResponseStatus = "EXPIRED"
)

type FileService added in v0.4.1

type FileService struct {
	Options []option.RequestOption
}

Files are used to upload documents via presigned URLs. After uploading and completing a file, link it to resources through their own APIs (e.g. attach a transcript to a meeting). See <u>[File uploads](/using-the-api/file-uploads/)</u> for the full upload flow and supported purposes. For meeting transcript attachments, see <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u>.

FileService 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 NewFileService method instead.

func NewFileService added in v0.4.1

func NewFileService(opts ...option.RequestOption) (r FileService)

NewFileService 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 (*FileService) Cancel added in v0.4.1

func (r *FileService) Cancel(ctx context.Context, id string, body FileCancelParams, opts ...option.RequestOption) (res *FileCancelResponse, err error)

Cancels a pending upload by transitioning the file to `CANCELLED`. Only files in `PENDING` status can be cancelled. **[Required scope](/using-the-api/scopes/):** `files:create`

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

func (*FileService) Complete added in v0.4.1

func (r *FileService) Complete(ctx context.Context, id string, body FileCompleteParams, opts ...option.RequestOption) (res *FileCompleteResponse, err error)

Finalizes an upload after the file bytes have been uploaded.

If an optional `md5` hex digest is provided, the server validates the checksum before marking the file as completed.

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

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

func (*FileService) Get added in v0.4.1

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

Retrieves a single file by its ID.

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

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

func (*FileService) List added in v0.4.1

func (r *FileService) List(ctx context.Context, query FileListParams, opts ...option.RequestOption) (res *FileListResponse, err error)

Returns a paginated list of files 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/):** `files:read`

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

func (*FileService) New added in v0.4.1

func (r *FileService) New(ctx context.Context, body FileNewParams, opts ...option.RequestOption) (res *FileCreateResponse, err error)

Creates a new file upload session and returns an upload URL.

After uploading the file bytes to `uploadUrl`, call `POST /v1/files/{id}/complete` to finalize the upload. Optionally pass `purpose` to validate MIME type and size constraints at creation time. See <u>[File uploads](/using-the-api/file-uploads/)</u> for the full upload flow, supported purposes, and size limits. If you are uploading a meeting transcript, see <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u> for the follow-up meeting attachment flow.

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

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

func (*FileService) URL added in v0.4.1

func (r *FileService) URL(ctx context.Context, id string, opts ...option.RequestOption) (res *FileURLResponse, err error)

Returns a temporary download URL for the file. Only available for files in `COMPLETED` status.

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

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

type FileURLResponse added in v0.4.1

type FileURLResponse struct {
	// When the download URL expires.
	ExpiresAt string `json:"expiresAt" api:"required"`
	// Temporary download URL for the file.
	URL string `json:"url" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExpiresAt   respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FileURLResponse) RawJSON added in v0.4.1

func (r FileURLResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*FileURLResponse) UnmarshalJSON added in v0.4.1

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

type ListCreateResponse added in v0.4.1

type ListCreateResponse struct {
	// Unique identifier for the list.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the list was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$objectType`).
	Fields map[string]ListCreateResponseField `json:"fields" api:"required"`
	// URL to view the list 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 (ListCreateResponse) RawJSON added in v0.4.1

func (r ListCreateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListCreateResponse) UnmarshalJSON added in v0.4.1

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

type ListCreateResponseField added in v0.4.1

type ListCreateResponseField struct {
	// The field value, or null if unset.
	Value ListCreateResponseFieldValueUnion `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 (ListCreateResponseField) RawJSON added in v0.4.1

func (r ListCreateResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListCreateResponseField) UnmarshalJSON added in v0.4.1

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

type ListCreateResponseFieldValueAddress added in v0.4.1

type ListCreateResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListCreateResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListCreateResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type ListCreateResponseFieldValueFullName added in v0.4.1

type ListCreateResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListCreateResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListCreateResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type ListCreateResponseFieldValueUnion added in v0.4.1

type ListCreateResponseFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [ListCreateResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [ListCreateResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [ListCreateResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [ListCreateResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [ListCreateResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [ListCreateResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [ListCreateResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [ListCreateResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [ListCreateResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [ListCreateResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ListCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ListCreateResponseFieldValueAddress, ListCreateResponseFieldValueFullName.

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 OfStringArray]

func (ListCreateResponseFieldValueUnion) AsAddress added in v0.4.1

func (ListCreateResponseFieldValueUnion) AsBool added in v0.4.1

func (u ListCreateResponseFieldValueUnion) AsBool() (v bool)

func (ListCreateResponseFieldValueUnion) AsFloat added in v0.4.1

func (ListCreateResponseFieldValueUnion) AsFullName added in v0.4.1

func (ListCreateResponseFieldValueUnion) AsString added in v0.4.1

func (u ListCreateResponseFieldValueUnion) AsString() (v string)

func (ListCreateResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u ListCreateResponseFieldValueUnion) AsStringArray() (v []string)

func (ListCreateResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListCreateResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type ListListAccountsParams added in v0.4.1

type ListListAccountsParams 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 (ListListAccountsParams) URLQuery added in v0.4.1

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

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

type ListListAccountsResponse added in v0.4.1

type ListListAccountsResponse struct {
	// Array of entity objects for the current page.
	Data []ListListAccountsResponseData `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 (ListListAccountsResponse) RawJSON added in v0.4.1

func (r ListListAccountsResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListListAccountsResponse) UnmarshalJSON added in v0.4.1

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

type ListListAccountsResponseData added in v0.4.1

type ListListAccountsResponseData 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]ListListAccountsResponseDataField `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]ListListAccountsResponseDataRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListListAccountsResponseData) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListAccountsResponseData) UnmarshalJSON added in v0.4.1

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

type ListListAccountsResponseDataField added in v0.4.1

type ListListAccountsResponseDataField struct {
	// The field value, or null if unset.
	Value ListListAccountsResponseDataFieldValueUnion `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 (ListListAccountsResponseDataField) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListAccountsResponseDataField) UnmarshalJSON added in v0.4.1

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

type ListListAccountsResponseDataFieldValueAddress added in v0.4.1

type ListListAccountsResponseDataFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListListAccountsResponseDataFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListAccountsResponseDataFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type ListListAccountsResponseDataFieldValueFullName added in v0.4.1

type ListListAccountsResponseDataFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListListAccountsResponseDataFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListAccountsResponseDataFieldValueFullName) UnmarshalJSON added in v0.4.1

type ListListAccountsResponseDataFieldValueUnion added in v0.4.1

type ListListAccountsResponseDataFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [ListListAccountsResponseDataFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [ListListAccountsResponseDataFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ListListAccountsResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ListListAccountsResponseDataFieldValueAddress, ListListAccountsResponseDataFieldValueFullName.

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 OfStringArray]

func (ListListAccountsResponseDataFieldValueUnion) AsAddress added in v0.4.1

func (ListListAccountsResponseDataFieldValueUnion) AsBool added in v0.4.1

func (ListListAccountsResponseDataFieldValueUnion) AsFloat added in v0.4.1

func (ListListAccountsResponseDataFieldValueUnion) AsFullName added in v0.4.1

func (ListListAccountsResponseDataFieldValueUnion) AsString added in v0.4.1

func (ListListAccountsResponseDataFieldValueUnion) AsStringArray added in v0.4.1

func (u ListListAccountsResponseDataFieldValueUnion) AsStringArray() (v []string)

func (ListListAccountsResponseDataFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListAccountsResponseDataFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type ListListAccountsResponseDataRelationship added in v0.4.1

type ListListAccountsResponseDataRelationship 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 (ListListAccountsResponseDataRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListAccountsResponseDataRelationship) UnmarshalJSON added in v0.4.1

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

type ListListContactsParams added in v0.4.1

type ListListContactsParams 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 (ListListContactsParams) URLQuery added in v0.4.1

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

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

type ListListContactsResponse added in v0.4.1

type ListListContactsResponse struct {
	// Array of entity objects for the current page.
	Data []ListListContactsResponseData `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 (ListListContactsResponse) RawJSON added in v0.4.1

func (r ListListContactsResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListListContactsResponse) UnmarshalJSON added in v0.4.1

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

type ListListContactsResponseData added in v0.4.1

type ListListContactsResponseData 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]ListListContactsResponseDataField `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]ListListContactsResponseDataRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListListContactsResponseData) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListContactsResponseData) UnmarshalJSON added in v0.4.1

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

type ListListContactsResponseDataField added in v0.4.1

type ListListContactsResponseDataField struct {
	// The field value, or null if unset.
	Value ListListContactsResponseDataFieldValueUnion `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 (ListListContactsResponseDataField) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListContactsResponseDataField) UnmarshalJSON added in v0.4.1

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

type ListListContactsResponseDataFieldValueAddress added in v0.4.1

type ListListContactsResponseDataFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListListContactsResponseDataFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListContactsResponseDataFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type ListListContactsResponseDataFieldValueFullName added in v0.4.1

type ListListContactsResponseDataFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListListContactsResponseDataFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListContactsResponseDataFieldValueFullName) UnmarshalJSON added in v0.4.1

type ListListContactsResponseDataFieldValueUnion added in v0.4.1

type ListListContactsResponseDataFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [ListListContactsResponseDataFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [ListListContactsResponseDataFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [ListListContactsResponseDataFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [ListListContactsResponseDataFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [ListListContactsResponseDataFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [ListListContactsResponseDataFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [ListListContactsResponseDataFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [ListListContactsResponseDataFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [ListListContactsResponseDataFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [ListListContactsResponseDataFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ListListContactsResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ListListContactsResponseDataFieldValueAddress, ListListContactsResponseDataFieldValueFullName.

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 OfStringArray]

func (ListListContactsResponseDataFieldValueUnion) AsAddress added in v0.4.1

func (ListListContactsResponseDataFieldValueUnion) AsBool added in v0.4.1

func (ListListContactsResponseDataFieldValueUnion) AsFloat added in v0.4.1

func (ListListContactsResponseDataFieldValueUnion) AsFullName added in v0.4.1

func (ListListContactsResponseDataFieldValueUnion) AsString added in v0.4.1

func (ListListContactsResponseDataFieldValueUnion) AsStringArray added in v0.4.1

func (u ListListContactsResponseDataFieldValueUnion) AsStringArray() (v []string)

func (ListListContactsResponseDataFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListContactsResponseDataFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type ListListContactsResponseDataRelationship added in v0.4.1

type ListListContactsResponseDataRelationship 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 (ListListContactsResponseDataRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListContactsResponseDataRelationship) UnmarshalJSON added in v0.4.1

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

type ListListOpportunitiesParams added in v0.4.1

type ListListOpportunitiesParams 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 (ListListOpportunitiesParams) URLQuery added in v0.4.1

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

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

type ListListOpportunitiesResponse added in v0.4.1

type ListListOpportunitiesResponse struct {
	// Array of entity objects for the current page.
	Data []ListListOpportunitiesResponseData `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 (ListListOpportunitiesResponse) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListOpportunitiesResponse) UnmarshalJSON added in v0.4.1

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

type ListListOpportunitiesResponseData added in v0.4.1

type ListListOpportunitiesResponseData 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]ListListOpportunitiesResponseDataField `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]ListListOpportunitiesResponseDataRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListListOpportunitiesResponseData) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListOpportunitiesResponseData) UnmarshalJSON added in v0.4.1

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

type ListListOpportunitiesResponseDataField added in v0.4.1

type ListListOpportunitiesResponseDataField struct {
	// The field value, or null if unset.
	Value ListListOpportunitiesResponseDataFieldValueUnion `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 (ListListOpportunitiesResponseDataField) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListOpportunitiesResponseDataField) UnmarshalJSON added in v0.4.1

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

type ListListOpportunitiesResponseDataFieldValueAddress added in v0.4.1

type ListListOpportunitiesResponseDataFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListListOpportunitiesResponseDataFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListOpportunitiesResponseDataFieldValueAddress) UnmarshalJSON added in v0.4.1

type ListListOpportunitiesResponseDataFieldValueFullName added in v0.4.1

type ListListOpportunitiesResponseDataFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListListOpportunitiesResponseDataFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListOpportunitiesResponseDataFieldValueFullName) UnmarshalJSON added in v0.4.1

type ListListOpportunitiesResponseDataFieldValueUnion added in v0.4.1

type ListListOpportunitiesResponseDataFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant
	// [ListListOpportunitiesResponseDataFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant
	// [ListListOpportunitiesResponseDataFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ListListOpportunitiesResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ListListOpportunitiesResponseDataFieldValueAddress, ListListOpportunitiesResponseDataFieldValueFullName.

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 OfStringArray]

func (ListListOpportunitiesResponseDataFieldValueUnion) AsAddress added in v0.4.1

func (ListListOpportunitiesResponseDataFieldValueUnion) AsBool added in v0.4.1

func (ListListOpportunitiesResponseDataFieldValueUnion) AsFloat added in v0.4.1

func (ListListOpportunitiesResponseDataFieldValueUnion) AsFullName added in v0.4.1

func (ListListOpportunitiesResponseDataFieldValueUnion) AsString added in v0.4.1

func (ListListOpportunitiesResponseDataFieldValueUnion) AsStringArray added in v0.4.1

func (ListListOpportunitiesResponseDataFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListOpportunitiesResponseDataFieldValueUnion) UnmarshalJSON added in v0.4.1

type ListListOpportunitiesResponseDataRelationship added in v0.4.1

type ListListOpportunitiesResponseDataRelationship 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 (ListListOpportunitiesResponseDataRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListOpportunitiesResponseDataRelationship) UnmarshalJSON added in v0.4.1

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

type ListListParams added in v0.4.1

type ListListParams 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 (ListListParams) URLQuery added in v0.4.1

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

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

type ListListResponse added in v0.4.1

type ListListResponse struct {
	// Array of list objects for the current page.
	Data []ListListResponseData `json:"data" api:"required"`
	// The object type, always `"list"`.
	Object string `json:"object" api:"required"`
	// Total number of lists 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 (ListListResponse) RawJSON added in v0.4.1

func (r ListListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListListResponse) UnmarshalJSON added in v0.4.1

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

type ListListResponseData added in v0.4.1

type ListListResponseData struct {
	// Unique identifier for the list.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the list was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$objectType`).
	Fields map[string]ListListResponseDataField `json:"fields" api:"required"`
	// URL to view the list 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 (ListListResponseData) RawJSON added in v0.4.1

func (r ListListResponseData) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListListResponseData) UnmarshalJSON added in v0.4.1

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

type ListListResponseDataField added in v0.4.1

type ListListResponseDataField struct {
	// The field value, or null if unset.
	Value ListListResponseDataFieldValueUnion `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 (ListListResponseDataField) RawJSON added in v0.4.1

func (r ListListResponseDataField) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListListResponseDataField) UnmarshalJSON added in v0.4.1

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

type ListListResponseDataFieldValueAddress added in v0.4.1

type ListListResponseDataFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListListResponseDataFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListResponseDataFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type ListListResponseDataFieldValueFullName added in v0.4.1

type ListListResponseDataFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListListResponseDataFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListResponseDataFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type ListListResponseDataFieldValueUnion added in v0.4.1

type ListListResponseDataFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [ListListResponseDataFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [ListListResponseDataFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [ListListResponseDataFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [ListListResponseDataFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [ListListResponseDataFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [ListListResponseDataFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [ListListResponseDataFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [ListListResponseDataFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [ListListResponseDataFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [ListListResponseDataFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ListListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ListListResponseDataFieldValueAddress, ListListResponseDataFieldValueFullName.

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 OfStringArray]

func (ListListResponseDataFieldValueUnion) AsAddress added in v0.4.1

func (ListListResponseDataFieldValueUnion) AsBool added in v0.4.1

func (ListListResponseDataFieldValueUnion) AsFloat added in v0.4.1

func (ListListResponseDataFieldValueUnion) AsFullName added in v0.4.1

func (ListListResponseDataFieldValueUnion) AsString added in v0.4.1

func (ListListResponseDataFieldValueUnion) AsStringArray added in v0.4.1

func (u ListListResponseDataFieldValueUnion) AsStringArray() (v []string)

func (ListListResponseDataFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListListResponseDataFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type ListNewParams added in v0.4.1

type ListNewParams struct {
	// Field values for the new list. Required: `$name` (string) and `$objectType`.
	Fields ListNewParamsFields `json:"fields,omitzero" api:"required"`
	// Relationships to set on the new list.
	Relationships ListNewParamsRelationshipsUnion `json:"relationships,omitzero"`
	// contains filtered or unexported fields
}

func (ListNewParams) MarshalJSON added in v0.4.1

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

func (*ListNewParams) UnmarshalJSON added in v0.4.1

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

type ListNewParamsFields added in v0.4.1

type ListNewParamsFields struct {
	// Display name of the list.
	Name string `json:"$name" api:"required"`
	// The type of entities this list contains. One of `account`, `contact`, or
	// `opportunity`.
	//
	// Any of "account", "contact", "opportunity".
	ObjectType string `json:"$objectType,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Field values for the new list. Required: `$name` (string) and `$objectType`.

The properties Name, ObjectType are required.

func (ListNewParamsFields) MarshalJSON added in v0.4.1

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

func (*ListNewParamsFields) UnmarshalJSON added in v0.4.1

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

type ListNewParamsRelationshipsAccounts added in v0.4.1

type ListNewParamsRelationshipsAccounts struct {
	// Account ID(s) to add as initial members. List `$objectType` must be `account`.
	Accounts ListNewParamsRelationshipsAccountsAccountsUnion `json:"$accounts,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The property Accounts is required.

func (ListNewParamsRelationshipsAccounts) MarshalJSON added in v0.4.1

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

func (*ListNewParamsRelationshipsAccounts) UnmarshalJSON added in v0.4.1

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

type ListNewParamsRelationshipsAccountsAccountsUnion added in v0.4.1

type ListNewParamsRelationshipsAccountsAccountsUnion 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 (ListNewParamsRelationshipsAccountsAccountsUnion) MarshalJSON added in v0.4.1

func (*ListNewParamsRelationshipsAccountsAccountsUnion) UnmarshalJSON added in v0.4.1

type ListNewParamsRelationshipsContacts added in v0.4.1

type ListNewParamsRelationshipsContacts struct {
	// Contact ID(s) to add as initial members. List `$objectType` must be `contact`.
	Contacts ListNewParamsRelationshipsContactsContactsUnion `json:"$contacts,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The property Contacts is required.

func (ListNewParamsRelationshipsContacts) MarshalJSON added in v0.4.1

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

func (*ListNewParamsRelationshipsContacts) UnmarshalJSON added in v0.4.1

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

type ListNewParamsRelationshipsContactsContactsUnion added in v0.4.1

type ListNewParamsRelationshipsContactsContactsUnion 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 (ListNewParamsRelationshipsContactsContactsUnion) MarshalJSON added in v0.4.1

func (*ListNewParamsRelationshipsContactsContactsUnion) UnmarshalJSON added in v0.4.1

type ListNewParamsRelationshipsOpportunities added in v0.4.1

type ListNewParamsRelationshipsOpportunities struct {
	// Opportunity ID(s) to add as initial members. List `$objectType` must be
	// `opportunity`.
	Opportunities ListNewParamsRelationshipsOpportunitiesOpportunitiesUnion `json:"$opportunities,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The property Opportunities is required.

func (ListNewParamsRelationshipsOpportunities) MarshalJSON added in v0.4.1

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

func (*ListNewParamsRelationshipsOpportunities) UnmarshalJSON added in v0.4.1

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

type ListNewParamsRelationshipsOpportunitiesOpportunitiesUnion added in v0.4.1

type ListNewParamsRelationshipsOpportunitiesOpportunitiesUnion 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 (ListNewParamsRelationshipsOpportunitiesOpportunitiesUnion) MarshalJSON added in v0.4.1

func (*ListNewParamsRelationshipsOpportunitiesOpportunitiesUnion) UnmarshalJSON added in v0.4.1

type ListNewParamsRelationshipsUnion added in v0.4.1

type ListNewParamsRelationshipsUnion struct {
	OfListNewsRelationshipsAccounts      *ListNewParamsRelationshipsAccounts      `json:",omitzero,inline"`
	OfListNewsRelationshipsContacts      *ListNewParamsRelationshipsContacts      `json:",omitzero,inline"`
	OfListNewsRelationshipsOpportunities *ListNewParamsRelationshipsOpportunities `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 (ListNewParamsRelationshipsUnion) MarshalJSON added in v0.4.1

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

func (*ListNewParamsRelationshipsUnion) UnmarshalJSON added in v0.4.1

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

type ListRetrieveResponse added in v0.4.1

type ListRetrieveResponse struct {
	// Unique identifier for the list.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the list was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$objectType`).
	Fields map[string]ListRetrieveResponseField `json:"fields" api:"required"`
	// URL to view the list 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 (ListRetrieveResponse) RawJSON added in v0.4.1

func (r ListRetrieveResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListRetrieveResponse) UnmarshalJSON added in v0.4.1

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

type ListRetrieveResponseField added in v0.4.1

type ListRetrieveResponseField struct {
	// The field value, or null if unset.
	Value ListRetrieveResponseFieldValueUnion `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 (ListRetrieveResponseField) RawJSON added in v0.4.1

func (r ListRetrieveResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListRetrieveResponseField) UnmarshalJSON added in v0.4.1

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

type ListRetrieveResponseFieldValueAddress added in v0.4.1

type ListRetrieveResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListRetrieveResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListRetrieveResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type ListRetrieveResponseFieldValueFullName added in v0.4.1

type ListRetrieveResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListRetrieveResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListRetrieveResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type ListRetrieveResponseFieldValueUnion added in v0.4.1

type ListRetrieveResponseFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [ListRetrieveResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [ListRetrieveResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [ListRetrieveResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [ListRetrieveResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [ListRetrieveResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [ListRetrieveResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [ListRetrieveResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [ListRetrieveResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [ListRetrieveResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [ListRetrieveResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ListRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ListRetrieveResponseFieldValueAddress, ListRetrieveResponseFieldValueFullName.

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 OfStringArray]

func (ListRetrieveResponseFieldValueUnion) AsAddress added in v0.4.1

func (ListRetrieveResponseFieldValueUnion) AsBool added in v0.4.1

func (ListRetrieveResponseFieldValueUnion) AsFloat added in v0.4.1

func (ListRetrieveResponseFieldValueUnion) AsFullName added in v0.4.1

func (ListRetrieveResponseFieldValueUnion) AsString added in v0.4.1

func (ListRetrieveResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u ListRetrieveResponseFieldValueUnion) AsStringArray() (v []string)

func (ListRetrieveResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListRetrieveResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type ListService added in v0.4.1

type ListService struct {
	Options []option.RequestOption
}

Lists are curated collections of accounts, contacts, or opportunities in Lightfield. Each list contains entities of a single type.

ListService 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 NewListService method instead.

func NewListService added in v0.4.1

func NewListService(opts ...option.RequestOption) (r ListService)

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

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

Retrieves a single list by its ID.

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

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

func (*ListService) List added in v0.4.1

func (r *ListService) List(ctx context.Context, query ListListParams, opts ...option.RequestOption) (res *ListListResponse, err error)

Returns a paginated list of lists. 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/):** `lists:read`

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

func (*ListService) ListAccounts added in v0.4.1

func (r *ListService) ListAccounts(ctx context.Context, listID string, query ListListAccountsParams, opts ...option.RequestOption) (res *ListListAccountsResponse, err error)

Returns a paginated list of accounts that belong to the specified list.

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

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

func (*ListService) ListContacts added in v0.4.1

func (r *ListService) ListContacts(ctx context.Context, listID string, query ListListContactsParams, opts ...option.RequestOption) (res *ListListContactsResponse, err error)

Returns a paginated list of contacts that belong to the specified list.

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

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

func (*ListService) ListOpportunities added in v0.4.1

func (r *ListService) ListOpportunities(ctx context.Context, listID string, query ListListOpportunitiesParams, opts ...option.RequestOption) (res *ListListOpportunitiesResponse, err error)

Returns a paginated list of opportunities that belong to the specified list.

**[Required scopes](/using-the-api/scopes/):** `lists:read` and `opportunities:read`

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

func (*ListService) New added in v0.4.1

func (r *ListService) New(ctx context.Context, body ListNewParams, opts ...option.RequestOption) (res *ListCreateResponse, err error)

Creates a new list. The `$name` and `$objectType` fields are required.

Supports idempotency via the `Idempotency-Key` header.

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

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

func (*ListService) Update added in v0.4.1

func (r *ListService) Update(ctx context.Context, id string, body ListUpdateParams, opts ...option.RequestOption) (res *ListUpdateResponse, err error)

Updates an existing list by ID. Only included fields are modified.

Supports idempotency via the `Idempotency-Key` header.

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

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

type ListUpdateParams added in v0.4.1

type ListUpdateParams struct {
	// Field values to update — only provided fields are modified; omitted fields are
	// left unchanged.
	Fields ListUpdateParamsFields `json:"fields,omitzero"`
	// Relationship operations. Use the key matching the list's `$objectType` (e.g.
	// `$accounts` for an account list).
	Relationships ListUpdateParamsRelationshipsUnion `json:"relationships,omitzero"`
	// contains filtered or unexported fields
}

func (ListUpdateParams) MarshalJSON added in v0.4.1

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

func (*ListUpdateParams) UnmarshalJSON added in v0.4.1

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

type ListUpdateParamsFields added in v0.4.1

type ListUpdateParamsFields struct {
	// Display name of the list.
	Name param.Opt[string] `json:"$name,omitzero"`
	// contains filtered or unexported fields
}

Field values to update — only provided fields are modified; omitted fields are left unchanged.

func (ListUpdateParamsFields) MarshalJSON added in v0.4.1

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

func (*ListUpdateParamsFields) UnmarshalJSON added in v0.4.1

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

type ListUpdateParamsRelationshipsAccounts added in v0.4.1

type ListUpdateParamsRelationshipsAccounts struct {
	// Add/remove accounts. List `$objectType` must be `account`.
	Accounts ListUpdateParamsRelationshipsAccountsAccounts `json:"$accounts,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The property Accounts is required.

func (ListUpdateParamsRelationshipsAccounts) MarshalJSON added in v0.4.1

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

func (*ListUpdateParamsRelationshipsAccounts) UnmarshalJSON added in v0.4.1

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

type ListUpdateParamsRelationshipsAccountsAccounts added in v0.4.1

type ListUpdateParamsRelationshipsAccountsAccounts struct {
	// Entity ID(s) to add to the list.
	Add ListUpdateParamsRelationshipsAccountsAccountsAddUnion `json:"add,omitzero"`
	// Entity ID(s) to remove from the list.
	Remove ListUpdateParamsRelationshipsAccountsAccountsRemoveUnion `json:"remove,omitzero"`
	// contains filtered or unexported fields
}

Add/remove accounts. List `$objectType` must be `account`.

func (ListUpdateParamsRelationshipsAccountsAccounts) MarshalJSON added in v0.4.1

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

func (*ListUpdateParamsRelationshipsAccountsAccounts) UnmarshalJSON added in v0.4.1

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

type ListUpdateParamsRelationshipsAccountsAccountsAddUnion added in v0.4.1

type ListUpdateParamsRelationshipsAccountsAccountsAddUnion 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 (ListUpdateParamsRelationshipsAccountsAccountsAddUnion) MarshalJSON added in v0.4.1

func (*ListUpdateParamsRelationshipsAccountsAccountsAddUnion) UnmarshalJSON added in v0.4.1

type ListUpdateParamsRelationshipsAccountsAccountsRemoveUnion added in v0.4.1

type ListUpdateParamsRelationshipsAccountsAccountsRemoveUnion 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 (ListUpdateParamsRelationshipsAccountsAccountsRemoveUnion) MarshalJSON added in v0.4.1

func (*ListUpdateParamsRelationshipsAccountsAccountsRemoveUnion) UnmarshalJSON added in v0.4.1

type ListUpdateParamsRelationshipsContacts added in v0.4.1

type ListUpdateParamsRelationshipsContacts struct {
	// Add/remove contacts. List `$objectType` must be `contact`.
	Contacts ListUpdateParamsRelationshipsContactsContacts `json:"$contacts,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The property Contacts is required.

func (ListUpdateParamsRelationshipsContacts) MarshalJSON added in v0.4.1

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

func (*ListUpdateParamsRelationshipsContacts) UnmarshalJSON added in v0.4.1

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

type ListUpdateParamsRelationshipsContactsContacts added in v0.4.1

type ListUpdateParamsRelationshipsContactsContacts struct {
	// Entity ID(s) to add to the list.
	Add ListUpdateParamsRelationshipsContactsContactsAddUnion `json:"add,omitzero"`
	// Entity ID(s) to remove from the list.
	Remove ListUpdateParamsRelationshipsContactsContactsRemoveUnion `json:"remove,omitzero"`
	// contains filtered or unexported fields
}

Add/remove contacts. List `$objectType` must be `contact`.

func (ListUpdateParamsRelationshipsContactsContacts) MarshalJSON added in v0.4.1

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

func (*ListUpdateParamsRelationshipsContactsContacts) UnmarshalJSON added in v0.4.1

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

type ListUpdateParamsRelationshipsContactsContactsAddUnion added in v0.4.1

type ListUpdateParamsRelationshipsContactsContactsAddUnion 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 (ListUpdateParamsRelationshipsContactsContactsAddUnion) MarshalJSON added in v0.4.1

func (*ListUpdateParamsRelationshipsContactsContactsAddUnion) UnmarshalJSON added in v0.4.1

type ListUpdateParamsRelationshipsContactsContactsRemoveUnion added in v0.4.1

type ListUpdateParamsRelationshipsContactsContactsRemoveUnion 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 (ListUpdateParamsRelationshipsContactsContactsRemoveUnion) MarshalJSON added in v0.4.1

func (*ListUpdateParamsRelationshipsContactsContactsRemoveUnion) UnmarshalJSON added in v0.4.1

type ListUpdateParamsRelationshipsOpportunities added in v0.4.1

type ListUpdateParamsRelationshipsOpportunities struct {
	// Add/remove opportunities. List `$objectType` must be `opportunity`.
	Opportunities ListUpdateParamsRelationshipsOpportunitiesOpportunities `json:"$opportunities,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The property Opportunities is required.

func (ListUpdateParamsRelationshipsOpportunities) MarshalJSON added in v0.4.1

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

func (*ListUpdateParamsRelationshipsOpportunities) UnmarshalJSON added in v0.4.1

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

type ListUpdateParamsRelationshipsOpportunitiesOpportunities added in v0.4.1

type ListUpdateParamsRelationshipsOpportunitiesOpportunities struct {
	// Entity ID(s) to add to the list.
	Add ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnion `json:"add,omitzero"`
	// Entity ID(s) to remove from the list.
	Remove ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnion `json:"remove,omitzero"`
	// contains filtered or unexported fields
}

Add/remove opportunities. List `$objectType` must be `opportunity`.

func (ListUpdateParamsRelationshipsOpportunitiesOpportunities) MarshalJSON added in v0.4.1

func (*ListUpdateParamsRelationshipsOpportunitiesOpportunities) UnmarshalJSON added in v0.4.1

type ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnion added in v0.4.1

type ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnion 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 (ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnion) MarshalJSON added in v0.4.1

func (*ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnion) UnmarshalJSON added in v0.4.1

type ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnion added in v0.4.1

type ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnion 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 (ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnion) MarshalJSON added in v0.4.1

func (*ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnion) UnmarshalJSON added in v0.4.1

type ListUpdateParamsRelationshipsUnion added in v0.4.1

type ListUpdateParamsRelationshipsUnion struct {
	OfListUpdatesRelationshipsAccounts      *ListUpdateParamsRelationshipsAccounts      `json:",omitzero,inline"`
	OfListUpdatesRelationshipsContacts      *ListUpdateParamsRelationshipsContacts      `json:",omitzero,inline"`
	OfListUpdatesRelationshipsOpportunities *ListUpdateParamsRelationshipsOpportunities `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 (ListUpdateParamsRelationshipsUnion) MarshalJSON added in v0.4.1

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

func (*ListUpdateParamsRelationshipsUnion) UnmarshalJSON added in v0.4.1

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

type ListUpdateResponse added in v0.4.1

type ListUpdateResponse struct {
	// Unique identifier for the list.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the list was created.
	CreatedAt string `json:"createdAt" api:"required"`
	// Map of field names to their typed values. System fields are prefixed with `$`
	// (e.g. `$name`, `$objectType`).
	Fields map[string]ListUpdateResponseField `json:"fields" api:"required"`
	// URL to view the list 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 (ListUpdateResponse) RawJSON added in v0.4.1

func (r ListUpdateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListUpdateResponse) UnmarshalJSON added in v0.4.1

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

type ListUpdateResponseField added in v0.4.1

type ListUpdateResponseField struct {
	// The field value, or null if unset.
	Value ListUpdateResponseFieldValueUnion `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 (ListUpdateResponseField) RawJSON added in v0.4.1

func (r ListUpdateResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListUpdateResponseField) UnmarshalJSON added in v0.4.1

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

type ListUpdateResponseFieldValueAddress added in v0.4.1

type ListUpdateResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListUpdateResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListUpdateResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type ListUpdateResponseFieldValueFullName added in v0.4.1

type ListUpdateResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListUpdateResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListUpdateResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type ListUpdateResponseFieldValueUnion added in v0.4.1

type ListUpdateResponseFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [ListUpdateResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [ListUpdateResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [ListUpdateResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [ListUpdateResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [ListUpdateResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [ListUpdateResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [ListUpdateResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [ListUpdateResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [ListUpdateResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [ListUpdateResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ListUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ListUpdateResponseFieldValueAddress, ListUpdateResponseFieldValueFullName.

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 OfStringArray]

func (ListUpdateResponseFieldValueUnion) AsAddress added in v0.4.1

func (ListUpdateResponseFieldValueUnion) AsBool added in v0.4.1

func (u ListUpdateResponseFieldValueUnion) AsBool() (v bool)

func (ListUpdateResponseFieldValueUnion) AsFloat added in v0.4.1

func (ListUpdateResponseFieldValueUnion) AsFullName added in v0.4.1

func (ListUpdateResponseFieldValueUnion) AsString added in v0.4.1

func (u ListUpdateResponseFieldValueUnion) AsString() (v string)

func (ListUpdateResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u ListUpdateResponseFieldValueUnion) AsStringArray() (v []string)

func (ListUpdateResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*ListUpdateResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type MeetingCreateResponse added in v0.4.1

type MeetingCreateResponse struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// The caller's resolved access level for this meeting.
	//
	// Any of "FULL", "METADATA".
	AccessLevel MeetingCreateResponseAccessLevel `json:"accessLevel" 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]MeetingCreateResponseField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Always `meeting`.
	//
	// Any of "meeting".
	ObjectType MeetingCreateResponseObjectType `json:"objectType" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]MeetingCreateResponseRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		AccessLevel   respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		ObjectType    respjson.Field
		Relationships respjson.Field
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeetingCreateResponse) RawJSON added in v0.4.1

func (r MeetingCreateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeetingCreateResponse) UnmarshalJSON added in v0.4.1

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

type MeetingCreateResponseAccessLevel added in v0.4.1

type MeetingCreateResponseAccessLevel string

The caller's resolved access level for this meeting.

const (
	MeetingCreateResponseAccessLevelFull     MeetingCreateResponseAccessLevel = "FULL"
	MeetingCreateResponseAccessLevelMetadata MeetingCreateResponseAccessLevel = "METADATA"
)

type MeetingCreateResponseField added in v0.4.1

type MeetingCreateResponseField struct {
	// The field value, or null if unset.
	Value MeetingCreateResponseFieldValueUnion `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 (MeetingCreateResponseField) RawJSON added in v0.4.1

func (r MeetingCreateResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeetingCreateResponseField) UnmarshalJSON added in v0.4.1

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

type MeetingCreateResponseFieldValueAddress added in v0.4.1

type MeetingCreateResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeetingCreateResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingCreateResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type MeetingCreateResponseFieldValueFullName added in v0.4.1

type MeetingCreateResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeetingCreateResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingCreateResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type MeetingCreateResponseFieldValueUnion added in v0.4.1

type MeetingCreateResponseFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [MeetingCreateResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [MeetingCreateResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [MeetingCreateResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [MeetingCreateResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [MeetingCreateResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [MeetingCreateResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [MeetingCreateResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [MeetingCreateResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [MeetingCreateResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [MeetingCreateResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MeetingCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], MeetingCreateResponseFieldValueAddress, MeetingCreateResponseFieldValueFullName.

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 OfStringArray]

func (MeetingCreateResponseFieldValueUnion) AsAddress added in v0.4.1

func (MeetingCreateResponseFieldValueUnion) AsBool added in v0.4.1

func (MeetingCreateResponseFieldValueUnion) AsFloat added in v0.4.1

func (MeetingCreateResponseFieldValueUnion) AsFullName added in v0.4.1

func (MeetingCreateResponseFieldValueUnion) AsString added in v0.4.1

func (MeetingCreateResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u MeetingCreateResponseFieldValueUnion) AsStringArray() (v []string)

func (MeetingCreateResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingCreateResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type MeetingCreateResponseObjectType added in v0.4.1

type MeetingCreateResponseObjectType string

Always `meeting`.

const (
	MeetingCreateResponseObjectTypeMeeting MeetingCreateResponseObjectType = "meeting"
)

type MeetingCreateResponseRelationship added in v0.4.1

type MeetingCreateResponseRelationship 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 (MeetingCreateResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingCreateResponseRelationship) UnmarshalJSON added in v0.4.1

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

type MeetingListParams added in v0.4.1

type MeetingListParams 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 (MeetingListParams) URLQuery added in v0.4.1

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

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

type MeetingListResponse added in v0.4.1

type MeetingListResponse struct {
	// Array of meeting objects for the current page.
	Data []MeetingListResponseData `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 (MeetingListResponse) RawJSON added in v0.4.1

func (r MeetingListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeetingListResponse) UnmarshalJSON added in v0.4.1

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

type MeetingListResponseData added in v0.4.1

type MeetingListResponseData struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// The caller's resolved access level for this meeting.
	//
	// Any of "FULL", "METADATA".
	AccessLevel string `json:"accessLevel" 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]MeetingListResponseDataField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Always `meeting`.
	//
	// Any of "meeting".
	ObjectType string `json:"objectType" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]MeetingListResponseDataRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		AccessLevel   respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		ObjectType    respjson.Field
		Relationships respjson.Field
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeetingListResponseData) RawJSON added in v0.4.1

func (r MeetingListResponseData) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeetingListResponseData) UnmarshalJSON added in v0.4.1

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

type MeetingListResponseDataField added in v0.4.1

type MeetingListResponseDataField struct {
	// The field value, or null if unset.
	Value MeetingListResponseDataFieldValueUnion `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 (MeetingListResponseDataField) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingListResponseDataField) UnmarshalJSON added in v0.4.1

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

type MeetingListResponseDataFieldValueAddress added in v0.4.1

type MeetingListResponseDataFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeetingListResponseDataFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingListResponseDataFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type MeetingListResponseDataFieldValueFullName added in v0.4.1

type MeetingListResponseDataFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeetingListResponseDataFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingListResponseDataFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type MeetingListResponseDataFieldValueUnion added in v0.4.1

type MeetingListResponseDataFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [MeetingListResponseDataFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [MeetingListResponseDataFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [MeetingListResponseDataFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [MeetingListResponseDataFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [MeetingListResponseDataFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [MeetingListResponseDataFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [MeetingListResponseDataFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [MeetingListResponseDataFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [MeetingListResponseDataFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [MeetingListResponseDataFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MeetingListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], MeetingListResponseDataFieldValueAddress, MeetingListResponseDataFieldValueFullName.

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 OfStringArray]

func (MeetingListResponseDataFieldValueUnion) AsAddress added in v0.4.1

func (MeetingListResponseDataFieldValueUnion) AsBool added in v0.4.1

func (MeetingListResponseDataFieldValueUnion) AsFloat added in v0.4.1

func (MeetingListResponseDataFieldValueUnion) AsFullName added in v0.4.1

func (MeetingListResponseDataFieldValueUnion) AsString added in v0.4.1

func (MeetingListResponseDataFieldValueUnion) AsStringArray added in v0.4.1

func (u MeetingListResponseDataFieldValueUnion) AsStringArray() (v []string)

func (MeetingListResponseDataFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingListResponseDataFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type MeetingListResponseDataRelationship added in v0.4.1

type MeetingListResponseDataRelationship 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 (MeetingListResponseDataRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingListResponseDataRelationship) UnmarshalJSON added in v0.4.1

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

type MeetingNewParams added in v0.4.1

type MeetingNewParams struct {
	// Field values for the new MANUAL meeting. System fields use a `$` prefix (for
	// example `$title`, `$startDate`, `$endDate`). Required: `$title`, `$startDate`,
	// and `$endDate`. `$organizerEmail` accepts a single email address when provided;
	// `$attendeeEmails` accepts an array of email addresses. See
	// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
	// value type details.
	Fields MeetingNewParamsFields `json:"fields,omitzero" api:"required"`
	// When true, the initial post-create meeting sync may auto-create account and
	// contact records for external attendees.
	AutoCreateRecords param.Opt[bool] `json:"autoCreateRecords,omitzero"`
	// Relationships to set on the new meeting. Only `$transcript` is writable on
	// create; all other meeting relationships are system-managed.
	Relationships MeetingNewParamsRelationships `json:"relationships,omitzero"`
	// contains filtered or unexported fields
}

func (MeetingNewParams) MarshalJSON added in v0.4.1

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

func (*MeetingNewParams) UnmarshalJSON added in v0.4.1

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

type MeetingNewParamsFields added in v0.4.1

type MeetingNewParamsFields struct {
	// The end time of the meeting in ISO 8601 format. Must be in the past.
	EndDate string `json:"$endDate" api:"required"`
	// The start time of the meeting in ISO 8601 format. Must be in the past.
	StartDate string `json:"$startDate" api:"required"`
	// The title of the meeting.
	Title string `json:"$title" api:"required"`
	// A description of the meeting.
	Description param.Opt[string] `json:"$description,omitzero"`
	// The URL for the meeting.
	MeetingURL param.Opt[string] `json:"$meetingUrl,omitzero"`
	// The email address of the meeting organizer. This field accepts a single email
	// address.
	OrganizerEmail param.Opt[string] `json:"$organizerEmail,omitzero"`
	// The privacy setting for the meeting (`FULL` or `METADATA`).
	//
	// Any of "FULL", "METADATA".
	PrivacySetting string `json:"$privacySetting,omitzero"`
	// A list of attendee email addresses.
	AttendeeEmails []string `json:"$attendeeEmails,omitzero"`
	// contains filtered or unexported fields
}

Field values for the new MANUAL meeting. System fields use a `$` prefix (for example `$title`, `$startDate`, `$endDate`). Required: `$title`, `$startDate`, and `$endDate`. `$organizerEmail` accepts a single email address when provided; `$attendeeEmails` accepts an array of email addresses. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for value type details.

The properties EndDate, StartDate, Title are required.

func (MeetingNewParamsFields) MarshalJSON added in v0.4.1

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

func (*MeetingNewParamsFields) UnmarshalJSON added in v0.4.1

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

type MeetingNewParamsRelationships added in v0.4.1

type MeetingNewParamsRelationships struct {
	// The ID of the file to attach as the meeting transcript when creating the
	// meeting. Only one transcript can be attached to a meeting.
	Transcript MeetingNewParamsRelationshipsTranscriptUnion `json:"$transcript,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Relationships to set on the new meeting. Only `$transcript` is writable on create; all other meeting relationships are system-managed.

The property Transcript is required.

func (MeetingNewParamsRelationships) MarshalJSON added in v0.4.1

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

func (*MeetingNewParamsRelationships) UnmarshalJSON added in v0.4.1

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

type MeetingNewParamsRelationshipsTranscriptUnion added in v0.4.1

type MeetingNewParamsRelationshipsTranscriptUnion 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 (MeetingNewParamsRelationshipsTranscriptUnion) MarshalJSON added in v0.4.1

func (*MeetingNewParamsRelationshipsTranscriptUnion) UnmarshalJSON added in v0.4.1

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

type MeetingRetrieveResponse added in v0.4.1

type MeetingRetrieveResponse struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// The caller's resolved access level for this meeting.
	//
	// Any of "FULL", "METADATA".
	AccessLevel MeetingRetrieveResponseAccessLevel `json:"accessLevel" 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]MeetingRetrieveResponseField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Always `meeting`.
	//
	// Any of "meeting".
	ObjectType MeetingRetrieveResponseObjectType `json:"objectType" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]MeetingRetrieveResponseRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		AccessLevel   respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		ObjectType    respjson.Field
		Relationships respjson.Field
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeetingRetrieveResponse) RawJSON added in v0.4.1

func (r MeetingRetrieveResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeetingRetrieveResponse) UnmarshalJSON added in v0.4.1

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

type MeetingRetrieveResponseAccessLevel added in v0.4.1

type MeetingRetrieveResponseAccessLevel string

The caller's resolved access level for this meeting.

const (
	MeetingRetrieveResponseAccessLevelFull     MeetingRetrieveResponseAccessLevel = "FULL"
	MeetingRetrieveResponseAccessLevelMetadata MeetingRetrieveResponseAccessLevel = "METADATA"
)

type MeetingRetrieveResponseField added in v0.4.1

type MeetingRetrieveResponseField struct {
	// The field value, or null if unset.
	Value MeetingRetrieveResponseFieldValueUnion `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 (MeetingRetrieveResponseField) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingRetrieveResponseField) UnmarshalJSON added in v0.4.1

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

type MeetingRetrieveResponseFieldValueAddress added in v0.4.1

type MeetingRetrieveResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeetingRetrieveResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingRetrieveResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type MeetingRetrieveResponseFieldValueFullName added in v0.4.1

type MeetingRetrieveResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeetingRetrieveResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingRetrieveResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type MeetingRetrieveResponseFieldValueUnion added in v0.4.1

type MeetingRetrieveResponseFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [MeetingRetrieveResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [MeetingRetrieveResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MeetingRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], MeetingRetrieveResponseFieldValueAddress, MeetingRetrieveResponseFieldValueFullName.

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 OfStringArray]

func (MeetingRetrieveResponseFieldValueUnion) AsAddress added in v0.4.1

func (MeetingRetrieveResponseFieldValueUnion) AsBool added in v0.4.1

func (MeetingRetrieveResponseFieldValueUnion) AsFloat added in v0.4.1

func (MeetingRetrieveResponseFieldValueUnion) AsFullName added in v0.4.1

func (MeetingRetrieveResponseFieldValueUnion) AsString added in v0.4.1

func (MeetingRetrieveResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u MeetingRetrieveResponseFieldValueUnion) AsStringArray() (v []string)

func (MeetingRetrieveResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingRetrieveResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type MeetingRetrieveResponseObjectType added in v0.4.1

type MeetingRetrieveResponseObjectType string

Always `meeting`.

const (
	MeetingRetrieveResponseObjectTypeMeeting MeetingRetrieveResponseObjectType = "meeting"
)

type MeetingRetrieveResponseRelationship added in v0.4.1

type MeetingRetrieveResponseRelationship 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 (MeetingRetrieveResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingRetrieveResponseRelationship) UnmarshalJSON added in v0.4.1

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

type MeetingService added in v0.4.1

type MeetingService struct {
	Options []option.RequestOption
}

Meetings represent synced or manually created interactions in Lightfield. Read responses are privacy-aware and may be redacted based on the caller. For transcript uploads and attachment flows, see <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u>.

MeetingService 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 NewMeetingService method instead.

func NewMeetingService added in v0.4.1

func NewMeetingService(opts ...option.RequestOption) (r MeetingService)

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

Retrieves a single meeting by its ID. Meeting fields and transcript visibility are redacted based on the caller-specific privacy resolution, and the response includes a read-only `accessLevel`.

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

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

func (*MeetingService) List added in v0.4.1

Returns a paginated list of meetings. Use `offset` and `limit` to paginate through results. Each meeting is privacy-filtered per caller, includes a read-only `accessLevel`, and may redact transcript or content fields based on the caller-specific privacy resolution. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.

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

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

func (*MeetingService) New added in v0.4.1

Creates a new meeting record. This endpoint only supports creation of meetings in the past. The `$title`, `$startDate`, and `$endDate` fields are required. Only the `$transcript` relationship is writable on create; all other meeting relationships are system-managed. The response is privacy-aware and includes a read-only `accessLevel`. See <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u> for the full file upload and transcript attachment flow.

Supports idempotency via the `Idempotency-Key` header.

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

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

func (*MeetingService) Update added in v0.4.1

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

Only `fields.$privacySetting` and `relationships.$transcript.replace` are writable. Use `$transcript.replace` to set the meeting transcript. Clearing or removing `$transcript` is not supported. The response is privacy-aware and includes a read-only `accessLevel`. See <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u> for the full file upload and transcript attachment flow.

Supports idempotency via the `Idempotency-Key` header.

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

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

type MeetingUpdateParams added in v0.4.1

type MeetingUpdateParams struct {
	// Field values to update. Only `$privacySetting` is writable, and omitted fields
	// are left unchanged.
	Fields MeetingUpdateParamsFields `json:"fields,omitzero"`
	// Relationship operations to apply. Only `$transcript.replace` is supported;
	// removing or clearing `$transcript` is not supported.
	Relationships MeetingUpdateParamsRelationships `json:"relationships,omitzero"`
	// contains filtered or unexported fields
}

func (MeetingUpdateParams) MarshalJSON added in v0.4.1

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

func (*MeetingUpdateParams) UnmarshalJSON added in v0.4.1

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

type MeetingUpdateParamsFields added in v0.4.1

type MeetingUpdateParamsFields struct {
	// The privacy setting for the meeting.
	//
	// Any of "FULL", "METADATA".
	PrivacySetting string `json:"$privacySetting,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Field values to update. Only `$privacySetting` is writable, and omitted fields are left unchanged.

The property PrivacySetting is required.

func (MeetingUpdateParamsFields) MarshalJSON added in v0.4.1

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

func (*MeetingUpdateParamsFields) UnmarshalJSON added in v0.4.1

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

type MeetingUpdateParamsRelationships added in v0.4.1

type MeetingUpdateParamsRelationships struct {
	Transcript MeetingUpdateParamsRelationshipsTranscript `json:"$transcript,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Relationship operations to apply. Only `$transcript.replace` is supported; removing or clearing `$transcript` is not supported.

The property Transcript is required.

func (MeetingUpdateParamsRelationships) MarshalJSON added in v0.4.1

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

func (*MeetingUpdateParamsRelationships) UnmarshalJSON added in v0.4.1

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

type MeetingUpdateParamsRelationshipsTranscript added in v0.4.1

type MeetingUpdateParamsRelationshipsTranscript struct {
	// The file ID to set as the meeting transcript.
	Replace string `json:"replace" api:"required"`
	// contains filtered or unexported fields
}

The property Replace is required.

func (MeetingUpdateParamsRelationshipsTranscript) MarshalJSON added in v0.4.1

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

func (*MeetingUpdateParamsRelationshipsTranscript) UnmarshalJSON added in v0.4.1

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

type MeetingUpdateResponse added in v0.4.1

type MeetingUpdateResponse struct {
	// Unique identifier for the entity.
	ID string `json:"id" api:"required"`
	// The caller's resolved access level for this meeting.
	//
	// Any of "FULL", "METADATA".
	AccessLevel MeetingUpdateResponseAccessLevel `json:"accessLevel" 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]MeetingUpdateResponseField `json:"fields" api:"required"`
	// URL to view the entity in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Always `meeting`.
	//
	// Any of "meeting".
	ObjectType MeetingUpdateResponseObjectType `json:"objectType" api:"required"`
	// Map of relationship names to their associated entities. System relationships are
	// prefixed with `$` (e.g. `$owner`, `$contact`).
	Relationships map[string]MeetingUpdateResponseRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		AccessLevel   respjson.Field
		CreatedAt     respjson.Field
		Fields        respjson.Field
		HTTPLink      respjson.Field
		ObjectType    respjson.Field
		Relationships respjson.Field
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeetingUpdateResponse) RawJSON added in v0.4.1

func (r MeetingUpdateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeetingUpdateResponse) UnmarshalJSON added in v0.4.1

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

type MeetingUpdateResponseAccessLevel added in v0.4.1

type MeetingUpdateResponseAccessLevel string

The caller's resolved access level for this meeting.

const (
	MeetingUpdateResponseAccessLevelFull     MeetingUpdateResponseAccessLevel = "FULL"
	MeetingUpdateResponseAccessLevelMetadata MeetingUpdateResponseAccessLevel = "METADATA"
)

type MeetingUpdateResponseField added in v0.4.1

type MeetingUpdateResponseField struct {
	// The field value, or null if unset.
	Value MeetingUpdateResponseFieldValueUnion `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 (MeetingUpdateResponseField) RawJSON added in v0.4.1

func (r MeetingUpdateResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeetingUpdateResponseField) UnmarshalJSON added in v0.4.1

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

type MeetingUpdateResponseFieldValueAddress added in v0.4.1

type MeetingUpdateResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeetingUpdateResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingUpdateResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type MeetingUpdateResponseFieldValueFullName added in v0.4.1

type MeetingUpdateResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeetingUpdateResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingUpdateResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type MeetingUpdateResponseFieldValueUnion added in v0.4.1

type MeetingUpdateResponseFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [MeetingUpdateResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [MeetingUpdateResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [MeetingUpdateResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [MeetingUpdateResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [MeetingUpdateResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [MeetingUpdateResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [MeetingUpdateResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [MeetingUpdateResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [MeetingUpdateResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [MeetingUpdateResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MeetingUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], MeetingUpdateResponseFieldValueAddress, MeetingUpdateResponseFieldValueFullName.

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 OfStringArray]

func (MeetingUpdateResponseFieldValueUnion) AsAddress added in v0.4.1

func (MeetingUpdateResponseFieldValueUnion) AsBool added in v0.4.1

func (MeetingUpdateResponseFieldValueUnion) AsFloat added in v0.4.1

func (MeetingUpdateResponseFieldValueUnion) AsFullName added in v0.4.1

func (MeetingUpdateResponseFieldValueUnion) AsString added in v0.4.1

func (MeetingUpdateResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u MeetingUpdateResponseFieldValueUnion) AsStringArray() (v []string)

func (MeetingUpdateResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingUpdateResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type MeetingUpdateResponseObjectType added in v0.4.1

type MeetingUpdateResponseObjectType string

Always `meeting`.

const (
	MeetingUpdateResponseObjectTypeMeeting MeetingUpdateResponseObjectType = "meeting"
)

type MeetingUpdateResponseRelationship added in v0.4.1

type MeetingUpdateResponseRelationship 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 (MeetingUpdateResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MeetingUpdateResponseRelationship) UnmarshalJSON added in v0.4.1

func (r *MeetingUpdateResponseRelationship) UnmarshalJSON(data []byte) 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 MemberListResponseDataFields `json:"fields" api:"required"`
	// URL to view the member in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Members do not expose writable or readable relationships in this API.
	Relationships any `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the member was last updated, or null.
	UpdatedAt string `json:"updatedAt" 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
		Relationships respjson.Field
		UpdatedAt     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 MemberListResponseDataFields added in v0.4.1

type MemberListResponseDataFields struct {
	// The member's email address.
	Email MemberListResponseDataFieldsEmail `json:"$email" api:"required"`
	// The member's full name.
	Name MemberListResponseDataFieldsName `json:"$name" api:"required"`
	// URL of the member's profile image, or null if unset.
	ProfileImage MemberListResponseDataFieldsProfileImage `json:"$profileImage" api:"required"`
	// The member's workspace role.
	Role MemberListResponseDataFieldsRole `json:"$role" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Email        respjson.Field
		Name         respjson.Field
		ProfileImage respjson.Field
		Role         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Map of field names to their typed values.

func (MemberListResponseDataFields) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MemberListResponseDataFields) UnmarshalJSON added in v0.4.1

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

type MemberListResponseDataFieldsEmail added in v0.4.1

type MemberListResponseDataFieldsEmail struct {
	// The field value.
	Value string `json:"value" api:"required"`
	// The data type of the field value.
	//
	// Any of "EMAIL".
	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:"-"`
}

The member's email address.

func (MemberListResponseDataFieldsEmail) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MemberListResponseDataFieldsEmail) UnmarshalJSON added in v0.4.1

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

type MemberListResponseDataFieldsName added in v0.4.1

type MemberListResponseDataFieldsName struct {
	Value MemberListResponseDataFieldsNameValue `json:"value" api:"required"`
	// The data type of the field value.
	//
	// Any of "FULL_NAME".
	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:"-"`
}

The member's full name.

func (MemberListResponseDataFieldsName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MemberListResponseDataFieldsName) UnmarshalJSON added in v0.4.1

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

type MemberListResponseDataFieldsNameValue added in v0.4.1

type MemberListResponseDataFieldsNameValue struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MemberListResponseDataFieldsNameValue) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MemberListResponseDataFieldsNameValue) UnmarshalJSON added in v0.4.1

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

type MemberListResponseDataFieldsProfileImage added in v0.4.1

type MemberListResponseDataFieldsProfileImage struct {
	// The field value, or null if unset.
	Value string `json:"value" api:"required"`
	// The data type of the field value.
	//
	// Any of "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:"-"`
}

URL of the member's profile image, or null if unset.

func (MemberListResponseDataFieldsProfileImage) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MemberListResponseDataFieldsProfileImage) UnmarshalJSON added in v0.4.1

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

type MemberListResponseDataFieldsRole added in v0.4.1

type MemberListResponseDataFieldsRole struct {
	// The field value.
	Value string `json:"value" api:"required"`
	// The data type of the field value.
	//
	// Any of "TEXT".
	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:"-"`
}

The member's workspace role.

func (MemberListResponseDataFieldsRole) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MemberListResponseDataFieldsRole) UnmarshalJSON added in v0.4.1

func (r *MemberListResponseDataFieldsRole) 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 MemberRetrieveResponseFields `json:"fields" api:"required"`
	// URL to view the member in the Lightfield web app, or null.
	HTTPLink string `json:"httpLink" api:"required"`
	// Members do not expose writable or readable relationships in this API.
	Relationships any `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the member was last updated, or null.
	UpdatedAt string `json:"updatedAt" 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
		Relationships respjson.Field
		UpdatedAt     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 MemberRetrieveResponseFields added in v0.4.1

type MemberRetrieveResponseFields struct {
	// The member's email address.
	Email MemberRetrieveResponseFieldsEmail `json:"$email" api:"required"`
	// The member's full name.
	Name MemberRetrieveResponseFieldsName `json:"$name" api:"required"`
	// URL of the member's profile image, or null if unset.
	ProfileImage MemberRetrieveResponseFieldsProfileImage `json:"$profileImage" api:"required"`
	// The member's workspace role.
	Role MemberRetrieveResponseFieldsRole `json:"$role" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Email        respjson.Field
		Name         respjson.Field
		ProfileImage respjson.Field
		Role         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Map of field names to their typed values.

func (MemberRetrieveResponseFields) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MemberRetrieveResponseFields) UnmarshalJSON added in v0.4.1

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

type MemberRetrieveResponseFieldsEmail added in v0.4.1

type MemberRetrieveResponseFieldsEmail struct {
	// The field value.
	Value string `json:"value" api:"required"`
	// The data type of the field value.
	//
	// Any of "EMAIL".
	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:"-"`
}

The member's email address.

func (MemberRetrieveResponseFieldsEmail) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MemberRetrieveResponseFieldsEmail) UnmarshalJSON added in v0.4.1

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

type MemberRetrieveResponseFieldsName added in v0.4.1

type MemberRetrieveResponseFieldsName struct {
	Value MemberRetrieveResponseFieldsNameValue `json:"value" api:"required"`
	// The data type of the field value.
	//
	// Any of "FULL_NAME".
	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:"-"`
}

The member's full name.

func (MemberRetrieveResponseFieldsName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MemberRetrieveResponseFieldsName) UnmarshalJSON added in v0.4.1

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

type MemberRetrieveResponseFieldsNameValue added in v0.4.1

type MemberRetrieveResponseFieldsNameValue struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MemberRetrieveResponseFieldsNameValue) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MemberRetrieveResponseFieldsNameValue) UnmarshalJSON added in v0.4.1

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

type MemberRetrieveResponseFieldsProfileImage added in v0.4.1

type MemberRetrieveResponseFieldsProfileImage struct {
	// The field value, or null if unset.
	Value string `json:"value" api:"required"`
	// The data type of the field value.
	//
	// Any of "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:"-"`
}

URL of the member's profile image, or null if unset.

func (MemberRetrieveResponseFieldsProfileImage) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MemberRetrieveResponseFieldsProfileImage) UnmarshalJSON added in v0.4.1

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

type MemberRetrieveResponseFieldsRole added in v0.4.1

type MemberRetrieveResponseFieldsRole struct {
	// The field value.
	Value string `json:"value" api:"required"`
	// The data type of the field value.
	//
	// Any of "TEXT".
	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:"-"`
}

The member's workspace role.

func (MemberRetrieveResponseFieldsRole) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*MemberRetrieveResponseFieldsRole) UnmarshalJSON added in v0.4.1

func (r *MemberRetrieveResponseFieldsRole) 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 NoteCreateResponse added in v0.4.1

type NoteCreateResponse 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]NoteCreateResponseField `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]NoteCreateResponseRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NoteCreateResponse) RawJSON added in v0.4.1

func (r NoteCreateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*NoteCreateResponse) UnmarshalJSON added in v0.4.1

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

type NoteCreateResponseField added in v0.4.1

type NoteCreateResponseField struct {
	// The field value, or null if unset.
	Value NoteCreateResponseFieldValueUnion `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 (NoteCreateResponseField) RawJSON added in v0.4.1

func (r NoteCreateResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*NoteCreateResponseField) UnmarshalJSON added in v0.4.1

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

type NoteCreateResponseFieldValueAddress added in v0.4.1

type NoteCreateResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NoteCreateResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteCreateResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type NoteCreateResponseFieldValueFullName added in v0.4.1

type NoteCreateResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NoteCreateResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteCreateResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type NoteCreateResponseFieldValueUnion added in v0.4.1

type NoteCreateResponseFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [NoteCreateResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [NoteCreateResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [NoteCreateResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [NoteCreateResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [NoteCreateResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [NoteCreateResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [NoteCreateResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [NoteCreateResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [NoteCreateResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [NoteCreateResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

NoteCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], NoteCreateResponseFieldValueAddress, NoteCreateResponseFieldValueFullName.

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 OfStringArray]

func (NoteCreateResponseFieldValueUnion) AsAddress added in v0.4.1

func (NoteCreateResponseFieldValueUnion) AsBool added in v0.4.1

func (u NoteCreateResponseFieldValueUnion) AsBool() (v bool)

func (NoteCreateResponseFieldValueUnion) AsFloat added in v0.4.1

func (NoteCreateResponseFieldValueUnion) AsFullName added in v0.4.1

func (NoteCreateResponseFieldValueUnion) AsString added in v0.4.1

func (u NoteCreateResponseFieldValueUnion) AsString() (v string)

func (NoteCreateResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u NoteCreateResponseFieldValueUnion) AsStringArray() (v []string)

func (NoteCreateResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteCreateResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type NoteCreateResponseRelationship added in v0.4.1

type NoteCreateResponseRelationship 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 (NoteCreateResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteCreateResponseRelationship) UnmarshalJSON added in v0.4.1

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

type NoteListParams added in v0.4.1

type NoteListParams 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 (NoteListParams) URLQuery added in v0.4.1

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

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

type NoteListResponse added in v0.4.1

type NoteListResponse struct {
	// Array of entity objects for the current page.
	Data []NoteListResponseData `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 (NoteListResponse) RawJSON added in v0.4.1

func (r NoteListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*NoteListResponse) UnmarshalJSON added in v0.4.1

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

type NoteListResponseData added in v0.4.1

type NoteListResponseData 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]NoteListResponseDataField `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]NoteListResponseDataRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NoteListResponseData) RawJSON added in v0.4.1

func (r NoteListResponseData) RawJSON() string

Returns the unmodified JSON received from the API

func (*NoteListResponseData) UnmarshalJSON added in v0.4.1

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

type NoteListResponseDataField added in v0.4.1

type NoteListResponseDataField struct {
	// The field value, or null if unset.
	Value NoteListResponseDataFieldValueUnion `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 (NoteListResponseDataField) RawJSON added in v0.4.1

func (r NoteListResponseDataField) RawJSON() string

Returns the unmodified JSON received from the API

func (*NoteListResponseDataField) UnmarshalJSON added in v0.4.1

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

type NoteListResponseDataFieldValueAddress added in v0.4.1

type NoteListResponseDataFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NoteListResponseDataFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteListResponseDataFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type NoteListResponseDataFieldValueFullName added in v0.4.1

type NoteListResponseDataFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NoteListResponseDataFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteListResponseDataFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type NoteListResponseDataFieldValueUnion added in v0.4.1

type NoteListResponseDataFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [NoteListResponseDataFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [NoteListResponseDataFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [NoteListResponseDataFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [NoteListResponseDataFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [NoteListResponseDataFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [NoteListResponseDataFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [NoteListResponseDataFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [NoteListResponseDataFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [NoteListResponseDataFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [NoteListResponseDataFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

NoteListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], NoteListResponseDataFieldValueAddress, NoteListResponseDataFieldValueFullName.

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 OfStringArray]

func (NoteListResponseDataFieldValueUnion) AsAddress added in v0.4.1

func (NoteListResponseDataFieldValueUnion) AsBool added in v0.4.1

func (NoteListResponseDataFieldValueUnion) AsFloat added in v0.4.1

func (NoteListResponseDataFieldValueUnion) AsFullName added in v0.4.1

func (NoteListResponseDataFieldValueUnion) AsString added in v0.4.1

func (NoteListResponseDataFieldValueUnion) AsStringArray added in v0.4.1

func (u NoteListResponseDataFieldValueUnion) AsStringArray() (v []string)

func (NoteListResponseDataFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteListResponseDataFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type NoteListResponseDataRelationship added in v0.4.1

type NoteListResponseDataRelationship 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 (NoteListResponseDataRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteListResponseDataRelationship) UnmarshalJSON added in v0.4.1

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

type NoteNewParams added in v0.4.1

type NoteNewParams struct {
	// Field values for the new note. `$title` is required; `$content` is optional. See
	// **[Fields and relationships](/using-the-api/fields-and-relationships/)** for
	// value type details.
	Fields NoteNewParamsFields `json:"fields,omitzero" api:"required"`
	// Relationships to set on the new note. System relationships use a `$` prefix
	// (e.g. `$account`, `$opportunity`). Each value is a single entity ID or an array
	// of IDs. The note author is automatically set to the API key owner.
	Relationships NoteNewParamsRelationships `json:"relationships,omitzero"`
	// contains filtered or unexported fields
}

func (NoteNewParams) MarshalJSON added in v0.4.1

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

func (*NoteNewParams) UnmarshalJSON added in v0.4.1

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

type NoteNewParamsFields added in v0.4.1

type NoteNewParamsFields struct {
	// Title of the note.
	Title string `json:"$title" api:"required"`
	// Content of the note as markdown formatted text.
	Content param.Opt[string] `json:"$content,omitzero"`
	// contains filtered or unexported fields
}

Field values for the new note. `$title` is required; `$content` is optional. See **[Fields and relationships](/using-the-api/fields-and-relationships/)** for value type details.

The property Title is required.

func (NoteNewParamsFields) MarshalJSON added in v0.4.1

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

func (*NoteNewParamsFields) UnmarshalJSON added in v0.4.1

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

type NoteNewParamsRelationships added in v0.4.1

type NoteNewParamsRelationships struct {
	// ID(s) of accounts to associate with this note.
	Account NoteNewParamsRelationshipsAccountUnion `json:"$account,omitzero"`
	// ID(s) of opportunities to associate with this note.
	Opportunity NoteNewParamsRelationshipsOpportunityUnion `json:"$opportunity,omitzero"`
	// contains filtered or unexported fields
}

Relationships to set on the new note. System relationships use a `$` prefix (e.g. `$account`, `$opportunity`). Each value is a single entity ID or an array of IDs. The note author is automatically set to the API key owner.

func (NoteNewParamsRelationships) MarshalJSON added in v0.4.1

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

func (*NoteNewParamsRelationships) UnmarshalJSON added in v0.4.1

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

type NoteNewParamsRelationshipsAccountUnion added in v0.4.1

type NoteNewParamsRelationshipsAccountUnion 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 (NoteNewParamsRelationshipsAccountUnion) MarshalJSON added in v0.4.1

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

func (*NoteNewParamsRelationshipsAccountUnion) UnmarshalJSON added in v0.4.1

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

type NoteNewParamsRelationshipsOpportunityUnion added in v0.4.1

type NoteNewParamsRelationshipsOpportunityUnion 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 (NoteNewParamsRelationshipsOpportunityUnion) MarshalJSON added in v0.4.1

func (*NoteNewParamsRelationshipsOpportunityUnion) UnmarshalJSON added in v0.4.1

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

type NoteRetrieveResponse added in v0.4.1

type NoteRetrieveResponse 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]NoteRetrieveResponseField `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]NoteRetrieveResponseRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NoteRetrieveResponse) RawJSON added in v0.4.1

func (r NoteRetrieveResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*NoteRetrieveResponse) UnmarshalJSON added in v0.4.1

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

type NoteRetrieveResponseField added in v0.4.1

type NoteRetrieveResponseField struct {
	// The field value, or null if unset.
	Value NoteRetrieveResponseFieldValueUnion `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 (NoteRetrieveResponseField) RawJSON added in v0.4.1

func (r NoteRetrieveResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*NoteRetrieveResponseField) UnmarshalJSON added in v0.4.1

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

type NoteRetrieveResponseFieldValueAddress added in v0.4.1

type NoteRetrieveResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NoteRetrieveResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteRetrieveResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type NoteRetrieveResponseFieldValueFullName added in v0.4.1

type NoteRetrieveResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NoteRetrieveResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteRetrieveResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type NoteRetrieveResponseFieldValueUnion added in v0.4.1

type NoteRetrieveResponseFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [NoteRetrieveResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [NoteRetrieveResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [NoteRetrieveResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [NoteRetrieveResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [NoteRetrieveResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [NoteRetrieveResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [NoteRetrieveResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [NoteRetrieveResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [NoteRetrieveResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [NoteRetrieveResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

NoteRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], NoteRetrieveResponseFieldValueAddress, NoteRetrieveResponseFieldValueFullName.

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 OfStringArray]

func (NoteRetrieveResponseFieldValueUnion) AsAddress added in v0.4.1

func (NoteRetrieveResponseFieldValueUnion) AsBool added in v0.4.1

func (NoteRetrieveResponseFieldValueUnion) AsFloat added in v0.4.1

func (NoteRetrieveResponseFieldValueUnion) AsFullName added in v0.4.1

func (NoteRetrieveResponseFieldValueUnion) AsString added in v0.4.1

func (NoteRetrieveResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u NoteRetrieveResponseFieldValueUnion) AsStringArray() (v []string)

func (NoteRetrieveResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteRetrieveResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type NoteRetrieveResponseRelationship added in v0.4.1

type NoteRetrieveResponseRelationship 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 (NoteRetrieveResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteRetrieveResponseRelationship) UnmarshalJSON added in v0.4.1

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

type NoteService added in v0.4.1

type NoteService struct {
	Options []option.RequestOption
}

Notes represent free-form text records in Lightfield. Each note can be associated with zero or more accounts and opportunities.

NoteService 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 NewNoteService method instead.

func NewNoteService added in v0.4.1

func NewNoteService(opts ...option.RequestOption) (r NoteService)

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

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

Retrieves a single note by its ID.

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

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

func (*NoteService) List added in v0.4.1

func (r *NoteService) List(ctx context.Context, query NoteListParams, opts ...option.RequestOption) (res *NoteListResponse, err error)

Returns a paginated list of notes. 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/):** `notes:read`

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

func (*NoteService) New added in v0.4.1

func (r *NoteService) New(ctx context.Context, body NoteNewParams, opts ...option.RequestOption) (res *NoteCreateResponse, err error)

Creates a new note record.

The note author is automatically set to the API key owner.

Supports idempotency via the `Idempotency-Key` header.

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

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

func (*NoteService) Update added in v0.4.1

func (r *NoteService) Update(ctx context.Context, id string, body NoteUpdateParams, opts ...option.RequestOption) (res *NoteUpdateResponse, err error)

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

Both `$account` and `$opportunity` relationships can be modified via `add` or `remove` operations.

Supports idempotency via the `Idempotency-Key` header.

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

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

type NoteUpdateParams added in v0.4.1

type NoteUpdateParams struct {
	// Field values to update — only provided fields are modified; omitted fields are
	// left unchanged. See
	// **[Fields and relationships](/using-the-api/fields-and-relationships/)** for
	// value type details.
	Fields NoteUpdateParamsFields `json:"fields,omitzero"`
	// Relationship operations to apply. System relationships use a `$` prefix (e.g.
	// `$account`, `$opportunity`). Each value is an operation object with `add` or
	// `remove`.
	Relationships NoteUpdateParamsRelationships `json:"relationships,omitzero"`
	// contains filtered or unexported fields
}

func (NoteUpdateParams) MarshalJSON added in v0.4.1

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

func (*NoteUpdateParams) UnmarshalJSON added in v0.4.1

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

type NoteUpdateParamsFields added in v0.4.1

type NoteUpdateParamsFields struct {
	// Content of the note as markdown formatted text.
	Content param.Opt[string] `json:"$content,omitzero"`
	// Title of the note.
	Title param.Opt[string] `json:"$title,omitzero"`
	// contains filtered or unexported fields
}

Field values to update — only provided fields are modified; omitted fields are left unchanged. See **[Fields and relationships](/using-the-api/fields-and-relationships/)** for value type details.

func (NoteUpdateParamsFields) MarshalJSON added in v0.4.1

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

func (*NoteUpdateParamsFields) UnmarshalJSON added in v0.4.1

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

type NoteUpdateParamsRelationships added in v0.4.1

type NoteUpdateParamsRelationships struct {
	// Operation to modify associated accounts.
	Account NoteUpdateParamsRelationshipsAccountUnion `json:"$account,omitzero"`
	// Operation to modify associated opportunities.
	Opportunity NoteUpdateParamsRelationshipsOpportunityUnion `json:"$opportunity,omitzero"`
	// contains filtered or unexported fields
}

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

func (NoteUpdateParamsRelationships) MarshalJSON added in v0.4.1

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

func (*NoteUpdateParamsRelationships) UnmarshalJSON added in v0.4.1

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

type NoteUpdateParamsRelationshipsAccountAdd added in v0.4.1

type NoteUpdateParamsRelationshipsAccountAdd struct {
	// Entity ID(s) to add to the relationship.
	Add NoteUpdateParamsRelationshipsAccountAddAddUnion `json:"add,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The property Add is required.

func (NoteUpdateParamsRelationshipsAccountAdd) MarshalJSON added in v0.4.1

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

func (*NoteUpdateParamsRelationshipsAccountAdd) UnmarshalJSON added in v0.4.1

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

type NoteUpdateParamsRelationshipsAccountAddAddUnion added in v0.4.1

type NoteUpdateParamsRelationshipsAccountAddAddUnion 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 (NoteUpdateParamsRelationshipsAccountAddAddUnion) MarshalJSON added in v0.4.1

func (*NoteUpdateParamsRelationshipsAccountAddAddUnion) UnmarshalJSON added in v0.4.1

type NoteUpdateParamsRelationshipsAccountRemove added in v0.4.1

type NoteUpdateParamsRelationshipsAccountRemove struct {
	// Entity ID(s) to remove from the relationship.
	Remove NoteUpdateParamsRelationshipsAccountRemoveRemoveUnion `json:"remove,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The property Remove is required.

func (NoteUpdateParamsRelationshipsAccountRemove) MarshalJSON added in v0.4.1

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

func (*NoteUpdateParamsRelationshipsAccountRemove) UnmarshalJSON added in v0.4.1

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

type NoteUpdateParamsRelationshipsAccountRemoveRemoveUnion added in v0.4.1

type NoteUpdateParamsRelationshipsAccountRemoveRemoveUnion 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 (NoteUpdateParamsRelationshipsAccountRemoveRemoveUnion) MarshalJSON added in v0.4.1

func (*NoteUpdateParamsRelationshipsAccountRemoveRemoveUnion) UnmarshalJSON added in v0.4.1

type NoteUpdateParamsRelationshipsAccountUnion added in v0.4.1

type NoteUpdateParamsRelationshipsAccountUnion struct {
	OfNoteUpdatesRelationshipsAccountAdd    *NoteUpdateParamsRelationshipsAccountAdd    `json:",omitzero,inline"`
	OfNoteUpdatesRelationshipsAccountRemove *NoteUpdateParamsRelationshipsAccountRemove `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 (NoteUpdateParamsRelationshipsAccountUnion) MarshalJSON added in v0.4.1

func (*NoteUpdateParamsRelationshipsAccountUnion) UnmarshalJSON added in v0.4.1

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

type NoteUpdateParamsRelationshipsOpportunityAdd added in v0.4.1

type NoteUpdateParamsRelationshipsOpportunityAdd struct {
	// Entity ID(s) to add to the relationship.
	Add NoteUpdateParamsRelationshipsOpportunityAddAddUnion `json:"add,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The property Add is required.

func (NoteUpdateParamsRelationshipsOpportunityAdd) MarshalJSON added in v0.4.1

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

func (*NoteUpdateParamsRelationshipsOpportunityAdd) UnmarshalJSON added in v0.4.1

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

type NoteUpdateParamsRelationshipsOpportunityAddAddUnion added in v0.4.1

type NoteUpdateParamsRelationshipsOpportunityAddAddUnion 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 (NoteUpdateParamsRelationshipsOpportunityAddAddUnion) MarshalJSON added in v0.4.1

func (*NoteUpdateParamsRelationshipsOpportunityAddAddUnion) UnmarshalJSON added in v0.4.1

type NoteUpdateParamsRelationshipsOpportunityRemove added in v0.4.1

type NoteUpdateParamsRelationshipsOpportunityRemove struct {
	// Entity ID(s) to remove from the relationship.
	Remove NoteUpdateParamsRelationshipsOpportunityRemoveRemoveUnion `json:"remove,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The property Remove is required.

func (NoteUpdateParamsRelationshipsOpportunityRemove) MarshalJSON added in v0.4.1

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

func (*NoteUpdateParamsRelationshipsOpportunityRemove) UnmarshalJSON added in v0.4.1

type NoteUpdateParamsRelationshipsOpportunityRemoveRemoveUnion added in v0.4.1

type NoteUpdateParamsRelationshipsOpportunityRemoveRemoveUnion 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 (NoteUpdateParamsRelationshipsOpportunityRemoveRemoveUnion) MarshalJSON added in v0.4.1

func (*NoteUpdateParamsRelationshipsOpportunityRemoveRemoveUnion) UnmarshalJSON added in v0.4.1

type NoteUpdateParamsRelationshipsOpportunityUnion added in v0.4.1

type NoteUpdateParamsRelationshipsOpportunityUnion struct {
	OfNoteUpdatesRelationshipsOpportunityAdd    *NoteUpdateParamsRelationshipsOpportunityAdd    `json:",omitzero,inline"`
	OfNoteUpdatesRelationshipsOpportunityRemove *NoteUpdateParamsRelationshipsOpportunityRemove `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 (NoteUpdateParamsRelationshipsOpportunityUnion) MarshalJSON added in v0.4.1

func (*NoteUpdateParamsRelationshipsOpportunityUnion) UnmarshalJSON added in v0.4.1

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

type NoteUpdateResponse added in v0.4.1

type NoteUpdateResponse 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]NoteUpdateResponseField `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]NoteUpdateResponseRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NoteUpdateResponse) RawJSON added in v0.4.1

func (r NoteUpdateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*NoteUpdateResponse) UnmarshalJSON added in v0.4.1

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

type NoteUpdateResponseField added in v0.4.1

type NoteUpdateResponseField struct {
	// The field value, or null if unset.
	Value NoteUpdateResponseFieldValueUnion `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 (NoteUpdateResponseField) RawJSON added in v0.4.1

func (r NoteUpdateResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*NoteUpdateResponseField) UnmarshalJSON added in v0.4.1

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

type NoteUpdateResponseFieldValueAddress added in v0.4.1

type NoteUpdateResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NoteUpdateResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteUpdateResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type NoteUpdateResponseFieldValueFullName added in v0.4.1

type NoteUpdateResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NoteUpdateResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteUpdateResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type NoteUpdateResponseFieldValueUnion added in v0.4.1

type NoteUpdateResponseFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [NoteUpdateResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [NoteUpdateResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [NoteUpdateResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [NoteUpdateResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [NoteUpdateResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [NoteUpdateResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [NoteUpdateResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [NoteUpdateResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [NoteUpdateResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [NoteUpdateResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

NoteUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], NoteUpdateResponseFieldValueAddress, NoteUpdateResponseFieldValueFullName.

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 OfStringArray]

func (NoteUpdateResponseFieldValueUnion) AsAddress added in v0.4.1

func (NoteUpdateResponseFieldValueUnion) AsBool added in v0.4.1

func (u NoteUpdateResponseFieldValueUnion) AsBool() (v bool)

func (NoteUpdateResponseFieldValueUnion) AsFloat added in v0.4.1

func (NoteUpdateResponseFieldValueUnion) AsFullName added in v0.4.1

func (NoteUpdateResponseFieldValueUnion) AsString added in v0.4.1

func (u NoteUpdateResponseFieldValueUnion) AsString() (v string)

func (NoteUpdateResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u NoteUpdateResponseFieldValueUnion) AsStringArray() (v []string)

func (NoteUpdateResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteUpdateResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type NoteUpdateResponseRelationship added in v0.4.1

type NoteUpdateResponseRelationship 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 (NoteUpdateResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*NoteUpdateResponseRelationship) UnmarshalJSON added in v0.4.1

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

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"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    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 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 OpportunityCreateResponseFieldValueAddress added in v0.4.1

type OpportunityCreateResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityCreateResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityCreateResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type OpportunityCreateResponseFieldValueFullName added in v0.4.1

type OpportunityCreateResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityCreateResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityCreateResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [OpportunityCreateResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [OpportunityCreateResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [OpportunityCreateResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [OpportunityCreateResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [OpportunityCreateResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [OpportunityCreateResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [OpportunityCreateResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [OpportunityCreateResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [OpportunityCreateResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [OpportunityCreateResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], OpportunityCreateResponseFieldValueAddress, OpportunityCreateResponseFieldValueFullName.

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 OfStringArray]

func (OpportunityCreateResponseFieldValueUnion) AsAddress added in v0.4.1

func (OpportunityCreateResponseFieldValueUnion) AsBool added in v0.4.1

func (OpportunityCreateResponseFieldValueUnion) AsFloat added in v0.4.1

func (OpportunityCreateResponseFieldValueUnion) AsFullName added in v0.4.1

func (OpportunityCreateResponseFieldValueUnion) AsString added in v0.4.1

func (OpportunityCreateResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u OpportunityCreateResponseFieldValueUnion) AsStringArray() (v []string)

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 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 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 OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration `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 OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration added in v0.4.1

type OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration struct {
	// ISO 4217 3-letter currency code.
	Currency string `json:"currency"`
	// Social platform associated with this handle field.
	//
	// Any of "TWITTER", "LINKEDIN", "FACEBOOK", "INSTAGRAM".
	HandleService string `json:"handleService"`
	// Whether this field accepts multiple values.
	MultipleValues bool `json:"multipleValues"`
	// Available options for select fields.
	Options []OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption `json:"options"`
	// Whether values for this field must be unique.
	Unique bool `json:"unique"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Currency       respjson.Field
		HandleService  respjson.Field
		MultipleValues respjson.Field
		Options        respjson.Field
		Unique         respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Type-specific configuration (e.g. select options, currency code).

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration) UnmarshalJSON added in v0.4.1

type OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption added in v0.4.1

type OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption struct {
	// Unique identifier of the select option.
	ID string `json:"id" api:"required"`
	// Human-readable display name of the option.
	Label string `json:"label" api:"required"`
	// Description of the option, or null.
	Description string `json:"description" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Label       respjson.Field
		Description respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption) UnmarshalJSON added in v0.4.1

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"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    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 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 OpportunityListResponseDataFieldValueAddress added in v0.4.1

type OpportunityListResponseDataFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityListResponseDataFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityListResponseDataFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type OpportunityListResponseDataFieldValueFullName added in v0.4.1

type OpportunityListResponseDataFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityListResponseDataFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityListResponseDataFieldValueFullName) UnmarshalJSON added in v0.4.1

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

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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [OpportunityListResponseDataFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [OpportunityListResponseDataFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [OpportunityListResponseDataFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [OpportunityListResponseDataFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [OpportunityListResponseDataFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [OpportunityListResponseDataFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [OpportunityListResponseDataFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [OpportunityListResponseDataFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [OpportunityListResponseDataFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [OpportunityListResponseDataFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], OpportunityListResponseDataFieldValueAddress, OpportunityListResponseDataFieldValueFullName.

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 OfStringArray]

func (OpportunityListResponseDataFieldValueUnion) AsAddress added in v0.4.1

func (OpportunityListResponseDataFieldValueUnion) AsBool

func (OpportunityListResponseDataFieldValueUnion) AsFloat

func (OpportunityListResponseDataFieldValueUnion) AsFullName added in v0.4.1

func (OpportunityListResponseDataFieldValueUnion) AsString

func (OpportunityListResponseDataFieldValueUnion) AsStringArray added in v0.4.1

func (u OpportunityListResponseDataFieldValueUnion) AsStringArray() (v []string)

func (OpportunityListResponseDataFieldValueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityListResponseDataFieldValueUnion) UnmarshalJSON

func (r *OpportunityListResponseDataFieldValueUnion) 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 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 map[string]OpportunityNewParamsFieldUnion `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 map[string]OpportunityNewParamsRelationshipUnion `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 OpportunityNewParamsFieldAddress added in v0.4.1

type OpportunityNewParamsFieldAddress 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
}

func (OpportunityNewParamsFieldAddress) MarshalJSON added in v0.4.1

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

func (*OpportunityNewParamsFieldAddress) UnmarshalJSON added in v0.4.1

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

type OpportunityNewParamsFieldFullName added in v0.4.1

type OpportunityNewParamsFieldFullName 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
}

func (OpportunityNewParamsFieldFullName) MarshalJSON added in v0.4.1

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

func (*OpportunityNewParamsFieldFullName) UnmarshalJSON added in v0.4.1

func (r *OpportunityNewParamsFieldFullName) 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"`
	OfStringArray []string                           `json:",omitzero,inline"`
	OfAddress     *OpportunityNewParamsFieldAddress  `json:",omitzero,inline"`
	OfFullName    *OpportunityNewParamsFieldFullName `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 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 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"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    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 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 OpportunityRetrieveResponseFieldValueAddress added in v0.4.1

type OpportunityRetrieveResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityRetrieveResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityRetrieveResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type OpportunityRetrieveResponseFieldValueFullName added in v0.4.1

type OpportunityRetrieveResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityRetrieveResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityRetrieveResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [OpportunityRetrieveResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [OpportunityRetrieveResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], OpportunityRetrieveResponseFieldValueAddress, OpportunityRetrieveResponseFieldValueFullName.

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 OfStringArray]

func (OpportunityRetrieveResponseFieldValueUnion) AsAddress added in v0.4.1

func (OpportunityRetrieveResponseFieldValueUnion) AsBool added in v0.4.1

func (OpportunityRetrieveResponseFieldValueUnion) AsFloat added in v0.4.1

func (OpportunityRetrieveResponseFieldValueUnion) AsFullName added in v0.4.1

func (OpportunityRetrieveResponseFieldValueUnion) AsString added in v0.4.1

func (OpportunityRetrieveResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u OpportunityRetrieveResponseFieldValueUnion) AsStringArray() (v []string)

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 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 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, and `$field` query parameters to filter. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about <u>[pagination](/using-the-api/list-endpoints/#pagination)</u> and <u>[filtering](/using-the-api/list-endpoints/#filtering)</u>.

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

To avoid duplicates, we recommend a find-or-create pattern — use <u>[list filtering](/using-the-api/list-endpoints/#filtering)</u> to check if a record exists before creating.

**[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 map[string]OpportunityUpdateParamsFieldUnion `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 map[string]OpportunityUpdateParamsRelationship `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 OpportunityUpdateParamsFieldAddress added in v0.4.1

type OpportunityUpdateParamsFieldAddress 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
}

func (OpportunityUpdateParamsFieldAddress) MarshalJSON added in v0.4.1

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

func (*OpportunityUpdateParamsFieldAddress) UnmarshalJSON added in v0.4.1

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

type OpportunityUpdateParamsFieldFullName added in v0.4.1

type OpportunityUpdateParamsFieldFullName 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
}

func (OpportunityUpdateParamsFieldFullName) MarshalJSON added in v0.4.1

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

func (*OpportunityUpdateParamsFieldFullName) UnmarshalJSON added in v0.4.1

func (r *OpportunityUpdateParamsFieldFullName) 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"`
	OfStringArray []string                              `json:",omitzero,inline"`
	OfAddress     *OpportunityUpdateParamsFieldAddress  `json:",omitzero,inline"`
	OfFullName    *OpportunityUpdateParamsFieldFullName `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 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 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"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    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 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 OpportunityUpdateResponseFieldValueAddress added in v0.4.1

type OpportunityUpdateResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityUpdateResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityUpdateResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type OpportunityUpdateResponseFieldValueFullName added in v0.4.1

type OpportunityUpdateResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OpportunityUpdateResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*OpportunityUpdateResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [OpportunityUpdateResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [OpportunityUpdateResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpportunityUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], OpportunityUpdateResponseFieldValueAddress, OpportunityUpdateResponseFieldValueFullName.

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 OfStringArray]

func (OpportunityUpdateResponseFieldValueUnion) AsAddress added in v0.4.1

func (OpportunityUpdateResponseFieldValueUnion) AsBool

func (OpportunityUpdateResponseFieldValueUnion) AsFloat

func (OpportunityUpdateResponseFieldValueUnion) AsFullName added in v0.4.1

func (OpportunityUpdateResponseFieldValueUnion) AsString

func (OpportunityUpdateResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u OpportunityUpdateResponseFieldValueUnion) AsStringArray() (v []string)

func (OpportunityUpdateResponseFieldValueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*OpportunityUpdateResponseFieldValueUnion) UnmarshalJSON

func (r *OpportunityUpdateResponseFieldValueUnion) 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 TaskCreateResponse added in v0.4.1

type TaskCreateResponse 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]TaskCreateResponseField `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]TaskCreateResponseRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskCreateResponse) RawJSON added in v0.4.1

func (r TaskCreateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaskCreateResponse) UnmarshalJSON added in v0.4.1

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

type TaskCreateResponseField added in v0.4.1

type TaskCreateResponseField struct {
	// The field value, or null if unset.
	Value TaskCreateResponseFieldValueUnion `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 (TaskCreateResponseField) RawJSON added in v0.4.1

func (r TaskCreateResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaskCreateResponseField) UnmarshalJSON added in v0.4.1

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

type TaskCreateResponseFieldValueAddress added in v0.4.1

type TaskCreateResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskCreateResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskCreateResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type TaskCreateResponseFieldValueFullName added in v0.4.1

type TaskCreateResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskCreateResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskCreateResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type TaskCreateResponseFieldValueUnion added in v0.4.1

type TaskCreateResponseFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [TaskCreateResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [TaskCreateResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [TaskCreateResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [TaskCreateResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [TaskCreateResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [TaskCreateResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [TaskCreateResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [TaskCreateResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [TaskCreateResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [TaskCreateResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

TaskCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], TaskCreateResponseFieldValueAddress, TaskCreateResponseFieldValueFullName.

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 OfStringArray]

func (TaskCreateResponseFieldValueUnion) AsAddress added in v0.4.1

func (TaskCreateResponseFieldValueUnion) AsBool added in v0.4.1

func (u TaskCreateResponseFieldValueUnion) AsBool() (v bool)

func (TaskCreateResponseFieldValueUnion) AsFloat added in v0.4.1

func (TaskCreateResponseFieldValueUnion) AsFullName added in v0.4.1

func (TaskCreateResponseFieldValueUnion) AsString added in v0.4.1

func (u TaskCreateResponseFieldValueUnion) AsString() (v string)

func (TaskCreateResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u TaskCreateResponseFieldValueUnion) AsStringArray() (v []string)

func (TaskCreateResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskCreateResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type TaskCreateResponseRelationship added in v0.4.1

type TaskCreateResponseRelationship 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 (TaskCreateResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskCreateResponseRelationship) UnmarshalJSON added in v0.4.1

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

type TaskDefinitionsResponse added in v0.4.1

type TaskDefinitionsResponse struct {
	// Map of field keys to their definitions, including both system and custom fields.
	FieldDefinitions map[string]TaskDefinitionsResponseFieldDefinition `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]TaskDefinitionsResponseRelationshipDefinition `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 (TaskDefinitionsResponse) RawJSON added in v0.4.1

func (r TaskDefinitionsResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaskDefinitionsResponse) UnmarshalJSON added in v0.4.1

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

type TaskDefinitionsResponseFieldDefinition added in v0.4.1

type TaskDefinitionsResponseFieldDefinition 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 TaskDefinitionsResponseFieldDefinitionTypeConfiguration `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 (TaskDefinitionsResponseFieldDefinition) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskDefinitionsResponseFieldDefinition) UnmarshalJSON added in v0.4.1

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

type TaskDefinitionsResponseFieldDefinitionTypeConfiguration added in v0.4.1

type TaskDefinitionsResponseFieldDefinitionTypeConfiguration struct {
	// ISO 4217 3-letter currency code.
	Currency string `json:"currency"`
	// Social platform associated with this handle field.
	//
	// Any of "TWITTER", "LINKEDIN", "FACEBOOK", "INSTAGRAM".
	HandleService string `json:"handleService"`
	// Whether this field accepts multiple values.
	MultipleValues bool `json:"multipleValues"`
	// Available options for select fields.
	Options []TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption `json:"options"`
	// Whether values for this field must be unique.
	Unique bool `json:"unique"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Currency       respjson.Field
		HandleService  respjson.Field
		MultipleValues respjson.Field
		Options        respjson.Field
		Unique         respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Type-specific configuration (e.g. select options, currency code).

func (TaskDefinitionsResponseFieldDefinitionTypeConfiguration) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskDefinitionsResponseFieldDefinitionTypeConfiguration) UnmarshalJSON added in v0.4.1

type TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption added in v0.4.1

type TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption struct {
	// Unique identifier of the select option.
	ID string `json:"id" api:"required"`
	// Human-readable display name of the option.
	Label string `json:"label" api:"required"`
	// Description of the option, or null.
	Description string `json:"description" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Label       respjson.Field
		Description respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption) UnmarshalJSON added in v0.4.1

type TaskDefinitionsResponseRelationshipDefinition added in v0.4.1

type TaskDefinitionsResponseRelationshipDefinition 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 (TaskDefinitionsResponseRelationshipDefinition) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskDefinitionsResponseRelationshipDefinition) UnmarshalJSON added in v0.4.1

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

type TaskListParams added in v0.4.1

type TaskListParams 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 (TaskListParams) URLQuery added in v0.4.1

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

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

type TaskListResponse added in v0.4.1

type TaskListResponse struct {
	// Array of entity objects for the current page.
	Data []TaskListResponseData `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 (TaskListResponse) RawJSON added in v0.4.1

func (r TaskListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaskListResponse) UnmarshalJSON added in v0.4.1

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

type TaskListResponseData added in v0.4.1

type TaskListResponseData 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]TaskListResponseDataField `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]TaskListResponseDataRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskListResponseData) RawJSON added in v0.4.1

func (r TaskListResponseData) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaskListResponseData) UnmarshalJSON added in v0.4.1

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

type TaskListResponseDataField added in v0.4.1

type TaskListResponseDataField struct {
	// The field value, or null if unset.
	Value TaskListResponseDataFieldValueUnion `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 (TaskListResponseDataField) RawJSON added in v0.4.1

func (r TaskListResponseDataField) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaskListResponseDataField) UnmarshalJSON added in v0.4.1

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

type TaskListResponseDataFieldValueAddress added in v0.4.1

type TaskListResponseDataFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskListResponseDataFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskListResponseDataFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type TaskListResponseDataFieldValueFullName added in v0.4.1

type TaskListResponseDataFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskListResponseDataFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskListResponseDataFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type TaskListResponseDataFieldValueUnion added in v0.4.1

type TaskListResponseDataFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [TaskListResponseDataFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [TaskListResponseDataFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [TaskListResponseDataFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [TaskListResponseDataFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [TaskListResponseDataFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [TaskListResponseDataFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [TaskListResponseDataFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [TaskListResponseDataFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [TaskListResponseDataFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [TaskListResponseDataFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

TaskListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], TaskListResponseDataFieldValueAddress, TaskListResponseDataFieldValueFullName.

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 OfStringArray]

func (TaskListResponseDataFieldValueUnion) AsAddress added in v0.4.1

func (TaskListResponseDataFieldValueUnion) AsBool added in v0.4.1

func (TaskListResponseDataFieldValueUnion) AsFloat added in v0.4.1

func (TaskListResponseDataFieldValueUnion) AsFullName added in v0.4.1

func (TaskListResponseDataFieldValueUnion) AsString added in v0.4.1

func (TaskListResponseDataFieldValueUnion) AsStringArray added in v0.4.1

func (u TaskListResponseDataFieldValueUnion) AsStringArray() (v []string)

func (TaskListResponseDataFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskListResponseDataFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type TaskListResponseDataRelationship added in v0.4.1

type TaskListResponseDataRelationship 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 (TaskListResponseDataRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskListResponseDataRelationship) UnmarshalJSON added in v0.4.1

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

type TaskNewParams added in v0.4.1

type TaskNewParams struct {
	// Field values for the new task. Tasks only support the documented system fields,
	// all prefixed with `$` (e.g. `$title`, `$status`). Required: `$title` (string)
	// and `$status` (one of `TODO`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`). Call the
	// <u>[definitions endpoint](/api/resources/task/methods/definitions)</u> to
	// discover the available fields. See
	// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
	// value type details.
	Fields TaskNewParamsFields `json:"fields,omitzero" api:"required"`
	// Relationships to set on the new task. System relationships use a `$` prefix
	// (e.g. `$account`, `$assignedTo`); custom relationships use their bare slug.
	// `$assignedTo` is required. Each value is a single entity ID or an array of IDs.
	// Call the <u>[definitions endpoint](/api/resources/task/methods/definitions)</u>
	// to list available relationship keys.
	Relationships map[string]TaskNewParamsRelationshipUnion `json:"relationships,omitzero" api:"required"`
	// contains filtered or unexported fields
}

func (TaskNewParams) MarshalJSON added in v0.4.1

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

func (*TaskNewParams) UnmarshalJSON added in v0.4.1

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

type TaskNewParamsFields added in v0.4.1

type TaskNewParamsFields struct {
	// Task status. One of: `TODO`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`.
	Status string `json:"$status" api:"required"`
	// Title of the task.
	Title string `json:"$title" api:"required"`
	// Description of the task in markdown format.
	Description param.Opt[string] `json:"$description,omitzero"`
	// Due date as an ISO 8601 datetime string.
	DueAt param.Opt[string] `json:"$dueAt,omitzero"`
	// contains filtered or unexported fields
}

Field values for the new task. Tasks only support the documented system fields, all prefixed with `$` (e.g. `$title`, `$status`). Required: `$title` (string) and `$status` (one of `TODO`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`). Call the <u>[definitions endpoint](/api/resources/task/methods/definitions)</u> to discover the available fields. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for value type details.

The properties Status, Title are required.

func (TaskNewParamsFields) MarshalJSON added in v0.4.1

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

func (*TaskNewParamsFields) UnmarshalJSON added in v0.4.1

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

type TaskNewParamsRelationshipUnion added in v0.4.1

type TaskNewParamsRelationshipUnion 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 (TaskNewParamsRelationshipUnion) MarshalJSON added in v0.4.1

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

func (*TaskNewParamsRelationshipUnion) UnmarshalJSON added in v0.4.1

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

type TaskRetrieveResponse added in v0.4.1

type TaskRetrieveResponse 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]TaskRetrieveResponseField `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]TaskRetrieveResponseRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskRetrieveResponse) RawJSON added in v0.4.1

func (r TaskRetrieveResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaskRetrieveResponse) UnmarshalJSON added in v0.4.1

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

type TaskRetrieveResponseField added in v0.4.1

type TaskRetrieveResponseField struct {
	// The field value, or null if unset.
	Value TaskRetrieveResponseFieldValueUnion `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 (TaskRetrieveResponseField) RawJSON added in v0.4.1

func (r TaskRetrieveResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaskRetrieveResponseField) UnmarshalJSON added in v0.4.1

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

type TaskRetrieveResponseFieldValueAddress added in v0.4.1

type TaskRetrieveResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskRetrieveResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskRetrieveResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type TaskRetrieveResponseFieldValueFullName added in v0.4.1

type TaskRetrieveResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskRetrieveResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskRetrieveResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type TaskRetrieveResponseFieldValueUnion added in v0.4.1

type TaskRetrieveResponseFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [TaskRetrieveResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [TaskRetrieveResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [TaskRetrieveResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [TaskRetrieveResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [TaskRetrieveResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [TaskRetrieveResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [TaskRetrieveResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [TaskRetrieveResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [TaskRetrieveResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [TaskRetrieveResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

TaskRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], TaskRetrieveResponseFieldValueAddress, TaskRetrieveResponseFieldValueFullName.

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 OfStringArray]

func (TaskRetrieveResponseFieldValueUnion) AsAddress added in v0.4.1

func (TaskRetrieveResponseFieldValueUnion) AsBool added in v0.4.1

func (TaskRetrieveResponseFieldValueUnion) AsFloat added in v0.4.1

func (TaskRetrieveResponseFieldValueUnion) AsFullName added in v0.4.1

func (TaskRetrieveResponseFieldValueUnion) AsString added in v0.4.1

func (TaskRetrieveResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u TaskRetrieveResponseFieldValueUnion) AsStringArray() (v []string)

func (TaskRetrieveResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskRetrieveResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type TaskRetrieveResponseRelationship added in v0.4.1

type TaskRetrieveResponseRelationship 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 (TaskRetrieveResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskRetrieveResponseRelationship) UnmarshalJSON added in v0.4.1

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

type TaskService added in v0.4.1

type TaskService struct {
	Options []option.RequestOption
}

Tasks represent action items in Lightfield. Each task belongs to an account, is assigned to a member, and can optionally be associated with an opportunity.

TaskService 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 NewTaskService method instead.

func NewTaskService added in v0.4.1

func NewTaskService(opts ...option.RequestOption) (r TaskService)

NewTaskService 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 (*TaskService) Definitions added in v0.4.1

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

Returns the schema for the field and relationship definitions available on tasks. Useful for understanding the shape of task 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/):** `tasks:read`

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

func (*TaskService) Get added in v0.4.1

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

Retrieves a single task by its ID.

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

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

func (*TaskService) List added in v0.4.1

func (r *TaskService) List(ctx context.Context, query TaskListParams, opts ...option.RequestOption) (res *TaskListResponse, err error)

Returns a paginated list of tasks. 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/):** `tasks:read`

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

func (*TaskService) New added in v0.4.1

func (r *TaskService) New(ctx context.Context, body TaskNewParams, opts ...option.RequestOption) (res *TaskCreateResponse, err error)

Creates a new task record. The `$title` and `$status` fields and the `$assignedTo` relationship are required.

If `$createdBy` is omitted it defaults to the authenticated user. The `$note` relationship is read-only — manage notes via their own relationships.

Supports idempotency via the `Idempotency-Key` header.

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

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

func (*TaskService) Update added in v0.4.1

func (r *TaskService) Update(ctx context.Context, id string, body TaskUpdateParams, opts ...option.RequestOption) (res *TaskUpdateResponse, err error)

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

The `$note` relationship is read-only — manage notes via their own relationships.

Supports idempotency via the `Idempotency-Key` header.

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

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

type TaskUpdateParams added in v0.4.1

type TaskUpdateParams struct {
	// Field values to update — only provided fields are modified; omitted fields are
	// left unchanged. Tasks only support the documented system fields, all prefixed
	// with `$` (e.g. `$title`, `$status`). Call the
	// <u>[definitions endpoint](/api/resources/task/methods/definitions)</u> for
	// available fields. See
	// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
	// value type details.
	Fields TaskUpdateParamsFields `json:"fields,omitzero"`
	// Relationship operations to apply. System relationships use a `$` prefix (e.g.
	// `$account`, `$assignedTo`). Each value is an operation object with `add`,
	// `remove`, or `replace`.
	Relationships map[string]TaskUpdateParamsRelationship `json:"relationships,omitzero"`
	// contains filtered or unexported fields
}

func (TaskUpdateParams) MarshalJSON added in v0.4.1

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

func (*TaskUpdateParams) UnmarshalJSON added in v0.4.1

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

type TaskUpdateParamsFields added in v0.4.1

type TaskUpdateParamsFields struct {
	// Description of the task in markdown format.
	Description param.Opt[string] `json:"$description,omitzero"`
	// Due date as an ISO 8601 datetime string.
	DueAt param.Opt[string] `json:"$dueAt,omitzero"`
	// Task status. One of: `TODO`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`.
	Status param.Opt[string] `json:"$status,omitzero"`
	// Title of the task.
	Title param.Opt[string] `json:"$title,omitzero"`
	// contains filtered or unexported fields
}

Field values to update — only provided fields are modified; omitted fields are left unchanged. Tasks only support the documented system fields, all prefixed with `$` (e.g. `$title`, `$status`). Call the <u>[definitions endpoint](/api/resources/task/methods/definitions)</u> for available fields. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for value type details.

func (TaskUpdateParamsFields) MarshalJSON added in v0.4.1

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

func (*TaskUpdateParamsFields) UnmarshalJSON added in v0.4.1

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

type TaskUpdateParamsRelationship added in v0.4.1

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

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

func (TaskUpdateParamsRelationship) MarshalJSON added in v0.4.1

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

func (*TaskUpdateParamsRelationship) UnmarshalJSON added in v0.4.1

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

type TaskUpdateParamsRelationshipAddUnion added in v0.4.1

type TaskUpdateParamsRelationshipAddUnion 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 (TaskUpdateParamsRelationshipAddUnion) MarshalJSON added in v0.4.1

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

func (*TaskUpdateParamsRelationshipAddUnion) UnmarshalJSON added in v0.4.1

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

type TaskUpdateParamsRelationshipRemoveUnion added in v0.4.1

type TaskUpdateParamsRelationshipRemoveUnion 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 (TaskUpdateParamsRelationshipRemoveUnion) MarshalJSON added in v0.4.1

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

func (*TaskUpdateParamsRelationshipRemoveUnion) UnmarshalJSON added in v0.4.1

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

type TaskUpdateParamsRelationshipReplaceUnion added in v0.4.1

type TaskUpdateParamsRelationshipReplaceUnion 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 (TaskUpdateParamsRelationshipReplaceUnion) MarshalJSON added in v0.4.1

func (*TaskUpdateParamsRelationshipReplaceUnion) UnmarshalJSON added in v0.4.1

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

type TaskUpdateResponse added in v0.4.1

type TaskUpdateResponse 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]TaskUpdateResponseField `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]TaskUpdateResponseRelationship `json:"relationships" api:"required"`
	// ISO 8601 timestamp of when the entity was last updated, or null.
	UpdatedAt string `json:"updatedAt" api:"required"`
	// External identifier for the entity, or null if unset.
	ExternalID string `json:"externalId" api:"nullable"`
	// 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
		UpdatedAt     respjson.Field
		ExternalID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskUpdateResponse) RawJSON added in v0.4.1

func (r TaskUpdateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaskUpdateResponse) UnmarshalJSON added in v0.4.1

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

type TaskUpdateResponseField added in v0.4.1

type TaskUpdateResponseField struct {
	// The field value, or null if unset.
	Value TaskUpdateResponseFieldValueUnion `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 (TaskUpdateResponseField) RawJSON added in v0.4.1

func (r TaskUpdateResponseField) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaskUpdateResponseField) UnmarshalJSON added in v0.4.1

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

type TaskUpdateResponseFieldValueAddress added in v0.4.1

type TaskUpdateResponseFieldValueAddress struct {
	// City name.
	City string `json:"city" api:"nullable"`
	// 2-letter ISO 3166-1 alpha-2 country code.
	Country string `json:"country" api:"nullable"`
	// Latitude coordinate.
	Latitude float64 `json:"latitude" api:"nullable"`
	// Longitude coordinate.
	Longitude float64 `json:"longitude" api:"nullable"`
	// Postal or ZIP code.
	PostalCode string `json:"postalCode" api:"nullable"`
	// State or province.
	State string `json:"state" api:"nullable"`
	// Street address line 1.
	Street string `json:"street" api:"nullable"`
	// Street address line 2.
	Street2 string `json:"street2" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		City        respjson.Field
		Country     respjson.Field
		Latitude    respjson.Field
		Longitude   respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		Street      respjson.Field
		Street2     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskUpdateResponseFieldValueAddress) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskUpdateResponseFieldValueAddress) UnmarshalJSON added in v0.4.1

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

type TaskUpdateResponseFieldValueFullName added in v0.4.1

type TaskUpdateResponseFieldValueFullName struct {
	// The contact's first name.
	FirstName string `json:"firstName" api:"nullable"`
	// The contact's last name.
	LastName string `json:"lastName" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FirstName   respjson.Field
		LastName    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskUpdateResponseFieldValueFullName) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskUpdateResponseFieldValueFullName) UnmarshalJSON added in v0.4.1

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

type TaskUpdateResponseFieldValueUnion added in v0.4.1

type TaskUpdateResponseFieldValueUnion 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 [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant [TaskUpdateResponseFieldValueAddress].
	City string `json:"city"`
	// This field is from variant [TaskUpdateResponseFieldValueAddress].
	Country string `json:"country"`
	// This field is from variant [TaskUpdateResponseFieldValueAddress].
	Latitude float64 `json:"latitude"`
	// This field is from variant [TaskUpdateResponseFieldValueAddress].
	Longitude float64 `json:"longitude"`
	// This field is from variant [TaskUpdateResponseFieldValueAddress].
	PostalCode string `json:"postalCode"`
	// This field is from variant [TaskUpdateResponseFieldValueAddress].
	State string `json:"state"`
	// This field is from variant [TaskUpdateResponseFieldValueAddress].
	Street string `json:"street"`
	// This field is from variant [TaskUpdateResponseFieldValueAddress].
	Street2 string `json:"street2"`
	// This field is from variant [TaskUpdateResponseFieldValueFullName].
	FirstName string `json:"firstName"`
	// This field is from variant [TaskUpdateResponseFieldValueFullName].
	LastName string `json:"lastName"`
	JSON     struct {
		OfString      respjson.Field
		OfFloat       respjson.Field
		OfBool        respjson.Field
		OfStringArray respjson.Field
		City          respjson.Field
		Country       respjson.Field
		Latitude      respjson.Field
		Longitude     respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Street        respjson.Field
		Street2       respjson.Field
		FirstName     respjson.Field
		LastName      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

TaskUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], TaskUpdateResponseFieldValueAddress, TaskUpdateResponseFieldValueFullName.

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 OfStringArray]

func (TaskUpdateResponseFieldValueUnion) AsAddress added in v0.4.1

func (TaskUpdateResponseFieldValueUnion) AsBool added in v0.4.1

func (u TaskUpdateResponseFieldValueUnion) AsBool() (v bool)

func (TaskUpdateResponseFieldValueUnion) AsFloat added in v0.4.1

func (TaskUpdateResponseFieldValueUnion) AsFullName added in v0.4.1

func (TaskUpdateResponseFieldValueUnion) AsString added in v0.4.1

func (u TaskUpdateResponseFieldValueUnion) AsString() (v string)

func (TaskUpdateResponseFieldValueUnion) AsStringArray added in v0.4.1

func (u TaskUpdateResponseFieldValueUnion) AsStringArray() (v []string)

func (TaskUpdateResponseFieldValueUnion) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskUpdateResponseFieldValueUnion) UnmarshalJSON added in v0.4.1

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

type TaskUpdateResponseRelationship added in v0.4.1

type TaskUpdateResponseRelationship 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 (TaskUpdateResponseRelationship) RawJSON added in v0.4.1

Returns the unmodified JSON received from the API

func (*TaskUpdateResponseRelationship) UnmarshalJSON added in v0.4.1

func (r *TaskUpdateResponseRelationship) 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