micro

package module
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 18 Imported by: ? modules, 0 packages

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

README

Micro Go API Library

Go Reference

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

It is generated with Stainless.

MCP Server

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

Add to Cursor Install in VS Code

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

Installation

import (
	"github.com/micro-so/micro-sdk-go" // imported as micro
)

Or to pin the version:

go get -u 'github.com/micro-so/micro-sdk-go@v0.9.0'

Requirements

This library requires Go 1.22+.

Usage

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

package main

import (
	"context"
	"fmt"

	"github.com/micro-so/micro-sdk-go"
	"github.com/micro-so/micro-sdk-go/option"
)

func main() {
	client := micro.NewClient(
		option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("MICRO_API_KEY")
		option.WithTeamID("My Team ID"),
	)
	response, err := client.Prism.Objects.Deals.Query(context.TODO(), micro.PrismObjectDealQueryParams{
		Query: micro.F(micro.PrismObjectDealQueryParamsQuery{
			Select: micro.F([]string{"id", "name"}),
		}),
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", response.Data)
}

Request fields

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

See the full list of request options.

Pagination

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

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

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

Errors

When the API returns a non-success status code, we return an error with type *micro.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.Prism.Objects.Deals.Query(context.TODO(), micro.PrismObjectDealQueryParams{
	Query: micro.F(micro.PrismObjectDealQueryParamsQuery{
		Select: micro.F([]string{"id", "name"}),
	}),
})
if err != nil {
	var apierr *micro.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 "/v2/prism/{teamId}/deal/query": 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.Prism.Objects.Deals.Query(
	ctx,
	micro.PrismObjectDealQueryParams{
		Query: micro.F(micro.PrismObjectDealQueryParamsQuery{
			Select: micro.F([]string{"id", "name"}),
		}),
	},
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

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

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

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

Retries

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

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

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

// Override per-request:
client.Prism.Objects.Deals.Query(
	context.TODO(),
	micro.PrismObjectDealQueryParams{
		Query: micro.F(micro.PrismObjectDealQueryParamsQuery{
			Select: micro.F([]string{"id", "name"}),
		}),
	},
	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
response, err := client.Prism.Objects.Deals.Query(
	context.TODO(),
	micro.PrismObjectDealQueryParams{
		Query: micro.F(micro.PrismObjectDealQueryParamsQuery{
			Select: micro.F([]string{"id", "name"}),
		}),
	},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", response)

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

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

Undocumented endpoints

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

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

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

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

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

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

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

Middleware

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

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

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

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

    return res, err
}

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

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

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

Semantic versioning

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

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

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

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

Contributing

See the contributing documentation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

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

Bool is a param field helper which helps specify bools.

func DefaultClientOptions

func DefaultClientOptions() []option.RequestOption

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

func F

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

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

func FileParam

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

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

func Float

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

Float is a param field helper which helps specify floats.

func Int

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

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

func Null

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

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

func Raw

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

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

func String

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

String is a param field helper which helps specify strings.

Types

type Client

type Client struct {
	Options              []option.RequestOption
	Prism                *PrismService
	Views                *ViewService
	TriggeredAutomations *TriggeredAutomationService
	Webhooks             *WebhookService
}

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

func (*Client) Delete

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

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

func (*Client) Execute

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

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

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

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

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

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

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

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

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

func (*Client) Get

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

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

func (*Client) Patch

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

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

func (*Client) Post

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

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

func (*Client) Put

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

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

type Error

type Error = apierror.Error

type PrismImportGetParams added in v0.5.0

type PrismImportGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type PrismImportGetResponse added in v0.5.0

type PrismImportGetResponse struct {
	// Null for sync imports (results inlined). Set for async imports.
	JobID  string                       `json:"job_id" api:"required,nullable"`
	Status PrismImportGetResponseStatus `json:"status" api:"required"`
	// Total number of rows in the import.
	Total     int64     `json:"total" api:"required"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Set when status=failed; describes the job-level failure (not per-row).
	Error     PrismImportGetResponseError `json:"error"`
	ExpiresAt time.Time                   `json:"expires_at" format:"date-time"`
	Failed    int64                       `json:"failed"`
	// Rows that have been attempted (succeeded + failed).
	Processed int64 `json:"processed"`
	// Per-row outcomes. Always present for sync imports; populated for async imports
	// once the job reaches `complete`.
	Results   []PrismImportGetResponseResult `json:"results"`
	Succeeded int64                          `json:"succeeded"`
	UpdatedAt time.Time                      `json:"updated_at" format:"date-time"`
	JSON      prismImportGetResponseJSON     `json:"-"`
}

Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}.

func (*PrismImportGetResponse) UnmarshalJSON added in v0.5.0

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

type PrismImportGetResponseError added in v0.5.0

type PrismImportGetResponseError struct {
	Code    string                          `json:"code"`
	Message string                          `json:"message"`
	JSON    prismImportGetResponseErrorJSON `json:"-"`
}

Set when status=failed; describes the job-level failure (not per-row).

func (*PrismImportGetResponseError) UnmarshalJSON added in v0.5.0

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

type PrismImportGetResponseResult added in v0.5.0

type PrismImportGetResponseResult struct {
	ID      string                             `json:"id" api:"nullable" format:"uuid"`
	Created bool                               `json:"created"`
	Error   PrismImportGetResponseResultsError `json:"error"`
	// True if the row matched an existing record via the dedupe key.
	Existing bool `json:"existing"`
	// Zero-based position of this row in the request.
	InputIndex int64 `json:"input_index"`
	// True if a matching record was updated.
	Updated bool                             `json:"updated"`
	JSON    prismImportGetResponseResultJSON `json:"-"`
}

func (*PrismImportGetResponseResult) UnmarshalJSON added in v0.5.0

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

type PrismImportGetResponseResultsError added in v0.5.0

type PrismImportGetResponseResultsError struct {
	Code    string                                 `json:"code"`
	Message string                                 `json:"message"`
	JSON    prismImportGetResponseResultsErrorJSON `json:"-"`
}

func (*PrismImportGetResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismImportGetResponseStatus added in v0.5.0

type PrismImportGetResponseStatus string
const (
	PrismImportGetResponseStatusComplete   PrismImportGetResponseStatus = "complete"
	PrismImportGetResponseStatusProcessing PrismImportGetResponseStatus = "processing"
	PrismImportGetResponseStatusFailed     PrismImportGetResponseStatus = "failed"
)

func (PrismImportGetResponseStatus) IsKnown added in v0.5.0

func (r PrismImportGetResponseStatus) IsKnown() bool

type PrismImportService added in v0.5.0

type PrismImportService struct {
	Options []option.RequestOption
}

PrismImportService contains methods and other services that help with interacting with the micro 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 NewPrismImportService method instead.

func NewPrismImportService added in v0.5.0

func NewPrismImportService(opts ...option.RequestOption) (r *PrismImportService)

NewPrismImportService 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 (*PrismImportService) Get added in v0.5.0

Poll the status of an async import. Sync imports complete in the original response and don't appear here. Async jobs are retained for 7 days. Returns 404 once the job has expired.

type PrismObjectActionBulkDeleteParams added in v0.5.0

type PrismObjectActionBulkDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]   `path:"teamId" api:"required" format:"uuid"`
	IDs            param.Field[[]string] `json:"ids" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string]   `header:"Idempotency-Key"`
}

func (PrismObjectActionBulkDeleteParams) MarshalJSON added in v0.5.0

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

type PrismObjectActionBulkDeleteResponse added in v0.5.0

type PrismObjectActionBulkDeleteResponse struct {
	Results []PrismObjectActionBulkDeleteResponseResult `json:"results" api:"required"`
	Summary PrismObjectActionBulkDeleteResponseSummary  `json:"summary" api:"required"`
	JSON    prismObjectActionBulkDeleteResponseJSON     `json:"-"`
}

Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed.

func (*PrismObjectActionBulkDeleteResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionBulkDeleteResponseResult added in v0.5.0

type PrismObjectActionBulkDeleteResponseResult struct {
	// Item ID, or null if the input was unparseable.
	ID     string                                           `json:"id" api:"required,nullable"`
	Status PrismObjectActionBulkDeleteResponseResultsStatus `json:"status" api:"required"`
	Error  PrismObjectActionBulkDeleteResponseResultsError  `json:"error"`
	// Object returned by reads (get/create/patch/restore). id is always present.
	Record PrismObjectActionBulkDeleteResponseResultsRecord `json:"record"`
	JSON   prismObjectActionBulkDeleteResponseResultJSON    `json:"-"`
}

func (*PrismObjectActionBulkDeleteResponseResult) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionBulkDeleteResponseResultsError added in v0.5.0

type PrismObjectActionBulkDeleteResponseResultsError struct {
	Code    string                                              `json:"code"`
	Message string                                              `json:"message"`
	JSON    prismObjectActionBulkDeleteResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectActionBulkDeleteResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionBulkDeleteResponseResultsRecord added in v0.5.0

type PrismObjectActionBulkDeleteResponseResultsRecord struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                               `json:"default"`
	List    interface{}                                          `json:"list"`
	JSON    prismObjectActionBulkDeleteResponseResultsRecordJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectActionBulkDeleteResponseResultsRecord) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionBulkDeleteResponseResultsStatus added in v0.5.0

type PrismObjectActionBulkDeleteResponseResultsStatus string
const (
	PrismObjectActionBulkDeleteResponseResultsStatusOk    PrismObjectActionBulkDeleteResponseResultsStatus = "ok"
	PrismObjectActionBulkDeleteResponseResultsStatusError PrismObjectActionBulkDeleteResponseResultsStatus = "error"
)

func (PrismObjectActionBulkDeleteResponseResultsStatus) IsKnown added in v0.5.0

type PrismObjectActionBulkDeleteResponseSummary added in v0.5.0

type PrismObjectActionBulkDeleteResponseSummary struct {
	Failed    int64                                          `json:"failed" api:"required"`
	Succeeded int64                                          `json:"succeeded" api:"required"`
	Total     int64                                          `json:"total" api:"required"`
	JSON      prismObjectActionBulkDeleteResponseSummaryJSON `json:"-"`
}

func (*PrismObjectActionBulkDeleteResponseSummary) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionBulkNewParams

type PrismObjectActionBulkNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Array of objects to import with property values keyed by slug
	Objects        param.Field[[]PrismObjectPropertiesParam]          `json:"objects" api:"required"`
	Options        param.Field[PrismObjectActionBulkNewParamsOptions] `json:"options"`
	IdempotencyKey param.Field[string]                                `header:"Idempotency-Key"`
}

func (PrismObjectActionBulkNewParams) MarshalJSON

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

type PrismObjectActionBulkNewParamsOptions

type PrismObjectActionBulkNewParamsOptions struct {
	// Whether deduplication should be case insensitive
	CaseInsensitive param.Field[bool] `json:"caseInsensitive"`
	// When true, unknown values for select/multiselect properties are created as new
	// options instead of failing the import
	CreateMissingOptions param.Field[bool] `json:"create_missing_options"`
	// Deprecated alias for list_id.
	//
	// Deprecated: deprecated
	CRMID param.Field[string] `json:"crm_id" format:"uuid"`
	// Property slug to deduplicate on. A single-element array is also accepted;
	// compound (multi-slug) dedupe is not supported yet and is rejected with guidance.
	DedupeBy param.Field[PrismObjectActionBulkNewParamsOptionsDedupeByUnion] `json:"dedupe_by"`
	// App/CRM ID for context (optional)
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Require app_stage for every row in the selected list. app_stage is a reserved
	// list-scoped alias for native status.
	RequireListStage param.Field[bool] `json:"require_list_stage"`
	// Patch a deduplicated record with the supplied properties instead of skipping it.
	UpdateExisting param.Field[bool] `json:"update_existing"`
}

func (PrismObjectActionBulkNewParamsOptions) MarshalJSON

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

type PrismObjectActionBulkNewParamsOptionsDedupeByArray added in v0.9.0

type PrismObjectActionBulkNewParamsOptionsDedupeByArray []string

func (PrismObjectActionBulkNewParamsOptionsDedupeByArray) ImplementsPrismObjectActionBulkNewParamsOptionsDedupeByUnion added in v0.9.0

func (r PrismObjectActionBulkNewParamsOptionsDedupeByArray) ImplementsPrismObjectActionBulkNewParamsOptionsDedupeByUnion()

type PrismObjectActionBulkNewParamsOptionsDedupeByUnion added in v0.9.0

type PrismObjectActionBulkNewParamsOptionsDedupeByUnion interface {
	ImplementsPrismObjectActionBulkNewParamsOptionsDedupeByUnion()
}

Property slug to deduplicate on. A single-element array is also accepted; compound (multi-slug) dedupe is not supported yet and is rejected with guidance.

Satisfied by [shared.UnionString], PrismObjectActionBulkNewParamsOptionsDedupeByArray.

type PrismObjectActionBulkNewResponse

type PrismObjectActionBulkNewResponse struct {
	// Null for sync imports (results inlined). Set for async imports.
	JobID  string                                 `json:"job_id" api:"required,nullable"`
	Status PrismObjectActionBulkNewResponseStatus `json:"status" api:"required"`
	// Total number of rows in the import.
	Total     int64     `json:"total" api:"required"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Set when status=failed; describes the job-level failure (not per-row).
	Error     PrismObjectActionBulkNewResponseError `json:"error"`
	ExpiresAt time.Time                             `json:"expires_at" format:"date-time"`
	Failed    int64                                 `json:"failed"`
	// Rows that have been attempted (succeeded + failed).
	Processed int64 `json:"processed"`
	// Per-row outcomes. Always present for sync imports; populated for async imports
	// once the job reaches `complete`.
	Results   []PrismObjectActionBulkNewResponseResult `json:"results"`
	Succeeded int64                                    `json:"succeeded"`
	UpdatedAt time.Time                                `json:"updated_at" format:"date-time"`
	JSON      prismObjectActionBulkNewResponseJSON     `json:"-"`
}

Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}.

func (*PrismObjectActionBulkNewResponse) UnmarshalJSON

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

type PrismObjectActionBulkNewResponseError added in v0.5.0

type PrismObjectActionBulkNewResponseError struct {
	Code    string                                    `json:"code"`
	Message string                                    `json:"message"`
	JSON    prismObjectActionBulkNewResponseErrorJSON `json:"-"`
}

Set when status=failed; describes the job-level failure (not per-row).

func (*PrismObjectActionBulkNewResponseError) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionBulkNewResponseResult

type PrismObjectActionBulkNewResponseResult struct {
	ID      string                                       `json:"id" api:"nullable" format:"uuid"`
	Created bool                                         `json:"created"`
	Error   PrismObjectActionBulkNewResponseResultsError `json:"error"`
	// True if the row matched an existing record via the dedupe key.
	Existing bool `json:"existing"`
	// Zero-based position of this row in the request.
	InputIndex int64 `json:"input_index"`
	// True if a matching record was updated.
	Updated bool                                       `json:"updated"`
	JSON    prismObjectActionBulkNewResponseResultJSON `json:"-"`
}

func (*PrismObjectActionBulkNewResponseResult) UnmarshalJSON

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

type PrismObjectActionBulkNewResponseResultsError added in v0.5.0

type PrismObjectActionBulkNewResponseResultsError struct {
	Code    string                                           `json:"code"`
	Message string                                           `json:"message"`
	JSON    prismObjectActionBulkNewResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectActionBulkNewResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionBulkNewResponseStatus

type PrismObjectActionBulkNewResponseStatus string
const (
	PrismObjectActionBulkNewResponseStatusComplete   PrismObjectActionBulkNewResponseStatus = "complete"
	PrismObjectActionBulkNewResponseStatusProcessing PrismObjectActionBulkNewResponseStatus = "processing"
	PrismObjectActionBulkNewResponseStatusFailed     PrismObjectActionBulkNewResponseStatus = "failed"
)

func (PrismObjectActionBulkNewResponseStatus) IsKnown

type PrismObjectActionBulkUpdateParams added in v0.5.0

type PrismObjectActionBulkUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]                                  `path:"teamId" api:"required" format:"uuid"`
	Items          param.Field[[]PrismObjectActionBulkUpdateParamsItem] `json:"items" api:"required"`
	IdempotencyKey param.Field[string]                                  `header:"Idempotency-Key"`
}

func (PrismObjectActionBulkUpdateParams) MarshalJSON added in v0.5.0

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

type PrismObjectActionBulkUpdateParamsItem added in v0.5.0

type PrismObjectActionBulkUpdateParamsItem struct {
	ID          param.Field[string]    `json:"id" api:"required" format:"uuid"`
	ExtraFields map[string]interface{} `json:"-,extras"`
}

Object with `id` plus the same property body shape as PATCH (`default`/`list`/`extended`).

func (PrismObjectActionBulkUpdateParamsItem) MarshalJSON added in v0.5.0

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

type PrismObjectActionBulkUpdateResponse added in v0.5.0

type PrismObjectActionBulkUpdateResponse struct {
	Results []PrismObjectActionBulkUpdateResponseResult `json:"results" api:"required"`
	Summary PrismObjectActionBulkUpdateResponseSummary  `json:"summary" api:"required"`
	JSON    prismObjectActionBulkUpdateResponseJSON     `json:"-"`
}

Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed.

func (*PrismObjectActionBulkUpdateResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionBulkUpdateResponseResult added in v0.5.0

type PrismObjectActionBulkUpdateResponseResult struct {
	// Item ID, or null if the input was unparseable.
	ID     string                                           `json:"id" api:"required,nullable"`
	Status PrismObjectActionBulkUpdateResponseResultsStatus `json:"status" api:"required"`
	Error  PrismObjectActionBulkUpdateResponseResultsError  `json:"error"`
	// Object returned by reads (get/create/patch/restore). id is always present.
	Record PrismObjectActionBulkUpdateResponseResultsRecord `json:"record"`
	JSON   prismObjectActionBulkUpdateResponseResultJSON    `json:"-"`
}

func (*PrismObjectActionBulkUpdateResponseResult) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionBulkUpdateResponseResultsError added in v0.5.0

type PrismObjectActionBulkUpdateResponseResultsError struct {
	Code    string                                              `json:"code"`
	Message string                                              `json:"message"`
	JSON    prismObjectActionBulkUpdateResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectActionBulkUpdateResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionBulkUpdateResponseResultsRecord added in v0.5.0

type PrismObjectActionBulkUpdateResponseResultsRecord struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                               `json:"default"`
	List    interface{}                                          `json:"list"`
	JSON    prismObjectActionBulkUpdateResponseResultsRecordJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectActionBulkUpdateResponseResultsRecord) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionBulkUpdateResponseResultsStatus added in v0.5.0

type PrismObjectActionBulkUpdateResponseResultsStatus string
const (
	PrismObjectActionBulkUpdateResponseResultsStatusOk    PrismObjectActionBulkUpdateResponseResultsStatus = "ok"
	PrismObjectActionBulkUpdateResponseResultsStatusError PrismObjectActionBulkUpdateResponseResultsStatus = "error"
)

func (PrismObjectActionBulkUpdateResponseResultsStatus) IsKnown added in v0.5.0

type PrismObjectActionBulkUpdateResponseSummary added in v0.5.0

type PrismObjectActionBulkUpdateResponseSummary struct {
	Failed    int64                                          `json:"failed" api:"required"`
	Succeeded int64                                          `json:"succeeded" api:"required"`
	Total     int64                                          `json:"total" api:"required"`
	JSON      prismObjectActionBulkUpdateResponseSummaryJSON `json:"-"`
}

func (*PrismObjectActionBulkUpdateResponseSummary) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionCountParams added in v0.5.0

type PrismObjectActionCountParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the count to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectActionCountParams) URLQuery added in v0.5.0

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

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

type PrismObjectActionCountResponse added in v0.5.0

type PrismObjectActionCountResponse struct {
	// Number of records matching the access scope.
	Total int64                              `json:"total" api:"required"`
	JSON  prismObjectActionCountResponseJSON `json:"-"`
}

func (*PrismObjectActionCountResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionDeleteParams

type PrismObjectActionDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID  param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IfMatch param.Field[string] `header:"If-Match"`
}

type PrismObjectActionDuplicateParams

type PrismObjectActionDuplicateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectActionDuplicateResponse

type PrismObjectActionDuplicateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                 `json:"default"`
	List    interface{}                            `json:"list"`
	JSON    prismObjectActionDuplicateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectActionDuplicateResponse) UnmarshalJSON

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

type PrismObjectActionFindParams added in v0.5.0

type PrismObjectActionFindParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the lookup to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectActionFindParams) URLQuery added in v0.5.0

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

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

type PrismObjectActionFindResponse added in v0.5.0

type PrismObjectActionFindResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}            `json:"default"`
	List    interface{}                       `json:"list"`
	JSON    prismObjectActionFindResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectActionFindResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionGetParams

type PrismObjectActionGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
}

func (PrismObjectActionGetParams) URLQuery added in v0.5.0

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

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

type PrismObjectActionGetResponse added in v0.2.0

type PrismObjectActionGetResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}           `json:"default"`
	List    interface{}                      `json:"list"`
	JSON    prismObjectActionGetResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectActionGetResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectActionGrantGetParams

type PrismObjectActionGrantGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type PrismObjectActionGrantGetResponse

type PrismObjectActionGrantGetResponse struct {
	TeamGroupID []map[string]PrismObjectActionGrantGetResponseTeamGroupID `json:"team_group_id"`
	TeamID      map[string]PrismObjectActionGrantGetResponseTeamID        `json:"team_id"`
	UserID      []map[string]PrismObjectActionGrantGetResponseUserID      `json:"user_id"`
	JSON        prismObjectActionGrantGetResponseJSON                     `json:"-"`
}

func (*PrismObjectActionGrantGetResponse) UnmarshalJSON

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

type PrismObjectActionGrantGetResponseTeamGroupID

type PrismObjectActionGrantGetResponseTeamGroupID string
const (
	PrismObjectActionGrantGetResponseTeamGroupIDA PrismObjectActionGrantGetResponseTeamGroupID = "a"
	PrismObjectActionGrantGetResponseTeamGroupIDR PrismObjectActionGrantGetResponseTeamGroupID = "r"
	PrismObjectActionGrantGetResponseTeamGroupIDW PrismObjectActionGrantGetResponseTeamGroupID = "w"
)

func (PrismObjectActionGrantGetResponseTeamGroupID) IsKnown

type PrismObjectActionGrantGetResponseTeamID

type PrismObjectActionGrantGetResponseTeamID string
const (
	PrismObjectActionGrantGetResponseTeamIDA PrismObjectActionGrantGetResponseTeamID = "a"
	PrismObjectActionGrantGetResponseTeamIDR PrismObjectActionGrantGetResponseTeamID = "r"
	PrismObjectActionGrantGetResponseTeamIDW PrismObjectActionGrantGetResponseTeamID = "w"
)

func (PrismObjectActionGrantGetResponseTeamID) IsKnown

type PrismObjectActionGrantGetResponseUserID

type PrismObjectActionGrantGetResponseUserID string
const (
	PrismObjectActionGrantGetResponseUserIDA PrismObjectActionGrantGetResponseUserID = "a"
	PrismObjectActionGrantGetResponseUserIDR PrismObjectActionGrantGetResponseUserID = "r"
	PrismObjectActionGrantGetResponseUserIDW PrismObjectActionGrantGetResponseUserID = "w"
)

func (PrismObjectActionGrantGetResponseUserID) IsKnown

type PrismObjectActionGrantService

type PrismObjectActionGrantService struct {
	Options []option.RequestOption
}

PrismObjectActionGrantService contains methods and other services that help with interacting with the micro 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 NewPrismObjectActionGrantService method instead.

func NewPrismObjectActionGrantService

func NewPrismObjectActionGrantService(opts ...option.RequestOption) (r *PrismObjectActionGrantService)

NewPrismObjectActionGrantService 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 (*PrismObjectActionGrantService) Get

Get grant

func (*PrismObjectActionGrantService) Update

Update grant

type PrismObjectActionGrantUpdateParams

type PrismObjectActionGrantUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	PathTeamID     param.Field[string]                                                     `path:"teamId" api:"required" format:"uuid"`
	TeamGroupID    param.Field[[]map[string]PrismObjectActionGrantUpdateParamsTeamGroupID] `json:"team_group_id"`
	BodyTeamID     param.Field[map[string]PrismObjectActionGrantUpdateParamsTeamID]        `json:"team_id"`
	UserID         param.Field[[]map[string]PrismObjectActionGrantUpdateParamsUserID]      `json:"user_id"`
	IdempotencyKey param.Field[string]                                                     `header:"Idempotency-Key"`
}

func (PrismObjectActionGrantUpdateParams) MarshalJSON

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

type PrismObjectActionGrantUpdateParamsTeamGroupID

type PrismObjectActionGrantUpdateParamsTeamGroupID string
const (
	PrismObjectActionGrantUpdateParamsTeamGroupIDA PrismObjectActionGrantUpdateParamsTeamGroupID = "a"
	PrismObjectActionGrantUpdateParamsTeamGroupIDR PrismObjectActionGrantUpdateParamsTeamGroupID = "r"
	PrismObjectActionGrantUpdateParamsTeamGroupIDW PrismObjectActionGrantUpdateParamsTeamGroupID = "w"
)

func (PrismObjectActionGrantUpdateParamsTeamGroupID) IsKnown

type PrismObjectActionGrantUpdateParamsTeamID

type PrismObjectActionGrantUpdateParamsTeamID string
const (
	PrismObjectActionGrantUpdateParamsTeamIDA PrismObjectActionGrantUpdateParamsTeamID = "a"
	PrismObjectActionGrantUpdateParamsTeamIDR PrismObjectActionGrantUpdateParamsTeamID = "r"
	PrismObjectActionGrantUpdateParamsTeamIDW PrismObjectActionGrantUpdateParamsTeamID = "w"
)

func (PrismObjectActionGrantUpdateParamsTeamID) IsKnown

type PrismObjectActionGrantUpdateParamsUserID

type PrismObjectActionGrantUpdateParamsUserID string
const (
	PrismObjectActionGrantUpdateParamsUserIDA PrismObjectActionGrantUpdateParamsUserID = "a"
	PrismObjectActionGrantUpdateParamsUserIDR PrismObjectActionGrantUpdateParamsUserID = "r"
	PrismObjectActionGrantUpdateParamsUserIDW PrismObjectActionGrantUpdateParamsUserID = "w"
)

func (PrismObjectActionGrantUpdateParamsUserID) IsKnown

type PrismObjectActionGrantUpdateResponse

type PrismObjectActionGrantUpdateResponse struct {
	TeamGroupID []map[string]PrismObjectActionGrantUpdateResponseTeamGroupID `json:"team_group_id"`
	TeamID      map[string]PrismObjectActionGrantUpdateResponseTeamID        `json:"team_id"`
	UserID      []map[string]PrismObjectActionGrantUpdateResponseUserID      `json:"user_id"`
	JSON        prismObjectActionGrantUpdateResponseJSON                     `json:"-"`
}

func (*PrismObjectActionGrantUpdateResponse) UnmarshalJSON

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

type PrismObjectActionGrantUpdateResponseTeamGroupID

type PrismObjectActionGrantUpdateResponseTeamGroupID string
const (
	PrismObjectActionGrantUpdateResponseTeamGroupIDA PrismObjectActionGrantUpdateResponseTeamGroupID = "a"
	PrismObjectActionGrantUpdateResponseTeamGroupIDR PrismObjectActionGrantUpdateResponseTeamGroupID = "r"
	PrismObjectActionGrantUpdateResponseTeamGroupIDW PrismObjectActionGrantUpdateResponseTeamGroupID = "w"
)

func (PrismObjectActionGrantUpdateResponseTeamGroupID) IsKnown

type PrismObjectActionGrantUpdateResponseTeamID

type PrismObjectActionGrantUpdateResponseTeamID string
const (
	PrismObjectActionGrantUpdateResponseTeamIDA PrismObjectActionGrantUpdateResponseTeamID = "a"
	PrismObjectActionGrantUpdateResponseTeamIDR PrismObjectActionGrantUpdateResponseTeamID = "r"
	PrismObjectActionGrantUpdateResponseTeamIDW PrismObjectActionGrantUpdateResponseTeamID = "w"
)

func (PrismObjectActionGrantUpdateResponseTeamID) IsKnown

type PrismObjectActionGrantUpdateResponseUserID

type PrismObjectActionGrantUpdateResponseUserID string
const (
	PrismObjectActionGrantUpdateResponseUserIDA PrismObjectActionGrantUpdateResponseUserID = "a"
	PrismObjectActionGrantUpdateResponseUserIDR PrismObjectActionGrantUpdateResponseUserID = "r"
	PrismObjectActionGrantUpdateResponseUserIDW PrismObjectActionGrantUpdateResponseUserID = "w"
)

func (PrismObjectActionGrantUpdateResponseUserID) IsKnown

type PrismObjectActionListParams added in v0.5.0

type PrismObjectActionListParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page.
	Cursor param.Field[string] `query:"cursor"`
	// Include soft-deleted records. Pass the literal string `true`.
	Deleted param.Field[bool] `query:"deleted"`
	// When set to `true`, the response includes a `total` field with the unpaginated
	// row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total.
	IncludeTotal param.Field[bool] `query:"include_total"`
	// Maximum number of rows to return. Capped server-side at 50.
	Limit param.Field[int64] `query:"limit"`
	// Scope properties to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
	// Comma-separated list of slugs. Prefix with `-` for descending. Example:
	// `sort=-updated_at,name`.
	Sort param.Field[string] `query:"sort"`
}

func (PrismObjectActionListParams) URLQuery added in v0.5.0

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

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

type PrismObjectActionListResponse added in v0.5.0

type PrismObjectActionListResponse struct {
	Data []PrismObjectActionListResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal — false on the last page, never forces clients to
	// overshoot.
	HasMore    bool   `json:"has_more" api:"required"`
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Populated only when `?include_total=true` was passed.
	Total int64                             `json:"total" api:"nullable"`
	JSON  prismObjectActionListResponseJSON `json:"-"`
}

func (*PrismObjectActionListResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionListResponseData added in v0.5.0

type PrismObjectActionListResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}                `json:"properties"`
	Source     []string                              `json:"source" api:"nullable"`
	JSON       prismObjectActionListResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectActionListResponseData) UnmarshalJSON added in v0.5.0

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

type PrismObjectActionNewParams

type PrismObjectActionNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
}

func (PrismObjectActionNewParams) MarshalJSON

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

type PrismObjectActionNewResponse added in v0.2.0

type PrismObjectActionNewResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}           `json:"default"`
	List    interface{}                      `json:"list"`
	JSON    prismObjectActionNewResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectActionNewResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectActionQueryParams

type PrismObjectActionQueryParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string]                              `path:"teamId" api:"required" format:"uuid"`
	Query  param.Field[PrismObjectActionQueryParamsQuery]   `json:"query" api:"required"`
	ID     param.Field[PrismObjectActionQueryParamsIDUnion] `json:"id" format:"uuid"`
	Boxes  param.Field[[]string]                            `json:"boxes"`
	// Alternative location for the opaque cursor (a sibling of `query`). Use whichever
	// feels more natural; if both are present, `query.cursor` wins.
	Cursor  param.Field[string] `json:"cursor"`
	Deleted param.Field[bool]   `json:"deleted"`
	// When true, the response includes a `total` field with the unpaginated row count.
	// Costs an additional pass over the result set — for unfiltered totals prefer
	// `GET /v2/prism/{teamId}/{objectType}/count` instead.
	IncludeTotal param.Field[bool]     `json:"include_total"`
	Sources      param.Field[[]string] `json:"sources" format:"uuid"`
}

func (PrismObjectActionQueryParams) MarshalJSON

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

type PrismObjectActionQueryParamsIDArray

type PrismObjectActionQueryParamsIDArray []string

func (PrismObjectActionQueryParamsIDArray) ImplementsPrismObjectActionQueryParamsIDUnion

func (r PrismObjectActionQueryParamsIDArray) ImplementsPrismObjectActionQueryParamsIDUnion()

type PrismObjectActionQueryParamsIDUnion

type PrismObjectActionQueryParamsIDUnion interface {
	ImplementsPrismObjectActionQueryParamsIDUnion()
}

Satisfied by [shared.UnionString], PrismObjectActionQueryParamsIDArray.

type PrismObjectActionQueryParamsQuery

type PrismObjectActionQueryParamsQuery struct {
	// Property slugs to select. Use dot notation for relationships (e.g.
	// attendee.contact.first_name). `id` is always returned at the top level of each
	// row and does not need to be selected.
	Select param.Field[[]string] `json:"select" api:"required"`
	// Logical operator for combining filters
	Combinator param.Field[PrismObjectActionQueryParamsQueryCombinator] `json:"combinator"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page. When set, `page` and `limit` are derived from the cursor
	// and any explicit values are ignored.
	Cursor param.Field[string] `json:"cursor"`
	// Filters as [{ slug: { operator: value } }]. For select/multiselect properties,
	// values may be option slugs or option UUIDs.
	Filter param.Field[[]map[string]PrismObjectActionQueryParamsQueryFilterUnion] `json:"filter"`
	// Maximum number of rows to return. Capped server-side at 50; requests above the
	// cap are rejected.
	Limit  param.Field[int64]  `json:"limit"`
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Page number (1-based). Prefer `cursor`. Page-number pagination drifts under
	// concurrent writes; use it only for one-shot exports.
	//
	// Deprecated: deprecated
	Page param.Field[int64] `json:"page"`
	// Sort order as [{ slug: direction }]. Array order determines sort priority
	Sort param.Field[[]map[string]PrismObjectActionQueryParamsQuerySort] `json:"sort"`
}

func (PrismObjectActionQueryParamsQuery) MarshalJSON

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

type PrismObjectActionQueryParamsQueryCombinator

type PrismObjectActionQueryParamsQueryCombinator string

Logical operator for combining filters

const (
	PrismObjectActionQueryParamsQueryCombinatorAnd PrismObjectActionQueryParamsQueryCombinator = "AND"
	PrismObjectActionQueryParamsQueryCombinatorOr  PrismObjectActionQueryParamsQueryCombinator = "OR"
)

func (PrismObjectActionQueryParamsQueryCombinator) IsKnown

type PrismObjectActionQueryParamsQueryFilter added in v0.3.0

type PrismObjectActionQueryParamsQueryFilter struct {
	NotEquals       param.Field[interface{}] `json:"!="`
	Less            param.Field[string]      `json:"<"`
	LessOrEquals    param.Field[string]      `json:"<="`
	Equals          param.Field[interface{}] `json:"="`
	Greater         param.Field[string]      `json:">"`
	GreaterOrEquals param.Field[string]      `json:">="`
	BeginsWith      param.Field[string]      `json:"begins_with"`
	Between         param.Field[interface{}] `json:"between"`
	Contains        param.Field[interface{}] `json:"contains"`
	EndsWith        param.Field[string]      `json:"ends_with"`
	Exists          param.Field[bool]        `json:"exists"`
	In              param.Field[interface{}] `json:"in"`
	IsNotNull       param.Field[interface{}] `json:"is_not_null"`
	IsNull          param.Field[interface{}] `json:"is_null"`
	NotContains     param.Field[string]      `json:"not_contains"`
	NotExists       param.Field[bool]        `json:"not_exists"`
	NotIn           param.Field[interface{}] `json:"not_in"`
}

func (PrismObjectActionQueryParamsQueryFilter) MarshalJSON added in v0.3.0

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

type PrismObjectActionQueryParamsQueryFilterBeginsWith added in v0.3.0

type PrismObjectActionQueryParamsQueryFilterBeginsWith struct {
	BeginsWith param.Field[string] `json:"begins_with" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterBeginsWith) MarshalJSON added in v0.3.0

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

type PrismObjectActionQueryParamsQueryFilterBetween added in v0.5.0

type PrismObjectActionQueryParamsQueryFilterBetween struct {
	Between param.Field[PrismObjectActionQueryParamsQueryFilterBetweenBetweenUnion] `json:"between" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterBetween) MarshalJSON added in v0.5.0

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

type PrismObjectActionQueryParamsQueryFilterBetweenBetweenArray added in v0.5.0

type PrismObjectActionQueryParamsQueryFilterBetweenBetweenArray []string

func (PrismObjectActionQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectActionQueryParamsQueryFilterBetweenBetweenUnion added in v0.5.0

func (r PrismObjectActionQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectActionQueryParamsQueryFilterBetweenBetweenUnion()

type PrismObjectActionQueryParamsQueryFilterBetweenBetweenUnion added in v0.5.0

type PrismObjectActionQueryParamsQueryFilterBetweenBetweenUnion interface {
	ImplementsPrismObjectActionQueryParamsQueryFilterBetweenBetweenUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectActionQueryParamsQueryFilterBetweenBetweenArray.

type PrismObjectActionQueryParamsQueryFilterContains added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterContains struct {
	Contains param.Field[PrismObjectActionQueryParamsQueryFilterContainsContainsUnion] `json:"contains" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterContains) MarshalJSON added in v0.4.0

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

type PrismObjectActionQueryParamsQueryFilterContainsContainsArray added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterContainsContainsArray []string

func (PrismObjectActionQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectActionQueryParamsQueryFilterContainsContainsUnion added in v0.4.0

func (r PrismObjectActionQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectActionQueryParamsQueryFilterContainsContainsUnion()

type PrismObjectActionQueryParamsQueryFilterContainsContainsUnion added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterContainsContainsUnion interface {
	ImplementsPrismObjectActionQueryParamsQueryFilterContainsContainsUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectActionQueryParamsQueryFilterContainsContainsArray.

type PrismObjectActionQueryParamsQueryFilterEndsWith added in v0.3.0

type PrismObjectActionQueryParamsQueryFilterEndsWith struct {
	EndsWith param.Field[string] `json:"ends_with" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterEndsWith) MarshalJSON added in v0.3.0

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

type PrismObjectActionQueryParamsQueryFilterExists added in v0.3.0

type PrismObjectActionQueryParamsQueryFilterExists struct {
	Exists param.Field[bool] `json:"exists" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterExists) MarshalJSON added in v0.3.0

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

type PrismObjectActionQueryParamsQueryFilterIn added in v0.3.0

type PrismObjectActionQueryParamsQueryFilterIn struct {
	In param.Field[[]string] `json:"in" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterIn) MarshalJSON added in v0.3.0

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

type PrismObjectActionQueryParamsQueryFilterIsNotNull added in v0.5.0

type PrismObjectActionQueryParamsQueryFilterIsNotNull struct {
	IsNotNull param.Field[PrismObjectActionQueryParamsQueryFilterIsNotNullIsNotNullUnion] `json:"is_not_null" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterIsNotNull) MarshalJSON added in v0.5.0

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

type PrismObjectActionQueryParamsQueryFilterIsNotNullIsNotNullArray added in v0.5.0

type PrismObjectActionQueryParamsQueryFilterIsNotNullIsNotNullArray []string

func (PrismObjectActionQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectActionQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.5.0

func (r PrismObjectActionQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectActionQueryParamsQueryFilterIsNotNullIsNotNullUnion()

type PrismObjectActionQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.5.0

type PrismObjectActionQueryParamsQueryFilterIsNotNullIsNotNullUnion interface {
	ImplementsPrismObjectActionQueryParamsQueryFilterIsNotNullIsNotNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectActionQueryParamsQueryFilterIsNotNullIsNotNullArray.

type PrismObjectActionQueryParamsQueryFilterIsNull added in v0.5.0

type PrismObjectActionQueryParamsQueryFilterIsNull struct {
	IsNull param.Field[PrismObjectActionQueryParamsQueryFilterIsNullIsNullUnion] `json:"is_null" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterIsNull) MarshalJSON added in v0.5.0

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

type PrismObjectActionQueryParamsQueryFilterIsNullIsNullArray added in v0.5.0

type PrismObjectActionQueryParamsQueryFilterIsNullIsNullArray []string

func (PrismObjectActionQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectActionQueryParamsQueryFilterIsNullIsNullUnion added in v0.5.0

func (r PrismObjectActionQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectActionQueryParamsQueryFilterIsNullIsNullUnion()

type PrismObjectActionQueryParamsQueryFilterIsNullIsNullUnion added in v0.5.0

type PrismObjectActionQueryParamsQueryFilterIsNullIsNullUnion interface {
	ImplementsPrismObjectActionQueryParamsQueryFilterIsNullIsNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectActionQueryParamsQueryFilterIsNullIsNullArray.

type PrismObjectActionQueryParamsQueryFilterNotContains added in v0.3.0

type PrismObjectActionQueryParamsQueryFilterNotContains struct {
	NotContains param.Field[string] `json:"not_contains" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterNotContains) MarshalJSON added in v0.3.0

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

type PrismObjectActionQueryParamsQueryFilterNotExists added in v0.3.0

type PrismObjectActionQueryParamsQueryFilterNotExists struct {
	NotExists param.Field[bool] `json:"not_exists" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterNotExists) MarshalJSON added in v0.3.0

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

type PrismObjectActionQueryParamsQueryFilterNotIn added in v0.3.0

type PrismObjectActionQueryParamsQueryFilterNotIn struct {
	NotIn param.Field[[]string] `json:"not_in" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterNotIn) MarshalJSON added in v0.3.0

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

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterEq added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterEq struct {
	Equals param.Field[PrismObjectActionQueryParamsQueryFilterPrismQueryFilterEqUnion] `json:"=" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterPrismQueryFilterEq) MarshalJSON added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterEqUnion added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterEqUnion interface {
	ImplementsPrismObjectActionQueryParamsQueryFilterPrismQueryFilterEqUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterGt added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterGt struct {
	Greater param.Field[string] `json:">" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterPrismQueryFilterGt) MarshalJSON added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterGte added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterGte struct {
	GreaterOrEquals param.Field[string] `json:">=" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterPrismQueryFilterGte) MarshalJSON added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterLt added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterLt struct {
	Less param.Field[string] `json:"<" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterPrismQueryFilterLt) MarshalJSON added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterLte added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterLte struct {
	LessOrEquals param.Field[string] `json:"<=" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterPrismQueryFilterLte) MarshalJSON added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterNe added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterNe struct {
	NotEquals param.Field[PrismObjectActionQueryParamsQueryFilterPrismQueryFilterNeUnion] `json:"!=" api:"required"`
}

func (PrismObjectActionQueryParamsQueryFilterPrismQueryFilterNe) MarshalJSON added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterNeUnion added in v0.4.0

type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterNeUnion interface {
	ImplementsPrismObjectActionQueryParamsQueryFilterPrismQueryFilterNeUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectActionQueryParamsQuerySort

type PrismObjectActionQueryParamsQuerySort string
const (
	PrismObjectActionQueryParamsQuerySortAsc  PrismObjectActionQueryParamsQuerySort = "asc"
	PrismObjectActionQueryParamsQuerySortDesc PrismObjectActionQueryParamsQuerySort = "desc"
)

func (PrismObjectActionQueryParamsQuerySort) IsKnown

type PrismObjectActionQueryResponse

type PrismObjectActionQueryResponse struct {
	Data []PrismObjectActionQueryResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal. False when this page contains the last record; true
	// only when at least one more record exists. (Implementation note: the server
	// fetches one extra row internally to determine this — clients never need to
	// overshoot to discover the end.)
	HasMore bool `json:"has_more" api:"required"`
	// Opaque cursor pointing at the next page. Pass it back unchanged in the request
	// body (`cursor`) of the next call. Null when `has_more` is false.
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Only populated when the request set `include_total: true`. Total number of
	// records matching the query, ignoring pagination. Opt-in because it costs an
	// additional pass over the result set.
	Total int64                              `json:"total" api:"nullable"`
	JSON  prismObjectActionQueryResponseJSON `json:"-"`
}

func (*PrismObjectActionQueryResponse) UnmarshalJSON

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

type PrismObjectActionQueryResponseData added in v0.2.0

type PrismObjectActionQueryResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}                 `json:"properties"`
	Source     []string                               `json:"source" api:"nullable"`
	JSON       prismObjectActionQueryResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectActionQueryResponseData) UnmarshalJSON added in v0.2.0

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

type PrismObjectActionRestoreParams

type PrismObjectActionRestoreParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectActionRestoreResponse added in v0.2.0

type PrismObjectActionRestoreResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}               `json:"default"`
	List    interface{}                          `json:"list"`
	JSON    prismObjectActionRestoreResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectActionRestoreResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectActionService

type PrismObjectActionService struct {
	Options []option.RequestOption
	Grant   *PrismObjectActionGrantService
}

PrismObjectActionService contains methods and other services that help with interacting with the micro 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 NewPrismObjectActionService method instead.

func NewPrismObjectActionService

func NewPrismObjectActionService(opts ...option.RequestOption) (r *PrismObjectActionService)

NewPrismObjectActionService 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 (*PrismObjectActionService) BulkDelete added in v0.5.0

Soft-delete up to 100 records in a single call. Same partial-success contract as batch/update.

func (*PrismObjectActionService) BulkNew

Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final `ImportJob`; large batches start an async job, return 202 with `status: processing` and a `Location` header, and can be polled via `GET /v2/prism/{teamId}/imports/{jobId}`.

func (*PrismObjectActionService) BulkUpdate added in v0.5.0

Patch up to 100 records in a single call. Each item is attempted independently — failures don't abort the batch. Inspect `results[].status` per item.

func (*PrismObjectActionService) Count added in v0.5.0

Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body.

func (*PrismObjectActionService) Delete

Delete object

func (*PrismObjectActionService) Duplicate

Duplicate object

func (*PrismObjectActionService) Find added in v0.5.0

Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches.

func (*PrismObjectActionService) Get

Get object

func (*PrismObjectActionService) List added in v0.5.0

Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality.

func (*PrismObjectActionService) New

Create object

func (*PrismObjectActionService) Query

Query

func (*PrismObjectActionService) Restore

Restore object

func (*PrismObjectActionService) Update

Patch object

func (*PrismObjectActionService) Upsert added in v0.5.0

Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead.

type PrismObjectActionUpdateParams

type PrismObjectActionUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
	IfMatch               param.Field[string]        `header:"If-Match"`
}

func (PrismObjectActionUpdateParams) MarshalJSON

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

type PrismObjectActionUpdateResponse added in v0.2.0

type PrismObjectActionUpdateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}              `json:"default"`
	List    interface{}                         `json:"list"`
	JSON    prismObjectActionUpdateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectActionUpdateResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectActionUpsertParams added in v0.5.0

type PrismObjectActionUpsertParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	// Scope the upsert to a specific list/app. Required to match or write list-scoped
	// properties, including `app_stage`.
	ListID         param.Field[string] `query:"list_id" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

func (PrismObjectActionUpsertParams) MarshalJSON added in v0.5.0

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

func (PrismObjectActionUpsertParams) URLQuery added in v0.9.0

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

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

type PrismObjectActionUpsertResponse added in v0.5.0

type PrismObjectActionUpsertResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}              `json:"default"`
	List    interface{}                         `json:"list"`
	JSON    prismObjectActionUpsertResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectActionUpsertResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactBulkDeleteParams added in v0.5.0

type PrismObjectContactBulkDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]   `path:"teamId" api:"required" format:"uuid"`
	IDs            param.Field[[]string] `json:"ids" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string]   `header:"Idempotency-Key"`
}

func (PrismObjectContactBulkDeleteParams) MarshalJSON added in v0.5.0

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

type PrismObjectContactBulkDeleteResponse added in v0.5.0

type PrismObjectContactBulkDeleteResponse struct {
	Results []PrismObjectContactBulkDeleteResponseResult `json:"results" api:"required"`
	Summary PrismObjectContactBulkDeleteResponseSummary  `json:"summary" api:"required"`
	JSON    prismObjectContactBulkDeleteResponseJSON     `json:"-"`
}

Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed.

func (*PrismObjectContactBulkDeleteResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactBulkDeleteResponseResult added in v0.5.0

type PrismObjectContactBulkDeleteResponseResult struct {
	// Item ID, or null if the input was unparseable.
	ID     string                                            `json:"id" api:"required,nullable"`
	Status PrismObjectContactBulkDeleteResponseResultsStatus `json:"status" api:"required"`
	Error  PrismObjectContactBulkDeleteResponseResultsError  `json:"error"`
	// Object returned by reads (get/create/patch/restore). id is always present.
	Record PrismObjectContactBulkDeleteResponseResultsRecord `json:"record"`
	JSON   prismObjectContactBulkDeleteResponseResultJSON    `json:"-"`
}

func (*PrismObjectContactBulkDeleteResponseResult) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactBulkDeleteResponseResultsError added in v0.5.0

type PrismObjectContactBulkDeleteResponseResultsError struct {
	Code    string                                               `json:"code"`
	Message string                                               `json:"message"`
	JSON    prismObjectContactBulkDeleteResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectContactBulkDeleteResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactBulkDeleteResponseResultsRecord added in v0.5.0

type PrismObjectContactBulkDeleteResponseResultsRecord struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                                `json:"default"`
	List    interface{}                                           `json:"list"`
	JSON    prismObjectContactBulkDeleteResponseResultsRecordJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectContactBulkDeleteResponseResultsRecord) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactBulkDeleteResponseResultsStatus added in v0.5.0

type PrismObjectContactBulkDeleteResponseResultsStatus string
const (
	PrismObjectContactBulkDeleteResponseResultsStatusOk    PrismObjectContactBulkDeleteResponseResultsStatus = "ok"
	PrismObjectContactBulkDeleteResponseResultsStatusError PrismObjectContactBulkDeleteResponseResultsStatus = "error"
)

func (PrismObjectContactBulkDeleteResponseResultsStatus) IsKnown added in v0.5.0

type PrismObjectContactBulkDeleteResponseSummary added in v0.5.0

type PrismObjectContactBulkDeleteResponseSummary struct {
	Failed    int64                                           `json:"failed" api:"required"`
	Succeeded int64                                           `json:"succeeded" api:"required"`
	Total     int64                                           `json:"total" api:"required"`
	JSON      prismObjectContactBulkDeleteResponseSummaryJSON `json:"-"`
}

func (*PrismObjectContactBulkDeleteResponseSummary) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactBulkNewParams added in v0.2.0

type PrismObjectContactBulkNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Array of objects to import with property values keyed by slug
	Objects        param.Field[[]PrismObjectPropertiesParam]           `json:"objects" api:"required"`
	Options        param.Field[PrismObjectContactBulkNewParamsOptions] `json:"options"`
	IdempotencyKey param.Field[string]                                 `header:"Idempotency-Key"`
}

func (PrismObjectContactBulkNewParams) MarshalJSON added in v0.2.0

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

type PrismObjectContactBulkNewParamsOptions added in v0.2.0

type PrismObjectContactBulkNewParamsOptions struct {
	// Whether deduplication should be case insensitive
	CaseInsensitive param.Field[bool] `json:"caseInsensitive"`
	// When true, unknown values for select/multiselect properties are created as new
	// options instead of failing the import
	CreateMissingOptions param.Field[bool] `json:"create_missing_options"`
	// Deprecated alias for list_id.
	//
	// Deprecated: deprecated
	CRMID param.Field[string] `json:"crm_id" format:"uuid"`
	// Property slug to deduplicate on. A single-element array is also accepted;
	// compound (multi-slug) dedupe is not supported yet and is rejected with guidance.
	DedupeBy param.Field[PrismObjectContactBulkNewParamsOptionsDedupeByUnion] `json:"dedupe_by"`
	// App/CRM ID for context (optional)
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Require app_stage for every row in the selected list. app_stage is a reserved
	// list-scoped alias for native status.
	RequireListStage param.Field[bool] `json:"require_list_stage"`
	// Patch a deduplicated record with the supplied properties instead of skipping it.
	UpdateExisting param.Field[bool] `json:"update_existing"`
}

func (PrismObjectContactBulkNewParamsOptions) MarshalJSON added in v0.2.0

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

type PrismObjectContactBulkNewParamsOptionsDedupeByArray added in v0.9.0

type PrismObjectContactBulkNewParamsOptionsDedupeByArray []string

func (PrismObjectContactBulkNewParamsOptionsDedupeByArray) ImplementsPrismObjectContactBulkNewParamsOptionsDedupeByUnion added in v0.9.0

func (r PrismObjectContactBulkNewParamsOptionsDedupeByArray) ImplementsPrismObjectContactBulkNewParamsOptionsDedupeByUnion()

type PrismObjectContactBulkNewParamsOptionsDedupeByUnion added in v0.9.0

type PrismObjectContactBulkNewParamsOptionsDedupeByUnion interface {
	ImplementsPrismObjectContactBulkNewParamsOptionsDedupeByUnion()
}

Property slug to deduplicate on. A single-element array is also accepted; compound (multi-slug) dedupe is not supported yet and is rejected with guidance.

Satisfied by [shared.UnionString], PrismObjectContactBulkNewParamsOptionsDedupeByArray.

type PrismObjectContactBulkNewResponse added in v0.2.0

type PrismObjectContactBulkNewResponse struct {
	// Null for sync imports (results inlined). Set for async imports.
	JobID  string                                  `json:"job_id" api:"required,nullable"`
	Status PrismObjectContactBulkNewResponseStatus `json:"status" api:"required"`
	// Total number of rows in the import.
	Total     int64     `json:"total" api:"required"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Set when status=failed; describes the job-level failure (not per-row).
	Error     PrismObjectContactBulkNewResponseError `json:"error"`
	ExpiresAt time.Time                              `json:"expires_at" format:"date-time"`
	Failed    int64                                  `json:"failed"`
	// Rows that have been attempted (succeeded + failed).
	Processed int64 `json:"processed"`
	// Per-row outcomes. Always present for sync imports; populated for async imports
	// once the job reaches `complete`.
	Results   []PrismObjectContactBulkNewResponseResult `json:"results"`
	Succeeded int64                                     `json:"succeeded"`
	UpdatedAt time.Time                                 `json:"updated_at" format:"date-time"`
	JSON      prismObjectContactBulkNewResponseJSON     `json:"-"`
}

Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}.

func (*PrismObjectContactBulkNewResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectContactBulkNewResponseError added in v0.5.0

type PrismObjectContactBulkNewResponseError struct {
	Code    string                                     `json:"code"`
	Message string                                     `json:"message"`
	JSON    prismObjectContactBulkNewResponseErrorJSON `json:"-"`
}

Set when status=failed; describes the job-level failure (not per-row).

func (*PrismObjectContactBulkNewResponseError) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactBulkNewResponseResult added in v0.2.0

type PrismObjectContactBulkNewResponseResult struct {
	ID      string                                        `json:"id" api:"nullable" format:"uuid"`
	Created bool                                          `json:"created"`
	Error   PrismObjectContactBulkNewResponseResultsError `json:"error"`
	// True if the row matched an existing record via the dedupe key.
	Existing bool `json:"existing"`
	// Zero-based position of this row in the request.
	InputIndex int64 `json:"input_index"`
	// True if a matching record was updated.
	Updated bool                                        `json:"updated"`
	JSON    prismObjectContactBulkNewResponseResultJSON `json:"-"`
}

func (*PrismObjectContactBulkNewResponseResult) UnmarshalJSON added in v0.2.0

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

type PrismObjectContactBulkNewResponseResultsError added in v0.5.0

type PrismObjectContactBulkNewResponseResultsError struct {
	Code    string                                            `json:"code"`
	Message string                                            `json:"message"`
	JSON    prismObjectContactBulkNewResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectContactBulkNewResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactBulkNewResponseStatus added in v0.2.0

type PrismObjectContactBulkNewResponseStatus string
const (
	PrismObjectContactBulkNewResponseStatusComplete   PrismObjectContactBulkNewResponseStatus = "complete"
	PrismObjectContactBulkNewResponseStatusProcessing PrismObjectContactBulkNewResponseStatus = "processing"
	PrismObjectContactBulkNewResponseStatusFailed     PrismObjectContactBulkNewResponseStatus = "failed"
)

func (PrismObjectContactBulkNewResponseStatus) IsKnown added in v0.2.0

type PrismObjectContactBulkUpdateParams added in v0.5.0

type PrismObjectContactBulkUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]                                   `path:"teamId" api:"required" format:"uuid"`
	Items          param.Field[[]PrismObjectContactBulkUpdateParamsItem] `json:"items" api:"required"`
	IdempotencyKey param.Field[string]                                   `header:"Idempotency-Key"`
}

func (PrismObjectContactBulkUpdateParams) MarshalJSON added in v0.5.0

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

type PrismObjectContactBulkUpdateParamsItem added in v0.5.0

type PrismObjectContactBulkUpdateParamsItem struct {
	ID          param.Field[string]    `json:"id" api:"required" format:"uuid"`
	ExtraFields map[string]interface{} `json:"-,extras"`
}

Object with `id` plus the same property body shape as PATCH (`default`/`list`/`extended`).

func (PrismObjectContactBulkUpdateParamsItem) MarshalJSON added in v0.5.0

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

type PrismObjectContactBulkUpdateResponse added in v0.5.0

type PrismObjectContactBulkUpdateResponse struct {
	Results []PrismObjectContactBulkUpdateResponseResult `json:"results" api:"required"`
	Summary PrismObjectContactBulkUpdateResponseSummary  `json:"summary" api:"required"`
	JSON    prismObjectContactBulkUpdateResponseJSON     `json:"-"`
}

Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed.

func (*PrismObjectContactBulkUpdateResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactBulkUpdateResponseResult added in v0.5.0

type PrismObjectContactBulkUpdateResponseResult struct {
	// Item ID, or null if the input was unparseable.
	ID     string                                            `json:"id" api:"required,nullable"`
	Status PrismObjectContactBulkUpdateResponseResultsStatus `json:"status" api:"required"`
	Error  PrismObjectContactBulkUpdateResponseResultsError  `json:"error"`
	// Object returned by reads (get/create/patch/restore). id is always present.
	Record PrismObjectContactBulkUpdateResponseResultsRecord `json:"record"`
	JSON   prismObjectContactBulkUpdateResponseResultJSON    `json:"-"`
}

func (*PrismObjectContactBulkUpdateResponseResult) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactBulkUpdateResponseResultsError added in v0.5.0

type PrismObjectContactBulkUpdateResponseResultsError struct {
	Code    string                                               `json:"code"`
	Message string                                               `json:"message"`
	JSON    prismObjectContactBulkUpdateResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectContactBulkUpdateResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactBulkUpdateResponseResultsRecord added in v0.5.0

type PrismObjectContactBulkUpdateResponseResultsRecord struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                                `json:"default"`
	List    interface{}                                           `json:"list"`
	JSON    prismObjectContactBulkUpdateResponseResultsRecordJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectContactBulkUpdateResponseResultsRecord) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactBulkUpdateResponseResultsStatus added in v0.5.0

type PrismObjectContactBulkUpdateResponseResultsStatus string
const (
	PrismObjectContactBulkUpdateResponseResultsStatusOk    PrismObjectContactBulkUpdateResponseResultsStatus = "ok"
	PrismObjectContactBulkUpdateResponseResultsStatusError PrismObjectContactBulkUpdateResponseResultsStatus = "error"
)

func (PrismObjectContactBulkUpdateResponseResultsStatus) IsKnown added in v0.5.0

type PrismObjectContactBulkUpdateResponseSummary added in v0.5.0

type PrismObjectContactBulkUpdateResponseSummary struct {
	Failed    int64                                           `json:"failed" api:"required"`
	Succeeded int64                                           `json:"succeeded" api:"required"`
	Total     int64                                           `json:"total" api:"required"`
	JSON      prismObjectContactBulkUpdateResponseSummaryJSON `json:"-"`
}

func (*PrismObjectContactBulkUpdateResponseSummary) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactCountParams added in v0.5.0

type PrismObjectContactCountParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the count to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectContactCountParams) URLQuery added in v0.5.0

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

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

type PrismObjectContactCountResponse added in v0.5.0

type PrismObjectContactCountResponse struct {
	// Number of records matching the access scope.
	Total int64                               `json:"total" api:"required"`
	JSON  prismObjectContactCountResponseJSON `json:"-"`
}

func (*PrismObjectContactCountResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactDeleteParams added in v0.2.0

type PrismObjectContactDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID  param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IfMatch param.Field[string] `header:"If-Match"`
}

type PrismObjectContactDuplicateParams added in v0.2.0

type PrismObjectContactDuplicateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectContactDuplicateResponse added in v0.2.0

type PrismObjectContactDuplicateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                  `json:"default"`
	List    interface{}                             `json:"list"`
	JSON    prismObjectContactDuplicateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectContactDuplicateResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectContactFindParams added in v0.5.0

type PrismObjectContactFindParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the lookup to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectContactFindParams) URLQuery added in v0.5.0

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

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

type PrismObjectContactFindResponse added in v0.5.0

type PrismObjectContactFindResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}             `json:"default"`
	List    interface{}                        `json:"list"`
	JSON    prismObjectContactFindResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectContactFindResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactGetParams added in v0.2.0

type PrismObjectContactGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
}

func (PrismObjectContactGetParams) URLQuery added in v0.5.0

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

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

type PrismObjectContactGetResponse added in v0.2.0

type PrismObjectContactGetResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}            `json:"default"`
	List    interface{}                       `json:"list"`
	JSON    prismObjectContactGetResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectContactGetResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectContactListParams added in v0.5.0

type PrismObjectContactListParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page.
	Cursor param.Field[string] `query:"cursor"`
	// Include soft-deleted records. Pass the literal string `true`.
	Deleted param.Field[bool] `query:"deleted"`
	// When set to `true`, the response includes a `total` field with the unpaginated
	// row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total.
	IncludeTotal param.Field[bool] `query:"include_total"`
	// Maximum number of rows to return. Capped server-side at 50.
	Limit param.Field[int64] `query:"limit"`
	// Scope properties to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
	// Comma-separated list of slugs. Prefix with `-` for descending. Example:
	// `sort=-updated_at,name`.
	Sort param.Field[string] `query:"sort"`
}

func (PrismObjectContactListParams) URLQuery added in v0.5.0

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

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

type PrismObjectContactListResponse added in v0.5.0

type PrismObjectContactListResponse struct {
	Data []PrismObjectContactListResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal — false on the last page, never forces clients to
	// overshoot.
	HasMore    bool   `json:"has_more" api:"required"`
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Populated only when `?include_total=true` was passed.
	Total int64                              `json:"total" api:"nullable"`
	JSON  prismObjectContactListResponseJSON `json:"-"`
}

func (*PrismObjectContactListResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactListResponseData added in v0.5.0

type PrismObjectContactListResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}                 `json:"properties"`
	Source     []string                               `json:"source" api:"nullable"`
	JSON       prismObjectContactListResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectContactListResponseData) UnmarshalJSON added in v0.5.0

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

type PrismObjectContactNewParams added in v0.2.0

type PrismObjectContactNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
}

func (PrismObjectContactNewParams) MarshalJSON added in v0.2.0

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

type PrismObjectContactNewResponse added in v0.2.0

type PrismObjectContactNewResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}            `json:"default"`
	List    interface{}                       `json:"list"`
	JSON    prismObjectContactNewResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectContactNewResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectContactQueryParams

type PrismObjectContactQueryParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string]                               `path:"teamId" api:"required" format:"uuid"`
	Query  param.Field[PrismObjectContactQueryParamsQuery]   `json:"query" api:"required"`
	ID     param.Field[PrismObjectContactQueryParamsIDUnion] `json:"id" format:"uuid"`
	Boxes  param.Field[[]string]                             `json:"boxes"`
	// Alternative location for the opaque cursor (a sibling of `query`). Use whichever
	// feels more natural; if both are present, `query.cursor` wins.
	Cursor  param.Field[string] `json:"cursor"`
	Deleted param.Field[bool]   `json:"deleted"`
	// When true, the response includes a `total` field with the unpaginated row count.
	// Costs an additional pass over the result set — for unfiltered totals prefer
	// `GET /v2/prism/{teamId}/{objectType}/count` instead.
	IncludeTotal param.Field[bool]     `json:"include_total"`
	Sources      param.Field[[]string] `json:"sources" format:"uuid"`
}

func (PrismObjectContactQueryParams) MarshalJSON

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

type PrismObjectContactQueryParamsIDArray

type PrismObjectContactQueryParamsIDArray []string

func (PrismObjectContactQueryParamsIDArray) ImplementsPrismObjectContactQueryParamsIDUnion

func (r PrismObjectContactQueryParamsIDArray) ImplementsPrismObjectContactQueryParamsIDUnion()

type PrismObjectContactQueryParamsIDUnion

type PrismObjectContactQueryParamsIDUnion interface {
	ImplementsPrismObjectContactQueryParamsIDUnion()
}

Satisfied by [shared.UnionString], PrismObjectContactQueryParamsIDArray.

type PrismObjectContactQueryParamsQuery

type PrismObjectContactQueryParamsQuery struct {
	// Property slugs to select. Use dot notation for relationships (e.g.
	// attendee.contact.first_name). `id` is always returned at the top level of each
	// row and does not need to be selected.
	Select param.Field[[]string] `json:"select" api:"required"`
	// Logical operator for combining filters
	Combinator param.Field[PrismObjectContactQueryParamsQueryCombinator] `json:"combinator"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page. When set, `page` and `limit` are derived from the cursor
	// and any explicit values are ignored.
	Cursor param.Field[string] `json:"cursor"`
	// Filters as [{ slug: { operator: value } }]. For select/multiselect properties,
	// values may be option slugs or option UUIDs.
	Filter param.Field[[]map[string]PrismObjectContactQueryParamsQueryFilterUnion] `json:"filter"`
	// Maximum number of rows to return. Capped server-side at 50; requests above the
	// cap are rejected.
	Limit  param.Field[int64]  `json:"limit"`
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Page number (1-based). Prefer `cursor`. Page-number pagination drifts under
	// concurrent writes; use it only for one-shot exports.
	//
	// Deprecated: deprecated
	Page param.Field[int64] `json:"page"`
	// Sort order as [{ slug: direction }]. Array order determines sort priority
	Sort param.Field[[]map[string]PrismObjectContactQueryParamsQuerySort] `json:"sort"`
}

func (PrismObjectContactQueryParamsQuery) MarshalJSON

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

type PrismObjectContactQueryParamsQueryCombinator

type PrismObjectContactQueryParamsQueryCombinator string

Logical operator for combining filters

const (
	PrismObjectContactQueryParamsQueryCombinatorAnd PrismObjectContactQueryParamsQueryCombinator = "AND"
	PrismObjectContactQueryParamsQueryCombinatorOr  PrismObjectContactQueryParamsQueryCombinator = "OR"
)

func (PrismObjectContactQueryParamsQueryCombinator) IsKnown

type PrismObjectContactQueryParamsQueryFilter added in v0.3.0

type PrismObjectContactQueryParamsQueryFilter struct {
	NotEquals       param.Field[interface{}] `json:"!="`
	Less            param.Field[string]      `json:"<"`
	LessOrEquals    param.Field[string]      `json:"<="`
	Equals          param.Field[interface{}] `json:"="`
	Greater         param.Field[string]      `json:">"`
	GreaterOrEquals param.Field[string]      `json:">="`
	BeginsWith      param.Field[string]      `json:"begins_with"`
	Between         param.Field[interface{}] `json:"between"`
	Contains        param.Field[interface{}] `json:"contains"`
	EndsWith        param.Field[string]      `json:"ends_with"`
	Exists          param.Field[bool]        `json:"exists"`
	In              param.Field[interface{}] `json:"in"`
	IsNotNull       param.Field[interface{}] `json:"is_not_null"`
	IsNull          param.Field[interface{}] `json:"is_null"`
	NotContains     param.Field[string]      `json:"not_contains"`
	NotExists       param.Field[bool]        `json:"not_exists"`
	NotIn           param.Field[interface{}] `json:"not_in"`
}

func (PrismObjectContactQueryParamsQueryFilter) MarshalJSON added in v0.3.0

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

type PrismObjectContactQueryParamsQueryFilterBeginsWith added in v0.3.0

type PrismObjectContactQueryParamsQueryFilterBeginsWith struct {
	BeginsWith param.Field[string] `json:"begins_with" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterBeginsWith) MarshalJSON added in v0.3.0

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

type PrismObjectContactQueryParamsQueryFilterBetween added in v0.5.0

type PrismObjectContactQueryParamsQueryFilterBetween struct {
	Between param.Field[PrismObjectContactQueryParamsQueryFilterBetweenBetweenUnion] `json:"between" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterBetween) MarshalJSON added in v0.5.0

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

type PrismObjectContactQueryParamsQueryFilterBetweenBetweenArray added in v0.5.0

type PrismObjectContactQueryParamsQueryFilterBetweenBetweenArray []string

func (PrismObjectContactQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectContactQueryParamsQueryFilterBetweenBetweenUnion added in v0.5.0

func (r PrismObjectContactQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectContactQueryParamsQueryFilterBetweenBetweenUnion()

type PrismObjectContactQueryParamsQueryFilterBetweenBetweenUnion added in v0.5.0

type PrismObjectContactQueryParamsQueryFilterBetweenBetweenUnion interface {
	ImplementsPrismObjectContactQueryParamsQueryFilterBetweenBetweenUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectContactQueryParamsQueryFilterBetweenBetweenArray.

type PrismObjectContactQueryParamsQueryFilterContains added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterContains struct {
	Contains param.Field[PrismObjectContactQueryParamsQueryFilterContainsContainsUnion] `json:"contains" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterContains) MarshalJSON added in v0.4.0

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

type PrismObjectContactQueryParamsQueryFilterContainsContainsArray added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterContainsContainsArray []string

func (PrismObjectContactQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectContactQueryParamsQueryFilterContainsContainsUnion added in v0.4.0

func (r PrismObjectContactQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectContactQueryParamsQueryFilterContainsContainsUnion()

type PrismObjectContactQueryParamsQueryFilterContainsContainsUnion added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterContainsContainsUnion interface {
	ImplementsPrismObjectContactQueryParamsQueryFilterContainsContainsUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectContactQueryParamsQueryFilterContainsContainsArray.

type PrismObjectContactQueryParamsQueryFilterEndsWith added in v0.3.0

type PrismObjectContactQueryParamsQueryFilterEndsWith struct {
	EndsWith param.Field[string] `json:"ends_with" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterEndsWith) MarshalJSON added in v0.3.0

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

type PrismObjectContactQueryParamsQueryFilterExists added in v0.3.0

type PrismObjectContactQueryParamsQueryFilterExists struct {
	Exists param.Field[bool] `json:"exists" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterExists) MarshalJSON added in v0.3.0

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

type PrismObjectContactQueryParamsQueryFilterIn added in v0.3.0

type PrismObjectContactQueryParamsQueryFilterIn struct {
	In param.Field[[]string] `json:"in" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterIn) MarshalJSON added in v0.3.0

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

type PrismObjectContactQueryParamsQueryFilterIsNotNull added in v0.5.0

type PrismObjectContactQueryParamsQueryFilterIsNotNull struct {
	IsNotNull param.Field[PrismObjectContactQueryParamsQueryFilterIsNotNullIsNotNullUnion] `json:"is_not_null" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterIsNotNull) MarshalJSON added in v0.5.0

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

type PrismObjectContactQueryParamsQueryFilterIsNotNullIsNotNullArray added in v0.5.0

type PrismObjectContactQueryParamsQueryFilterIsNotNullIsNotNullArray []string

func (PrismObjectContactQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectContactQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.5.0

func (r PrismObjectContactQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectContactQueryParamsQueryFilterIsNotNullIsNotNullUnion()

type PrismObjectContactQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.5.0

type PrismObjectContactQueryParamsQueryFilterIsNotNullIsNotNullUnion interface {
	ImplementsPrismObjectContactQueryParamsQueryFilterIsNotNullIsNotNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectContactQueryParamsQueryFilterIsNotNullIsNotNullArray.

type PrismObjectContactQueryParamsQueryFilterIsNull added in v0.5.0

type PrismObjectContactQueryParamsQueryFilterIsNull struct {
	IsNull param.Field[PrismObjectContactQueryParamsQueryFilterIsNullIsNullUnion] `json:"is_null" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterIsNull) MarshalJSON added in v0.5.0

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

type PrismObjectContactQueryParamsQueryFilterIsNullIsNullArray added in v0.5.0

type PrismObjectContactQueryParamsQueryFilterIsNullIsNullArray []string

func (PrismObjectContactQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectContactQueryParamsQueryFilterIsNullIsNullUnion added in v0.5.0

func (r PrismObjectContactQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectContactQueryParamsQueryFilterIsNullIsNullUnion()

type PrismObjectContactQueryParamsQueryFilterIsNullIsNullUnion added in v0.5.0

type PrismObjectContactQueryParamsQueryFilterIsNullIsNullUnion interface {
	ImplementsPrismObjectContactQueryParamsQueryFilterIsNullIsNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectContactQueryParamsQueryFilterIsNullIsNullArray.

type PrismObjectContactQueryParamsQueryFilterNotContains added in v0.3.0

type PrismObjectContactQueryParamsQueryFilterNotContains struct {
	NotContains param.Field[string] `json:"not_contains" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterNotContains) MarshalJSON added in v0.3.0

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

type PrismObjectContactQueryParamsQueryFilterNotExists added in v0.3.0

type PrismObjectContactQueryParamsQueryFilterNotExists struct {
	NotExists param.Field[bool] `json:"not_exists" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterNotExists) MarshalJSON added in v0.3.0

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

type PrismObjectContactQueryParamsQueryFilterNotIn added in v0.3.0

type PrismObjectContactQueryParamsQueryFilterNotIn struct {
	NotIn param.Field[[]string] `json:"not_in" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterNotIn) MarshalJSON added in v0.3.0

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

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterEq added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterEq struct {
	Equals param.Field[PrismObjectContactQueryParamsQueryFilterPrismQueryFilterEqUnion] `json:"=" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterPrismQueryFilterEq) MarshalJSON added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterEqUnion added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterEqUnion interface {
	ImplementsPrismObjectContactQueryParamsQueryFilterPrismQueryFilterEqUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterGt added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterGt struct {
	Greater param.Field[string] `json:">" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterPrismQueryFilterGt) MarshalJSON added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterGte added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterGte struct {
	GreaterOrEquals param.Field[string] `json:">=" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterPrismQueryFilterGte) MarshalJSON added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterLt added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterLt struct {
	Less param.Field[string] `json:"<" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterPrismQueryFilterLt) MarshalJSON added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterLte added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterLte struct {
	LessOrEquals param.Field[string] `json:"<=" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterPrismQueryFilterLte) MarshalJSON added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterNe added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterNe struct {
	NotEquals param.Field[PrismObjectContactQueryParamsQueryFilterPrismQueryFilterNeUnion] `json:"!=" api:"required"`
}

func (PrismObjectContactQueryParamsQueryFilterPrismQueryFilterNe) MarshalJSON added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterNeUnion added in v0.4.0

type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterNeUnion interface {
	ImplementsPrismObjectContactQueryParamsQueryFilterPrismQueryFilterNeUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectContactQueryParamsQuerySort

type PrismObjectContactQueryParamsQuerySort string
const (
	PrismObjectContactQueryParamsQuerySortAsc  PrismObjectContactQueryParamsQuerySort = "asc"
	PrismObjectContactQueryParamsQuerySortDesc PrismObjectContactQueryParamsQuerySort = "desc"
)

func (PrismObjectContactQueryParamsQuerySort) IsKnown

type PrismObjectContactQueryResponse

type PrismObjectContactQueryResponse struct {
	Data []PrismObjectContactQueryResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal. False when this page contains the last record; true
	// only when at least one more record exists. (Implementation note: the server
	// fetches one extra row internally to determine this — clients never need to
	// overshoot to discover the end.)
	HasMore bool `json:"has_more" api:"required"`
	// Opaque cursor pointing at the next page. Pass it back unchanged in the request
	// body (`cursor`) of the next call. Null when `has_more` is false.
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Only populated when the request set `include_total: true`. Total number of
	// records matching the query, ignoring pagination. Opt-in because it costs an
	// additional pass over the result set.
	Total int64                               `json:"total" api:"nullable"`
	JSON  prismObjectContactQueryResponseJSON `json:"-"`
}

func (*PrismObjectContactQueryResponse) UnmarshalJSON

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

type PrismObjectContactQueryResponseData added in v0.2.0

type PrismObjectContactQueryResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}                  `json:"properties"`
	Source     []string                                `json:"source" api:"nullable"`
	JSON       prismObjectContactQueryResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectContactQueryResponseData) UnmarshalJSON added in v0.2.0

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

type PrismObjectContactRestoreParams added in v0.2.0

type PrismObjectContactRestoreParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectContactRestoreResponse added in v0.2.0

type PrismObjectContactRestoreResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                `json:"default"`
	List    interface{}                           `json:"list"`
	JSON    prismObjectContactRestoreResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectContactRestoreResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectContactService

type PrismObjectContactService struct {
	Options []option.RequestOption
}

PrismObjectContactService contains methods and other services that help with interacting with the micro 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 NewPrismObjectContactService method instead.

func NewPrismObjectContactService

func NewPrismObjectContactService(opts ...option.RequestOption) (r *PrismObjectContactService)

NewPrismObjectContactService 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 (*PrismObjectContactService) BulkDelete added in v0.5.0

Soft-delete up to 100 records in a single call. Same partial-success contract as batch/update.

func (*PrismObjectContactService) BulkNew added in v0.2.0

Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final `ImportJob`; large batches start an async job, return 202 with `status: processing` and a `Location` header, and can be polled via `GET /v2/prism/{teamId}/imports/{jobId}`.

func (*PrismObjectContactService) BulkUpdate added in v0.5.0

Patch up to 100 records in a single call. Each item is attempted independently — failures don't abort the batch. Inspect `results[].status` per item.

func (*PrismObjectContactService) Count added in v0.5.0

Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body.

func (*PrismObjectContactService) Delete added in v0.2.0

Delete object

func (*PrismObjectContactService) Duplicate added in v0.2.0

Duplicate object

func (*PrismObjectContactService) Find added in v0.5.0

Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches.

func (*PrismObjectContactService) Get added in v0.2.0

Get object

func (*PrismObjectContactService) List added in v0.5.0

Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality.

func (*PrismObjectContactService) New added in v0.2.0

Create object

func (*PrismObjectContactService) Query

Query

func (*PrismObjectContactService) Restore added in v0.2.0

Restore object

func (*PrismObjectContactService) Update added in v0.2.0

Patch object

func (*PrismObjectContactService) Upsert added in v0.5.0

Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead.

type PrismObjectContactUpdateParams added in v0.2.0

type PrismObjectContactUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
	IfMatch               param.Field[string]        `header:"If-Match"`
}

func (PrismObjectContactUpdateParams) MarshalJSON added in v0.2.0

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

type PrismObjectContactUpdateResponse added in v0.2.0

type PrismObjectContactUpdateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}               `json:"default"`
	List    interface{}                          `json:"list"`
	JSON    prismObjectContactUpdateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectContactUpdateResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectContactUpsertParams added in v0.5.0

type PrismObjectContactUpsertParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	// Scope the upsert to a specific list/app. Required to match or write list-scoped
	// properties, including `app_stage`.
	ListID         param.Field[string] `query:"list_id" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

func (PrismObjectContactUpsertParams) MarshalJSON added in v0.5.0

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

func (PrismObjectContactUpsertParams) URLQuery added in v0.9.0

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

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

type PrismObjectContactUpsertResponse added in v0.5.0

type PrismObjectContactUpsertResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}               `json:"default"`
	List    interface{}                          `json:"list"`
	JSON    prismObjectContactUpsertResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectContactUpsertResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealBulkDeleteParams added in v0.5.0

type PrismObjectDealBulkDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]   `path:"teamId" api:"required" format:"uuid"`
	IDs            param.Field[[]string] `json:"ids" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string]   `header:"Idempotency-Key"`
}

func (PrismObjectDealBulkDeleteParams) MarshalJSON added in v0.5.0

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

type PrismObjectDealBulkDeleteResponse added in v0.5.0

type PrismObjectDealBulkDeleteResponse struct {
	Results []PrismObjectDealBulkDeleteResponseResult `json:"results" api:"required"`
	Summary PrismObjectDealBulkDeleteResponseSummary  `json:"summary" api:"required"`
	JSON    prismObjectDealBulkDeleteResponseJSON     `json:"-"`
}

Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed.

func (*PrismObjectDealBulkDeleteResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealBulkDeleteResponseResult added in v0.5.0

type PrismObjectDealBulkDeleteResponseResult struct {
	// Item ID, or null if the input was unparseable.
	ID     string                                         `json:"id" api:"required,nullable"`
	Status PrismObjectDealBulkDeleteResponseResultsStatus `json:"status" api:"required"`
	Error  PrismObjectDealBulkDeleteResponseResultsError  `json:"error"`
	// Object returned by reads (get/create/patch/restore). id is always present.
	Record PrismObjectDealBulkDeleteResponseResultsRecord `json:"record"`
	JSON   prismObjectDealBulkDeleteResponseResultJSON    `json:"-"`
}

func (*PrismObjectDealBulkDeleteResponseResult) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealBulkDeleteResponseResultsError added in v0.5.0

type PrismObjectDealBulkDeleteResponseResultsError struct {
	Code    string                                            `json:"code"`
	Message string                                            `json:"message"`
	JSON    prismObjectDealBulkDeleteResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectDealBulkDeleteResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealBulkDeleteResponseResultsRecord added in v0.5.0

type PrismObjectDealBulkDeleteResponseResultsRecord struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                             `json:"default"`
	List    interface{}                                        `json:"list"`
	JSON    prismObjectDealBulkDeleteResponseResultsRecordJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDealBulkDeleteResponseResultsRecord) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealBulkDeleteResponseResultsStatus added in v0.5.0

type PrismObjectDealBulkDeleteResponseResultsStatus string
const (
	PrismObjectDealBulkDeleteResponseResultsStatusOk    PrismObjectDealBulkDeleteResponseResultsStatus = "ok"
	PrismObjectDealBulkDeleteResponseResultsStatusError PrismObjectDealBulkDeleteResponseResultsStatus = "error"
)

func (PrismObjectDealBulkDeleteResponseResultsStatus) IsKnown added in v0.5.0

type PrismObjectDealBulkDeleteResponseSummary added in v0.5.0

type PrismObjectDealBulkDeleteResponseSummary struct {
	Failed    int64                                        `json:"failed" api:"required"`
	Succeeded int64                                        `json:"succeeded" api:"required"`
	Total     int64                                        `json:"total" api:"required"`
	JSON      prismObjectDealBulkDeleteResponseSummaryJSON `json:"-"`
}

func (*PrismObjectDealBulkDeleteResponseSummary) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealBulkNewParams

type PrismObjectDealBulkNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Array of objects to import with property values keyed by slug
	Objects        param.Field[[]PrismObjectPropertiesParam]        `json:"objects" api:"required"`
	Options        param.Field[PrismObjectDealBulkNewParamsOptions] `json:"options"`
	IdempotencyKey param.Field[string]                              `header:"Idempotency-Key"`
}

func (PrismObjectDealBulkNewParams) MarshalJSON

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

type PrismObjectDealBulkNewParamsOptions

type PrismObjectDealBulkNewParamsOptions struct {
	// Whether deduplication should be case insensitive
	CaseInsensitive param.Field[bool] `json:"caseInsensitive"`
	// When true, unknown values for select/multiselect properties are created as new
	// options instead of failing the import
	CreateMissingOptions param.Field[bool] `json:"create_missing_options"`
	// Deprecated alias for list_id.
	//
	// Deprecated: deprecated
	CRMID param.Field[string] `json:"crm_id" format:"uuid"`
	// Property slug to deduplicate on. A single-element array is also accepted;
	// compound (multi-slug) dedupe is not supported yet and is rejected with guidance.
	DedupeBy param.Field[PrismObjectDealBulkNewParamsOptionsDedupeByUnion] `json:"dedupe_by"`
	// App/CRM ID for context (optional)
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Require app_stage for every row in the selected list. app_stage is a reserved
	// list-scoped alias for native status.
	RequireListStage param.Field[bool] `json:"require_list_stage"`
	// Patch a deduplicated record with the supplied properties instead of skipping it.
	UpdateExisting param.Field[bool] `json:"update_existing"`
}

func (PrismObjectDealBulkNewParamsOptions) MarshalJSON

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

type PrismObjectDealBulkNewParamsOptionsDedupeByArray added in v0.9.0

type PrismObjectDealBulkNewParamsOptionsDedupeByArray []string

func (PrismObjectDealBulkNewParamsOptionsDedupeByArray) ImplementsPrismObjectDealBulkNewParamsOptionsDedupeByUnion added in v0.9.0

func (r PrismObjectDealBulkNewParamsOptionsDedupeByArray) ImplementsPrismObjectDealBulkNewParamsOptionsDedupeByUnion()

type PrismObjectDealBulkNewParamsOptionsDedupeByUnion added in v0.9.0

type PrismObjectDealBulkNewParamsOptionsDedupeByUnion interface {
	ImplementsPrismObjectDealBulkNewParamsOptionsDedupeByUnion()
}

Property slug to deduplicate on. A single-element array is also accepted; compound (multi-slug) dedupe is not supported yet and is rejected with guidance.

Satisfied by [shared.UnionString], PrismObjectDealBulkNewParamsOptionsDedupeByArray.

type PrismObjectDealBulkNewResponse

type PrismObjectDealBulkNewResponse struct {
	// Null for sync imports (results inlined). Set for async imports.
	JobID  string                               `json:"job_id" api:"required,nullable"`
	Status PrismObjectDealBulkNewResponseStatus `json:"status" api:"required"`
	// Total number of rows in the import.
	Total     int64     `json:"total" api:"required"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Set when status=failed; describes the job-level failure (not per-row).
	Error     PrismObjectDealBulkNewResponseError `json:"error"`
	ExpiresAt time.Time                           `json:"expires_at" format:"date-time"`
	Failed    int64                               `json:"failed"`
	// Rows that have been attempted (succeeded + failed).
	Processed int64 `json:"processed"`
	// Per-row outcomes. Always present for sync imports; populated for async imports
	// once the job reaches `complete`.
	Results   []PrismObjectDealBulkNewResponseResult `json:"results"`
	Succeeded int64                                  `json:"succeeded"`
	UpdatedAt time.Time                              `json:"updated_at" format:"date-time"`
	JSON      prismObjectDealBulkNewResponseJSON     `json:"-"`
}

Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}.

func (*PrismObjectDealBulkNewResponse) UnmarshalJSON

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

type PrismObjectDealBulkNewResponseError added in v0.5.0

type PrismObjectDealBulkNewResponseError struct {
	Code    string                                  `json:"code"`
	Message string                                  `json:"message"`
	JSON    prismObjectDealBulkNewResponseErrorJSON `json:"-"`
}

Set when status=failed; describes the job-level failure (not per-row).

func (*PrismObjectDealBulkNewResponseError) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealBulkNewResponseResult

type PrismObjectDealBulkNewResponseResult struct {
	ID      string                                     `json:"id" api:"nullable" format:"uuid"`
	Created bool                                       `json:"created"`
	Error   PrismObjectDealBulkNewResponseResultsError `json:"error"`
	// True if the row matched an existing record via the dedupe key.
	Existing bool `json:"existing"`
	// Zero-based position of this row in the request.
	InputIndex int64 `json:"input_index"`
	// True if a matching record was updated.
	Updated bool                                     `json:"updated"`
	JSON    prismObjectDealBulkNewResponseResultJSON `json:"-"`
}

func (*PrismObjectDealBulkNewResponseResult) UnmarshalJSON

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

type PrismObjectDealBulkNewResponseResultsError added in v0.5.0

type PrismObjectDealBulkNewResponseResultsError struct {
	Code    string                                         `json:"code"`
	Message string                                         `json:"message"`
	JSON    prismObjectDealBulkNewResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectDealBulkNewResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealBulkNewResponseStatus

type PrismObjectDealBulkNewResponseStatus string
const (
	PrismObjectDealBulkNewResponseStatusComplete   PrismObjectDealBulkNewResponseStatus = "complete"
	PrismObjectDealBulkNewResponseStatusProcessing PrismObjectDealBulkNewResponseStatus = "processing"
	PrismObjectDealBulkNewResponseStatusFailed     PrismObjectDealBulkNewResponseStatus = "failed"
)

func (PrismObjectDealBulkNewResponseStatus) IsKnown

type PrismObjectDealBulkUpdateParams added in v0.5.0

type PrismObjectDealBulkUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]                                `path:"teamId" api:"required" format:"uuid"`
	Items          param.Field[[]PrismObjectDealBulkUpdateParamsItem] `json:"items" api:"required"`
	IdempotencyKey param.Field[string]                                `header:"Idempotency-Key"`
}

func (PrismObjectDealBulkUpdateParams) MarshalJSON added in v0.5.0

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

type PrismObjectDealBulkUpdateParamsItem added in v0.5.0

type PrismObjectDealBulkUpdateParamsItem struct {
	ID          param.Field[string]    `json:"id" api:"required" format:"uuid"`
	ExtraFields map[string]interface{} `json:"-,extras"`
}

Object with `id` plus the same property body shape as PATCH (`default`/`list`/`extended`).

func (PrismObjectDealBulkUpdateParamsItem) MarshalJSON added in v0.5.0

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

type PrismObjectDealBulkUpdateResponse added in v0.5.0

type PrismObjectDealBulkUpdateResponse struct {
	Results []PrismObjectDealBulkUpdateResponseResult `json:"results" api:"required"`
	Summary PrismObjectDealBulkUpdateResponseSummary  `json:"summary" api:"required"`
	JSON    prismObjectDealBulkUpdateResponseJSON     `json:"-"`
}

Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed.

func (*PrismObjectDealBulkUpdateResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealBulkUpdateResponseResult added in v0.5.0

type PrismObjectDealBulkUpdateResponseResult struct {
	// Item ID, or null if the input was unparseable.
	ID     string                                         `json:"id" api:"required,nullable"`
	Status PrismObjectDealBulkUpdateResponseResultsStatus `json:"status" api:"required"`
	Error  PrismObjectDealBulkUpdateResponseResultsError  `json:"error"`
	// Object returned by reads (get/create/patch/restore). id is always present.
	Record PrismObjectDealBulkUpdateResponseResultsRecord `json:"record"`
	JSON   prismObjectDealBulkUpdateResponseResultJSON    `json:"-"`
}

func (*PrismObjectDealBulkUpdateResponseResult) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealBulkUpdateResponseResultsError added in v0.5.0

type PrismObjectDealBulkUpdateResponseResultsError struct {
	Code    string                                            `json:"code"`
	Message string                                            `json:"message"`
	JSON    prismObjectDealBulkUpdateResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectDealBulkUpdateResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealBulkUpdateResponseResultsRecord added in v0.5.0

type PrismObjectDealBulkUpdateResponseResultsRecord struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                             `json:"default"`
	List    interface{}                                        `json:"list"`
	JSON    prismObjectDealBulkUpdateResponseResultsRecordJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDealBulkUpdateResponseResultsRecord) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealBulkUpdateResponseResultsStatus added in v0.5.0

type PrismObjectDealBulkUpdateResponseResultsStatus string
const (
	PrismObjectDealBulkUpdateResponseResultsStatusOk    PrismObjectDealBulkUpdateResponseResultsStatus = "ok"
	PrismObjectDealBulkUpdateResponseResultsStatusError PrismObjectDealBulkUpdateResponseResultsStatus = "error"
)

func (PrismObjectDealBulkUpdateResponseResultsStatus) IsKnown added in v0.5.0

type PrismObjectDealBulkUpdateResponseSummary added in v0.5.0

type PrismObjectDealBulkUpdateResponseSummary struct {
	Failed    int64                                        `json:"failed" api:"required"`
	Succeeded int64                                        `json:"succeeded" api:"required"`
	Total     int64                                        `json:"total" api:"required"`
	JSON      prismObjectDealBulkUpdateResponseSummaryJSON `json:"-"`
}

func (*PrismObjectDealBulkUpdateResponseSummary) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealCountParams added in v0.5.0

type PrismObjectDealCountParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the count to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectDealCountParams) URLQuery added in v0.5.0

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

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

type PrismObjectDealCountResponse added in v0.5.0

type PrismObjectDealCountResponse struct {
	// Number of records matching the access scope.
	Total int64                            `json:"total" api:"required"`
	JSON  prismObjectDealCountResponseJSON `json:"-"`
}

func (*PrismObjectDealCountResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealDeleteParams

type PrismObjectDealDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID  param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IfMatch param.Field[string] `header:"If-Match"`
}

type PrismObjectDealDuplicateParams

type PrismObjectDealDuplicateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectDealDuplicateResponse

type PrismObjectDealDuplicateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}               `json:"default"`
	List    interface{}                          `json:"list"`
	JSON    prismObjectDealDuplicateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDealDuplicateResponse) UnmarshalJSON

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

type PrismObjectDealFindParams added in v0.5.0

type PrismObjectDealFindParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the lookup to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectDealFindParams) URLQuery added in v0.5.0

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

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

type PrismObjectDealFindResponse added in v0.5.0

type PrismObjectDealFindResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}          `json:"default"`
	List    interface{}                     `json:"list"`
	JSON    prismObjectDealFindResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDealFindResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealGetParams

type PrismObjectDealGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
}

func (PrismObjectDealGetParams) URLQuery added in v0.5.0

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

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

type PrismObjectDealGetResponse added in v0.2.0

type PrismObjectDealGetResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}         `json:"default"`
	List    interface{}                    `json:"list"`
	JSON    prismObjectDealGetResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDealGetResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectDealGrantGetParams

type PrismObjectDealGrantGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type PrismObjectDealGrantGetResponse

type PrismObjectDealGrantGetResponse struct {
	TeamGroupID []map[string]PrismObjectDealGrantGetResponseTeamGroupID `json:"team_group_id"`
	TeamID      map[string]PrismObjectDealGrantGetResponseTeamID        `json:"team_id"`
	UserID      []map[string]PrismObjectDealGrantGetResponseUserID      `json:"user_id"`
	JSON        prismObjectDealGrantGetResponseJSON                     `json:"-"`
}

func (*PrismObjectDealGrantGetResponse) UnmarshalJSON

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

type PrismObjectDealGrantGetResponseTeamGroupID

type PrismObjectDealGrantGetResponseTeamGroupID string
const (
	PrismObjectDealGrantGetResponseTeamGroupIDA PrismObjectDealGrantGetResponseTeamGroupID = "a"
	PrismObjectDealGrantGetResponseTeamGroupIDR PrismObjectDealGrantGetResponseTeamGroupID = "r"
	PrismObjectDealGrantGetResponseTeamGroupIDW PrismObjectDealGrantGetResponseTeamGroupID = "w"
)

func (PrismObjectDealGrantGetResponseTeamGroupID) IsKnown

type PrismObjectDealGrantGetResponseTeamID

type PrismObjectDealGrantGetResponseTeamID string
const (
	PrismObjectDealGrantGetResponseTeamIDA PrismObjectDealGrantGetResponseTeamID = "a"
	PrismObjectDealGrantGetResponseTeamIDR PrismObjectDealGrantGetResponseTeamID = "r"
	PrismObjectDealGrantGetResponseTeamIDW PrismObjectDealGrantGetResponseTeamID = "w"
)

func (PrismObjectDealGrantGetResponseTeamID) IsKnown

type PrismObjectDealGrantGetResponseUserID

type PrismObjectDealGrantGetResponseUserID string
const (
	PrismObjectDealGrantGetResponseUserIDA PrismObjectDealGrantGetResponseUserID = "a"
	PrismObjectDealGrantGetResponseUserIDR PrismObjectDealGrantGetResponseUserID = "r"
	PrismObjectDealGrantGetResponseUserIDW PrismObjectDealGrantGetResponseUserID = "w"
)

func (PrismObjectDealGrantGetResponseUserID) IsKnown

type PrismObjectDealGrantService

type PrismObjectDealGrantService struct {
	Options []option.RequestOption
}

PrismObjectDealGrantService contains methods and other services that help with interacting with the micro 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 NewPrismObjectDealGrantService method instead.

func NewPrismObjectDealGrantService

func NewPrismObjectDealGrantService(opts ...option.RequestOption) (r *PrismObjectDealGrantService)

NewPrismObjectDealGrantService 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 (*PrismObjectDealGrantService) Get

Get grant

func (*PrismObjectDealGrantService) Update

Update grant

type PrismObjectDealGrantUpdateParams

type PrismObjectDealGrantUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	PathTeamID     param.Field[string]                                                   `path:"teamId" api:"required" format:"uuid"`
	TeamGroupID    param.Field[[]map[string]PrismObjectDealGrantUpdateParamsTeamGroupID] `json:"team_group_id"`
	BodyTeamID     param.Field[map[string]PrismObjectDealGrantUpdateParamsTeamID]        `json:"team_id"`
	UserID         param.Field[[]map[string]PrismObjectDealGrantUpdateParamsUserID]      `json:"user_id"`
	IdempotencyKey param.Field[string]                                                   `header:"Idempotency-Key"`
}

func (PrismObjectDealGrantUpdateParams) MarshalJSON

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

type PrismObjectDealGrantUpdateParamsTeamGroupID

type PrismObjectDealGrantUpdateParamsTeamGroupID string
const (
	PrismObjectDealGrantUpdateParamsTeamGroupIDA PrismObjectDealGrantUpdateParamsTeamGroupID = "a"
	PrismObjectDealGrantUpdateParamsTeamGroupIDR PrismObjectDealGrantUpdateParamsTeamGroupID = "r"
	PrismObjectDealGrantUpdateParamsTeamGroupIDW PrismObjectDealGrantUpdateParamsTeamGroupID = "w"
)

func (PrismObjectDealGrantUpdateParamsTeamGroupID) IsKnown

type PrismObjectDealGrantUpdateParamsTeamID

type PrismObjectDealGrantUpdateParamsTeamID string
const (
	PrismObjectDealGrantUpdateParamsTeamIDA PrismObjectDealGrantUpdateParamsTeamID = "a"
	PrismObjectDealGrantUpdateParamsTeamIDR PrismObjectDealGrantUpdateParamsTeamID = "r"
	PrismObjectDealGrantUpdateParamsTeamIDW PrismObjectDealGrantUpdateParamsTeamID = "w"
)

func (PrismObjectDealGrantUpdateParamsTeamID) IsKnown

type PrismObjectDealGrantUpdateParamsUserID

type PrismObjectDealGrantUpdateParamsUserID string
const (
	PrismObjectDealGrantUpdateParamsUserIDA PrismObjectDealGrantUpdateParamsUserID = "a"
	PrismObjectDealGrantUpdateParamsUserIDR PrismObjectDealGrantUpdateParamsUserID = "r"
	PrismObjectDealGrantUpdateParamsUserIDW PrismObjectDealGrantUpdateParamsUserID = "w"
)

func (PrismObjectDealGrantUpdateParamsUserID) IsKnown

type PrismObjectDealGrantUpdateResponse

type PrismObjectDealGrantUpdateResponse struct {
	TeamGroupID []map[string]PrismObjectDealGrantUpdateResponseTeamGroupID `json:"team_group_id"`
	TeamID      map[string]PrismObjectDealGrantUpdateResponseTeamID        `json:"team_id"`
	UserID      []map[string]PrismObjectDealGrantUpdateResponseUserID      `json:"user_id"`
	JSON        prismObjectDealGrantUpdateResponseJSON                     `json:"-"`
}

func (*PrismObjectDealGrantUpdateResponse) UnmarshalJSON

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

type PrismObjectDealGrantUpdateResponseTeamGroupID

type PrismObjectDealGrantUpdateResponseTeamGroupID string
const (
	PrismObjectDealGrantUpdateResponseTeamGroupIDA PrismObjectDealGrantUpdateResponseTeamGroupID = "a"
	PrismObjectDealGrantUpdateResponseTeamGroupIDR PrismObjectDealGrantUpdateResponseTeamGroupID = "r"
	PrismObjectDealGrantUpdateResponseTeamGroupIDW PrismObjectDealGrantUpdateResponseTeamGroupID = "w"
)

func (PrismObjectDealGrantUpdateResponseTeamGroupID) IsKnown

type PrismObjectDealGrantUpdateResponseTeamID

type PrismObjectDealGrantUpdateResponseTeamID string
const (
	PrismObjectDealGrantUpdateResponseTeamIDA PrismObjectDealGrantUpdateResponseTeamID = "a"
	PrismObjectDealGrantUpdateResponseTeamIDR PrismObjectDealGrantUpdateResponseTeamID = "r"
	PrismObjectDealGrantUpdateResponseTeamIDW PrismObjectDealGrantUpdateResponseTeamID = "w"
)

func (PrismObjectDealGrantUpdateResponseTeamID) IsKnown

type PrismObjectDealGrantUpdateResponseUserID

type PrismObjectDealGrantUpdateResponseUserID string
const (
	PrismObjectDealGrantUpdateResponseUserIDA PrismObjectDealGrantUpdateResponseUserID = "a"
	PrismObjectDealGrantUpdateResponseUserIDR PrismObjectDealGrantUpdateResponseUserID = "r"
	PrismObjectDealGrantUpdateResponseUserIDW PrismObjectDealGrantUpdateResponseUserID = "w"
)

func (PrismObjectDealGrantUpdateResponseUserID) IsKnown

type PrismObjectDealListParams added in v0.5.0

type PrismObjectDealListParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page.
	Cursor param.Field[string] `query:"cursor"`
	// Include soft-deleted records. Pass the literal string `true`.
	Deleted param.Field[bool] `query:"deleted"`
	// When set to `true`, the response includes a `total` field with the unpaginated
	// row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total.
	IncludeTotal param.Field[bool] `query:"include_total"`
	// Maximum number of rows to return. Capped server-side at 50.
	Limit param.Field[int64] `query:"limit"`
	// Scope properties to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
	// Comma-separated list of slugs. Prefix with `-` for descending. Example:
	// `sort=-updated_at,name`.
	Sort param.Field[string] `query:"sort"`
}

func (PrismObjectDealListParams) URLQuery added in v0.5.0

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

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

type PrismObjectDealListResponse added in v0.5.0

type PrismObjectDealListResponse struct {
	Data []PrismObjectDealListResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal — false on the last page, never forces clients to
	// overshoot.
	HasMore    bool   `json:"has_more" api:"required"`
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Populated only when `?include_total=true` was passed.
	Total int64                           `json:"total" api:"nullable"`
	JSON  prismObjectDealListResponseJSON `json:"-"`
}

func (*PrismObjectDealListResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealListResponseData added in v0.5.0

type PrismObjectDealListResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}              `json:"properties"`
	Source     []string                            `json:"source" api:"nullable"`
	JSON       prismObjectDealListResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectDealListResponseData) UnmarshalJSON added in v0.5.0

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

type PrismObjectDealNewParams

type PrismObjectDealNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
}

func (PrismObjectDealNewParams) MarshalJSON

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

type PrismObjectDealNewResponse added in v0.2.0

type PrismObjectDealNewResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}         `json:"default"`
	List    interface{}                    `json:"list"`
	JSON    prismObjectDealNewResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDealNewResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectDealQueryParams

type PrismObjectDealQueryParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string]                            `path:"teamId" api:"required" format:"uuid"`
	Query  param.Field[PrismObjectDealQueryParamsQuery]   `json:"query" api:"required"`
	ID     param.Field[PrismObjectDealQueryParamsIDUnion] `json:"id" format:"uuid"`
	Boxes  param.Field[[]string]                          `json:"boxes"`
	// Alternative location for the opaque cursor (a sibling of `query`). Use whichever
	// feels more natural; if both are present, `query.cursor` wins.
	Cursor  param.Field[string] `json:"cursor"`
	Deleted param.Field[bool]   `json:"deleted"`
	// When true, the response includes a `total` field with the unpaginated row count.
	// Costs an additional pass over the result set — for unfiltered totals prefer
	// `GET /v2/prism/{teamId}/{objectType}/count` instead.
	IncludeTotal param.Field[bool]     `json:"include_total"`
	Sources      param.Field[[]string] `json:"sources" format:"uuid"`
}

func (PrismObjectDealQueryParams) MarshalJSON

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

type PrismObjectDealQueryParamsIDArray

type PrismObjectDealQueryParamsIDArray []string

func (PrismObjectDealQueryParamsIDArray) ImplementsPrismObjectDealQueryParamsIDUnion

func (r PrismObjectDealQueryParamsIDArray) ImplementsPrismObjectDealQueryParamsIDUnion()

type PrismObjectDealQueryParamsIDUnion

type PrismObjectDealQueryParamsIDUnion interface {
	ImplementsPrismObjectDealQueryParamsIDUnion()
}

Satisfied by [shared.UnionString], PrismObjectDealQueryParamsIDArray.

type PrismObjectDealQueryParamsQuery

type PrismObjectDealQueryParamsQuery struct {
	// Property slugs to select. Use dot notation for relationships (e.g.
	// attendee.contact.first_name). `id` is always returned at the top level of each
	// row and does not need to be selected.
	Select param.Field[[]string] `json:"select" api:"required"`
	// Logical operator for combining filters
	Combinator param.Field[PrismObjectDealQueryParamsQueryCombinator] `json:"combinator"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page. When set, `page` and `limit` are derived from the cursor
	// and any explicit values are ignored.
	Cursor param.Field[string] `json:"cursor"`
	// Filters as [{ slug: { operator: value } }]. For select/multiselect properties,
	// values may be option slugs or option UUIDs.
	Filter param.Field[[]map[string]PrismObjectDealQueryParamsQueryFilterUnion] `json:"filter"`
	// Maximum number of rows to return. Capped server-side at 50; requests above the
	// cap are rejected.
	Limit  param.Field[int64]  `json:"limit"`
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Page number (1-based). Prefer `cursor`. Page-number pagination drifts under
	// concurrent writes; use it only for one-shot exports.
	//
	// Deprecated: deprecated
	Page param.Field[int64] `json:"page"`
	// Sort order as [{ slug: direction }]. Array order determines sort priority
	Sort param.Field[[]map[string]PrismObjectDealQueryParamsQuerySort] `json:"sort"`
}

func (PrismObjectDealQueryParamsQuery) MarshalJSON

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

type PrismObjectDealQueryParamsQueryCombinator

type PrismObjectDealQueryParamsQueryCombinator string

Logical operator for combining filters

const (
	PrismObjectDealQueryParamsQueryCombinatorAnd PrismObjectDealQueryParamsQueryCombinator = "AND"
	PrismObjectDealQueryParamsQueryCombinatorOr  PrismObjectDealQueryParamsQueryCombinator = "OR"
)

func (PrismObjectDealQueryParamsQueryCombinator) IsKnown

type PrismObjectDealQueryParamsQueryFilter added in v0.3.0

type PrismObjectDealQueryParamsQueryFilter struct {
	NotEquals       param.Field[interface{}] `json:"!="`
	Less            param.Field[string]      `json:"<"`
	LessOrEquals    param.Field[string]      `json:"<="`
	Equals          param.Field[interface{}] `json:"="`
	Greater         param.Field[string]      `json:">"`
	GreaterOrEquals param.Field[string]      `json:">="`
	BeginsWith      param.Field[string]      `json:"begins_with"`
	Between         param.Field[interface{}] `json:"between"`
	Contains        param.Field[interface{}] `json:"contains"`
	EndsWith        param.Field[string]      `json:"ends_with"`
	Exists          param.Field[bool]        `json:"exists"`
	In              param.Field[interface{}] `json:"in"`
	IsNotNull       param.Field[interface{}] `json:"is_not_null"`
	IsNull          param.Field[interface{}] `json:"is_null"`
	NotContains     param.Field[string]      `json:"not_contains"`
	NotExists       param.Field[bool]        `json:"not_exists"`
	NotIn           param.Field[interface{}] `json:"not_in"`
}

func (PrismObjectDealQueryParamsQueryFilter) MarshalJSON added in v0.3.0

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

type PrismObjectDealQueryParamsQueryFilterBeginsWith added in v0.3.0

type PrismObjectDealQueryParamsQueryFilterBeginsWith struct {
	BeginsWith param.Field[string] `json:"begins_with" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterBeginsWith) MarshalJSON added in v0.3.0

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

type PrismObjectDealQueryParamsQueryFilterBetween added in v0.5.0

type PrismObjectDealQueryParamsQueryFilterBetween struct {
	Between param.Field[PrismObjectDealQueryParamsQueryFilterBetweenBetweenUnion] `json:"between" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterBetween) MarshalJSON added in v0.5.0

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

type PrismObjectDealQueryParamsQueryFilterBetweenBetweenArray added in v0.5.0

type PrismObjectDealQueryParamsQueryFilterBetweenBetweenArray []string

func (PrismObjectDealQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectDealQueryParamsQueryFilterBetweenBetweenUnion added in v0.5.0

func (r PrismObjectDealQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectDealQueryParamsQueryFilterBetweenBetweenUnion()

type PrismObjectDealQueryParamsQueryFilterBetweenBetweenUnion added in v0.5.0

type PrismObjectDealQueryParamsQueryFilterBetweenBetweenUnion interface {
	ImplementsPrismObjectDealQueryParamsQueryFilterBetweenBetweenUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectDealQueryParamsQueryFilterBetweenBetweenArray.

type PrismObjectDealQueryParamsQueryFilterContains added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterContains struct {
	Contains param.Field[PrismObjectDealQueryParamsQueryFilterContainsContainsUnion] `json:"contains" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterContains) MarshalJSON added in v0.4.0

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

type PrismObjectDealQueryParamsQueryFilterContainsContainsArray added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterContainsContainsArray []string

func (PrismObjectDealQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectDealQueryParamsQueryFilterContainsContainsUnion added in v0.4.0

func (r PrismObjectDealQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectDealQueryParamsQueryFilterContainsContainsUnion()

type PrismObjectDealQueryParamsQueryFilterContainsContainsUnion added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterContainsContainsUnion interface {
	ImplementsPrismObjectDealQueryParamsQueryFilterContainsContainsUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectDealQueryParamsQueryFilterContainsContainsArray.

type PrismObjectDealQueryParamsQueryFilterEndsWith added in v0.3.0

type PrismObjectDealQueryParamsQueryFilterEndsWith struct {
	EndsWith param.Field[string] `json:"ends_with" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterEndsWith) MarshalJSON added in v0.3.0

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

type PrismObjectDealQueryParamsQueryFilterExists added in v0.3.0

type PrismObjectDealQueryParamsQueryFilterExists struct {
	Exists param.Field[bool] `json:"exists" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterExists) MarshalJSON added in v0.3.0

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

type PrismObjectDealQueryParamsQueryFilterIn added in v0.3.0

type PrismObjectDealQueryParamsQueryFilterIn struct {
	In param.Field[[]string] `json:"in" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterIn) MarshalJSON added in v0.3.0

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

type PrismObjectDealQueryParamsQueryFilterIsNotNull added in v0.5.0

type PrismObjectDealQueryParamsQueryFilterIsNotNull struct {
	IsNotNull param.Field[PrismObjectDealQueryParamsQueryFilterIsNotNullIsNotNullUnion] `json:"is_not_null" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterIsNotNull) MarshalJSON added in v0.5.0

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

type PrismObjectDealQueryParamsQueryFilterIsNotNullIsNotNullArray added in v0.5.0

type PrismObjectDealQueryParamsQueryFilterIsNotNullIsNotNullArray []string

func (PrismObjectDealQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectDealQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.5.0

func (r PrismObjectDealQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectDealQueryParamsQueryFilterIsNotNullIsNotNullUnion()

type PrismObjectDealQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.5.0

type PrismObjectDealQueryParamsQueryFilterIsNotNullIsNotNullUnion interface {
	ImplementsPrismObjectDealQueryParamsQueryFilterIsNotNullIsNotNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectDealQueryParamsQueryFilterIsNotNullIsNotNullArray.

type PrismObjectDealQueryParamsQueryFilterIsNull added in v0.5.0

type PrismObjectDealQueryParamsQueryFilterIsNull struct {
	IsNull param.Field[PrismObjectDealQueryParamsQueryFilterIsNullIsNullUnion] `json:"is_null" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterIsNull) MarshalJSON added in v0.5.0

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

type PrismObjectDealQueryParamsQueryFilterIsNullIsNullArray added in v0.5.0

type PrismObjectDealQueryParamsQueryFilterIsNullIsNullArray []string

func (PrismObjectDealQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectDealQueryParamsQueryFilterIsNullIsNullUnion added in v0.5.0

func (r PrismObjectDealQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectDealQueryParamsQueryFilterIsNullIsNullUnion()

type PrismObjectDealQueryParamsQueryFilterIsNullIsNullUnion added in v0.5.0

type PrismObjectDealQueryParamsQueryFilterIsNullIsNullUnion interface {
	ImplementsPrismObjectDealQueryParamsQueryFilterIsNullIsNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectDealQueryParamsQueryFilterIsNullIsNullArray.

type PrismObjectDealQueryParamsQueryFilterNotContains added in v0.3.0

type PrismObjectDealQueryParamsQueryFilterNotContains struct {
	NotContains param.Field[string] `json:"not_contains" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterNotContains) MarshalJSON added in v0.3.0

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

type PrismObjectDealQueryParamsQueryFilterNotExists added in v0.3.0

type PrismObjectDealQueryParamsQueryFilterNotExists struct {
	NotExists param.Field[bool] `json:"not_exists" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterNotExists) MarshalJSON added in v0.3.0

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

type PrismObjectDealQueryParamsQueryFilterNotIn added in v0.3.0

type PrismObjectDealQueryParamsQueryFilterNotIn struct {
	NotIn param.Field[[]string] `json:"not_in" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterNotIn) MarshalJSON added in v0.3.0

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

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterEq added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterEq struct {
	Equals param.Field[PrismObjectDealQueryParamsQueryFilterPrismQueryFilterEqUnion] `json:"=" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterPrismQueryFilterEq) MarshalJSON added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterEqUnion added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterEqUnion interface {
	ImplementsPrismObjectDealQueryParamsQueryFilterPrismQueryFilterEqUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterGt added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterGt struct {
	Greater param.Field[string] `json:">" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterPrismQueryFilterGt) MarshalJSON added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterGte added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterGte struct {
	GreaterOrEquals param.Field[string] `json:">=" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterPrismQueryFilterGte) MarshalJSON added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterLt added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterLt struct {
	Less param.Field[string] `json:"<" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterPrismQueryFilterLt) MarshalJSON added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterLte added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterLte struct {
	LessOrEquals param.Field[string] `json:"<=" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterPrismQueryFilterLte) MarshalJSON added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterNe added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterNe struct {
	NotEquals param.Field[PrismObjectDealQueryParamsQueryFilterPrismQueryFilterNeUnion] `json:"!=" api:"required"`
}

func (PrismObjectDealQueryParamsQueryFilterPrismQueryFilterNe) MarshalJSON added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterNeUnion added in v0.4.0

type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterNeUnion interface {
	ImplementsPrismObjectDealQueryParamsQueryFilterPrismQueryFilterNeUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectDealQueryParamsQuerySort

type PrismObjectDealQueryParamsQuerySort string
const (
	PrismObjectDealQueryParamsQuerySortAsc  PrismObjectDealQueryParamsQuerySort = "asc"
	PrismObjectDealQueryParamsQuerySortDesc PrismObjectDealQueryParamsQuerySort = "desc"
)

func (PrismObjectDealQueryParamsQuerySort) IsKnown

type PrismObjectDealQueryResponse

type PrismObjectDealQueryResponse struct {
	Data []PrismObjectDealQueryResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal. False when this page contains the last record; true
	// only when at least one more record exists. (Implementation note: the server
	// fetches one extra row internally to determine this — clients never need to
	// overshoot to discover the end.)
	HasMore bool `json:"has_more" api:"required"`
	// Opaque cursor pointing at the next page. Pass it back unchanged in the request
	// body (`cursor`) of the next call. Null when `has_more` is false.
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Only populated when the request set `include_total: true`. Total number of
	// records matching the query, ignoring pagination. Opt-in because it costs an
	// additional pass over the result set.
	Total int64                            `json:"total" api:"nullable"`
	JSON  prismObjectDealQueryResponseJSON `json:"-"`
}

func (*PrismObjectDealQueryResponse) UnmarshalJSON

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

type PrismObjectDealQueryResponseData added in v0.2.0

type PrismObjectDealQueryResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}               `json:"properties"`
	Source     []string                             `json:"source" api:"nullable"`
	JSON       prismObjectDealQueryResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectDealQueryResponseData) UnmarshalJSON added in v0.2.0

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

type PrismObjectDealRestoreParams

type PrismObjectDealRestoreParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectDealRestoreResponse added in v0.2.0

type PrismObjectDealRestoreResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}             `json:"default"`
	List    interface{}                        `json:"list"`
	JSON    prismObjectDealRestoreResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDealRestoreResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectDealService

type PrismObjectDealService struct {
	Options []option.RequestOption
	Grant   *PrismObjectDealGrantService
}

PrismObjectDealService contains methods and other services that help with interacting with the micro 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 NewPrismObjectDealService method instead.

func NewPrismObjectDealService

func NewPrismObjectDealService(opts ...option.RequestOption) (r *PrismObjectDealService)

NewPrismObjectDealService 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 (*PrismObjectDealService) BulkDelete added in v0.5.0

Soft-delete up to 100 records in a single call. Same partial-success contract as batch/update.

func (*PrismObjectDealService) BulkNew

Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final `ImportJob`; large batches start an async job, return 202 with `status: processing` and a `Location` header, and can be polled via `GET /v2/prism/{teamId}/imports/{jobId}`.

func (*PrismObjectDealService) BulkUpdate added in v0.5.0

Patch up to 100 records in a single call. Each item is attempted independently — failures don't abort the batch. Inspect `results[].status` per item.

func (*PrismObjectDealService) Count added in v0.5.0

Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body.

func (*PrismObjectDealService) Delete

func (r *PrismObjectDealService) Delete(ctx context.Context, dealID string, params PrismObjectDealDeleteParams, opts ...option.RequestOption) (err error)

Delete object

func (*PrismObjectDealService) Duplicate

Duplicate object

func (*PrismObjectDealService) Find added in v0.5.0

Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches.

func (*PrismObjectDealService) Get

Get object

func (*PrismObjectDealService) List added in v0.5.0

Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality.

func (*PrismObjectDealService) New

Create object

func (*PrismObjectDealService) Query

Query

func (*PrismObjectDealService) Restore

Restore object

func (*PrismObjectDealService) Update

Patch object

func (*PrismObjectDealService) Upsert added in v0.5.0

Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead.

type PrismObjectDealUpdateParams

type PrismObjectDealUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
	IfMatch               param.Field[string]        `header:"If-Match"`
}

func (PrismObjectDealUpdateParams) MarshalJSON

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

type PrismObjectDealUpdateResponse added in v0.2.0

type PrismObjectDealUpdateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}            `json:"default"`
	List    interface{}                       `json:"list"`
	JSON    prismObjectDealUpdateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDealUpdateResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectDealUpsertParams added in v0.5.0

type PrismObjectDealUpsertParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	// Scope the upsert to a specific list/app. Required to match or write list-scoped
	// properties, including `app_stage`.
	ListID         param.Field[string] `query:"list_id" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

func (PrismObjectDealUpsertParams) MarshalJSON added in v0.5.0

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

func (PrismObjectDealUpsertParams) URLQuery added in v0.9.0

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

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

type PrismObjectDealUpsertResponse added in v0.5.0

type PrismObjectDealUpsertResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}            `json:"default"`
	List    interface{}                       `json:"list"`
	JSON    prismObjectDealUpsertResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDealUpsertResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkDeleteParams added in v0.5.0

type PrismObjectDocumentBulkDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]   `path:"teamId" api:"required" format:"uuid"`
	IDs            param.Field[[]string] `json:"ids" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string]   `header:"Idempotency-Key"`
}

func (PrismObjectDocumentBulkDeleteParams) MarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkDeleteResponse added in v0.5.0

type PrismObjectDocumentBulkDeleteResponse struct {
	Results []PrismObjectDocumentBulkDeleteResponseResult `json:"results" api:"required"`
	Summary PrismObjectDocumentBulkDeleteResponseSummary  `json:"summary" api:"required"`
	JSON    prismObjectDocumentBulkDeleteResponseJSON     `json:"-"`
}

Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed.

func (*PrismObjectDocumentBulkDeleteResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkDeleteResponseResult added in v0.5.0

type PrismObjectDocumentBulkDeleteResponseResult struct {
	// Item ID, or null if the input was unparseable.
	ID     string                                             `json:"id" api:"required,nullable"`
	Status PrismObjectDocumentBulkDeleteResponseResultsStatus `json:"status" api:"required"`
	Error  PrismObjectDocumentBulkDeleteResponseResultsError  `json:"error"`
	// Object returned by reads (get/create/patch/restore). id is always present.
	Record PrismObjectDocumentBulkDeleteResponseResultsRecord `json:"record"`
	JSON   prismObjectDocumentBulkDeleteResponseResultJSON    `json:"-"`
}

func (*PrismObjectDocumentBulkDeleteResponseResult) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkDeleteResponseResultsError added in v0.5.0

type PrismObjectDocumentBulkDeleteResponseResultsError struct {
	Code    string                                                `json:"code"`
	Message string                                                `json:"message"`
	JSON    prismObjectDocumentBulkDeleteResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectDocumentBulkDeleteResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkDeleteResponseResultsRecord added in v0.5.0

type PrismObjectDocumentBulkDeleteResponseResultsRecord struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                                 `json:"default"`
	List    interface{}                                            `json:"list"`
	JSON    prismObjectDocumentBulkDeleteResponseResultsRecordJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDocumentBulkDeleteResponseResultsRecord) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkDeleteResponseResultsStatus added in v0.5.0

type PrismObjectDocumentBulkDeleteResponseResultsStatus string
const (
	PrismObjectDocumentBulkDeleteResponseResultsStatusOk    PrismObjectDocumentBulkDeleteResponseResultsStatus = "ok"
	PrismObjectDocumentBulkDeleteResponseResultsStatusError PrismObjectDocumentBulkDeleteResponseResultsStatus = "error"
)

func (PrismObjectDocumentBulkDeleteResponseResultsStatus) IsKnown added in v0.5.0

type PrismObjectDocumentBulkDeleteResponseSummary added in v0.5.0

type PrismObjectDocumentBulkDeleteResponseSummary struct {
	Failed    int64                                            `json:"failed" api:"required"`
	Succeeded int64                                            `json:"succeeded" api:"required"`
	Total     int64                                            `json:"total" api:"required"`
	JSON      prismObjectDocumentBulkDeleteResponseSummaryJSON `json:"-"`
}

func (*PrismObjectDocumentBulkDeleteResponseSummary) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkNewParams

type PrismObjectDocumentBulkNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Array of objects to import with property values keyed by slug
	Objects        param.Field[[]PrismObjectPropertiesParam]            `json:"objects" api:"required"`
	Options        param.Field[PrismObjectDocumentBulkNewParamsOptions] `json:"options"`
	IdempotencyKey param.Field[string]                                  `header:"Idempotency-Key"`
}

func (PrismObjectDocumentBulkNewParams) MarshalJSON

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

type PrismObjectDocumentBulkNewParamsOptions

type PrismObjectDocumentBulkNewParamsOptions struct {
	// Whether deduplication should be case insensitive
	CaseInsensitive param.Field[bool] `json:"caseInsensitive"`
	// When true, unknown values for select/multiselect properties are created as new
	// options instead of failing the import
	CreateMissingOptions param.Field[bool] `json:"create_missing_options"`
	// Deprecated alias for list_id.
	//
	// Deprecated: deprecated
	CRMID param.Field[string] `json:"crm_id" format:"uuid"`
	// Property slug to deduplicate on. A single-element array is also accepted;
	// compound (multi-slug) dedupe is not supported yet and is rejected with guidance.
	DedupeBy param.Field[PrismObjectDocumentBulkNewParamsOptionsDedupeByUnion] `json:"dedupe_by"`
	// App/CRM ID for context (optional)
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Require app_stage for every row in the selected list. app_stage is a reserved
	// list-scoped alias for native status.
	RequireListStage param.Field[bool] `json:"require_list_stage"`
	// Patch a deduplicated record with the supplied properties instead of skipping it.
	UpdateExisting param.Field[bool] `json:"update_existing"`
}

func (PrismObjectDocumentBulkNewParamsOptions) MarshalJSON

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

type PrismObjectDocumentBulkNewParamsOptionsDedupeByArray added in v0.9.0

type PrismObjectDocumentBulkNewParamsOptionsDedupeByArray []string

func (PrismObjectDocumentBulkNewParamsOptionsDedupeByArray) ImplementsPrismObjectDocumentBulkNewParamsOptionsDedupeByUnion added in v0.9.0

func (r PrismObjectDocumentBulkNewParamsOptionsDedupeByArray) ImplementsPrismObjectDocumentBulkNewParamsOptionsDedupeByUnion()

type PrismObjectDocumentBulkNewParamsOptionsDedupeByUnion added in v0.9.0

type PrismObjectDocumentBulkNewParamsOptionsDedupeByUnion interface {
	ImplementsPrismObjectDocumentBulkNewParamsOptionsDedupeByUnion()
}

Property slug to deduplicate on. A single-element array is also accepted; compound (multi-slug) dedupe is not supported yet and is rejected with guidance.

Satisfied by [shared.UnionString], PrismObjectDocumentBulkNewParamsOptionsDedupeByArray.

type PrismObjectDocumentBulkNewResponse

type PrismObjectDocumentBulkNewResponse struct {
	// Null for sync imports (results inlined). Set for async imports.
	JobID  string                                   `json:"job_id" api:"required,nullable"`
	Status PrismObjectDocumentBulkNewResponseStatus `json:"status" api:"required"`
	// Total number of rows in the import.
	Total     int64     `json:"total" api:"required"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Set when status=failed; describes the job-level failure (not per-row).
	Error     PrismObjectDocumentBulkNewResponseError `json:"error"`
	ExpiresAt time.Time                               `json:"expires_at" format:"date-time"`
	Failed    int64                                   `json:"failed"`
	// Rows that have been attempted (succeeded + failed).
	Processed int64 `json:"processed"`
	// Per-row outcomes. Always present for sync imports; populated for async imports
	// once the job reaches `complete`.
	Results   []PrismObjectDocumentBulkNewResponseResult `json:"results"`
	Succeeded int64                                      `json:"succeeded"`
	UpdatedAt time.Time                                  `json:"updated_at" format:"date-time"`
	JSON      prismObjectDocumentBulkNewResponseJSON     `json:"-"`
}

Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}.

func (*PrismObjectDocumentBulkNewResponse) UnmarshalJSON

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

type PrismObjectDocumentBulkNewResponseError added in v0.5.0

type PrismObjectDocumentBulkNewResponseError struct {
	Code    string                                      `json:"code"`
	Message string                                      `json:"message"`
	JSON    prismObjectDocumentBulkNewResponseErrorJSON `json:"-"`
}

Set when status=failed; describes the job-level failure (not per-row).

func (*PrismObjectDocumentBulkNewResponseError) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkNewResponseResult

type PrismObjectDocumentBulkNewResponseResult struct {
	ID      string                                         `json:"id" api:"nullable" format:"uuid"`
	Created bool                                           `json:"created"`
	Error   PrismObjectDocumentBulkNewResponseResultsError `json:"error"`
	// True if the row matched an existing record via the dedupe key.
	Existing bool `json:"existing"`
	// Zero-based position of this row in the request.
	InputIndex int64 `json:"input_index"`
	// True if a matching record was updated.
	Updated bool                                         `json:"updated"`
	JSON    prismObjectDocumentBulkNewResponseResultJSON `json:"-"`
}

func (*PrismObjectDocumentBulkNewResponseResult) UnmarshalJSON

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

type PrismObjectDocumentBulkNewResponseResultsError added in v0.5.0

type PrismObjectDocumentBulkNewResponseResultsError struct {
	Code    string                                             `json:"code"`
	Message string                                             `json:"message"`
	JSON    prismObjectDocumentBulkNewResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectDocumentBulkNewResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkNewResponseStatus

type PrismObjectDocumentBulkNewResponseStatus string
const (
	PrismObjectDocumentBulkNewResponseStatusComplete   PrismObjectDocumentBulkNewResponseStatus = "complete"
	PrismObjectDocumentBulkNewResponseStatusProcessing PrismObjectDocumentBulkNewResponseStatus = "processing"
	PrismObjectDocumentBulkNewResponseStatusFailed     PrismObjectDocumentBulkNewResponseStatus = "failed"
)

func (PrismObjectDocumentBulkNewResponseStatus) IsKnown

type PrismObjectDocumentBulkUpdateParams added in v0.5.0

type PrismObjectDocumentBulkUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]                                    `path:"teamId" api:"required" format:"uuid"`
	Items          param.Field[[]PrismObjectDocumentBulkUpdateParamsItem] `json:"items" api:"required"`
	IdempotencyKey param.Field[string]                                    `header:"Idempotency-Key"`
}

func (PrismObjectDocumentBulkUpdateParams) MarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkUpdateParamsItem added in v0.5.0

type PrismObjectDocumentBulkUpdateParamsItem struct {
	ID          param.Field[string]    `json:"id" api:"required" format:"uuid"`
	ExtraFields map[string]interface{} `json:"-,extras"`
}

Object with `id` plus the same property body shape as PATCH (`default`/`list`/`extended`).

func (PrismObjectDocumentBulkUpdateParamsItem) MarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkUpdateResponse added in v0.5.0

type PrismObjectDocumentBulkUpdateResponse struct {
	Results []PrismObjectDocumentBulkUpdateResponseResult `json:"results" api:"required"`
	Summary PrismObjectDocumentBulkUpdateResponseSummary  `json:"summary" api:"required"`
	JSON    prismObjectDocumentBulkUpdateResponseJSON     `json:"-"`
}

Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed.

func (*PrismObjectDocumentBulkUpdateResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkUpdateResponseResult added in v0.5.0

type PrismObjectDocumentBulkUpdateResponseResult struct {
	// Item ID, or null if the input was unparseable.
	ID     string                                             `json:"id" api:"required,nullable"`
	Status PrismObjectDocumentBulkUpdateResponseResultsStatus `json:"status" api:"required"`
	Error  PrismObjectDocumentBulkUpdateResponseResultsError  `json:"error"`
	// Object returned by reads (get/create/patch/restore). id is always present.
	Record PrismObjectDocumentBulkUpdateResponseResultsRecord `json:"record"`
	JSON   prismObjectDocumentBulkUpdateResponseResultJSON    `json:"-"`
}

func (*PrismObjectDocumentBulkUpdateResponseResult) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkUpdateResponseResultsError added in v0.5.0

type PrismObjectDocumentBulkUpdateResponseResultsError struct {
	Code    string                                                `json:"code"`
	Message string                                                `json:"message"`
	JSON    prismObjectDocumentBulkUpdateResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectDocumentBulkUpdateResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkUpdateResponseResultsRecord added in v0.5.0

type PrismObjectDocumentBulkUpdateResponseResultsRecord struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                                 `json:"default"`
	List    interface{}                                            `json:"list"`
	JSON    prismObjectDocumentBulkUpdateResponseResultsRecordJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDocumentBulkUpdateResponseResultsRecord) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentBulkUpdateResponseResultsStatus added in v0.5.0

type PrismObjectDocumentBulkUpdateResponseResultsStatus string
const (
	PrismObjectDocumentBulkUpdateResponseResultsStatusOk    PrismObjectDocumentBulkUpdateResponseResultsStatus = "ok"
	PrismObjectDocumentBulkUpdateResponseResultsStatusError PrismObjectDocumentBulkUpdateResponseResultsStatus = "error"
)

func (PrismObjectDocumentBulkUpdateResponseResultsStatus) IsKnown added in v0.5.0

type PrismObjectDocumentBulkUpdateResponseSummary added in v0.5.0

type PrismObjectDocumentBulkUpdateResponseSummary struct {
	Failed    int64                                            `json:"failed" api:"required"`
	Succeeded int64                                            `json:"succeeded" api:"required"`
	Total     int64                                            `json:"total" api:"required"`
	JSON      prismObjectDocumentBulkUpdateResponseSummaryJSON `json:"-"`
}

func (*PrismObjectDocumentBulkUpdateResponseSummary) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentCountParams added in v0.5.0

type PrismObjectDocumentCountParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the count to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectDocumentCountParams) URLQuery added in v0.5.0

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

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

type PrismObjectDocumentCountResponse added in v0.5.0

type PrismObjectDocumentCountResponse struct {
	// Number of records matching the access scope.
	Total int64                                `json:"total" api:"required"`
	JSON  prismObjectDocumentCountResponseJSON `json:"-"`
}

func (*PrismObjectDocumentCountResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentDeleteParams

type PrismObjectDocumentDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID  param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IfMatch param.Field[string] `header:"If-Match"`
}

type PrismObjectDocumentDuplicateParams

type PrismObjectDocumentDuplicateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectDocumentDuplicateResponse

type PrismObjectDocumentDuplicateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                   `json:"default"`
	List    interface{}                              `json:"list"`
	JSON    prismObjectDocumentDuplicateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDocumentDuplicateResponse) UnmarshalJSON

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

type PrismObjectDocumentFindParams added in v0.5.0

type PrismObjectDocumentFindParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the lookup to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectDocumentFindParams) URLQuery added in v0.5.0

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

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

type PrismObjectDocumentFindResponse added in v0.5.0

type PrismObjectDocumentFindResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}              `json:"default"`
	List    interface{}                         `json:"list"`
	JSON    prismObjectDocumentFindResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDocumentFindResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentGetParams

type PrismObjectDocumentGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
}

func (PrismObjectDocumentGetParams) URLQuery added in v0.5.0

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

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

type PrismObjectDocumentGetResponse added in v0.2.0

type PrismObjectDocumentGetResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}             `json:"default"`
	List    interface{}                        `json:"list"`
	JSON    prismObjectDocumentGetResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDocumentGetResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectDocumentGrantGetParams

type PrismObjectDocumentGrantGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type PrismObjectDocumentGrantGetResponse

type PrismObjectDocumentGrantGetResponse struct {
	TeamGroupID []map[string]PrismObjectDocumentGrantGetResponseTeamGroupID `json:"team_group_id"`
	TeamID      map[string]PrismObjectDocumentGrantGetResponseTeamID        `json:"team_id"`
	UserID      []map[string]PrismObjectDocumentGrantGetResponseUserID      `json:"user_id"`
	JSON        prismObjectDocumentGrantGetResponseJSON                     `json:"-"`
}

func (*PrismObjectDocumentGrantGetResponse) UnmarshalJSON

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

type PrismObjectDocumentGrantGetResponseTeamGroupID

type PrismObjectDocumentGrantGetResponseTeamGroupID string
const (
	PrismObjectDocumentGrantGetResponseTeamGroupIDA PrismObjectDocumentGrantGetResponseTeamGroupID = "a"
	PrismObjectDocumentGrantGetResponseTeamGroupIDR PrismObjectDocumentGrantGetResponseTeamGroupID = "r"
	PrismObjectDocumentGrantGetResponseTeamGroupIDW PrismObjectDocumentGrantGetResponseTeamGroupID = "w"
)

func (PrismObjectDocumentGrantGetResponseTeamGroupID) IsKnown

type PrismObjectDocumentGrantGetResponseTeamID

type PrismObjectDocumentGrantGetResponseTeamID string
const (
	PrismObjectDocumentGrantGetResponseTeamIDA PrismObjectDocumentGrantGetResponseTeamID = "a"
	PrismObjectDocumentGrantGetResponseTeamIDR PrismObjectDocumentGrantGetResponseTeamID = "r"
	PrismObjectDocumentGrantGetResponseTeamIDW PrismObjectDocumentGrantGetResponseTeamID = "w"
)

func (PrismObjectDocumentGrantGetResponseTeamID) IsKnown

type PrismObjectDocumentGrantGetResponseUserID

type PrismObjectDocumentGrantGetResponseUserID string
const (
	PrismObjectDocumentGrantGetResponseUserIDA PrismObjectDocumentGrantGetResponseUserID = "a"
	PrismObjectDocumentGrantGetResponseUserIDR PrismObjectDocumentGrantGetResponseUserID = "r"
	PrismObjectDocumentGrantGetResponseUserIDW PrismObjectDocumentGrantGetResponseUserID = "w"
)

func (PrismObjectDocumentGrantGetResponseUserID) IsKnown

type PrismObjectDocumentGrantService

type PrismObjectDocumentGrantService struct {
	Options []option.RequestOption
}

PrismObjectDocumentGrantService contains methods and other services that help with interacting with the micro 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 NewPrismObjectDocumentGrantService method instead.

func NewPrismObjectDocumentGrantService

func NewPrismObjectDocumentGrantService(opts ...option.RequestOption) (r *PrismObjectDocumentGrantService)

NewPrismObjectDocumentGrantService 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 (*PrismObjectDocumentGrantService) Get

Get grant

func (*PrismObjectDocumentGrantService) Update

Update grant

type PrismObjectDocumentGrantUpdateParams

type PrismObjectDocumentGrantUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	PathTeamID     param.Field[string]                                                       `path:"teamId" api:"required" format:"uuid"`
	TeamGroupID    param.Field[[]map[string]PrismObjectDocumentGrantUpdateParamsTeamGroupID] `json:"team_group_id"`
	BodyTeamID     param.Field[map[string]PrismObjectDocumentGrantUpdateParamsTeamID]        `json:"team_id"`
	UserID         param.Field[[]map[string]PrismObjectDocumentGrantUpdateParamsUserID]      `json:"user_id"`
	IdempotencyKey param.Field[string]                                                       `header:"Idempotency-Key"`
}

func (PrismObjectDocumentGrantUpdateParams) MarshalJSON

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

type PrismObjectDocumentGrantUpdateParamsTeamGroupID

type PrismObjectDocumentGrantUpdateParamsTeamGroupID string
const (
	PrismObjectDocumentGrantUpdateParamsTeamGroupIDA PrismObjectDocumentGrantUpdateParamsTeamGroupID = "a"
	PrismObjectDocumentGrantUpdateParamsTeamGroupIDR PrismObjectDocumentGrantUpdateParamsTeamGroupID = "r"
	PrismObjectDocumentGrantUpdateParamsTeamGroupIDW PrismObjectDocumentGrantUpdateParamsTeamGroupID = "w"
)

func (PrismObjectDocumentGrantUpdateParamsTeamGroupID) IsKnown

type PrismObjectDocumentGrantUpdateParamsTeamID

type PrismObjectDocumentGrantUpdateParamsTeamID string
const (
	PrismObjectDocumentGrantUpdateParamsTeamIDA PrismObjectDocumentGrantUpdateParamsTeamID = "a"
	PrismObjectDocumentGrantUpdateParamsTeamIDR PrismObjectDocumentGrantUpdateParamsTeamID = "r"
	PrismObjectDocumentGrantUpdateParamsTeamIDW PrismObjectDocumentGrantUpdateParamsTeamID = "w"
)

func (PrismObjectDocumentGrantUpdateParamsTeamID) IsKnown

type PrismObjectDocumentGrantUpdateParamsUserID

type PrismObjectDocumentGrantUpdateParamsUserID string
const (
	PrismObjectDocumentGrantUpdateParamsUserIDA PrismObjectDocumentGrantUpdateParamsUserID = "a"
	PrismObjectDocumentGrantUpdateParamsUserIDR PrismObjectDocumentGrantUpdateParamsUserID = "r"
	PrismObjectDocumentGrantUpdateParamsUserIDW PrismObjectDocumentGrantUpdateParamsUserID = "w"
)

func (PrismObjectDocumentGrantUpdateParamsUserID) IsKnown

type PrismObjectDocumentGrantUpdateResponse

type PrismObjectDocumentGrantUpdateResponse struct {
	TeamGroupID []map[string]PrismObjectDocumentGrantUpdateResponseTeamGroupID `json:"team_group_id"`
	TeamID      map[string]PrismObjectDocumentGrantUpdateResponseTeamID        `json:"team_id"`
	UserID      []map[string]PrismObjectDocumentGrantUpdateResponseUserID      `json:"user_id"`
	JSON        prismObjectDocumentGrantUpdateResponseJSON                     `json:"-"`
}

func (*PrismObjectDocumentGrantUpdateResponse) UnmarshalJSON

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

type PrismObjectDocumentGrantUpdateResponseTeamGroupID

type PrismObjectDocumentGrantUpdateResponseTeamGroupID string
const (
	PrismObjectDocumentGrantUpdateResponseTeamGroupIDA PrismObjectDocumentGrantUpdateResponseTeamGroupID = "a"
	PrismObjectDocumentGrantUpdateResponseTeamGroupIDR PrismObjectDocumentGrantUpdateResponseTeamGroupID = "r"
	PrismObjectDocumentGrantUpdateResponseTeamGroupIDW PrismObjectDocumentGrantUpdateResponseTeamGroupID = "w"
)

func (PrismObjectDocumentGrantUpdateResponseTeamGroupID) IsKnown

type PrismObjectDocumentGrantUpdateResponseTeamID

type PrismObjectDocumentGrantUpdateResponseTeamID string
const (
	PrismObjectDocumentGrantUpdateResponseTeamIDA PrismObjectDocumentGrantUpdateResponseTeamID = "a"
	PrismObjectDocumentGrantUpdateResponseTeamIDR PrismObjectDocumentGrantUpdateResponseTeamID = "r"
	PrismObjectDocumentGrantUpdateResponseTeamIDW PrismObjectDocumentGrantUpdateResponseTeamID = "w"
)

func (PrismObjectDocumentGrantUpdateResponseTeamID) IsKnown

type PrismObjectDocumentGrantUpdateResponseUserID

type PrismObjectDocumentGrantUpdateResponseUserID string
const (
	PrismObjectDocumentGrantUpdateResponseUserIDA PrismObjectDocumentGrantUpdateResponseUserID = "a"
	PrismObjectDocumentGrantUpdateResponseUserIDR PrismObjectDocumentGrantUpdateResponseUserID = "r"
	PrismObjectDocumentGrantUpdateResponseUserIDW PrismObjectDocumentGrantUpdateResponseUserID = "w"
)

func (PrismObjectDocumentGrantUpdateResponseUserID) IsKnown

type PrismObjectDocumentListParams added in v0.5.0

type PrismObjectDocumentListParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page.
	Cursor param.Field[string] `query:"cursor"`
	// Include soft-deleted records. Pass the literal string `true`.
	Deleted param.Field[bool] `query:"deleted"`
	// When set to `true`, the response includes a `total` field with the unpaginated
	// row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total.
	IncludeTotal param.Field[bool] `query:"include_total"`
	// Maximum number of rows to return. Capped server-side at 50.
	Limit param.Field[int64] `query:"limit"`
	// Scope properties to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
	// Comma-separated list of slugs. Prefix with `-` for descending. Example:
	// `sort=-updated_at,name`.
	Sort param.Field[string] `query:"sort"`
}

func (PrismObjectDocumentListParams) URLQuery added in v0.5.0

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

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

type PrismObjectDocumentListResponse added in v0.5.0

type PrismObjectDocumentListResponse struct {
	Data []PrismObjectDocumentListResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal — false on the last page, never forces clients to
	// overshoot.
	HasMore    bool   `json:"has_more" api:"required"`
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Populated only when `?include_total=true` was passed.
	Total int64                               `json:"total" api:"nullable"`
	JSON  prismObjectDocumentListResponseJSON `json:"-"`
}

func (*PrismObjectDocumentListResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentListResponseData added in v0.5.0

type PrismObjectDocumentListResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}                  `json:"properties"`
	Source     []string                                `json:"source" api:"nullable"`
	JSON       prismObjectDocumentListResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectDocumentListResponseData) UnmarshalJSON added in v0.5.0

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

type PrismObjectDocumentNewParams

type PrismObjectDocumentNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
}

func (PrismObjectDocumentNewParams) MarshalJSON

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

type PrismObjectDocumentNewResponse added in v0.2.0

type PrismObjectDocumentNewResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}             `json:"default"`
	List    interface{}                        `json:"list"`
	JSON    prismObjectDocumentNewResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDocumentNewResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectDocumentQueryParams

type PrismObjectDocumentQueryParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string]                                `path:"teamId" api:"required" format:"uuid"`
	Query  param.Field[PrismObjectDocumentQueryParamsQuery]   `json:"query" api:"required"`
	ID     param.Field[PrismObjectDocumentQueryParamsIDUnion] `json:"id" format:"uuid"`
	Boxes  param.Field[[]string]                              `json:"boxes"`
	// Alternative location for the opaque cursor (a sibling of `query`). Use whichever
	// feels more natural; if both are present, `query.cursor` wins.
	Cursor  param.Field[string] `json:"cursor"`
	Deleted param.Field[bool]   `json:"deleted"`
	// When true, the response includes a `total` field with the unpaginated row count.
	// Costs an additional pass over the result set — for unfiltered totals prefer
	// `GET /v2/prism/{teamId}/{objectType}/count` instead.
	IncludeTotal param.Field[bool]     `json:"include_total"`
	Sources      param.Field[[]string] `json:"sources" format:"uuid"`
}

func (PrismObjectDocumentQueryParams) MarshalJSON

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

type PrismObjectDocumentQueryParamsIDArray

type PrismObjectDocumentQueryParamsIDArray []string

func (PrismObjectDocumentQueryParamsIDArray) ImplementsPrismObjectDocumentQueryParamsIDUnion

func (r PrismObjectDocumentQueryParamsIDArray) ImplementsPrismObjectDocumentQueryParamsIDUnion()

type PrismObjectDocumentQueryParamsIDUnion

type PrismObjectDocumentQueryParamsIDUnion interface {
	ImplementsPrismObjectDocumentQueryParamsIDUnion()
}

Satisfied by [shared.UnionString], PrismObjectDocumentQueryParamsIDArray.

type PrismObjectDocumentQueryParamsQuery

type PrismObjectDocumentQueryParamsQuery struct {
	// Property slugs to select. Use dot notation for relationships (e.g.
	// attendee.contact.first_name). `id` is always returned at the top level of each
	// row and does not need to be selected.
	Select param.Field[[]string] `json:"select" api:"required"`
	// Logical operator for combining filters
	Combinator param.Field[PrismObjectDocumentQueryParamsQueryCombinator] `json:"combinator"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page. When set, `page` and `limit` are derived from the cursor
	// and any explicit values are ignored.
	Cursor param.Field[string] `json:"cursor"`
	// Filters as [{ slug: { operator: value } }]. For select/multiselect properties,
	// values may be option slugs or option UUIDs.
	Filter param.Field[[]map[string]PrismObjectDocumentQueryParamsQueryFilterUnion] `json:"filter"`
	// Maximum number of rows to return. Capped server-side at 50; requests above the
	// cap are rejected.
	Limit  param.Field[int64]  `json:"limit"`
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Page number (1-based). Prefer `cursor`. Page-number pagination drifts under
	// concurrent writes; use it only for one-shot exports.
	//
	// Deprecated: deprecated
	Page param.Field[int64] `json:"page"`
	// Sort order as [{ slug: direction }]. Array order determines sort priority
	Sort param.Field[[]map[string]PrismObjectDocumentQueryParamsQuerySort] `json:"sort"`
}

func (PrismObjectDocumentQueryParamsQuery) MarshalJSON

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

type PrismObjectDocumentQueryParamsQueryCombinator

type PrismObjectDocumentQueryParamsQueryCombinator string

Logical operator for combining filters

const (
	PrismObjectDocumentQueryParamsQueryCombinatorAnd PrismObjectDocumentQueryParamsQueryCombinator = "AND"
	PrismObjectDocumentQueryParamsQueryCombinatorOr  PrismObjectDocumentQueryParamsQueryCombinator = "OR"
)

func (PrismObjectDocumentQueryParamsQueryCombinator) IsKnown

type PrismObjectDocumentQueryParamsQueryFilter added in v0.3.0

type PrismObjectDocumentQueryParamsQueryFilter struct {
	NotEquals       param.Field[interface{}] `json:"!="`
	Less            param.Field[string]      `json:"<"`
	LessOrEquals    param.Field[string]      `json:"<="`
	Equals          param.Field[interface{}] `json:"="`
	Greater         param.Field[string]      `json:">"`
	GreaterOrEquals param.Field[string]      `json:">="`
	BeginsWith      param.Field[string]      `json:"begins_with"`
	Between         param.Field[interface{}] `json:"between"`
	Contains        param.Field[interface{}] `json:"contains"`
	EndsWith        param.Field[string]      `json:"ends_with"`
	Exists          param.Field[bool]        `json:"exists"`
	In              param.Field[interface{}] `json:"in"`
	IsNotNull       param.Field[interface{}] `json:"is_not_null"`
	IsNull          param.Field[interface{}] `json:"is_null"`
	NotContains     param.Field[string]      `json:"not_contains"`
	NotExists       param.Field[bool]        `json:"not_exists"`
	NotIn           param.Field[interface{}] `json:"not_in"`
}

func (PrismObjectDocumentQueryParamsQueryFilter) MarshalJSON added in v0.3.0

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

type PrismObjectDocumentQueryParamsQueryFilterBeginsWith added in v0.3.0

type PrismObjectDocumentQueryParamsQueryFilterBeginsWith struct {
	BeginsWith param.Field[string] `json:"begins_with" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterBeginsWith) MarshalJSON added in v0.3.0

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

type PrismObjectDocumentQueryParamsQueryFilterBetween added in v0.5.0

type PrismObjectDocumentQueryParamsQueryFilterBetween struct {
	Between param.Field[PrismObjectDocumentQueryParamsQueryFilterBetweenBetweenUnion] `json:"between" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterBetween) MarshalJSON added in v0.5.0

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

type PrismObjectDocumentQueryParamsQueryFilterBetweenBetweenArray added in v0.5.0

type PrismObjectDocumentQueryParamsQueryFilterBetweenBetweenArray []string

func (PrismObjectDocumentQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectDocumentQueryParamsQueryFilterBetweenBetweenUnion added in v0.5.0

func (r PrismObjectDocumentQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectDocumentQueryParamsQueryFilterBetweenBetweenUnion()

type PrismObjectDocumentQueryParamsQueryFilterBetweenBetweenUnion added in v0.5.0

type PrismObjectDocumentQueryParamsQueryFilterBetweenBetweenUnion interface {
	ImplementsPrismObjectDocumentQueryParamsQueryFilterBetweenBetweenUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectDocumentQueryParamsQueryFilterBetweenBetweenArray.

type PrismObjectDocumentQueryParamsQueryFilterContains added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterContains struct {
	Contains param.Field[PrismObjectDocumentQueryParamsQueryFilterContainsContainsUnion] `json:"contains" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterContains) MarshalJSON added in v0.4.0

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

type PrismObjectDocumentQueryParamsQueryFilterContainsContainsArray added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterContainsContainsArray []string

func (PrismObjectDocumentQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectDocumentQueryParamsQueryFilterContainsContainsUnion added in v0.4.0

func (r PrismObjectDocumentQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectDocumentQueryParamsQueryFilterContainsContainsUnion()

type PrismObjectDocumentQueryParamsQueryFilterContainsContainsUnion added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterContainsContainsUnion interface {
	ImplementsPrismObjectDocumentQueryParamsQueryFilterContainsContainsUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectDocumentQueryParamsQueryFilterContainsContainsArray.

type PrismObjectDocumentQueryParamsQueryFilterEndsWith added in v0.3.0

type PrismObjectDocumentQueryParamsQueryFilterEndsWith struct {
	EndsWith param.Field[string] `json:"ends_with" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterEndsWith) MarshalJSON added in v0.3.0

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

type PrismObjectDocumentQueryParamsQueryFilterExists added in v0.3.0

type PrismObjectDocumentQueryParamsQueryFilterExists struct {
	Exists param.Field[bool] `json:"exists" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterExists) MarshalJSON added in v0.3.0

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

type PrismObjectDocumentQueryParamsQueryFilterIn added in v0.3.0

type PrismObjectDocumentQueryParamsQueryFilterIn struct {
	In param.Field[[]string] `json:"in" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterIn) MarshalJSON added in v0.3.0

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

type PrismObjectDocumentQueryParamsQueryFilterIsNotNull added in v0.5.0

type PrismObjectDocumentQueryParamsQueryFilterIsNotNull struct {
	IsNotNull param.Field[PrismObjectDocumentQueryParamsQueryFilterIsNotNullIsNotNullUnion] `json:"is_not_null" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterIsNotNull) MarshalJSON added in v0.5.0

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

type PrismObjectDocumentQueryParamsQueryFilterIsNotNullIsNotNullArray added in v0.5.0

type PrismObjectDocumentQueryParamsQueryFilterIsNotNullIsNotNullArray []string

func (PrismObjectDocumentQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectDocumentQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.5.0

func (r PrismObjectDocumentQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectDocumentQueryParamsQueryFilterIsNotNullIsNotNullUnion()

type PrismObjectDocumentQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.5.0

type PrismObjectDocumentQueryParamsQueryFilterIsNotNullIsNotNullUnion interface {
	ImplementsPrismObjectDocumentQueryParamsQueryFilterIsNotNullIsNotNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectDocumentQueryParamsQueryFilterIsNotNullIsNotNullArray.

type PrismObjectDocumentQueryParamsQueryFilterIsNull added in v0.5.0

type PrismObjectDocumentQueryParamsQueryFilterIsNull struct {
	IsNull param.Field[PrismObjectDocumentQueryParamsQueryFilterIsNullIsNullUnion] `json:"is_null" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterIsNull) MarshalJSON added in v0.5.0

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

type PrismObjectDocumentQueryParamsQueryFilterIsNullIsNullArray added in v0.5.0

type PrismObjectDocumentQueryParamsQueryFilterIsNullIsNullArray []string

func (PrismObjectDocumentQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectDocumentQueryParamsQueryFilterIsNullIsNullUnion added in v0.5.0

func (r PrismObjectDocumentQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectDocumentQueryParamsQueryFilterIsNullIsNullUnion()

type PrismObjectDocumentQueryParamsQueryFilterIsNullIsNullUnion added in v0.5.0

type PrismObjectDocumentQueryParamsQueryFilterIsNullIsNullUnion interface {
	ImplementsPrismObjectDocumentQueryParamsQueryFilterIsNullIsNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectDocumentQueryParamsQueryFilterIsNullIsNullArray.

type PrismObjectDocumentQueryParamsQueryFilterNotContains added in v0.3.0

type PrismObjectDocumentQueryParamsQueryFilterNotContains struct {
	NotContains param.Field[string] `json:"not_contains" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterNotContains) MarshalJSON added in v0.3.0

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

type PrismObjectDocumentQueryParamsQueryFilterNotExists added in v0.3.0

type PrismObjectDocumentQueryParamsQueryFilterNotExists struct {
	NotExists param.Field[bool] `json:"not_exists" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterNotExists) MarshalJSON added in v0.3.0

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

type PrismObjectDocumentQueryParamsQueryFilterNotIn added in v0.3.0

type PrismObjectDocumentQueryParamsQueryFilterNotIn struct {
	NotIn param.Field[[]string] `json:"not_in" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterNotIn) MarshalJSON added in v0.3.0

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

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterEq added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterEq struct {
	Equals param.Field[PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterEqUnion] `json:"=" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterEq) MarshalJSON added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterEqUnion added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterEqUnion interface {
	ImplementsPrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterEqUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterGt added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterGt struct {
	Greater param.Field[string] `json:">" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterGt) MarshalJSON added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterGte added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterGte struct {
	GreaterOrEquals param.Field[string] `json:">=" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterGte) MarshalJSON added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterLt added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterLt struct {
	Less param.Field[string] `json:"<" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterLt) MarshalJSON added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterLte added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterLte struct {
	LessOrEquals param.Field[string] `json:"<=" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterLte) MarshalJSON added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterNe added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterNe struct {
	NotEquals param.Field[PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterNeUnion] `json:"!=" api:"required"`
}

func (PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterNe) MarshalJSON added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterNeUnion added in v0.4.0

type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterNeUnion interface {
	ImplementsPrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterNeUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectDocumentQueryParamsQuerySort

type PrismObjectDocumentQueryParamsQuerySort string
const (
	PrismObjectDocumentQueryParamsQuerySortAsc  PrismObjectDocumentQueryParamsQuerySort = "asc"
	PrismObjectDocumentQueryParamsQuerySortDesc PrismObjectDocumentQueryParamsQuerySort = "desc"
)

func (PrismObjectDocumentQueryParamsQuerySort) IsKnown

type PrismObjectDocumentQueryResponse

type PrismObjectDocumentQueryResponse struct {
	Data []PrismObjectDocumentQueryResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal. False when this page contains the last record; true
	// only when at least one more record exists. (Implementation note: the server
	// fetches one extra row internally to determine this — clients never need to
	// overshoot to discover the end.)
	HasMore bool `json:"has_more" api:"required"`
	// Opaque cursor pointing at the next page. Pass it back unchanged in the request
	// body (`cursor`) of the next call. Null when `has_more` is false.
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Only populated when the request set `include_total: true`. Total number of
	// records matching the query, ignoring pagination. Opt-in because it costs an
	// additional pass over the result set.
	Total int64                                `json:"total" api:"nullable"`
	JSON  prismObjectDocumentQueryResponseJSON `json:"-"`
}

func (*PrismObjectDocumentQueryResponse) UnmarshalJSON

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

type PrismObjectDocumentQueryResponseData added in v0.2.0

type PrismObjectDocumentQueryResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}                   `json:"properties"`
	Source     []string                                 `json:"source" api:"nullable"`
	JSON       prismObjectDocumentQueryResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectDocumentQueryResponseData) UnmarshalJSON added in v0.2.0

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

type PrismObjectDocumentRestoreParams

type PrismObjectDocumentRestoreParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectDocumentRestoreResponse added in v0.2.0

type PrismObjectDocumentRestoreResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                 `json:"default"`
	List    interface{}                            `json:"list"`
	JSON    prismObjectDocumentRestoreResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDocumentRestoreResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectDocumentService

type PrismObjectDocumentService struct {
	Options []option.RequestOption
	Grant   *PrismObjectDocumentGrantService
}

PrismObjectDocumentService contains methods and other services that help with interacting with the micro 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 NewPrismObjectDocumentService method instead.

func NewPrismObjectDocumentService

func NewPrismObjectDocumentService(opts ...option.RequestOption) (r *PrismObjectDocumentService)

NewPrismObjectDocumentService 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 (*PrismObjectDocumentService) BulkDelete added in v0.5.0

Soft-delete up to 100 records in a single call. Same partial-success contract as batch/update.

func (*PrismObjectDocumentService) BulkNew

Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final `ImportJob`; large batches start an async job, return 202 with `status: processing` and a `Location` header, and can be polled via `GET /v2/prism/{teamId}/imports/{jobId}`.

func (*PrismObjectDocumentService) BulkUpdate added in v0.5.0

Patch up to 100 records in a single call. Each item is attempted independently — failures don't abort the batch. Inspect `results[].status` per item.

func (*PrismObjectDocumentService) Count added in v0.5.0

Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body.

func (*PrismObjectDocumentService) Delete

Delete object

func (*PrismObjectDocumentService) Duplicate

Duplicate object

func (*PrismObjectDocumentService) Find added in v0.5.0

Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches.

func (*PrismObjectDocumentService) Get

Get object

func (*PrismObjectDocumentService) List added in v0.5.0

Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality.

func (*PrismObjectDocumentService) New

Create object

func (*PrismObjectDocumentService) Query

Query

func (*PrismObjectDocumentService) Restore

Restore object

func (*PrismObjectDocumentService) Update

Patch object

func (*PrismObjectDocumentService) Upsert added in v0.5.0

Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead.

type PrismObjectDocumentUpdateParams

type PrismObjectDocumentUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
	IfMatch               param.Field[string]        `header:"If-Match"`
}

func (PrismObjectDocumentUpdateParams) MarshalJSON

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

type PrismObjectDocumentUpdateResponse added in v0.2.0

type PrismObjectDocumentUpdateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                `json:"default"`
	List    interface{}                           `json:"list"`
	JSON    prismObjectDocumentUpdateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDocumentUpdateResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectDocumentUpsertParams added in v0.5.0

type PrismObjectDocumentUpsertParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	// Scope the upsert to a specific list/app. Required to match or write list-scoped
	// properties, including `app_stage`.
	ListID         param.Field[string] `query:"list_id" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

func (PrismObjectDocumentUpsertParams) MarshalJSON added in v0.5.0

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

func (PrismObjectDocumentUpsertParams) URLQuery added in v0.9.0

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

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

type PrismObjectDocumentUpsertResponse added in v0.5.0

type PrismObjectDocumentUpsertResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                `json:"default"`
	List    interface{}                           `json:"list"`
	JSON    prismObjectDocumentUpsertResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectDocumentUpsertResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectEngagementBulkDeleteParams added in v0.7.0

type PrismObjectEngagementBulkDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]   `path:"teamId" api:"required" format:"uuid"`
	IDs            param.Field[[]string] `json:"ids" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string]   `header:"Idempotency-Key"`
}

func (PrismObjectEngagementBulkDeleteParams) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkDeleteResponse added in v0.7.0

type PrismObjectEngagementBulkDeleteResponse struct {
	Results []PrismObjectEngagementBulkDeleteResponseResult `json:"results" api:"required"`
	Summary PrismObjectEngagementBulkDeleteResponseSummary  `json:"summary" api:"required"`
	JSON    prismObjectEngagementBulkDeleteResponseJSON     `json:"-"`
}

Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed.

func (*PrismObjectEngagementBulkDeleteResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkDeleteResponseResult added in v0.7.0

type PrismObjectEngagementBulkDeleteResponseResult struct {
	// Item ID, or null if the input was unparseable.
	ID     string                                               `json:"id" api:"required,nullable"`
	Status PrismObjectEngagementBulkDeleteResponseResultsStatus `json:"status" api:"required"`
	Error  PrismObjectEngagementBulkDeleteResponseResultsError  `json:"error"`
	// Object returned by reads (get/create/patch/restore). id is always present.
	Record PrismObjectEngagementBulkDeleteResponseResultsRecord `json:"record"`
	JSON   prismObjectEngagementBulkDeleteResponseResultJSON    `json:"-"`
}

func (*PrismObjectEngagementBulkDeleteResponseResult) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkDeleteResponseResultsError added in v0.7.0

type PrismObjectEngagementBulkDeleteResponseResultsError struct {
	Code    string                                                  `json:"code"`
	Message string                                                  `json:"message"`
	JSON    prismObjectEngagementBulkDeleteResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectEngagementBulkDeleteResponseResultsError) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkDeleteResponseResultsRecord added in v0.7.0

type PrismObjectEngagementBulkDeleteResponseResultsRecord struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                                   `json:"default"`
	List    interface{}                                              `json:"list"`
	JSON    prismObjectEngagementBulkDeleteResponseResultsRecordJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEngagementBulkDeleteResponseResultsRecord) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkDeleteResponseResultsStatus added in v0.7.0

type PrismObjectEngagementBulkDeleteResponseResultsStatus string
const (
	PrismObjectEngagementBulkDeleteResponseResultsStatusOk    PrismObjectEngagementBulkDeleteResponseResultsStatus = "ok"
	PrismObjectEngagementBulkDeleteResponseResultsStatusError PrismObjectEngagementBulkDeleteResponseResultsStatus = "error"
)

func (PrismObjectEngagementBulkDeleteResponseResultsStatus) IsKnown added in v0.7.0

type PrismObjectEngagementBulkDeleteResponseSummary added in v0.7.0

type PrismObjectEngagementBulkDeleteResponseSummary struct {
	Failed    int64                                              `json:"failed" api:"required"`
	Succeeded int64                                              `json:"succeeded" api:"required"`
	Total     int64                                              `json:"total" api:"required"`
	JSON      prismObjectEngagementBulkDeleteResponseSummaryJSON `json:"-"`
}

func (*PrismObjectEngagementBulkDeleteResponseSummary) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkNewParams added in v0.7.0

type PrismObjectEngagementBulkNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Array of objects to import with property values keyed by slug
	Objects        param.Field[[]PrismObjectPropertiesParam]              `json:"objects" api:"required"`
	Options        param.Field[PrismObjectEngagementBulkNewParamsOptions] `json:"options"`
	IdempotencyKey param.Field[string]                                    `header:"Idempotency-Key"`
}

func (PrismObjectEngagementBulkNewParams) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkNewParamsOptions added in v0.7.0

type PrismObjectEngagementBulkNewParamsOptions struct {
	// Whether deduplication should be case insensitive
	CaseInsensitive param.Field[bool] `json:"caseInsensitive"`
	// When true, unknown values for select/multiselect properties are created as new
	// options instead of failing the import
	CreateMissingOptions param.Field[bool] `json:"create_missing_options"`
	// Deprecated alias for list_id.
	//
	// Deprecated: deprecated
	CRMID param.Field[string] `json:"crm_id" format:"uuid"`
	// Property slug to deduplicate on. A single-element array is also accepted;
	// compound (multi-slug) dedupe is not supported yet and is rejected with guidance.
	DedupeBy param.Field[PrismObjectEngagementBulkNewParamsOptionsDedupeByUnion] `json:"dedupe_by"`
	// App/CRM ID for context (optional)
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Require app_stage for every row in the selected list. app_stage is a reserved
	// list-scoped alias for native status.
	RequireListStage param.Field[bool] `json:"require_list_stage"`
	// Patch a deduplicated record with the supplied properties instead of skipping it.
	UpdateExisting param.Field[bool] `json:"update_existing"`
}

func (PrismObjectEngagementBulkNewParamsOptions) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkNewParamsOptionsDedupeByArray added in v0.9.0

type PrismObjectEngagementBulkNewParamsOptionsDedupeByArray []string

func (PrismObjectEngagementBulkNewParamsOptionsDedupeByArray) ImplementsPrismObjectEngagementBulkNewParamsOptionsDedupeByUnion added in v0.9.0

func (r PrismObjectEngagementBulkNewParamsOptionsDedupeByArray) ImplementsPrismObjectEngagementBulkNewParamsOptionsDedupeByUnion()

type PrismObjectEngagementBulkNewParamsOptionsDedupeByUnion added in v0.9.0

type PrismObjectEngagementBulkNewParamsOptionsDedupeByUnion interface {
	ImplementsPrismObjectEngagementBulkNewParamsOptionsDedupeByUnion()
}

Property slug to deduplicate on. A single-element array is also accepted; compound (multi-slug) dedupe is not supported yet and is rejected with guidance.

Satisfied by [shared.UnionString], PrismObjectEngagementBulkNewParamsOptionsDedupeByArray.

type PrismObjectEngagementBulkNewResponse added in v0.7.0

type PrismObjectEngagementBulkNewResponse struct {
	// Null for sync imports (results inlined). Set for async imports.
	JobID  string                                     `json:"job_id" api:"required,nullable"`
	Status PrismObjectEngagementBulkNewResponseStatus `json:"status" api:"required"`
	// Total number of rows in the import.
	Total     int64     `json:"total" api:"required"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Set when status=failed; describes the job-level failure (not per-row).
	Error     PrismObjectEngagementBulkNewResponseError `json:"error"`
	ExpiresAt time.Time                                 `json:"expires_at" format:"date-time"`
	Failed    int64                                     `json:"failed"`
	// Rows that have been attempted (succeeded + failed).
	Processed int64 `json:"processed"`
	// Per-row outcomes. Always present for sync imports; populated for async imports
	// once the job reaches `complete`.
	Results   []PrismObjectEngagementBulkNewResponseResult `json:"results"`
	Succeeded int64                                        `json:"succeeded"`
	UpdatedAt time.Time                                    `json:"updated_at" format:"date-time"`
	JSON      prismObjectEngagementBulkNewResponseJSON     `json:"-"`
}

Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}.

func (*PrismObjectEngagementBulkNewResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkNewResponseError added in v0.7.0

type PrismObjectEngagementBulkNewResponseError struct {
	Code    string                                        `json:"code"`
	Message string                                        `json:"message"`
	JSON    prismObjectEngagementBulkNewResponseErrorJSON `json:"-"`
}

Set when status=failed; describes the job-level failure (not per-row).

func (*PrismObjectEngagementBulkNewResponseError) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkNewResponseResult added in v0.7.0

type PrismObjectEngagementBulkNewResponseResult struct {
	ID      string                                           `json:"id" api:"nullable" format:"uuid"`
	Created bool                                             `json:"created"`
	Error   PrismObjectEngagementBulkNewResponseResultsError `json:"error"`
	// True if the row matched an existing record via the dedupe key.
	Existing bool `json:"existing"`
	// Zero-based position of this row in the request.
	InputIndex int64 `json:"input_index"`
	// True if a matching record was updated.
	Updated bool                                           `json:"updated"`
	JSON    prismObjectEngagementBulkNewResponseResultJSON `json:"-"`
}

func (*PrismObjectEngagementBulkNewResponseResult) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkNewResponseResultsError added in v0.7.0

type PrismObjectEngagementBulkNewResponseResultsError struct {
	Code    string                                               `json:"code"`
	Message string                                               `json:"message"`
	JSON    prismObjectEngagementBulkNewResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectEngagementBulkNewResponseResultsError) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkNewResponseStatus added in v0.7.0

type PrismObjectEngagementBulkNewResponseStatus string
const (
	PrismObjectEngagementBulkNewResponseStatusComplete   PrismObjectEngagementBulkNewResponseStatus = "complete"
	PrismObjectEngagementBulkNewResponseStatusProcessing PrismObjectEngagementBulkNewResponseStatus = "processing"
	PrismObjectEngagementBulkNewResponseStatusFailed     PrismObjectEngagementBulkNewResponseStatus = "failed"
)

func (PrismObjectEngagementBulkNewResponseStatus) IsKnown added in v0.7.0

type PrismObjectEngagementBulkUpdateParams added in v0.7.0

type PrismObjectEngagementBulkUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]                                      `path:"teamId" api:"required" format:"uuid"`
	Items          param.Field[[]PrismObjectEngagementBulkUpdateParamsItem] `json:"items" api:"required"`
	IdempotencyKey param.Field[string]                                      `header:"Idempotency-Key"`
}

func (PrismObjectEngagementBulkUpdateParams) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkUpdateParamsItem added in v0.7.0

type PrismObjectEngagementBulkUpdateParamsItem struct {
	ID          param.Field[string]    `json:"id" api:"required" format:"uuid"`
	ExtraFields map[string]interface{} `json:"-,extras"`
}

Object with `id` plus the same property body shape as PATCH (`default`/`list`/`extended`).

func (PrismObjectEngagementBulkUpdateParamsItem) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkUpdateResponse added in v0.7.0

type PrismObjectEngagementBulkUpdateResponse struct {
	Results []PrismObjectEngagementBulkUpdateResponseResult `json:"results" api:"required"`
	Summary PrismObjectEngagementBulkUpdateResponseSummary  `json:"summary" api:"required"`
	JSON    prismObjectEngagementBulkUpdateResponseJSON     `json:"-"`
}

Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed.

func (*PrismObjectEngagementBulkUpdateResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkUpdateResponseResult added in v0.7.0

type PrismObjectEngagementBulkUpdateResponseResult struct {
	// Item ID, or null if the input was unparseable.
	ID     string                                               `json:"id" api:"required,nullable"`
	Status PrismObjectEngagementBulkUpdateResponseResultsStatus `json:"status" api:"required"`
	Error  PrismObjectEngagementBulkUpdateResponseResultsError  `json:"error"`
	// Object returned by reads (get/create/patch/restore). id is always present.
	Record PrismObjectEngagementBulkUpdateResponseResultsRecord `json:"record"`
	JSON   prismObjectEngagementBulkUpdateResponseResultJSON    `json:"-"`
}

func (*PrismObjectEngagementBulkUpdateResponseResult) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkUpdateResponseResultsError added in v0.7.0

type PrismObjectEngagementBulkUpdateResponseResultsError struct {
	Code    string                                                  `json:"code"`
	Message string                                                  `json:"message"`
	JSON    prismObjectEngagementBulkUpdateResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectEngagementBulkUpdateResponseResultsError) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkUpdateResponseResultsRecord added in v0.7.0

type PrismObjectEngagementBulkUpdateResponseResultsRecord struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                                   `json:"default"`
	List    interface{}                                              `json:"list"`
	JSON    prismObjectEngagementBulkUpdateResponseResultsRecordJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEngagementBulkUpdateResponseResultsRecord) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementBulkUpdateResponseResultsStatus added in v0.7.0

type PrismObjectEngagementBulkUpdateResponseResultsStatus string
const (
	PrismObjectEngagementBulkUpdateResponseResultsStatusOk    PrismObjectEngagementBulkUpdateResponseResultsStatus = "ok"
	PrismObjectEngagementBulkUpdateResponseResultsStatusError PrismObjectEngagementBulkUpdateResponseResultsStatus = "error"
)

func (PrismObjectEngagementBulkUpdateResponseResultsStatus) IsKnown added in v0.7.0

type PrismObjectEngagementBulkUpdateResponseSummary added in v0.7.0

type PrismObjectEngagementBulkUpdateResponseSummary struct {
	Failed    int64                                              `json:"failed" api:"required"`
	Succeeded int64                                              `json:"succeeded" api:"required"`
	Total     int64                                              `json:"total" api:"required"`
	JSON      prismObjectEngagementBulkUpdateResponseSummaryJSON `json:"-"`
}

func (*PrismObjectEngagementBulkUpdateResponseSummary) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementCountParams added in v0.7.0

type PrismObjectEngagementCountParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the count to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectEngagementCountParams) URLQuery added in v0.7.0

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

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

type PrismObjectEngagementCountResponse added in v0.7.0

type PrismObjectEngagementCountResponse struct {
	// Number of records matching the access scope.
	Total int64                                  `json:"total" api:"required"`
	JSON  prismObjectEngagementCountResponseJSON `json:"-"`
}

func (*PrismObjectEngagementCountResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementDeleteParams added in v0.7.0

type PrismObjectEngagementDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID  param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IfMatch param.Field[string] `header:"If-Match"`
}

type PrismObjectEngagementDuplicateParams added in v0.7.0

type PrismObjectEngagementDuplicateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectEngagementDuplicateResponse added in v0.7.0

type PrismObjectEngagementDuplicateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                     `json:"default"`
	List    interface{}                                `json:"list"`
	JSON    prismObjectEngagementDuplicateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEngagementDuplicateResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementFindParams added in v0.7.0

type PrismObjectEngagementFindParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the lookup to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectEngagementFindParams) URLQuery added in v0.7.0

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

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

type PrismObjectEngagementFindResponse added in v0.7.0

type PrismObjectEngagementFindResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                `json:"default"`
	List    interface{}                           `json:"list"`
	JSON    prismObjectEngagementFindResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEngagementFindResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementGetParams added in v0.7.0

type PrismObjectEngagementGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
}

func (PrismObjectEngagementGetParams) URLQuery added in v0.7.0

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

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

type PrismObjectEngagementGetResponse added in v0.7.0

type PrismObjectEngagementGetResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}               `json:"default"`
	List    interface{}                          `json:"list"`
	JSON    prismObjectEngagementGetResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEngagementGetResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementGrantGetParams added in v0.7.0

type PrismObjectEngagementGrantGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type PrismObjectEngagementGrantGetResponse added in v0.7.0

type PrismObjectEngagementGrantGetResponse struct {
	TeamGroupID []map[string]PrismObjectEngagementGrantGetResponseTeamGroupID `json:"team_group_id"`
	TeamID      map[string]PrismObjectEngagementGrantGetResponseTeamID        `json:"team_id"`
	UserID      []map[string]PrismObjectEngagementGrantGetResponseUserID      `json:"user_id"`
	JSON        prismObjectEngagementGrantGetResponseJSON                     `json:"-"`
}

func (*PrismObjectEngagementGrantGetResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementGrantGetResponseTeamGroupID added in v0.7.0

type PrismObjectEngagementGrantGetResponseTeamGroupID string
const (
	PrismObjectEngagementGrantGetResponseTeamGroupIDA PrismObjectEngagementGrantGetResponseTeamGroupID = "a"
	PrismObjectEngagementGrantGetResponseTeamGroupIDR PrismObjectEngagementGrantGetResponseTeamGroupID = "r"
	PrismObjectEngagementGrantGetResponseTeamGroupIDW PrismObjectEngagementGrantGetResponseTeamGroupID = "w"
)

func (PrismObjectEngagementGrantGetResponseTeamGroupID) IsKnown added in v0.7.0

type PrismObjectEngagementGrantGetResponseTeamID added in v0.7.0

type PrismObjectEngagementGrantGetResponseTeamID string
const (
	PrismObjectEngagementGrantGetResponseTeamIDA PrismObjectEngagementGrantGetResponseTeamID = "a"
	PrismObjectEngagementGrantGetResponseTeamIDR PrismObjectEngagementGrantGetResponseTeamID = "r"
	PrismObjectEngagementGrantGetResponseTeamIDW PrismObjectEngagementGrantGetResponseTeamID = "w"
)

func (PrismObjectEngagementGrantGetResponseTeamID) IsKnown added in v0.7.0

type PrismObjectEngagementGrantGetResponseUserID added in v0.7.0

type PrismObjectEngagementGrantGetResponseUserID string
const (
	PrismObjectEngagementGrantGetResponseUserIDA PrismObjectEngagementGrantGetResponseUserID = "a"
	PrismObjectEngagementGrantGetResponseUserIDR PrismObjectEngagementGrantGetResponseUserID = "r"
	PrismObjectEngagementGrantGetResponseUserIDW PrismObjectEngagementGrantGetResponseUserID = "w"
)

func (PrismObjectEngagementGrantGetResponseUserID) IsKnown added in v0.7.0

type PrismObjectEngagementGrantService added in v0.7.0

type PrismObjectEngagementGrantService struct {
	Options []option.RequestOption
}

PrismObjectEngagementGrantService contains methods and other services that help with interacting with the micro 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 NewPrismObjectEngagementGrantService method instead.

func NewPrismObjectEngagementGrantService added in v0.7.0

func NewPrismObjectEngagementGrantService(opts ...option.RequestOption) (r *PrismObjectEngagementGrantService)

NewPrismObjectEngagementGrantService 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 (*PrismObjectEngagementGrantService) Get added in v0.7.0

Get grant

func (*PrismObjectEngagementGrantService) Update added in v0.7.0

Update grant

type PrismObjectEngagementGrantUpdateParams added in v0.7.0

type PrismObjectEngagementGrantUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	PathTeamID     param.Field[string]                                                         `path:"teamId" api:"required" format:"uuid"`
	TeamGroupID    param.Field[[]map[string]PrismObjectEngagementGrantUpdateParamsTeamGroupID] `json:"team_group_id"`
	BodyTeamID     param.Field[map[string]PrismObjectEngagementGrantUpdateParamsTeamID]        `json:"team_id"`
	UserID         param.Field[[]map[string]PrismObjectEngagementGrantUpdateParamsUserID]      `json:"user_id"`
	IdempotencyKey param.Field[string]                                                         `header:"Idempotency-Key"`
}

func (PrismObjectEngagementGrantUpdateParams) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementGrantUpdateParamsTeamGroupID added in v0.7.0

type PrismObjectEngagementGrantUpdateParamsTeamGroupID string
const (
	PrismObjectEngagementGrantUpdateParamsTeamGroupIDA PrismObjectEngagementGrantUpdateParamsTeamGroupID = "a"
	PrismObjectEngagementGrantUpdateParamsTeamGroupIDR PrismObjectEngagementGrantUpdateParamsTeamGroupID = "r"
	PrismObjectEngagementGrantUpdateParamsTeamGroupIDW PrismObjectEngagementGrantUpdateParamsTeamGroupID = "w"
)

func (PrismObjectEngagementGrantUpdateParamsTeamGroupID) IsKnown added in v0.7.0

type PrismObjectEngagementGrantUpdateParamsTeamID added in v0.7.0

type PrismObjectEngagementGrantUpdateParamsTeamID string
const (
	PrismObjectEngagementGrantUpdateParamsTeamIDA PrismObjectEngagementGrantUpdateParamsTeamID = "a"
	PrismObjectEngagementGrantUpdateParamsTeamIDR PrismObjectEngagementGrantUpdateParamsTeamID = "r"
	PrismObjectEngagementGrantUpdateParamsTeamIDW PrismObjectEngagementGrantUpdateParamsTeamID = "w"
)

func (PrismObjectEngagementGrantUpdateParamsTeamID) IsKnown added in v0.7.0

type PrismObjectEngagementGrantUpdateParamsUserID added in v0.7.0

type PrismObjectEngagementGrantUpdateParamsUserID string
const (
	PrismObjectEngagementGrantUpdateParamsUserIDA PrismObjectEngagementGrantUpdateParamsUserID = "a"
	PrismObjectEngagementGrantUpdateParamsUserIDR PrismObjectEngagementGrantUpdateParamsUserID = "r"
	PrismObjectEngagementGrantUpdateParamsUserIDW PrismObjectEngagementGrantUpdateParamsUserID = "w"
)

func (PrismObjectEngagementGrantUpdateParamsUserID) IsKnown added in v0.7.0

type PrismObjectEngagementGrantUpdateResponse added in v0.7.0

type PrismObjectEngagementGrantUpdateResponse struct {
	TeamGroupID []map[string]PrismObjectEngagementGrantUpdateResponseTeamGroupID `json:"team_group_id"`
	TeamID      map[string]PrismObjectEngagementGrantUpdateResponseTeamID        `json:"team_id"`
	UserID      []map[string]PrismObjectEngagementGrantUpdateResponseUserID      `json:"user_id"`
	JSON        prismObjectEngagementGrantUpdateResponseJSON                     `json:"-"`
}

func (*PrismObjectEngagementGrantUpdateResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementGrantUpdateResponseTeamGroupID added in v0.7.0

type PrismObjectEngagementGrantUpdateResponseTeamGroupID string
const (
	PrismObjectEngagementGrantUpdateResponseTeamGroupIDA PrismObjectEngagementGrantUpdateResponseTeamGroupID = "a"
	PrismObjectEngagementGrantUpdateResponseTeamGroupIDR PrismObjectEngagementGrantUpdateResponseTeamGroupID = "r"
	PrismObjectEngagementGrantUpdateResponseTeamGroupIDW PrismObjectEngagementGrantUpdateResponseTeamGroupID = "w"
)

func (PrismObjectEngagementGrantUpdateResponseTeamGroupID) IsKnown added in v0.7.0

type PrismObjectEngagementGrantUpdateResponseTeamID added in v0.7.0

type PrismObjectEngagementGrantUpdateResponseTeamID string
const (
	PrismObjectEngagementGrantUpdateResponseTeamIDA PrismObjectEngagementGrantUpdateResponseTeamID = "a"
	PrismObjectEngagementGrantUpdateResponseTeamIDR PrismObjectEngagementGrantUpdateResponseTeamID = "r"
	PrismObjectEngagementGrantUpdateResponseTeamIDW PrismObjectEngagementGrantUpdateResponseTeamID = "w"
)

func (PrismObjectEngagementGrantUpdateResponseTeamID) IsKnown added in v0.7.0

type PrismObjectEngagementGrantUpdateResponseUserID added in v0.7.0

type PrismObjectEngagementGrantUpdateResponseUserID string
const (
	PrismObjectEngagementGrantUpdateResponseUserIDA PrismObjectEngagementGrantUpdateResponseUserID = "a"
	PrismObjectEngagementGrantUpdateResponseUserIDR PrismObjectEngagementGrantUpdateResponseUserID = "r"
	PrismObjectEngagementGrantUpdateResponseUserIDW PrismObjectEngagementGrantUpdateResponseUserID = "w"
)

func (PrismObjectEngagementGrantUpdateResponseUserID) IsKnown added in v0.7.0

type PrismObjectEngagementListParams added in v0.7.0

type PrismObjectEngagementListParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page.
	Cursor param.Field[string] `query:"cursor"`
	// Include soft-deleted records. Pass the literal string `true`.
	Deleted param.Field[bool] `query:"deleted"`
	// When set to `true`, the response includes a `total` field with the unpaginated
	// row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total.
	IncludeTotal param.Field[bool] `query:"include_total"`
	// Maximum number of rows to return. Capped server-side at 50.
	Limit param.Field[int64] `query:"limit"`
	// Scope properties to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
	// Comma-separated list of slugs. Prefix with `-` for descending. Example:
	// `sort=-updated_at,name`.
	Sort param.Field[string] `query:"sort"`
}

func (PrismObjectEngagementListParams) URLQuery added in v0.7.0

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

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

type PrismObjectEngagementListResponse added in v0.7.0

type PrismObjectEngagementListResponse struct {
	Data []PrismObjectEngagementListResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal — false on the last page, never forces clients to
	// overshoot.
	HasMore    bool   `json:"has_more" api:"required"`
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Populated only when `?include_total=true` was passed.
	Total int64                                 `json:"total" api:"nullable"`
	JSON  prismObjectEngagementListResponseJSON `json:"-"`
}

func (*PrismObjectEngagementListResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementListResponseData added in v0.7.0

type PrismObjectEngagementListResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}                    `json:"properties"`
	Source     []string                                  `json:"source" api:"nullable"`
	JSON       prismObjectEngagementListResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectEngagementListResponseData) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementNewParams added in v0.7.0

type PrismObjectEngagementNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
}

func (PrismObjectEngagementNewParams) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementNewResponse added in v0.7.0

type PrismObjectEngagementNewResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}               `json:"default"`
	List    interface{}                          `json:"list"`
	JSON    prismObjectEngagementNewResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEngagementNewResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementQueryParams added in v0.7.0

type PrismObjectEngagementQueryParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string]                                  `path:"teamId" api:"required" format:"uuid"`
	Query  param.Field[PrismObjectEngagementQueryParamsQuery]   `json:"query" api:"required"`
	ID     param.Field[PrismObjectEngagementQueryParamsIDUnion] `json:"id" format:"uuid"`
	Boxes  param.Field[[]string]                                `json:"boxes"`
	// Alternative location for the opaque cursor (a sibling of `query`). Use whichever
	// feels more natural; if both are present, `query.cursor` wins.
	Cursor  param.Field[string] `json:"cursor"`
	Deleted param.Field[bool]   `json:"deleted"`
	// When true, the response includes a `total` field with the unpaginated row count.
	// Costs an additional pass over the result set — for unfiltered totals prefer
	// `GET /v2/prism/{teamId}/{objectType}/count` instead.
	IncludeTotal param.Field[bool]     `json:"include_total"`
	Sources      param.Field[[]string] `json:"sources" format:"uuid"`
}

func (PrismObjectEngagementQueryParams) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementQueryParamsIDArray added in v0.7.0

type PrismObjectEngagementQueryParamsIDArray []string

func (PrismObjectEngagementQueryParamsIDArray) ImplementsPrismObjectEngagementQueryParamsIDUnion added in v0.7.0

func (r PrismObjectEngagementQueryParamsIDArray) ImplementsPrismObjectEngagementQueryParamsIDUnion()

type PrismObjectEngagementQueryParamsIDUnion added in v0.7.0

type PrismObjectEngagementQueryParamsIDUnion interface {
	ImplementsPrismObjectEngagementQueryParamsIDUnion()
}

Satisfied by [shared.UnionString], PrismObjectEngagementQueryParamsIDArray.

type PrismObjectEngagementQueryParamsQuery added in v0.7.0

type PrismObjectEngagementQueryParamsQuery struct {
	// Property slugs to select. Use dot notation for relationships (e.g.
	// attendee.contact.first_name). `id` is always returned at the top level of each
	// row and does not need to be selected.
	Select param.Field[[]string] `json:"select" api:"required"`
	// Logical operator for combining filters
	Combinator param.Field[PrismObjectEngagementQueryParamsQueryCombinator] `json:"combinator"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page. When set, `page` and `limit` are derived from the cursor
	// and any explicit values are ignored.
	Cursor param.Field[string] `json:"cursor"`
	// Filters as [{ slug: { operator: value } }]. For select/multiselect properties,
	// values may be option slugs or option UUIDs.
	Filter param.Field[[]map[string]PrismObjectEngagementQueryParamsQueryFilterUnion] `json:"filter"`
	// Maximum number of rows to return. Capped server-side at 50; requests above the
	// cap are rejected.
	Limit  param.Field[int64]  `json:"limit"`
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Page number (1-based). Prefer `cursor`. Page-number pagination drifts under
	// concurrent writes; use it only for one-shot exports.
	//
	// Deprecated: deprecated
	Page param.Field[int64] `json:"page"`
	// Sort order as [{ slug: direction }]. Array order determines sort priority
	Sort param.Field[[]map[string]PrismObjectEngagementQueryParamsQuerySort] `json:"sort"`
}

func (PrismObjectEngagementQueryParamsQuery) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementQueryParamsQueryCombinator added in v0.7.0

type PrismObjectEngagementQueryParamsQueryCombinator string

Logical operator for combining filters

const (
	PrismObjectEngagementQueryParamsQueryCombinatorAnd PrismObjectEngagementQueryParamsQueryCombinator = "AND"
	PrismObjectEngagementQueryParamsQueryCombinatorOr  PrismObjectEngagementQueryParamsQueryCombinator = "OR"
)

func (PrismObjectEngagementQueryParamsQueryCombinator) IsKnown added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilter added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilter struct {
	NotEquals       param.Field[interface{}] `json:"!="`
	Less            param.Field[string]      `json:"<"`
	LessOrEquals    param.Field[string]      `json:"<="`
	Equals          param.Field[interface{}] `json:"="`
	Greater         param.Field[string]      `json:">"`
	GreaterOrEquals param.Field[string]      `json:">="`
	BeginsWith      param.Field[string]      `json:"begins_with"`
	Between         param.Field[interface{}] `json:"between"`
	Contains        param.Field[interface{}] `json:"contains"`
	EndsWith        param.Field[string]      `json:"ends_with"`
	Exists          param.Field[bool]        `json:"exists"`
	In              param.Field[interface{}] `json:"in"`
	IsNotNull       param.Field[interface{}] `json:"is_not_null"`
	IsNull          param.Field[interface{}] `json:"is_null"`
	NotContains     param.Field[string]      `json:"not_contains"`
	NotExists       param.Field[bool]        `json:"not_exists"`
	NotIn           param.Field[interface{}] `json:"not_in"`
}

func (PrismObjectEngagementQueryParamsQueryFilter) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementQueryParamsQueryFilterBeginsWith added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterBeginsWith struct {
	BeginsWith param.Field[string] `json:"begins_with" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterBeginsWith) MarshalJSON added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterBetween added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterBetween struct {
	Between param.Field[PrismObjectEngagementQueryParamsQueryFilterBetweenBetweenUnion] `json:"between" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterBetween) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementQueryParamsQueryFilterBetweenBetweenArray added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterBetweenBetweenArray []string

func (PrismObjectEngagementQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectEngagementQueryParamsQueryFilterBetweenBetweenUnion added in v0.7.0

func (r PrismObjectEngagementQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectEngagementQueryParamsQueryFilterBetweenBetweenUnion()

type PrismObjectEngagementQueryParamsQueryFilterBetweenBetweenUnion added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterBetweenBetweenUnion interface {
	ImplementsPrismObjectEngagementQueryParamsQueryFilterBetweenBetweenUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectEngagementQueryParamsQueryFilterBetweenBetweenArray.

type PrismObjectEngagementQueryParamsQueryFilterContains added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterContains struct {
	Contains param.Field[PrismObjectEngagementQueryParamsQueryFilterContainsContainsUnion] `json:"contains" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterContains) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementQueryParamsQueryFilterContainsContainsArray added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterContainsContainsArray []string

func (PrismObjectEngagementQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectEngagementQueryParamsQueryFilterContainsContainsUnion added in v0.7.0

func (r PrismObjectEngagementQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectEngagementQueryParamsQueryFilterContainsContainsUnion()

type PrismObjectEngagementQueryParamsQueryFilterContainsContainsUnion added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterContainsContainsUnion interface {
	ImplementsPrismObjectEngagementQueryParamsQueryFilterContainsContainsUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectEngagementQueryParamsQueryFilterContainsContainsArray.

type PrismObjectEngagementQueryParamsQueryFilterEndsWith added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterEndsWith struct {
	EndsWith param.Field[string] `json:"ends_with" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterEndsWith) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementQueryParamsQueryFilterExists added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterExists struct {
	Exists param.Field[bool] `json:"exists" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterExists) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementQueryParamsQueryFilterIn added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterIn struct {
	In param.Field[[]string] `json:"in" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterIn) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementQueryParamsQueryFilterIsNotNull added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterIsNotNull struct {
	IsNotNull param.Field[PrismObjectEngagementQueryParamsQueryFilterIsNotNullIsNotNullUnion] `json:"is_not_null" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterIsNotNull) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementQueryParamsQueryFilterIsNotNullIsNotNullArray added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterIsNotNullIsNotNullArray []string

func (PrismObjectEngagementQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectEngagementQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.7.0

func (r PrismObjectEngagementQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectEngagementQueryParamsQueryFilterIsNotNullIsNotNullUnion()

type PrismObjectEngagementQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterIsNotNullIsNotNullUnion interface {
	ImplementsPrismObjectEngagementQueryParamsQueryFilterIsNotNullIsNotNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectEngagementQueryParamsQueryFilterIsNotNullIsNotNullArray.

type PrismObjectEngagementQueryParamsQueryFilterIsNull added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterIsNull struct {
	IsNull param.Field[PrismObjectEngagementQueryParamsQueryFilterIsNullIsNullUnion] `json:"is_null" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterIsNull) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementQueryParamsQueryFilterIsNullIsNullArray added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterIsNullIsNullArray []string

func (PrismObjectEngagementQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectEngagementQueryParamsQueryFilterIsNullIsNullUnion added in v0.7.0

func (r PrismObjectEngagementQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectEngagementQueryParamsQueryFilterIsNullIsNullUnion()

type PrismObjectEngagementQueryParamsQueryFilterIsNullIsNullUnion added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterIsNullIsNullUnion interface {
	ImplementsPrismObjectEngagementQueryParamsQueryFilterIsNullIsNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectEngagementQueryParamsQueryFilterIsNullIsNullArray.

type PrismObjectEngagementQueryParamsQueryFilterNotContains added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterNotContains struct {
	NotContains param.Field[string] `json:"not_contains" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterNotContains) MarshalJSON added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterNotExists added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterNotExists struct {
	NotExists param.Field[bool] `json:"not_exists" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterNotExists) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementQueryParamsQueryFilterNotIn added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterNotIn struct {
	NotIn param.Field[[]string] `json:"not_in" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterNotIn) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterEq added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterEq struct {
	Equals param.Field[PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterEqUnion] `json:"=" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterEq) MarshalJSON added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterEqUnion added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterEqUnion interface {
	ImplementsPrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterEqUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterGt added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterGt struct {
	Greater param.Field[string] `json:">" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterGt) MarshalJSON added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterGte added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterGte struct {
	GreaterOrEquals param.Field[string] `json:">=" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterGte) MarshalJSON added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterLt added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterLt struct {
	Less param.Field[string] `json:"<" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterLt) MarshalJSON added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterLte added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterLte struct {
	LessOrEquals param.Field[string] `json:"<=" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterLte) MarshalJSON added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterNe added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterNe struct {
	NotEquals param.Field[PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterNeUnion] `json:"!=" api:"required"`
}

func (PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterNe) MarshalJSON added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterNeUnion added in v0.7.0

type PrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterNeUnion interface {
	ImplementsPrismObjectEngagementQueryParamsQueryFilterPrismQueryFilterNeUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectEngagementQueryParamsQuerySort added in v0.7.0

type PrismObjectEngagementQueryParamsQuerySort string
const (
	PrismObjectEngagementQueryParamsQuerySortAsc  PrismObjectEngagementQueryParamsQuerySort = "asc"
	PrismObjectEngagementQueryParamsQuerySortDesc PrismObjectEngagementQueryParamsQuerySort = "desc"
)

func (PrismObjectEngagementQueryParamsQuerySort) IsKnown added in v0.7.0

type PrismObjectEngagementQueryResponse added in v0.7.0

type PrismObjectEngagementQueryResponse struct {
	Data []PrismObjectEngagementQueryResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal. False when this page contains the last record; true
	// only when at least one more record exists. (Implementation note: the server
	// fetches one extra row internally to determine this — clients never need to
	// overshoot to discover the end.)
	HasMore bool `json:"has_more" api:"required"`
	// Opaque cursor pointing at the next page. Pass it back unchanged in the request
	// body (`cursor`) of the next call. Null when `has_more` is false.
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Only populated when the request set `include_total: true`. Total number of
	// records matching the query, ignoring pagination. Opt-in because it costs an
	// additional pass over the result set.
	Total int64                                  `json:"total" api:"nullable"`
	JSON  prismObjectEngagementQueryResponseJSON `json:"-"`
}

func (*PrismObjectEngagementQueryResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementQueryResponseData added in v0.7.0

type PrismObjectEngagementQueryResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}                     `json:"properties"`
	Source     []string                                   `json:"source" api:"nullable"`
	JSON       prismObjectEngagementQueryResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectEngagementQueryResponseData) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementRestoreParams added in v0.7.0

type PrismObjectEngagementRestoreParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectEngagementRestoreResponse added in v0.7.0

type PrismObjectEngagementRestoreResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                   `json:"default"`
	List    interface{}                              `json:"list"`
	JSON    prismObjectEngagementRestoreResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEngagementRestoreResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementService added in v0.7.0

type PrismObjectEngagementService struct {
	Options []option.RequestOption
	Grant   *PrismObjectEngagementGrantService
}

PrismObjectEngagementService contains methods and other services that help with interacting with the micro 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 NewPrismObjectEngagementService method instead.

func NewPrismObjectEngagementService added in v0.7.0

func NewPrismObjectEngagementService(opts ...option.RequestOption) (r *PrismObjectEngagementService)

NewPrismObjectEngagementService 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 (*PrismObjectEngagementService) BulkDelete added in v0.7.0

Soft-delete up to 100 records in a single call. Same partial-success contract as batch/update.

func (*PrismObjectEngagementService) BulkNew added in v0.7.0

Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final `ImportJob`; large batches start an async job, return 202 with `status: processing` and a `Location` header, and can be polled via `GET /v2/prism/{teamId}/imports/{jobId}`.

func (*PrismObjectEngagementService) BulkUpdate added in v0.7.0

Patch up to 100 records in a single call. Each item is attempted independently — failures don't abort the batch. Inspect `results[].status` per item.

func (*PrismObjectEngagementService) Count added in v0.7.0

Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body.

func (*PrismObjectEngagementService) Delete added in v0.7.0

Delete object

func (*PrismObjectEngagementService) Duplicate added in v0.7.0

Duplicate object

func (*PrismObjectEngagementService) Find added in v0.7.0

Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches.

func (*PrismObjectEngagementService) Get added in v0.7.0

Get object

func (*PrismObjectEngagementService) List added in v0.7.0

Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality.

func (*PrismObjectEngagementService) New added in v0.7.0

Create object

func (*PrismObjectEngagementService) Query added in v0.7.0

Query

func (*PrismObjectEngagementService) Restore added in v0.7.0

Restore object

func (*PrismObjectEngagementService) Update added in v0.7.0

Patch object

func (*PrismObjectEngagementService) Upsert added in v0.7.0

Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead.

type PrismObjectEngagementUpdateParams added in v0.7.0

type PrismObjectEngagementUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
	IfMatch               param.Field[string]        `header:"If-Match"`
}

func (PrismObjectEngagementUpdateParams) MarshalJSON added in v0.7.0

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

type PrismObjectEngagementUpdateResponse added in v0.7.0

type PrismObjectEngagementUpdateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                  `json:"default"`
	List    interface{}                             `json:"list"`
	JSON    prismObjectEngagementUpdateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEngagementUpdateResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEngagementUpsertParams added in v0.7.0

type PrismObjectEngagementUpsertParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	// Scope the upsert to a specific list/app. Required to match or write list-scoped
	// properties, including `app_stage`.
	ListID         param.Field[string] `query:"list_id" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

func (PrismObjectEngagementUpsertParams) MarshalJSON added in v0.7.0

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

func (PrismObjectEngagementUpsertParams) URLQuery added in v0.9.0

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

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

type PrismObjectEngagementUpsertResponse added in v0.7.0

type PrismObjectEngagementUpsertResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                  `json:"default"`
	List    interface{}                             `json:"list"`
	JSON    prismObjectEngagementUpsertResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEngagementUpsertResponse) UnmarshalJSON added in v0.7.0

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

type PrismObjectEventCountParams added in v0.5.0

type PrismObjectEventCountParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the count to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectEventCountParams) URLQuery added in v0.5.0

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

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

type PrismObjectEventCountResponse added in v0.5.0

type PrismObjectEventCountResponse struct {
	// Number of records matching the access scope.
	Total int64                             `json:"total" api:"required"`
	JSON  prismObjectEventCountResponseJSON `json:"-"`
}

func (*PrismObjectEventCountResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectEventDeleteParams added in v0.9.0

type PrismObjectEventDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID  param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IfMatch param.Field[string] `header:"If-Match"`
}

type PrismObjectEventDuplicateParams added in v0.9.0

type PrismObjectEventDuplicateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectEventDuplicateResponse added in v0.9.0

type PrismObjectEventDuplicateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                `json:"default"`
	List    interface{}                           `json:"list"`
	JSON    prismObjectEventDuplicateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEventDuplicateResponse) UnmarshalJSON added in v0.9.0

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

type PrismObjectEventFindParams added in v0.5.0

type PrismObjectEventFindParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the lookup to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectEventFindParams) URLQuery added in v0.5.0

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

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

type PrismObjectEventFindResponse added in v0.5.0

type PrismObjectEventFindResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}           `json:"default"`
	List    interface{}                      `json:"list"`
	JSON    prismObjectEventFindResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEventFindResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectEventGetParams

type PrismObjectEventGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
}

func (PrismObjectEventGetParams) URLQuery added in v0.5.0

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

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

type PrismObjectEventGetResponse added in v0.2.0

type PrismObjectEventGetResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}          `json:"default"`
	List    interface{}                     `json:"list"`
	JSON    prismObjectEventGetResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEventGetResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectEventGrantGetParams

type PrismObjectEventGrantGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type PrismObjectEventGrantGetResponse

type PrismObjectEventGrantGetResponse struct {
	TeamGroupID []map[string]PrismObjectEventGrantGetResponseTeamGroupID `json:"team_group_id"`
	TeamID      map[string]PrismObjectEventGrantGetResponseTeamID        `json:"team_id"`
	UserID      []map[string]PrismObjectEventGrantGetResponseUserID      `json:"user_id"`
	JSON        prismObjectEventGrantGetResponseJSON                     `json:"-"`
}

func (*PrismObjectEventGrantGetResponse) UnmarshalJSON

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

type PrismObjectEventGrantGetResponseTeamGroupID

type PrismObjectEventGrantGetResponseTeamGroupID string
const (
	PrismObjectEventGrantGetResponseTeamGroupIDA PrismObjectEventGrantGetResponseTeamGroupID = "a"
	PrismObjectEventGrantGetResponseTeamGroupIDR PrismObjectEventGrantGetResponseTeamGroupID = "r"
	PrismObjectEventGrantGetResponseTeamGroupIDW PrismObjectEventGrantGetResponseTeamGroupID = "w"
)

func (PrismObjectEventGrantGetResponseTeamGroupID) IsKnown

type PrismObjectEventGrantGetResponseTeamID

type PrismObjectEventGrantGetResponseTeamID string
const (
	PrismObjectEventGrantGetResponseTeamIDA PrismObjectEventGrantGetResponseTeamID = "a"
	PrismObjectEventGrantGetResponseTeamIDR PrismObjectEventGrantGetResponseTeamID = "r"
	PrismObjectEventGrantGetResponseTeamIDW PrismObjectEventGrantGetResponseTeamID = "w"
)

func (PrismObjectEventGrantGetResponseTeamID) IsKnown

type PrismObjectEventGrantGetResponseUserID

type PrismObjectEventGrantGetResponseUserID string
const (
	PrismObjectEventGrantGetResponseUserIDA PrismObjectEventGrantGetResponseUserID = "a"
	PrismObjectEventGrantGetResponseUserIDR PrismObjectEventGrantGetResponseUserID = "r"
	PrismObjectEventGrantGetResponseUserIDW PrismObjectEventGrantGetResponseUserID = "w"
)

func (PrismObjectEventGrantGetResponseUserID) IsKnown

type PrismObjectEventGrantService

type PrismObjectEventGrantService struct {
	Options []option.RequestOption
}

PrismObjectEventGrantService contains methods and other services that help with interacting with the micro 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 NewPrismObjectEventGrantService method instead.

func NewPrismObjectEventGrantService

func NewPrismObjectEventGrantService(opts ...option.RequestOption) (r *PrismObjectEventGrantService)

NewPrismObjectEventGrantService 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 (*PrismObjectEventGrantService) Get

Get grant

func (*PrismObjectEventGrantService) Update

Update grant

type PrismObjectEventGrantUpdateParams

type PrismObjectEventGrantUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	PathTeamID     param.Field[string]                                                    `path:"teamId" api:"required" format:"uuid"`
	TeamGroupID    param.Field[[]map[string]PrismObjectEventGrantUpdateParamsTeamGroupID] `json:"team_group_id"`
	BodyTeamID     param.Field[map[string]PrismObjectEventGrantUpdateParamsTeamID]        `json:"team_id"`
	UserID         param.Field[[]map[string]PrismObjectEventGrantUpdateParamsUserID]      `json:"user_id"`
	IdempotencyKey param.Field[string]                                                    `header:"Idempotency-Key"`
}

func (PrismObjectEventGrantUpdateParams) MarshalJSON

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

type PrismObjectEventGrantUpdateParamsTeamGroupID

type PrismObjectEventGrantUpdateParamsTeamGroupID string
const (
	PrismObjectEventGrantUpdateParamsTeamGroupIDA PrismObjectEventGrantUpdateParamsTeamGroupID = "a"
	PrismObjectEventGrantUpdateParamsTeamGroupIDR PrismObjectEventGrantUpdateParamsTeamGroupID = "r"
	PrismObjectEventGrantUpdateParamsTeamGroupIDW PrismObjectEventGrantUpdateParamsTeamGroupID = "w"
)

func (PrismObjectEventGrantUpdateParamsTeamGroupID) IsKnown

type PrismObjectEventGrantUpdateParamsTeamID

type PrismObjectEventGrantUpdateParamsTeamID string
const (
	PrismObjectEventGrantUpdateParamsTeamIDA PrismObjectEventGrantUpdateParamsTeamID = "a"
	PrismObjectEventGrantUpdateParamsTeamIDR PrismObjectEventGrantUpdateParamsTeamID = "r"
	PrismObjectEventGrantUpdateParamsTeamIDW PrismObjectEventGrantUpdateParamsTeamID = "w"
)

func (PrismObjectEventGrantUpdateParamsTeamID) IsKnown

type PrismObjectEventGrantUpdateParamsUserID

type PrismObjectEventGrantUpdateParamsUserID string
const (
	PrismObjectEventGrantUpdateParamsUserIDA PrismObjectEventGrantUpdateParamsUserID = "a"
	PrismObjectEventGrantUpdateParamsUserIDR PrismObjectEventGrantUpdateParamsUserID = "r"
	PrismObjectEventGrantUpdateParamsUserIDW PrismObjectEventGrantUpdateParamsUserID = "w"
)

func (PrismObjectEventGrantUpdateParamsUserID) IsKnown

type PrismObjectEventGrantUpdateResponse

type PrismObjectEventGrantUpdateResponse struct {
	TeamGroupID []map[string]PrismObjectEventGrantUpdateResponseTeamGroupID `json:"team_group_id"`
	TeamID      map[string]PrismObjectEventGrantUpdateResponseTeamID        `json:"team_id"`
	UserID      []map[string]PrismObjectEventGrantUpdateResponseUserID      `json:"user_id"`
	JSON        prismObjectEventGrantUpdateResponseJSON                     `json:"-"`
}

func (*PrismObjectEventGrantUpdateResponse) UnmarshalJSON

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

type PrismObjectEventGrantUpdateResponseTeamGroupID

type PrismObjectEventGrantUpdateResponseTeamGroupID string
const (
	PrismObjectEventGrantUpdateResponseTeamGroupIDA PrismObjectEventGrantUpdateResponseTeamGroupID = "a"
	PrismObjectEventGrantUpdateResponseTeamGroupIDR PrismObjectEventGrantUpdateResponseTeamGroupID = "r"
	PrismObjectEventGrantUpdateResponseTeamGroupIDW PrismObjectEventGrantUpdateResponseTeamGroupID = "w"
)

func (PrismObjectEventGrantUpdateResponseTeamGroupID) IsKnown

type PrismObjectEventGrantUpdateResponseTeamID

type PrismObjectEventGrantUpdateResponseTeamID string
const (
	PrismObjectEventGrantUpdateResponseTeamIDA PrismObjectEventGrantUpdateResponseTeamID = "a"
	PrismObjectEventGrantUpdateResponseTeamIDR PrismObjectEventGrantUpdateResponseTeamID = "r"
	PrismObjectEventGrantUpdateResponseTeamIDW PrismObjectEventGrantUpdateResponseTeamID = "w"
)

func (PrismObjectEventGrantUpdateResponseTeamID) IsKnown

type PrismObjectEventGrantUpdateResponseUserID

type PrismObjectEventGrantUpdateResponseUserID string
const (
	PrismObjectEventGrantUpdateResponseUserIDA PrismObjectEventGrantUpdateResponseUserID = "a"
	PrismObjectEventGrantUpdateResponseUserIDR PrismObjectEventGrantUpdateResponseUserID = "r"
	PrismObjectEventGrantUpdateResponseUserIDW PrismObjectEventGrantUpdateResponseUserID = "w"
)

func (PrismObjectEventGrantUpdateResponseUserID) IsKnown

type PrismObjectEventListParams added in v0.5.0

type PrismObjectEventListParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page.
	Cursor param.Field[string] `query:"cursor"`
	// Include soft-deleted records. Pass the literal string `true`.
	Deleted param.Field[bool] `query:"deleted"`
	// When set to `true`, the response includes a `total` field with the unpaginated
	// row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total.
	IncludeTotal param.Field[bool] `query:"include_total"`
	// Maximum number of rows to return. Capped server-side at 50.
	Limit param.Field[int64] `query:"limit"`
	// Scope properties to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
	// Comma-separated list of slugs. Prefix with `-` for descending. Example:
	// `sort=-updated_at,name`.
	Sort param.Field[string] `query:"sort"`
}

func (PrismObjectEventListParams) URLQuery added in v0.5.0

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

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

type PrismObjectEventListResponse added in v0.5.0

type PrismObjectEventListResponse struct {
	Data []PrismObjectEventListResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal — false on the last page, never forces clients to
	// overshoot.
	HasMore    bool   `json:"has_more" api:"required"`
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Populated only when `?include_total=true` was passed.
	Total int64                            `json:"total" api:"nullable"`
	JSON  prismObjectEventListResponseJSON `json:"-"`
}

func (*PrismObjectEventListResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectEventListResponseData added in v0.5.0

type PrismObjectEventListResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}               `json:"properties"`
	Source     []string                             `json:"source" api:"nullable"`
	JSON       prismObjectEventListResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectEventListResponseData) UnmarshalJSON added in v0.5.0

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

type PrismObjectEventNewParams added in v0.9.0

type PrismObjectEventNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
}

func (PrismObjectEventNewParams) MarshalJSON added in v0.9.0

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

type PrismObjectEventNewResponse added in v0.9.0

type PrismObjectEventNewResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}          `json:"default"`
	List    interface{}                     `json:"list"`
	JSON    prismObjectEventNewResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEventNewResponse) UnmarshalJSON added in v0.9.0

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

type PrismObjectEventQueryParams

type PrismObjectEventQueryParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string]                             `path:"teamId" api:"required" format:"uuid"`
	Query  param.Field[PrismObjectEventQueryParamsQuery]   `json:"query" api:"required"`
	ID     param.Field[PrismObjectEventQueryParamsIDUnion] `json:"id" format:"uuid"`
	Boxes  param.Field[[]string]                           `json:"boxes"`
	// Alternative location for the opaque cursor (a sibling of `query`). Use whichever
	// feels more natural; if both are present, `query.cursor` wins.
	Cursor  param.Field[string] `json:"cursor"`
	Deleted param.Field[bool]   `json:"deleted"`
	// When true, the response includes a `total` field with the unpaginated row count.
	// Costs an additional pass over the result set — for unfiltered totals prefer
	// `GET /v2/prism/{teamId}/{objectType}/count` instead.
	IncludeTotal param.Field[bool]     `json:"include_total"`
	Sources      param.Field[[]string] `json:"sources" format:"uuid"`
}

func (PrismObjectEventQueryParams) MarshalJSON

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

type PrismObjectEventQueryParamsIDArray

type PrismObjectEventQueryParamsIDArray []string

func (PrismObjectEventQueryParamsIDArray) ImplementsPrismObjectEventQueryParamsIDUnion

func (r PrismObjectEventQueryParamsIDArray) ImplementsPrismObjectEventQueryParamsIDUnion()

type PrismObjectEventQueryParamsIDUnion

type PrismObjectEventQueryParamsIDUnion interface {
	ImplementsPrismObjectEventQueryParamsIDUnion()
}

Satisfied by [shared.UnionString], PrismObjectEventQueryParamsIDArray.

type PrismObjectEventQueryParamsQuery

type PrismObjectEventQueryParamsQuery struct {
	// Property slugs to select. Use dot notation for relationships (e.g.
	// attendee.contact.first_name). `id` is always returned at the top level of each
	// row and does not need to be selected.
	Select param.Field[[]string] `json:"select" api:"required"`
	// Logical operator for combining filters
	Combinator param.Field[PrismObjectEventQueryParamsQueryCombinator] `json:"combinator"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page. When set, `page` and `limit` are derived from the cursor
	// and any explicit values are ignored.
	Cursor param.Field[string] `json:"cursor"`
	// Filters as [{ slug: { operator: value } }]. For select/multiselect properties,
	// values may be option slugs or option UUIDs.
	Filter param.Field[[]map[string]PrismObjectEventQueryParamsQueryFilterUnion] `json:"filter"`
	// Maximum number of rows to return. Capped server-side at 50; requests above the
	// cap are rejected.
	Limit  param.Field[int64]  `json:"limit"`
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Page number (1-based). Prefer `cursor`. Page-number pagination drifts under
	// concurrent writes; use it only for one-shot exports.
	//
	// Deprecated: deprecated
	Page param.Field[int64] `json:"page"`
	// Sort order as [{ slug: direction }]. Array order determines sort priority
	Sort param.Field[[]map[string]PrismObjectEventQueryParamsQuerySort] `json:"sort"`
}

func (PrismObjectEventQueryParamsQuery) MarshalJSON

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

type PrismObjectEventQueryParamsQueryCombinator

type PrismObjectEventQueryParamsQueryCombinator string

Logical operator for combining filters

const (
	PrismObjectEventQueryParamsQueryCombinatorAnd PrismObjectEventQueryParamsQueryCombinator = "AND"
	PrismObjectEventQueryParamsQueryCombinatorOr  PrismObjectEventQueryParamsQueryCombinator = "OR"
)

func (PrismObjectEventQueryParamsQueryCombinator) IsKnown

type PrismObjectEventQueryParamsQueryFilter added in v0.3.0

type PrismObjectEventQueryParamsQueryFilter struct {
	NotEquals       param.Field[interface{}] `json:"!="`
	Less            param.Field[string]      `json:"<"`
	LessOrEquals    param.Field[string]      `json:"<="`
	Equals          param.Field[interface{}] `json:"="`
	Greater         param.Field[string]      `json:">"`
	GreaterOrEquals param.Field[string]      `json:">="`
	BeginsWith      param.Field[string]      `json:"begins_with"`
	Between         param.Field[interface{}] `json:"between"`
	Contains        param.Field[interface{}] `json:"contains"`
	EndsWith        param.Field[string]      `json:"ends_with"`
	Exists          param.Field[bool]        `json:"exists"`
	In              param.Field[interface{}] `json:"in"`
	IsNotNull       param.Field[interface{}] `json:"is_not_null"`
	IsNull          param.Field[interface{}] `json:"is_null"`
	NotContains     param.Field[string]      `json:"not_contains"`
	NotExists       param.Field[bool]        `json:"not_exists"`
	NotIn           param.Field[interface{}] `json:"not_in"`
}

func (PrismObjectEventQueryParamsQueryFilter) MarshalJSON added in v0.3.0

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

type PrismObjectEventQueryParamsQueryFilterBeginsWith added in v0.3.0

type PrismObjectEventQueryParamsQueryFilterBeginsWith struct {
	BeginsWith param.Field[string] `json:"begins_with" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterBeginsWith) MarshalJSON added in v0.3.0

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

type PrismObjectEventQueryParamsQueryFilterBetween added in v0.5.0

type PrismObjectEventQueryParamsQueryFilterBetween struct {
	Between param.Field[PrismObjectEventQueryParamsQueryFilterBetweenBetweenUnion] `json:"between" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterBetween) MarshalJSON added in v0.5.0

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

type PrismObjectEventQueryParamsQueryFilterBetweenBetweenArray added in v0.5.0

type PrismObjectEventQueryParamsQueryFilterBetweenBetweenArray []string

func (PrismObjectEventQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectEventQueryParamsQueryFilterBetweenBetweenUnion added in v0.5.0

func (r PrismObjectEventQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectEventQueryParamsQueryFilterBetweenBetweenUnion()

type PrismObjectEventQueryParamsQueryFilterBetweenBetweenUnion added in v0.5.0

type PrismObjectEventQueryParamsQueryFilterBetweenBetweenUnion interface {
	ImplementsPrismObjectEventQueryParamsQueryFilterBetweenBetweenUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectEventQueryParamsQueryFilterBetweenBetweenArray.

type PrismObjectEventQueryParamsQueryFilterContains added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterContains struct {
	Contains param.Field[PrismObjectEventQueryParamsQueryFilterContainsContainsUnion] `json:"contains" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterContains) MarshalJSON added in v0.4.0

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

type PrismObjectEventQueryParamsQueryFilterContainsContainsArray added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterContainsContainsArray []string

func (PrismObjectEventQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectEventQueryParamsQueryFilterContainsContainsUnion added in v0.4.0

func (r PrismObjectEventQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectEventQueryParamsQueryFilterContainsContainsUnion()

type PrismObjectEventQueryParamsQueryFilterContainsContainsUnion added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterContainsContainsUnion interface {
	ImplementsPrismObjectEventQueryParamsQueryFilterContainsContainsUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectEventQueryParamsQueryFilterContainsContainsArray.

type PrismObjectEventQueryParamsQueryFilterEndsWith added in v0.3.0

type PrismObjectEventQueryParamsQueryFilterEndsWith struct {
	EndsWith param.Field[string] `json:"ends_with" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterEndsWith) MarshalJSON added in v0.3.0

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

type PrismObjectEventQueryParamsQueryFilterExists added in v0.3.0

type PrismObjectEventQueryParamsQueryFilterExists struct {
	Exists param.Field[bool] `json:"exists" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterExists) MarshalJSON added in v0.3.0

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

type PrismObjectEventQueryParamsQueryFilterIn added in v0.3.0

type PrismObjectEventQueryParamsQueryFilterIn struct {
	In param.Field[[]string] `json:"in" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterIn) MarshalJSON added in v0.3.0

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

type PrismObjectEventQueryParamsQueryFilterIsNotNull added in v0.5.0

type PrismObjectEventQueryParamsQueryFilterIsNotNull struct {
	IsNotNull param.Field[PrismObjectEventQueryParamsQueryFilterIsNotNullIsNotNullUnion] `json:"is_not_null" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterIsNotNull) MarshalJSON added in v0.5.0

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

type PrismObjectEventQueryParamsQueryFilterIsNotNullIsNotNullArray added in v0.5.0

type PrismObjectEventQueryParamsQueryFilterIsNotNullIsNotNullArray []string

func (PrismObjectEventQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectEventQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.5.0

func (r PrismObjectEventQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectEventQueryParamsQueryFilterIsNotNullIsNotNullUnion()

type PrismObjectEventQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.5.0

type PrismObjectEventQueryParamsQueryFilterIsNotNullIsNotNullUnion interface {
	ImplementsPrismObjectEventQueryParamsQueryFilterIsNotNullIsNotNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectEventQueryParamsQueryFilterIsNotNullIsNotNullArray.

type PrismObjectEventQueryParamsQueryFilterIsNull added in v0.5.0

type PrismObjectEventQueryParamsQueryFilterIsNull struct {
	IsNull param.Field[PrismObjectEventQueryParamsQueryFilterIsNullIsNullUnion] `json:"is_null" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterIsNull) MarshalJSON added in v0.5.0

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

type PrismObjectEventQueryParamsQueryFilterIsNullIsNullArray added in v0.5.0

type PrismObjectEventQueryParamsQueryFilterIsNullIsNullArray []string

func (PrismObjectEventQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectEventQueryParamsQueryFilterIsNullIsNullUnion added in v0.5.0

func (r PrismObjectEventQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectEventQueryParamsQueryFilterIsNullIsNullUnion()

type PrismObjectEventQueryParamsQueryFilterIsNullIsNullUnion added in v0.5.0

type PrismObjectEventQueryParamsQueryFilterIsNullIsNullUnion interface {
	ImplementsPrismObjectEventQueryParamsQueryFilterIsNullIsNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectEventQueryParamsQueryFilterIsNullIsNullArray.

type PrismObjectEventQueryParamsQueryFilterNotContains added in v0.3.0

type PrismObjectEventQueryParamsQueryFilterNotContains struct {
	NotContains param.Field[string] `json:"not_contains" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterNotContains) MarshalJSON added in v0.3.0

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

type PrismObjectEventQueryParamsQueryFilterNotExists added in v0.3.0

type PrismObjectEventQueryParamsQueryFilterNotExists struct {
	NotExists param.Field[bool] `json:"not_exists" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterNotExists) MarshalJSON added in v0.3.0

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

type PrismObjectEventQueryParamsQueryFilterNotIn added in v0.3.0

type PrismObjectEventQueryParamsQueryFilterNotIn struct {
	NotIn param.Field[[]string] `json:"not_in" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterNotIn) MarshalJSON added in v0.3.0

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

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterEq added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterEq struct {
	Equals param.Field[PrismObjectEventQueryParamsQueryFilterPrismQueryFilterEqUnion] `json:"=" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterPrismQueryFilterEq) MarshalJSON added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterEqUnion added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterEqUnion interface {
	ImplementsPrismObjectEventQueryParamsQueryFilterPrismQueryFilterEqUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterGt added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterGt struct {
	Greater param.Field[string] `json:">" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterPrismQueryFilterGt) MarshalJSON added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterGte added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterGte struct {
	GreaterOrEquals param.Field[string] `json:">=" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterPrismQueryFilterGte) MarshalJSON added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterLt added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterLt struct {
	Less param.Field[string] `json:"<" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterPrismQueryFilterLt) MarshalJSON added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterLte added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterLte struct {
	LessOrEquals param.Field[string] `json:"<=" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterPrismQueryFilterLte) MarshalJSON added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterNe added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterNe struct {
	NotEquals param.Field[PrismObjectEventQueryParamsQueryFilterPrismQueryFilterNeUnion] `json:"!=" api:"required"`
}

func (PrismObjectEventQueryParamsQueryFilterPrismQueryFilterNe) MarshalJSON added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterNeUnion added in v0.4.0

type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterNeUnion interface {
	ImplementsPrismObjectEventQueryParamsQueryFilterPrismQueryFilterNeUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectEventQueryParamsQuerySort

type PrismObjectEventQueryParamsQuerySort string
const (
	PrismObjectEventQueryParamsQuerySortAsc  PrismObjectEventQueryParamsQuerySort = "asc"
	PrismObjectEventQueryParamsQuerySortDesc PrismObjectEventQueryParamsQuerySort = "desc"
)

func (PrismObjectEventQueryParamsQuerySort) IsKnown

type PrismObjectEventQueryResponse

type PrismObjectEventQueryResponse struct {
	Data []PrismObjectEventQueryResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal. False when this page contains the last record; true
	// only when at least one more record exists. (Implementation note: the server
	// fetches one extra row internally to determine this — clients never need to
	// overshoot to discover the end.)
	HasMore bool `json:"has_more" api:"required"`
	// Opaque cursor pointing at the next page. Pass it back unchanged in the request
	// body (`cursor`) of the next call. Null when `has_more` is false.
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Only populated when the request set `include_total: true`. Total number of
	// records matching the query, ignoring pagination. Opt-in because it costs an
	// additional pass over the result set.
	Total int64                             `json:"total" api:"nullable"`
	JSON  prismObjectEventQueryResponseJSON `json:"-"`
}

func (*PrismObjectEventQueryResponse) UnmarshalJSON

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

type PrismObjectEventQueryResponseData added in v0.2.0

type PrismObjectEventQueryResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}                `json:"properties"`
	Source     []string                              `json:"source" api:"nullable"`
	JSON       prismObjectEventQueryResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectEventQueryResponseData) UnmarshalJSON added in v0.2.0

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

type PrismObjectEventRestoreParams added in v0.9.0

type PrismObjectEventRestoreParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectEventRestoreResponse added in v0.9.0

type PrismObjectEventRestoreResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}              `json:"default"`
	List    interface{}                         `json:"list"`
	JSON    prismObjectEventRestoreResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEventRestoreResponse) UnmarshalJSON added in v0.9.0

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

type PrismObjectEventService

type PrismObjectEventService struct {
	Options []option.RequestOption
	Grant   *PrismObjectEventGrantService
}

PrismObjectEventService contains methods and other services that help with interacting with the micro 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 NewPrismObjectEventService method instead.

func NewPrismObjectEventService

func NewPrismObjectEventService(opts ...option.RequestOption) (r *PrismObjectEventService)

NewPrismObjectEventService 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 (*PrismObjectEventService) Count added in v0.5.0

Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body.

func (*PrismObjectEventService) Delete added in v0.9.0

Delete object

func (*PrismObjectEventService) Duplicate added in v0.9.0

Duplicate object

func (*PrismObjectEventService) Find added in v0.5.0

Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches.

func (*PrismObjectEventService) Get

Get object

func (*PrismObjectEventService) List added in v0.5.0

Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality.

func (*PrismObjectEventService) New added in v0.9.0

Create object

func (*PrismObjectEventService) Query

Query

func (*PrismObjectEventService) Restore added in v0.9.0

Restore object

func (*PrismObjectEventService) Update added in v0.9.0

Patch object

func (*PrismObjectEventService) Upsert added in v0.9.0

Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead.

type PrismObjectEventUpdateParams added in v0.9.0

type PrismObjectEventUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
	IfMatch               param.Field[string]        `header:"If-Match"`
}

func (PrismObjectEventUpdateParams) MarshalJSON added in v0.9.0

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

type PrismObjectEventUpdateResponse added in v0.9.0

type PrismObjectEventUpdateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}             `json:"default"`
	List    interface{}                        `json:"list"`
	JSON    prismObjectEventUpdateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEventUpdateResponse) UnmarshalJSON added in v0.9.0

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

type PrismObjectEventUpsertParams added in v0.9.0

type PrismObjectEventUpsertParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	// Scope the upsert to a specific list/app. Required to match or write list-scoped
	// properties, including `app_stage`.
	ListID         param.Field[string] `query:"list_id" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

func (PrismObjectEventUpsertParams) MarshalJSON added in v0.9.0

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

func (PrismObjectEventUpsertParams) URLQuery added in v0.9.0

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

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

type PrismObjectEventUpsertResponse added in v0.9.0

type PrismObjectEventUpsertResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}             `json:"default"`
	List    interface{}                        `json:"list"`
	JSON    prismObjectEventUpsertResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectEventUpsertResponse) UnmarshalJSON added in v0.9.0

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

type PrismObjectIdentityBulkDeleteParams added in v0.5.0

type PrismObjectIdentityBulkDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]   `path:"teamId" api:"required" format:"uuid"`
	IDs            param.Field[[]string] `json:"ids" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string]   `header:"Idempotency-Key"`
}

func (PrismObjectIdentityBulkDeleteParams) MarshalJSON added in v0.5.0

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

type PrismObjectIdentityBulkDeleteResponse added in v0.5.0

type PrismObjectIdentityBulkDeleteResponse struct {
	Results []PrismObjectIdentityBulkDeleteResponseResult `json:"results" api:"required"`
	Summary PrismObjectIdentityBulkDeleteResponseSummary  `json:"summary" api:"required"`
	JSON    prismObjectIdentityBulkDeleteResponseJSON     `json:"-"`
}

Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed.

func (*PrismObjectIdentityBulkDeleteResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityBulkDeleteResponseResult added in v0.5.0

type PrismObjectIdentityBulkDeleteResponseResult struct {
	// Item ID, or null if the input was unparseable.
	ID     string                                             `json:"id" api:"required,nullable"`
	Status PrismObjectIdentityBulkDeleteResponseResultsStatus `json:"status" api:"required"`
	Error  PrismObjectIdentityBulkDeleteResponseResultsError  `json:"error"`
	// Object returned by reads (get/create/patch/restore). id is always present.
	Record PrismObjectIdentityBulkDeleteResponseResultsRecord `json:"record"`
	JSON   prismObjectIdentityBulkDeleteResponseResultJSON    `json:"-"`
}

func (*PrismObjectIdentityBulkDeleteResponseResult) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityBulkDeleteResponseResultsError added in v0.5.0

type PrismObjectIdentityBulkDeleteResponseResultsError struct {
	Code    string                                                `json:"code"`
	Message string                                                `json:"message"`
	JSON    prismObjectIdentityBulkDeleteResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectIdentityBulkDeleteResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityBulkDeleteResponseResultsRecord added in v0.5.0

type PrismObjectIdentityBulkDeleteResponseResultsRecord struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                                 `json:"default"`
	List    interface{}                                            `json:"list"`
	JSON    prismObjectIdentityBulkDeleteResponseResultsRecordJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectIdentityBulkDeleteResponseResultsRecord) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityBulkDeleteResponseResultsStatus added in v0.5.0

type PrismObjectIdentityBulkDeleteResponseResultsStatus string
const (
	PrismObjectIdentityBulkDeleteResponseResultsStatusOk    PrismObjectIdentityBulkDeleteResponseResultsStatus = "ok"
	PrismObjectIdentityBulkDeleteResponseResultsStatusError PrismObjectIdentityBulkDeleteResponseResultsStatus = "error"
)

func (PrismObjectIdentityBulkDeleteResponseResultsStatus) IsKnown added in v0.5.0

type PrismObjectIdentityBulkDeleteResponseSummary added in v0.5.0

type PrismObjectIdentityBulkDeleteResponseSummary struct {
	Failed    int64                                            `json:"failed" api:"required"`
	Succeeded int64                                            `json:"succeeded" api:"required"`
	Total     int64                                            `json:"total" api:"required"`
	JSON      prismObjectIdentityBulkDeleteResponseSummaryJSON `json:"-"`
}

func (*PrismObjectIdentityBulkDeleteResponseSummary) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityBulkNewParams

type PrismObjectIdentityBulkNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Array of objects to import with property values keyed by slug
	Objects        param.Field[[]PrismObjectPropertiesParam]            `json:"objects" api:"required"`
	Options        param.Field[PrismObjectIdentityBulkNewParamsOptions] `json:"options"`
	IdempotencyKey param.Field[string]                                  `header:"Idempotency-Key"`
}

func (PrismObjectIdentityBulkNewParams) MarshalJSON

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

type PrismObjectIdentityBulkNewParamsOptions

type PrismObjectIdentityBulkNewParamsOptions struct {
	// Whether deduplication should be case insensitive
	CaseInsensitive param.Field[bool] `json:"caseInsensitive"`
	// When true, unknown values for select/multiselect properties are created as new
	// options instead of failing the import
	CreateMissingOptions param.Field[bool] `json:"create_missing_options"`
	// Deprecated alias for list_id.
	//
	// Deprecated: deprecated
	CRMID param.Field[string] `json:"crm_id" format:"uuid"`
	// Property slug to deduplicate on. A single-element array is also accepted;
	// compound (multi-slug) dedupe is not supported yet and is rejected with guidance.
	DedupeBy param.Field[PrismObjectIdentityBulkNewParamsOptionsDedupeByUnion] `json:"dedupe_by"`
	// App/CRM ID for context (optional)
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Require app_stage for every row in the selected list. app_stage is a reserved
	// list-scoped alias for native status.
	RequireListStage param.Field[bool] `json:"require_list_stage"`
	// Patch a deduplicated record with the supplied properties instead of skipping it.
	UpdateExisting param.Field[bool] `json:"update_existing"`
}

func (PrismObjectIdentityBulkNewParamsOptions) MarshalJSON

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

type PrismObjectIdentityBulkNewParamsOptionsDedupeByArray added in v0.9.0

type PrismObjectIdentityBulkNewParamsOptionsDedupeByArray []string

func (PrismObjectIdentityBulkNewParamsOptionsDedupeByArray) ImplementsPrismObjectIdentityBulkNewParamsOptionsDedupeByUnion added in v0.9.0

func (r PrismObjectIdentityBulkNewParamsOptionsDedupeByArray) ImplementsPrismObjectIdentityBulkNewParamsOptionsDedupeByUnion()

type PrismObjectIdentityBulkNewParamsOptionsDedupeByUnion added in v0.9.0

type PrismObjectIdentityBulkNewParamsOptionsDedupeByUnion interface {
	ImplementsPrismObjectIdentityBulkNewParamsOptionsDedupeByUnion()
}

Property slug to deduplicate on. A single-element array is also accepted; compound (multi-slug) dedupe is not supported yet and is rejected with guidance.

Satisfied by [shared.UnionString], PrismObjectIdentityBulkNewParamsOptionsDedupeByArray.

type PrismObjectIdentityBulkNewResponse

type PrismObjectIdentityBulkNewResponse struct {
	// Null for sync imports (results inlined). Set for async imports.
	JobID  string                                   `json:"job_id" api:"required,nullable"`
	Status PrismObjectIdentityBulkNewResponseStatus `json:"status" api:"required"`
	// Total number of rows in the import.
	Total     int64     `json:"total" api:"required"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Set when status=failed; describes the job-level failure (not per-row).
	Error     PrismObjectIdentityBulkNewResponseError `json:"error"`
	ExpiresAt time.Time                               `json:"expires_at" format:"date-time"`
	Failed    int64                                   `json:"failed"`
	// Rows that have been attempted (succeeded + failed).
	Processed int64 `json:"processed"`
	// Per-row outcomes. Always present for sync imports; populated for async imports
	// once the job reaches `complete`.
	Results   []PrismObjectIdentityBulkNewResponseResult `json:"results"`
	Succeeded int64                                      `json:"succeeded"`
	UpdatedAt time.Time                                  `json:"updated_at" format:"date-time"`
	JSON      prismObjectIdentityBulkNewResponseJSON     `json:"-"`
}

Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}.

func (*PrismObjectIdentityBulkNewResponse) UnmarshalJSON

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

type PrismObjectIdentityBulkNewResponseError added in v0.5.0

type PrismObjectIdentityBulkNewResponseError struct {
	Code    string                                      `json:"code"`
	Message string                                      `json:"message"`
	JSON    prismObjectIdentityBulkNewResponseErrorJSON `json:"-"`
}

Set when status=failed; describes the job-level failure (not per-row).

func (*PrismObjectIdentityBulkNewResponseError) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityBulkNewResponseResult

type PrismObjectIdentityBulkNewResponseResult struct {
	ID      string                                         `json:"id" api:"nullable" format:"uuid"`
	Created bool                                           `json:"created"`
	Error   PrismObjectIdentityBulkNewResponseResultsError `json:"error"`
	// True if the row matched an existing record via the dedupe key.
	Existing bool `json:"existing"`
	// Zero-based position of this row in the request.
	InputIndex int64 `json:"input_index"`
	// True if a matching record was updated.
	Updated bool                                         `json:"updated"`
	JSON    prismObjectIdentityBulkNewResponseResultJSON `json:"-"`
}

func (*PrismObjectIdentityBulkNewResponseResult) UnmarshalJSON

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

type PrismObjectIdentityBulkNewResponseResultsError added in v0.5.0

type PrismObjectIdentityBulkNewResponseResultsError struct {
	Code    string                                             `json:"code"`
	Message string                                             `json:"message"`
	JSON    prismObjectIdentityBulkNewResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectIdentityBulkNewResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityBulkNewResponseStatus

type PrismObjectIdentityBulkNewResponseStatus string
const (
	PrismObjectIdentityBulkNewResponseStatusComplete   PrismObjectIdentityBulkNewResponseStatus = "complete"
	PrismObjectIdentityBulkNewResponseStatusProcessing PrismObjectIdentityBulkNewResponseStatus = "processing"
	PrismObjectIdentityBulkNewResponseStatusFailed     PrismObjectIdentityBulkNewResponseStatus = "failed"
)

func (PrismObjectIdentityBulkNewResponseStatus) IsKnown

type PrismObjectIdentityBulkUpdateParams added in v0.5.0

type PrismObjectIdentityBulkUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]                                    `path:"teamId" api:"required" format:"uuid"`
	Items          param.Field[[]PrismObjectIdentityBulkUpdateParamsItem] `json:"items" api:"required"`
	IdempotencyKey param.Field[string]                                    `header:"Idempotency-Key"`
}

func (PrismObjectIdentityBulkUpdateParams) MarshalJSON added in v0.5.0

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

type PrismObjectIdentityBulkUpdateParamsItem added in v0.5.0

type PrismObjectIdentityBulkUpdateParamsItem struct {
	ID          param.Field[string]    `json:"id" api:"required" format:"uuid"`
	ExtraFields map[string]interface{} `json:"-,extras"`
}

Object with `id` plus the same property body shape as PATCH (`default`/`list`/`extended`).

func (PrismObjectIdentityBulkUpdateParamsItem) MarshalJSON added in v0.5.0

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

type PrismObjectIdentityBulkUpdateResponse added in v0.5.0

type PrismObjectIdentityBulkUpdateResponse struct {
	Results []PrismObjectIdentityBulkUpdateResponseResult `json:"results" api:"required"`
	Summary PrismObjectIdentityBulkUpdateResponseSummary  `json:"summary" api:"required"`
	JSON    prismObjectIdentityBulkUpdateResponseJSON     `json:"-"`
}

Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed.

func (*PrismObjectIdentityBulkUpdateResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityBulkUpdateResponseResult added in v0.5.0

type PrismObjectIdentityBulkUpdateResponseResult struct {
	// Item ID, or null if the input was unparseable.
	ID     string                                             `json:"id" api:"required,nullable"`
	Status PrismObjectIdentityBulkUpdateResponseResultsStatus `json:"status" api:"required"`
	Error  PrismObjectIdentityBulkUpdateResponseResultsError  `json:"error"`
	// Object returned by reads (get/create/patch/restore). id is always present.
	Record PrismObjectIdentityBulkUpdateResponseResultsRecord `json:"record"`
	JSON   prismObjectIdentityBulkUpdateResponseResultJSON    `json:"-"`
}

func (*PrismObjectIdentityBulkUpdateResponseResult) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityBulkUpdateResponseResultsError added in v0.5.0

type PrismObjectIdentityBulkUpdateResponseResultsError struct {
	Code    string                                                `json:"code"`
	Message string                                                `json:"message"`
	JSON    prismObjectIdentityBulkUpdateResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectIdentityBulkUpdateResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityBulkUpdateResponseResultsRecord added in v0.5.0

type PrismObjectIdentityBulkUpdateResponseResultsRecord struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                                 `json:"default"`
	List    interface{}                                            `json:"list"`
	JSON    prismObjectIdentityBulkUpdateResponseResultsRecordJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectIdentityBulkUpdateResponseResultsRecord) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityBulkUpdateResponseResultsStatus added in v0.5.0

type PrismObjectIdentityBulkUpdateResponseResultsStatus string
const (
	PrismObjectIdentityBulkUpdateResponseResultsStatusOk    PrismObjectIdentityBulkUpdateResponseResultsStatus = "ok"
	PrismObjectIdentityBulkUpdateResponseResultsStatusError PrismObjectIdentityBulkUpdateResponseResultsStatus = "error"
)

func (PrismObjectIdentityBulkUpdateResponseResultsStatus) IsKnown added in v0.5.0

type PrismObjectIdentityBulkUpdateResponseSummary added in v0.5.0

type PrismObjectIdentityBulkUpdateResponseSummary struct {
	Failed    int64                                            `json:"failed" api:"required"`
	Succeeded int64                                            `json:"succeeded" api:"required"`
	Total     int64                                            `json:"total" api:"required"`
	JSON      prismObjectIdentityBulkUpdateResponseSummaryJSON `json:"-"`
}

func (*PrismObjectIdentityBulkUpdateResponseSummary) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityCountParams added in v0.5.0

type PrismObjectIdentityCountParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the count to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectIdentityCountParams) URLQuery added in v0.5.0

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

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

type PrismObjectIdentityCountResponse added in v0.5.0

type PrismObjectIdentityCountResponse struct {
	// Number of records matching the access scope.
	Total int64                                `json:"total" api:"required"`
	JSON  prismObjectIdentityCountResponseJSON `json:"-"`
}

func (*PrismObjectIdentityCountResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityDeleteParams

type PrismObjectIdentityDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID  param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IfMatch param.Field[string] `header:"If-Match"`
}

type PrismObjectIdentityDuplicateParams

type PrismObjectIdentityDuplicateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectIdentityDuplicateResponse

type PrismObjectIdentityDuplicateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                   `json:"default"`
	List    interface{}                              `json:"list"`
	JSON    prismObjectIdentityDuplicateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectIdentityDuplicateResponse) UnmarshalJSON

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

type PrismObjectIdentityFindParams added in v0.5.0

type PrismObjectIdentityFindParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the lookup to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectIdentityFindParams) URLQuery added in v0.5.0

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

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

type PrismObjectIdentityFindResponse added in v0.5.0

type PrismObjectIdentityFindResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}              `json:"default"`
	List    interface{}                         `json:"list"`
	JSON    prismObjectIdentityFindResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectIdentityFindResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityGetParams

type PrismObjectIdentityGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
}

func (PrismObjectIdentityGetParams) URLQuery added in v0.5.0

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

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

type PrismObjectIdentityGetResponse added in v0.2.0

type PrismObjectIdentityGetResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}             `json:"default"`
	List    interface{}                        `json:"list"`
	JSON    prismObjectIdentityGetResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectIdentityGetResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectIdentityListParams added in v0.5.0

type PrismObjectIdentityListParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page.
	Cursor param.Field[string] `query:"cursor"`
	// Include soft-deleted records. Pass the literal string `true`.
	Deleted param.Field[bool] `query:"deleted"`
	// When set to `true`, the response includes a `total` field with the unpaginated
	// row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total.
	IncludeTotal param.Field[bool] `query:"include_total"`
	// Maximum number of rows to return. Capped server-side at 50.
	Limit param.Field[int64] `query:"limit"`
	// Scope properties to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
	// Comma-separated list of slugs. Prefix with `-` for descending. Example:
	// `sort=-updated_at,name`.
	Sort param.Field[string] `query:"sort"`
}

func (PrismObjectIdentityListParams) URLQuery added in v0.5.0

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

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

type PrismObjectIdentityListResponse added in v0.5.0

type PrismObjectIdentityListResponse struct {
	Data []PrismObjectIdentityListResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal — false on the last page, never forces clients to
	// overshoot.
	HasMore    bool   `json:"has_more" api:"required"`
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Populated only when `?include_total=true` was passed.
	Total int64                               `json:"total" api:"nullable"`
	JSON  prismObjectIdentityListResponseJSON `json:"-"`
}

func (*PrismObjectIdentityListResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityListResponseData added in v0.5.0

type PrismObjectIdentityListResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}                  `json:"properties"`
	Source     []string                                `json:"source" api:"nullable"`
	JSON       prismObjectIdentityListResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectIdentityListResponseData) UnmarshalJSON added in v0.5.0

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

type PrismObjectIdentityNewParams

type PrismObjectIdentityNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
}

func (PrismObjectIdentityNewParams) MarshalJSON

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

type PrismObjectIdentityNewResponse added in v0.2.0

type PrismObjectIdentityNewResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}             `json:"default"`
	List    interface{}                        `json:"list"`
	JSON    prismObjectIdentityNewResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectIdentityNewResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectIdentityQueryParams

type PrismObjectIdentityQueryParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string]                                `path:"teamId" api:"required" format:"uuid"`
	Query  param.Field[PrismObjectIdentityQueryParamsQuery]   `json:"query" api:"required"`
	ID     param.Field[PrismObjectIdentityQueryParamsIDUnion] `json:"id" format:"uuid"`
	Boxes  param.Field[[]string]                              `json:"boxes"`
	// Alternative location for the opaque cursor (a sibling of `query`). Use whichever
	// feels more natural; if both are present, `query.cursor` wins.
	Cursor  param.Field[string] `json:"cursor"`
	Deleted param.Field[bool]   `json:"deleted"`
	// When true, the response includes a `total` field with the unpaginated row count.
	// Costs an additional pass over the result set — for unfiltered totals prefer
	// `GET /v2/prism/{teamId}/{objectType}/count` instead.
	IncludeTotal param.Field[bool]     `json:"include_total"`
	Sources      param.Field[[]string] `json:"sources" format:"uuid"`
}

func (PrismObjectIdentityQueryParams) MarshalJSON

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

type PrismObjectIdentityQueryParamsIDArray

type PrismObjectIdentityQueryParamsIDArray []string

func (PrismObjectIdentityQueryParamsIDArray) ImplementsPrismObjectIdentityQueryParamsIDUnion

func (r PrismObjectIdentityQueryParamsIDArray) ImplementsPrismObjectIdentityQueryParamsIDUnion()

type PrismObjectIdentityQueryParamsIDUnion

type PrismObjectIdentityQueryParamsIDUnion interface {
	ImplementsPrismObjectIdentityQueryParamsIDUnion()
}

Satisfied by [shared.UnionString], PrismObjectIdentityQueryParamsIDArray.

type PrismObjectIdentityQueryParamsQuery

type PrismObjectIdentityQueryParamsQuery struct {
	// Property slugs to select. Use dot notation for relationships (e.g.
	// attendee.contact.first_name). `id` is always returned at the top level of each
	// row and does not need to be selected.
	Select param.Field[[]string] `json:"select" api:"required"`
	// Logical operator for combining filters
	Combinator param.Field[PrismObjectIdentityQueryParamsQueryCombinator] `json:"combinator"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page. When set, `page` and `limit` are derived from the cursor
	// and any explicit values are ignored.
	Cursor param.Field[string] `json:"cursor"`
	// Filters as [{ slug: { operator: value } }]. For select/multiselect properties,
	// values may be option slugs or option UUIDs.
	Filter param.Field[[]map[string]PrismObjectIdentityQueryParamsQueryFilterUnion] `json:"filter"`
	// Maximum number of rows to return. Capped server-side at 50; requests above the
	// cap are rejected.
	Limit  param.Field[int64]  `json:"limit"`
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Page number (1-based). Prefer `cursor`. Page-number pagination drifts under
	// concurrent writes; use it only for one-shot exports.
	//
	// Deprecated: deprecated
	Page param.Field[int64] `json:"page"`
	// Sort order as [{ slug: direction }]. Array order determines sort priority
	Sort param.Field[[]map[string]PrismObjectIdentityQueryParamsQuerySort] `json:"sort"`
}

func (PrismObjectIdentityQueryParamsQuery) MarshalJSON

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

type PrismObjectIdentityQueryParamsQueryCombinator

type PrismObjectIdentityQueryParamsQueryCombinator string

Logical operator for combining filters

const (
	PrismObjectIdentityQueryParamsQueryCombinatorAnd PrismObjectIdentityQueryParamsQueryCombinator = "AND"
	PrismObjectIdentityQueryParamsQueryCombinatorOr  PrismObjectIdentityQueryParamsQueryCombinator = "OR"
)

func (PrismObjectIdentityQueryParamsQueryCombinator) IsKnown

type PrismObjectIdentityQueryParamsQueryFilter added in v0.3.0

type PrismObjectIdentityQueryParamsQueryFilter struct {
	NotEquals       param.Field[interface{}] `json:"!="`
	Less            param.Field[string]      `json:"<"`
	LessOrEquals    param.Field[string]      `json:"<="`
	Equals          param.Field[interface{}] `json:"="`
	Greater         param.Field[string]      `json:">"`
	GreaterOrEquals param.Field[string]      `json:">="`
	BeginsWith      param.Field[string]      `json:"begins_with"`
	Between         param.Field[interface{}] `json:"between"`
	Contains        param.Field[interface{}] `json:"contains"`
	EndsWith        param.Field[string]      `json:"ends_with"`
	Exists          param.Field[bool]        `json:"exists"`
	In              param.Field[interface{}] `json:"in"`
	IsNotNull       param.Field[interface{}] `json:"is_not_null"`
	IsNull          param.Field[interface{}] `json:"is_null"`
	NotContains     param.Field[string]      `json:"not_contains"`
	NotExists       param.Field[bool]        `json:"not_exists"`
	NotIn           param.Field[interface{}] `json:"not_in"`
}

func (PrismObjectIdentityQueryParamsQueryFilter) MarshalJSON added in v0.3.0

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

type PrismObjectIdentityQueryParamsQueryFilterBeginsWith added in v0.3.0

type PrismObjectIdentityQueryParamsQueryFilterBeginsWith struct {
	BeginsWith param.Field[string] `json:"begins_with" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterBeginsWith) MarshalJSON added in v0.3.0

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

type PrismObjectIdentityQueryParamsQueryFilterBetween added in v0.5.0

type PrismObjectIdentityQueryParamsQueryFilterBetween struct {
	Between param.Field[PrismObjectIdentityQueryParamsQueryFilterBetweenBetweenUnion] `json:"between" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterBetween) MarshalJSON added in v0.5.0

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

type PrismObjectIdentityQueryParamsQueryFilterBetweenBetweenArray added in v0.5.0

type PrismObjectIdentityQueryParamsQueryFilterBetweenBetweenArray []string

func (PrismObjectIdentityQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectIdentityQueryParamsQueryFilterBetweenBetweenUnion added in v0.5.0

func (r PrismObjectIdentityQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectIdentityQueryParamsQueryFilterBetweenBetweenUnion()

type PrismObjectIdentityQueryParamsQueryFilterBetweenBetweenUnion added in v0.5.0

type PrismObjectIdentityQueryParamsQueryFilterBetweenBetweenUnion interface {
	ImplementsPrismObjectIdentityQueryParamsQueryFilterBetweenBetweenUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectIdentityQueryParamsQueryFilterBetweenBetweenArray.

type PrismObjectIdentityQueryParamsQueryFilterContains added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterContains struct {
	Contains param.Field[PrismObjectIdentityQueryParamsQueryFilterContainsContainsUnion] `json:"contains" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterContains) MarshalJSON added in v0.4.0

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

type PrismObjectIdentityQueryParamsQueryFilterContainsContainsArray added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterContainsContainsArray []string

func (PrismObjectIdentityQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectIdentityQueryParamsQueryFilterContainsContainsUnion added in v0.4.0

func (r PrismObjectIdentityQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectIdentityQueryParamsQueryFilterContainsContainsUnion()

type PrismObjectIdentityQueryParamsQueryFilterContainsContainsUnion added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterContainsContainsUnion interface {
	ImplementsPrismObjectIdentityQueryParamsQueryFilterContainsContainsUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectIdentityQueryParamsQueryFilterContainsContainsArray.

type PrismObjectIdentityQueryParamsQueryFilterEndsWith added in v0.3.0

type PrismObjectIdentityQueryParamsQueryFilterEndsWith struct {
	EndsWith param.Field[string] `json:"ends_with" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterEndsWith) MarshalJSON added in v0.3.0

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

type PrismObjectIdentityQueryParamsQueryFilterExists added in v0.3.0

type PrismObjectIdentityQueryParamsQueryFilterExists struct {
	Exists param.Field[bool] `json:"exists" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterExists) MarshalJSON added in v0.3.0

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

type PrismObjectIdentityQueryParamsQueryFilterIn added in v0.3.0

type PrismObjectIdentityQueryParamsQueryFilterIn struct {
	In param.Field[[]string] `json:"in" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterIn) MarshalJSON added in v0.3.0

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

type PrismObjectIdentityQueryParamsQueryFilterIsNotNull added in v0.5.0

type PrismObjectIdentityQueryParamsQueryFilterIsNotNull struct {
	IsNotNull param.Field[PrismObjectIdentityQueryParamsQueryFilterIsNotNullIsNotNullUnion] `json:"is_not_null" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterIsNotNull) MarshalJSON added in v0.5.0

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

type PrismObjectIdentityQueryParamsQueryFilterIsNotNullIsNotNullArray added in v0.5.0

type PrismObjectIdentityQueryParamsQueryFilterIsNotNullIsNotNullArray []string

func (PrismObjectIdentityQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectIdentityQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.5.0

func (r PrismObjectIdentityQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectIdentityQueryParamsQueryFilterIsNotNullIsNotNullUnion()

type PrismObjectIdentityQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.5.0

type PrismObjectIdentityQueryParamsQueryFilterIsNotNullIsNotNullUnion interface {
	ImplementsPrismObjectIdentityQueryParamsQueryFilterIsNotNullIsNotNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectIdentityQueryParamsQueryFilterIsNotNullIsNotNullArray.

type PrismObjectIdentityQueryParamsQueryFilterIsNull added in v0.5.0

type PrismObjectIdentityQueryParamsQueryFilterIsNull struct {
	IsNull param.Field[PrismObjectIdentityQueryParamsQueryFilterIsNullIsNullUnion] `json:"is_null" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterIsNull) MarshalJSON added in v0.5.0

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

type PrismObjectIdentityQueryParamsQueryFilterIsNullIsNullArray added in v0.5.0

type PrismObjectIdentityQueryParamsQueryFilterIsNullIsNullArray []string

func (PrismObjectIdentityQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectIdentityQueryParamsQueryFilterIsNullIsNullUnion added in v0.5.0

func (r PrismObjectIdentityQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectIdentityQueryParamsQueryFilterIsNullIsNullUnion()

type PrismObjectIdentityQueryParamsQueryFilterIsNullIsNullUnion added in v0.5.0

type PrismObjectIdentityQueryParamsQueryFilterIsNullIsNullUnion interface {
	ImplementsPrismObjectIdentityQueryParamsQueryFilterIsNullIsNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectIdentityQueryParamsQueryFilterIsNullIsNullArray.

type PrismObjectIdentityQueryParamsQueryFilterNotContains added in v0.3.0

type PrismObjectIdentityQueryParamsQueryFilterNotContains struct {
	NotContains param.Field[string] `json:"not_contains" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterNotContains) MarshalJSON added in v0.3.0

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

type PrismObjectIdentityQueryParamsQueryFilterNotExists added in v0.3.0

type PrismObjectIdentityQueryParamsQueryFilterNotExists struct {
	NotExists param.Field[bool] `json:"not_exists" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterNotExists) MarshalJSON added in v0.3.0

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

type PrismObjectIdentityQueryParamsQueryFilterNotIn added in v0.3.0

type PrismObjectIdentityQueryParamsQueryFilterNotIn struct {
	NotIn param.Field[[]string] `json:"not_in" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterNotIn) MarshalJSON added in v0.3.0

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

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterEq added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterEq struct {
	Equals param.Field[PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterEqUnion] `json:"=" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterEq) MarshalJSON added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterEqUnion added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterEqUnion interface {
	ImplementsPrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterEqUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterGt added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterGt struct {
	Greater param.Field[string] `json:">" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterGt) MarshalJSON added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterGte added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterGte struct {
	GreaterOrEquals param.Field[string] `json:">=" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterGte) MarshalJSON added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterLt added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterLt struct {
	Less param.Field[string] `json:"<" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterLt) MarshalJSON added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterLte added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterLte struct {
	LessOrEquals param.Field[string] `json:"<=" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterLte) MarshalJSON added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterNe added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterNe struct {
	NotEquals param.Field[PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterNeUnion] `json:"!=" api:"required"`
}

func (PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterNe) MarshalJSON added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterNeUnion added in v0.4.0

type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterNeUnion interface {
	ImplementsPrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterNeUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectIdentityQueryParamsQuerySort

type PrismObjectIdentityQueryParamsQuerySort string
const (
	PrismObjectIdentityQueryParamsQuerySortAsc  PrismObjectIdentityQueryParamsQuerySort = "asc"
	PrismObjectIdentityQueryParamsQuerySortDesc PrismObjectIdentityQueryParamsQuerySort = "desc"
)

func (PrismObjectIdentityQueryParamsQuerySort) IsKnown

type PrismObjectIdentityQueryResponse

type PrismObjectIdentityQueryResponse struct {
	Data []PrismObjectIdentityQueryResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal. False when this page contains the last record; true
	// only when at least one more record exists. (Implementation note: the server
	// fetches one extra row internally to determine this — clients never need to
	// overshoot to discover the end.)
	HasMore bool `json:"has_more" api:"required"`
	// Opaque cursor pointing at the next page. Pass it back unchanged in the request
	// body (`cursor`) of the next call. Null when `has_more` is false.
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Only populated when the request set `include_total: true`. Total number of
	// records matching the query, ignoring pagination. Opt-in because it costs an
	// additional pass over the result set.
	Total int64                                `json:"total" api:"nullable"`
	JSON  prismObjectIdentityQueryResponseJSON `json:"-"`
}

func (*PrismObjectIdentityQueryResponse) UnmarshalJSON

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

type PrismObjectIdentityQueryResponseData added in v0.2.0

type PrismObjectIdentityQueryResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}                   `json:"properties"`
	Source     []string                                 `json:"source" api:"nullable"`
	JSON       prismObjectIdentityQueryResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectIdentityQueryResponseData) UnmarshalJSON added in v0.2.0

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

type PrismObjectIdentityRestoreParams

type PrismObjectIdentityRestoreParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectIdentityRestoreResponse added in v0.2.0

type PrismObjectIdentityRestoreResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                 `json:"default"`
	List    interface{}                            `json:"list"`
	JSON    prismObjectIdentityRestoreResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectIdentityRestoreResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectIdentityService

type PrismObjectIdentityService struct {
	Options []option.RequestOption
}

PrismObjectIdentityService contains methods and other services that help with interacting with the micro 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 NewPrismObjectIdentityService method instead.

func NewPrismObjectIdentityService

func NewPrismObjectIdentityService(opts ...option.RequestOption) (r *PrismObjectIdentityService)

NewPrismObjectIdentityService 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 (*PrismObjectIdentityService) BulkDelete added in v0.5.0

Soft-delete up to 100 records in a single call. Same partial-success contract as batch/update.

func (*PrismObjectIdentityService) BulkNew

Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final `ImportJob`; large batches start an async job, return 202 with `status: processing` and a `Location` header, and can be polled via `GET /v2/prism/{teamId}/imports/{jobId}`.

func (*PrismObjectIdentityService) BulkUpdate added in v0.5.0

Patch up to 100 records in a single call. Each item is attempted independently — failures don't abort the batch. Inspect `results[].status` per item.

func (*PrismObjectIdentityService) Count added in v0.5.0

Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body.

func (*PrismObjectIdentityService) Delete

Delete object

func (*PrismObjectIdentityService) Duplicate

Duplicate object

func (*PrismObjectIdentityService) Find added in v0.5.0

Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches.

func (*PrismObjectIdentityService) Get

Get object

func (*PrismObjectIdentityService) List added in v0.5.0

Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality.

func (*PrismObjectIdentityService) New

Create object

func (*PrismObjectIdentityService) Query

Query

func (*PrismObjectIdentityService) Restore

Restore object

func (*PrismObjectIdentityService) Update

Patch object

func (*PrismObjectIdentityService) Upsert added in v0.5.0

Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead.

type PrismObjectIdentityUpdateParams

type PrismObjectIdentityUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
	IfMatch               param.Field[string]        `header:"If-Match"`
}

func (PrismObjectIdentityUpdateParams) MarshalJSON

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

type PrismObjectIdentityUpdateResponse added in v0.2.0

type PrismObjectIdentityUpdateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                `json:"default"`
	List    interface{}                           `json:"list"`
	JSON    prismObjectIdentityUpdateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectIdentityUpdateResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectIdentityUpsertParams added in v0.5.0

type PrismObjectIdentityUpsertParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	// Scope the upsert to a specific list/app. Required to match or write list-scoped
	// properties, including `app_stage`.
	ListID         param.Field[string] `query:"list_id" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

func (PrismObjectIdentityUpsertParams) MarshalJSON added in v0.5.0

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

func (PrismObjectIdentityUpsertParams) URLQuery added in v0.9.0

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

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

type PrismObjectIdentityUpsertResponse added in v0.5.0

type PrismObjectIdentityUpsertResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                `json:"default"`
	List    interface{}                           `json:"list"`
	JSON    prismObjectIdentityUpsertResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectIdentityUpsertResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkDeleteParams added in v0.5.0

type PrismObjectOrganizationBulkDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]   `path:"teamId" api:"required" format:"uuid"`
	IDs            param.Field[[]string] `json:"ids" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string]   `header:"Idempotency-Key"`
}

func (PrismObjectOrganizationBulkDeleteParams) MarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkDeleteResponse added in v0.5.0

type PrismObjectOrganizationBulkDeleteResponse struct {
	Results []PrismObjectOrganizationBulkDeleteResponseResult `json:"results" api:"required"`
	Summary PrismObjectOrganizationBulkDeleteResponseSummary  `json:"summary" api:"required"`
	JSON    prismObjectOrganizationBulkDeleteResponseJSON     `json:"-"`
}

Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed.

func (*PrismObjectOrganizationBulkDeleteResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkDeleteResponseResult added in v0.5.0

type PrismObjectOrganizationBulkDeleteResponseResult struct {
	// Item ID, or null if the input was unparseable.
	ID     string                                                 `json:"id" api:"required,nullable"`
	Status PrismObjectOrganizationBulkDeleteResponseResultsStatus `json:"status" api:"required"`
	Error  PrismObjectOrganizationBulkDeleteResponseResultsError  `json:"error"`
	// Object returned by reads (get/create/patch/restore). id is always present.
	Record PrismObjectOrganizationBulkDeleteResponseResultsRecord `json:"record"`
	JSON   prismObjectOrganizationBulkDeleteResponseResultJSON    `json:"-"`
}

func (*PrismObjectOrganizationBulkDeleteResponseResult) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkDeleteResponseResultsError added in v0.5.0

type PrismObjectOrganizationBulkDeleteResponseResultsError struct {
	Code    string                                                    `json:"code"`
	Message string                                                    `json:"message"`
	JSON    prismObjectOrganizationBulkDeleteResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectOrganizationBulkDeleteResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkDeleteResponseResultsRecord added in v0.5.0

type PrismObjectOrganizationBulkDeleteResponseResultsRecord struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                                     `json:"default"`
	List    interface{}                                                `json:"list"`
	JSON    prismObjectOrganizationBulkDeleteResponseResultsRecordJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectOrganizationBulkDeleteResponseResultsRecord) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkDeleteResponseResultsStatus added in v0.5.0

type PrismObjectOrganizationBulkDeleteResponseResultsStatus string
const (
	PrismObjectOrganizationBulkDeleteResponseResultsStatusOk    PrismObjectOrganizationBulkDeleteResponseResultsStatus = "ok"
	PrismObjectOrganizationBulkDeleteResponseResultsStatusError PrismObjectOrganizationBulkDeleteResponseResultsStatus = "error"
)

func (PrismObjectOrganizationBulkDeleteResponseResultsStatus) IsKnown added in v0.5.0

type PrismObjectOrganizationBulkDeleteResponseSummary added in v0.5.0

type PrismObjectOrganizationBulkDeleteResponseSummary struct {
	Failed    int64                                                `json:"failed" api:"required"`
	Succeeded int64                                                `json:"succeeded" api:"required"`
	Total     int64                                                `json:"total" api:"required"`
	JSON      prismObjectOrganizationBulkDeleteResponseSummaryJSON `json:"-"`
}

func (*PrismObjectOrganizationBulkDeleteResponseSummary) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkNewParams added in v0.2.0

type PrismObjectOrganizationBulkNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Array of objects to import with property values keyed by slug
	Objects        param.Field[[]PrismObjectPropertiesParam]                `json:"objects" api:"required"`
	Options        param.Field[PrismObjectOrganizationBulkNewParamsOptions] `json:"options"`
	IdempotencyKey param.Field[string]                                      `header:"Idempotency-Key"`
}

func (PrismObjectOrganizationBulkNewParams) MarshalJSON added in v0.2.0

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

type PrismObjectOrganizationBulkNewParamsOptions added in v0.2.0

type PrismObjectOrganizationBulkNewParamsOptions struct {
	// Whether deduplication should be case insensitive
	CaseInsensitive param.Field[bool] `json:"caseInsensitive"`
	// When true, unknown values for select/multiselect properties are created as new
	// options instead of failing the import
	CreateMissingOptions param.Field[bool] `json:"create_missing_options"`
	// Deprecated alias for list_id.
	//
	// Deprecated: deprecated
	CRMID param.Field[string] `json:"crm_id" format:"uuid"`
	// Property slug to deduplicate on. A single-element array is also accepted;
	// compound (multi-slug) dedupe is not supported yet and is rejected with guidance.
	DedupeBy param.Field[PrismObjectOrganizationBulkNewParamsOptionsDedupeByUnion] `json:"dedupe_by"`
	// App/CRM ID for context (optional)
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Require app_stage for every row in the selected list. app_stage is a reserved
	// list-scoped alias for native status.
	RequireListStage param.Field[bool] `json:"require_list_stage"`
	// Patch a deduplicated record with the supplied properties instead of skipping it.
	UpdateExisting param.Field[bool] `json:"update_existing"`
}

func (PrismObjectOrganizationBulkNewParamsOptions) MarshalJSON added in v0.2.0

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

type PrismObjectOrganizationBulkNewParamsOptionsDedupeByArray added in v0.9.0

type PrismObjectOrganizationBulkNewParamsOptionsDedupeByArray []string

func (PrismObjectOrganizationBulkNewParamsOptionsDedupeByArray) ImplementsPrismObjectOrganizationBulkNewParamsOptionsDedupeByUnion added in v0.9.0

func (r PrismObjectOrganizationBulkNewParamsOptionsDedupeByArray) ImplementsPrismObjectOrganizationBulkNewParamsOptionsDedupeByUnion()

type PrismObjectOrganizationBulkNewParamsOptionsDedupeByUnion added in v0.9.0

type PrismObjectOrganizationBulkNewParamsOptionsDedupeByUnion interface {
	ImplementsPrismObjectOrganizationBulkNewParamsOptionsDedupeByUnion()
}

Property slug to deduplicate on. A single-element array is also accepted; compound (multi-slug) dedupe is not supported yet and is rejected with guidance.

Satisfied by [shared.UnionString], PrismObjectOrganizationBulkNewParamsOptionsDedupeByArray.

type PrismObjectOrganizationBulkNewResponse added in v0.2.0

type PrismObjectOrganizationBulkNewResponse struct {
	// Null for sync imports (results inlined). Set for async imports.
	JobID  string                                       `json:"job_id" api:"required,nullable"`
	Status PrismObjectOrganizationBulkNewResponseStatus `json:"status" api:"required"`
	// Total number of rows in the import.
	Total     int64     `json:"total" api:"required"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Set when status=failed; describes the job-level failure (not per-row).
	Error     PrismObjectOrganizationBulkNewResponseError `json:"error"`
	ExpiresAt time.Time                                   `json:"expires_at" format:"date-time"`
	Failed    int64                                       `json:"failed"`
	// Rows that have been attempted (succeeded + failed).
	Processed int64 `json:"processed"`
	// Per-row outcomes. Always present for sync imports; populated for async imports
	// once the job reaches `complete`.
	Results   []PrismObjectOrganizationBulkNewResponseResult `json:"results"`
	Succeeded int64                                          `json:"succeeded"`
	UpdatedAt time.Time                                      `json:"updated_at" format:"date-time"`
	JSON      prismObjectOrganizationBulkNewResponseJSON     `json:"-"`
}

Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}.

func (*PrismObjectOrganizationBulkNewResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectOrganizationBulkNewResponseError added in v0.5.0

type PrismObjectOrganizationBulkNewResponseError struct {
	Code    string                                          `json:"code"`
	Message string                                          `json:"message"`
	JSON    prismObjectOrganizationBulkNewResponseErrorJSON `json:"-"`
}

Set when status=failed; describes the job-level failure (not per-row).

func (*PrismObjectOrganizationBulkNewResponseError) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkNewResponseResult added in v0.2.0

type PrismObjectOrganizationBulkNewResponseResult struct {
	ID      string                                             `json:"id" api:"nullable" format:"uuid"`
	Created bool                                               `json:"created"`
	Error   PrismObjectOrganizationBulkNewResponseResultsError `json:"error"`
	// True if the row matched an existing record via the dedupe key.
	Existing bool `json:"existing"`
	// Zero-based position of this row in the request.
	InputIndex int64 `json:"input_index"`
	// True if a matching record was updated.
	Updated bool                                             `json:"updated"`
	JSON    prismObjectOrganizationBulkNewResponseResultJSON `json:"-"`
}

func (*PrismObjectOrganizationBulkNewResponseResult) UnmarshalJSON added in v0.2.0

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

type PrismObjectOrganizationBulkNewResponseResultsError added in v0.5.0

type PrismObjectOrganizationBulkNewResponseResultsError struct {
	Code    string                                                 `json:"code"`
	Message string                                                 `json:"message"`
	JSON    prismObjectOrganizationBulkNewResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectOrganizationBulkNewResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkNewResponseStatus added in v0.2.0

type PrismObjectOrganizationBulkNewResponseStatus string
const (
	PrismObjectOrganizationBulkNewResponseStatusComplete   PrismObjectOrganizationBulkNewResponseStatus = "complete"
	PrismObjectOrganizationBulkNewResponseStatusProcessing PrismObjectOrganizationBulkNewResponseStatus = "processing"
	PrismObjectOrganizationBulkNewResponseStatusFailed     PrismObjectOrganizationBulkNewResponseStatus = "failed"
)

func (PrismObjectOrganizationBulkNewResponseStatus) IsKnown added in v0.2.0

type PrismObjectOrganizationBulkUpdateParams added in v0.5.0

type PrismObjectOrganizationBulkUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]                                        `path:"teamId" api:"required" format:"uuid"`
	Items          param.Field[[]PrismObjectOrganizationBulkUpdateParamsItem] `json:"items" api:"required"`
	IdempotencyKey param.Field[string]                                        `header:"Idempotency-Key"`
}

func (PrismObjectOrganizationBulkUpdateParams) MarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkUpdateParamsItem added in v0.5.0

type PrismObjectOrganizationBulkUpdateParamsItem struct {
	ID          param.Field[string]    `json:"id" api:"required" format:"uuid"`
	ExtraFields map[string]interface{} `json:"-,extras"`
}

Object with `id` plus the same property body shape as PATCH (`default`/`list`/`extended`).

func (PrismObjectOrganizationBulkUpdateParamsItem) MarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkUpdateResponse added in v0.5.0

type PrismObjectOrganizationBulkUpdateResponse struct {
	Results []PrismObjectOrganizationBulkUpdateResponseResult `json:"results" api:"required"`
	Summary PrismObjectOrganizationBulkUpdateResponseSummary  `json:"summary" api:"required"`
	JSON    prismObjectOrganizationBulkUpdateResponseJSON     `json:"-"`
}

Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed.

func (*PrismObjectOrganizationBulkUpdateResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkUpdateResponseResult added in v0.5.0

type PrismObjectOrganizationBulkUpdateResponseResult struct {
	// Item ID, or null if the input was unparseable.
	ID     string                                                 `json:"id" api:"required,nullable"`
	Status PrismObjectOrganizationBulkUpdateResponseResultsStatus `json:"status" api:"required"`
	Error  PrismObjectOrganizationBulkUpdateResponseResultsError  `json:"error"`
	// Object returned by reads (get/create/patch/restore). id is always present.
	Record PrismObjectOrganizationBulkUpdateResponseResultsRecord `json:"record"`
	JSON   prismObjectOrganizationBulkUpdateResponseResultJSON    `json:"-"`
}

func (*PrismObjectOrganizationBulkUpdateResponseResult) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkUpdateResponseResultsError added in v0.5.0

type PrismObjectOrganizationBulkUpdateResponseResultsError struct {
	Code    string                                                    `json:"code"`
	Message string                                                    `json:"message"`
	JSON    prismObjectOrganizationBulkUpdateResponseResultsErrorJSON `json:"-"`
}

func (*PrismObjectOrganizationBulkUpdateResponseResultsError) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkUpdateResponseResultsRecord added in v0.5.0

type PrismObjectOrganizationBulkUpdateResponseResultsRecord struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                                     `json:"default"`
	List    interface{}                                                `json:"list"`
	JSON    prismObjectOrganizationBulkUpdateResponseResultsRecordJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectOrganizationBulkUpdateResponseResultsRecord) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationBulkUpdateResponseResultsStatus added in v0.5.0

type PrismObjectOrganizationBulkUpdateResponseResultsStatus string
const (
	PrismObjectOrganizationBulkUpdateResponseResultsStatusOk    PrismObjectOrganizationBulkUpdateResponseResultsStatus = "ok"
	PrismObjectOrganizationBulkUpdateResponseResultsStatusError PrismObjectOrganizationBulkUpdateResponseResultsStatus = "error"
)

func (PrismObjectOrganizationBulkUpdateResponseResultsStatus) IsKnown added in v0.5.0

type PrismObjectOrganizationBulkUpdateResponseSummary added in v0.5.0

type PrismObjectOrganizationBulkUpdateResponseSummary struct {
	Failed    int64                                                `json:"failed" api:"required"`
	Succeeded int64                                                `json:"succeeded" api:"required"`
	Total     int64                                                `json:"total" api:"required"`
	JSON      prismObjectOrganizationBulkUpdateResponseSummaryJSON `json:"-"`
}

func (*PrismObjectOrganizationBulkUpdateResponseSummary) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationCountParams added in v0.5.0

type PrismObjectOrganizationCountParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the count to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectOrganizationCountParams) URLQuery added in v0.5.0

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

type PrismObjectOrganizationCountResponse added in v0.5.0

type PrismObjectOrganizationCountResponse struct {
	// Number of records matching the access scope.
	Total int64                                    `json:"total" api:"required"`
	JSON  prismObjectOrganizationCountResponseJSON `json:"-"`
}

func (*PrismObjectOrganizationCountResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationDeleteParams added in v0.2.0

type PrismObjectOrganizationDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID  param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IfMatch param.Field[string] `header:"If-Match"`
}

type PrismObjectOrganizationDuplicateParams added in v0.2.0

type PrismObjectOrganizationDuplicateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectOrganizationDuplicateResponse added in v0.2.0

type PrismObjectOrganizationDuplicateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                       `json:"default"`
	List    interface{}                                  `json:"list"`
	JSON    prismObjectOrganizationDuplicateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectOrganizationDuplicateResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectOrganizationFindParams added in v0.5.0

type PrismObjectOrganizationFindParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Scope the lookup to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
}

func (PrismObjectOrganizationFindParams) URLQuery added in v0.5.0

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

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

type PrismObjectOrganizationFindResponse added in v0.5.0

type PrismObjectOrganizationFindResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                  `json:"default"`
	List    interface{}                             `json:"list"`
	JSON    prismObjectOrganizationFindResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectOrganizationFindResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationGetParams added in v0.2.0

type PrismObjectOrganizationGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
}

func (PrismObjectOrganizationGetParams) URLQuery added in v0.5.0

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

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

type PrismObjectOrganizationGetResponse added in v0.2.0

type PrismObjectOrganizationGetResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                 `json:"default"`
	List    interface{}                            `json:"list"`
	JSON    prismObjectOrganizationGetResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectOrganizationGetResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectOrganizationListParams added in v0.5.0

type PrismObjectOrganizationListParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page.
	Cursor param.Field[string] `query:"cursor"`
	// Include soft-deleted records. Pass the literal string `true`.
	Deleted param.Field[bool] `query:"deleted"`
	// When set to `true`, the response includes a `total` field with the unpaginated
	// row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total.
	IncludeTotal param.Field[bool] `query:"include_total"`
	// Maximum number of rows to return. Capped server-side at 50.
	Limit param.Field[int64] `query:"limit"`
	// Scope properties to a specific list/app.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
	// Comma-separated property slugs to return. Use dot notation for relationships.
	// `id` is always returned at the top level. Defaults to all properties.
	Select param.Field[string] `query:"select"`
	// Comma-separated list of slugs. Prefix with `-` for descending. Example:
	// `sort=-updated_at,name`.
	Sort param.Field[string] `query:"sort"`
}

func (PrismObjectOrganizationListParams) URLQuery added in v0.5.0

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

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

type PrismObjectOrganizationListResponse added in v0.5.0

type PrismObjectOrganizationListResponse struct {
	Data []PrismObjectOrganizationListResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal — false on the last page, never forces clients to
	// overshoot.
	HasMore    bool   `json:"has_more" api:"required"`
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Populated only when `?include_total=true` was passed.
	Total int64                                   `json:"total" api:"nullable"`
	JSON  prismObjectOrganizationListResponseJSON `json:"-"`
}

func (*PrismObjectOrganizationListResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationListResponseData added in v0.5.0

type PrismObjectOrganizationListResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}                      `json:"properties"`
	Source     []string                                    `json:"source" api:"nullable"`
	JSON       prismObjectOrganizationListResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectOrganizationListResponseData) UnmarshalJSON added in v0.5.0

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

type PrismObjectOrganizationNewParams added in v0.2.0

type PrismObjectOrganizationNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
}

func (PrismObjectOrganizationNewParams) MarshalJSON added in v0.2.0

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

type PrismObjectOrganizationNewResponse added in v0.2.0

type PrismObjectOrganizationNewResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                 `json:"default"`
	List    interface{}                            `json:"list"`
	JSON    prismObjectOrganizationNewResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectOrganizationNewResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectOrganizationQueryParams

type PrismObjectOrganizationQueryParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string]                                    `path:"teamId" api:"required" format:"uuid"`
	Query  param.Field[PrismObjectOrganizationQueryParamsQuery]   `json:"query" api:"required"`
	ID     param.Field[PrismObjectOrganizationQueryParamsIDUnion] `json:"id" format:"uuid"`
	Boxes  param.Field[[]string]                                  `json:"boxes"`
	// Alternative location for the opaque cursor (a sibling of `query`). Use whichever
	// feels more natural; if both are present, `query.cursor` wins.
	Cursor  param.Field[string] `json:"cursor"`
	Deleted param.Field[bool]   `json:"deleted"`
	// When true, the response includes a `total` field with the unpaginated row count.
	// Costs an additional pass over the result set — for unfiltered totals prefer
	// `GET /v2/prism/{teamId}/{objectType}/count` instead.
	IncludeTotal param.Field[bool]     `json:"include_total"`
	Sources      param.Field[[]string] `json:"sources" format:"uuid"`
}

func (PrismObjectOrganizationQueryParams) MarshalJSON

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

type PrismObjectOrganizationQueryParamsIDArray

type PrismObjectOrganizationQueryParamsIDArray []string

func (PrismObjectOrganizationQueryParamsIDArray) ImplementsPrismObjectOrganizationQueryParamsIDUnion

func (r PrismObjectOrganizationQueryParamsIDArray) ImplementsPrismObjectOrganizationQueryParamsIDUnion()

type PrismObjectOrganizationQueryParamsIDUnion

type PrismObjectOrganizationQueryParamsIDUnion interface {
	ImplementsPrismObjectOrganizationQueryParamsIDUnion()
}

Satisfied by [shared.UnionString], PrismObjectOrganizationQueryParamsIDArray.

type PrismObjectOrganizationQueryParamsQuery

type PrismObjectOrganizationQueryParamsQuery struct {
	// Property slugs to select. Use dot notation for relationships (e.g.
	// attendee.contact.first_name). `id` is always returned at the top level of each
	// row and does not need to be selected.
	Select param.Field[[]string] `json:"select" api:"required"`
	// Logical operator for combining filters
	Combinator param.Field[PrismObjectOrganizationQueryParamsQueryCombinator] `json:"combinator"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page. When set, `page` and `limit` are derived from the cursor
	// and any explicit values are ignored.
	Cursor param.Field[string] `json:"cursor"`
	// Filters as [{ slug: { operator: value } }]. For select/multiselect properties,
	// values may be option slugs or option UUIDs.
	Filter param.Field[[]map[string]PrismObjectOrganizationQueryParamsQueryFilterUnion] `json:"filter"`
	// Maximum number of rows to return. Capped server-side at 50; requests above the
	// cap are rejected.
	Limit  param.Field[int64]  `json:"limit"`
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Page number (1-based). Prefer `cursor`. Page-number pagination drifts under
	// concurrent writes; use it only for one-shot exports.
	//
	// Deprecated: deprecated
	Page param.Field[int64] `json:"page"`
	// Sort order as [{ slug: direction }]. Array order determines sort priority
	Sort param.Field[[]map[string]PrismObjectOrganizationQueryParamsQuerySort] `json:"sort"`
}

func (PrismObjectOrganizationQueryParamsQuery) MarshalJSON

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

type PrismObjectOrganizationQueryParamsQueryCombinator

type PrismObjectOrganizationQueryParamsQueryCombinator string

Logical operator for combining filters

const (
	PrismObjectOrganizationQueryParamsQueryCombinatorAnd PrismObjectOrganizationQueryParamsQueryCombinator = "AND"
	PrismObjectOrganizationQueryParamsQueryCombinatorOr  PrismObjectOrganizationQueryParamsQueryCombinator = "OR"
)

func (PrismObjectOrganizationQueryParamsQueryCombinator) IsKnown

type PrismObjectOrganizationQueryParamsQueryFilter added in v0.3.0

type PrismObjectOrganizationQueryParamsQueryFilter struct {
	NotEquals       param.Field[interface{}] `json:"!="`
	Less            param.Field[string]      `json:"<"`
	LessOrEquals    param.Field[string]      `json:"<="`
	Equals          param.Field[interface{}] `json:"="`
	Greater         param.Field[string]      `json:">"`
	GreaterOrEquals param.Field[string]      `json:">="`
	BeginsWith      param.Field[string]      `json:"begins_with"`
	Between         param.Field[interface{}] `json:"between"`
	Contains        param.Field[interface{}] `json:"contains"`
	EndsWith        param.Field[string]      `json:"ends_with"`
	Exists          param.Field[bool]        `json:"exists"`
	In              param.Field[interface{}] `json:"in"`
	IsNotNull       param.Field[interface{}] `json:"is_not_null"`
	IsNull          param.Field[interface{}] `json:"is_null"`
	NotContains     param.Field[string]      `json:"not_contains"`
	NotExists       param.Field[bool]        `json:"not_exists"`
	NotIn           param.Field[interface{}] `json:"not_in"`
}

func (PrismObjectOrganizationQueryParamsQueryFilter) MarshalJSON added in v0.3.0

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

type PrismObjectOrganizationQueryParamsQueryFilterBeginsWith added in v0.3.0

type PrismObjectOrganizationQueryParamsQueryFilterBeginsWith struct {
	BeginsWith param.Field[string] `json:"begins_with" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterBeginsWith) MarshalJSON added in v0.3.0

type PrismObjectOrganizationQueryParamsQueryFilterBetween added in v0.5.0

type PrismObjectOrganizationQueryParamsQueryFilterBetween struct {
	Between param.Field[PrismObjectOrganizationQueryParamsQueryFilterBetweenBetweenUnion] `json:"between" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterBetween) MarshalJSON added in v0.5.0

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

type PrismObjectOrganizationQueryParamsQueryFilterBetweenBetweenArray added in v0.5.0

type PrismObjectOrganizationQueryParamsQueryFilterBetweenBetweenArray []string

func (PrismObjectOrganizationQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectOrganizationQueryParamsQueryFilterBetweenBetweenUnion added in v0.5.0

func (r PrismObjectOrganizationQueryParamsQueryFilterBetweenBetweenArray) ImplementsPrismObjectOrganizationQueryParamsQueryFilterBetweenBetweenUnion()

type PrismObjectOrganizationQueryParamsQueryFilterBetweenBetweenUnion added in v0.5.0

type PrismObjectOrganizationQueryParamsQueryFilterBetweenBetweenUnion interface {
	ImplementsPrismObjectOrganizationQueryParamsQueryFilterBetweenBetweenUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectOrganizationQueryParamsQueryFilterBetweenBetweenArray.

type PrismObjectOrganizationQueryParamsQueryFilterContains added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterContains struct {
	Contains param.Field[PrismObjectOrganizationQueryParamsQueryFilterContainsContainsUnion] `json:"contains" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterContains) MarshalJSON added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterContainsContainsArray added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterContainsContainsArray []string

func (PrismObjectOrganizationQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectOrganizationQueryParamsQueryFilterContainsContainsUnion added in v0.4.0

func (r PrismObjectOrganizationQueryParamsQueryFilterContainsContainsArray) ImplementsPrismObjectOrganizationQueryParamsQueryFilterContainsContainsUnion()

type PrismObjectOrganizationQueryParamsQueryFilterContainsContainsUnion added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterContainsContainsUnion interface {
	ImplementsPrismObjectOrganizationQueryParamsQueryFilterContainsContainsUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectOrganizationQueryParamsQueryFilterContainsContainsArray.

type PrismObjectOrganizationQueryParamsQueryFilterEndsWith added in v0.3.0

type PrismObjectOrganizationQueryParamsQueryFilterEndsWith struct {
	EndsWith param.Field[string] `json:"ends_with" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterEndsWith) MarshalJSON added in v0.3.0

type PrismObjectOrganizationQueryParamsQueryFilterExists added in v0.3.0

type PrismObjectOrganizationQueryParamsQueryFilterExists struct {
	Exists param.Field[bool] `json:"exists" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterExists) MarshalJSON added in v0.3.0

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

type PrismObjectOrganizationQueryParamsQueryFilterIn added in v0.3.0

type PrismObjectOrganizationQueryParamsQueryFilterIn struct {
	In param.Field[[]string] `json:"in" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterIn) MarshalJSON added in v0.3.0

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

type PrismObjectOrganizationQueryParamsQueryFilterIsNotNull added in v0.5.0

type PrismObjectOrganizationQueryParamsQueryFilterIsNotNull struct {
	IsNotNull param.Field[PrismObjectOrganizationQueryParamsQueryFilterIsNotNullIsNotNullUnion] `json:"is_not_null" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterIsNotNull) MarshalJSON added in v0.5.0

type PrismObjectOrganizationQueryParamsQueryFilterIsNotNullIsNotNullArray added in v0.5.0

type PrismObjectOrganizationQueryParamsQueryFilterIsNotNullIsNotNullArray []string

func (PrismObjectOrganizationQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectOrganizationQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.5.0

func (r PrismObjectOrganizationQueryParamsQueryFilterIsNotNullIsNotNullArray) ImplementsPrismObjectOrganizationQueryParamsQueryFilterIsNotNullIsNotNullUnion()

type PrismObjectOrganizationQueryParamsQueryFilterIsNotNullIsNotNullUnion added in v0.5.0

type PrismObjectOrganizationQueryParamsQueryFilterIsNotNullIsNotNullUnion interface {
	ImplementsPrismObjectOrganizationQueryParamsQueryFilterIsNotNullIsNotNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectOrganizationQueryParamsQueryFilterIsNotNullIsNotNullArray.

type PrismObjectOrganizationQueryParamsQueryFilterIsNull added in v0.5.0

type PrismObjectOrganizationQueryParamsQueryFilterIsNull struct {
	IsNull param.Field[PrismObjectOrganizationQueryParamsQueryFilterIsNullIsNullUnion] `json:"is_null" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterIsNull) MarshalJSON added in v0.5.0

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

type PrismObjectOrganizationQueryParamsQueryFilterIsNullIsNullArray added in v0.5.0

type PrismObjectOrganizationQueryParamsQueryFilterIsNullIsNullArray []string

func (PrismObjectOrganizationQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectOrganizationQueryParamsQueryFilterIsNullIsNullUnion added in v0.5.0

func (r PrismObjectOrganizationQueryParamsQueryFilterIsNullIsNullArray) ImplementsPrismObjectOrganizationQueryParamsQueryFilterIsNullIsNullUnion()

type PrismObjectOrganizationQueryParamsQueryFilterIsNullIsNullUnion added in v0.5.0

type PrismObjectOrganizationQueryParamsQueryFilterIsNullIsNullUnion interface {
	ImplementsPrismObjectOrganizationQueryParamsQueryFilterIsNullIsNullUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool], PrismObjectOrganizationQueryParamsQueryFilterIsNullIsNullArray.

type PrismObjectOrganizationQueryParamsQueryFilterNotContains added in v0.3.0

type PrismObjectOrganizationQueryParamsQueryFilterNotContains struct {
	NotContains param.Field[string] `json:"not_contains" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterNotContains) MarshalJSON added in v0.3.0

type PrismObjectOrganizationQueryParamsQueryFilterNotExists added in v0.3.0

type PrismObjectOrganizationQueryParamsQueryFilterNotExists struct {
	NotExists param.Field[bool] `json:"not_exists" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterNotExists) MarshalJSON added in v0.3.0

type PrismObjectOrganizationQueryParamsQueryFilterNotIn added in v0.3.0

type PrismObjectOrganizationQueryParamsQueryFilterNotIn struct {
	NotIn param.Field[[]string] `json:"not_in" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterNotIn) MarshalJSON added in v0.3.0

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

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterEq added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterEq struct {
	Equals param.Field[PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterEqUnion] `json:"=" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterEq) MarshalJSON added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterEqUnion added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterEqUnion interface {
	ImplementsPrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterEqUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterGt added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterGt struct {
	Greater param.Field[string] `json:">" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterGt) MarshalJSON added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterGte added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterGte struct {
	GreaterOrEquals param.Field[string] `json:">=" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterGte) MarshalJSON added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterLt added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterLt struct {
	Less param.Field[string] `json:"<" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterLt) MarshalJSON added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterLte added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterLte struct {
	LessOrEquals param.Field[string] `json:"<=" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterLte) MarshalJSON added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterNe added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterNe struct {
	NotEquals param.Field[PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterNeUnion] `json:"!=" api:"required"`
}

func (PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterNe) MarshalJSON added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterNeUnion added in v0.4.0

type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterNeUnion interface {
	ImplementsPrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterNeUnion()
}

Satisfied by [shared.UnionString], [shared.UnionBool].

type PrismObjectOrganizationQueryParamsQuerySort

type PrismObjectOrganizationQueryParamsQuerySort string
const (
	PrismObjectOrganizationQueryParamsQuerySortAsc  PrismObjectOrganizationQueryParamsQuerySort = "asc"
	PrismObjectOrganizationQueryParamsQuerySortDesc PrismObjectOrganizationQueryParamsQuerySort = "desc"
)

func (PrismObjectOrganizationQueryParamsQuerySort) IsKnown

type PrismObjectOrganizationQueryResponse

type PrismObjectOrganizationQueryResponse struct {
	Data []PrismObjectOrganizationQueryResponseData `json:"data" api:"required"`
	// Accurate end-of-data signal. False when this page contains the last record; true
	// only when at least one more record exists. (Implementation note: the server
	// fetches one extra row internally to determine this — clients never need to
	// overshoot to discover the end.)
	HasMore bool `json:"has_more" api:"required"`
	// Opaque cursor pointing at the next page. Pass it back unchanged in the request
	// body (`cursor`) of the next call. Null when `has_more` is false.
	NextCursor string `json:"next_cursor" api:"nullable"`
	// Only populated when the request set `include_total: true`. Total number of
	// records matching the query, ignoring pagination. Opt-in because it costs an
	// additional pass over the result set.
	Total int64                                    `json:"total" api:"nullable"`
	JSON  prismObjectOrganizationQueryResponseJSON `json:"-"`
}

func (*PrismObjectOrganizationQueryResponse) UnmarshalJSON

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

type PrismObjectOrganizationQueryResponseData added in v0.2.0

type PrismObjectOrganizationQueryResponseData struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	IsUserObject bool   `json:"is_user_object"`
	// Selected property values keyed by property slug. For select/multiselect
	// properties, option slugs are returned. For reference properties, values are
	// nested `{ id, properties }` objects.
	Properties map[string]interface{}                       `json:"properties"`
	Source     []string                                     `json:"source" api:"nullable"`
	JSON       prismObjectOrganizationQueryResponseDataJSON `json:"-"`
}

Row returned by the query endpoint. `id` is always present at the top level. Selected property values are returned under `properties`, keyed by property slug. Reference-typed values are returned as nested `{ id, properties }` objects.

func (*PrismObjectOrganizationQueryResponseData) UnmarshalJSON added in v0.2.0

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

type PrismObjectOrganizationRestoreParams added in v0.2.0

type PrismObjectOrganizationRestoreParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type PrismObjectOrganizationRestoreResponse added in v0.2.0

type PrismObjectOrganizationRestoreResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                     `json:"default"`
	List    interface{}                                `json:"list"`
	JSON    prismObjectOrganizationRestoreResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectOrganizationRestoreResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectOrganizationService

type PrismObjectOrganizationService struct {
	Options []option.RequestOption
}

PrismObjectOrganizationService contains methods and other services that help with interacting with the micro 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 NewPrismObjectOrganizationService method instead.

func NewPrismObjectOrganizationService

func NewPrismObjectOrganizationService(opts ...option.RequestOption) (r *PrismObjectOrganizationService)

NewPrismObjectOrganizationService 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 (*PrismObjectOrganizationService) BulkDelete added in v0.5.0

Soft-delete up to 100 records in a single call. Same partial-success contract as batch/update.

func (*PrismObjectOrganizationService) BulkNew added in v0.2.0

Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final `ImportJob`; large batches start an async job, return 202 with `status: processing` and a `Location` header, and can be polled via `GET /v2/prism/{teamId}/imports/{jobId}`.

func (*PrismObjectOrganizationService) BulkUpdate added in v0.5.0

Patch up to 100 records in a single call. Each item is attempted independently — failures don't abort the batch. Inspect `results[].status` per item.

func (*PrismObjectOrganizationService) Count added in v0.5.0

Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body.

func (*PrismObjectOrganizationService) Delete added in v0.2.0

Delete object

func (*PrismObjectOrganizationService) Duplicate added in v0.2.0

Duplicate object

func (*PrismObjectOrganizationService) Find added in v0.5.0

Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches.

func (*PrismObjectOrganizationService) Get added in v0.2.0

Get object

func (*PrismObjectOrganizationService) List added in v0.5.0

Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality.

func (*PrismObjectOrganizationService) New added in v0.2.0

Create object

func (*PrismObjectOrganizationService) Query

Query

func (*PrismObjectOrganizationService) Restore added in v0.2.0

Restore object

func (*PrismObjectOrganizationService) Update added in v0.2.0

Patch object

func (*PrismObjectOrganizationService) Upsert added in v0.5.0

Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead.

type PrismObjectOrganizationUpdateParams added in v0.2.0

type PrismObjectOrganizationUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	IdempotencyKey        param.Field[string]        `header:"Idempotency-Key"`
	IfMatch               param.Field[string]        `header:"If-Match"`
}

func (PrismObjectOrganizationUpdateParams) MarshalJSON added in v0.2.0

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

type PrismObjectOrganizationUpdateResponse added in v0.2.0

type PrismObjectOrganizationUpdateResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                    `json:"default"`
	List    interface{}                               `json:"list"`
	JSON    prismObjectOrganizationUpdateResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectOrganizationUpdateResponse) UnmarshalJSON added in v0.2.0

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

type PrismObjectOrganizationUpsertParams added in v0.5.0

type PrismObjectOrganizationUpsertParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID                param.Field[string]        `path:"teamId" api:"required" format:"uuid"`
	PrismObjectProperties PrismObjectPropertiesParam `json:"prism_object_properties" api:"required"`
	// Scope the upsert to a specific list/app. Required to match or write list-scoped
	// properties, including `app_stage`.
	ListID         param.Field[string] `query:"list_id" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

func (PrismObjectOrganizationUpsertParams) MarshalJSON added in v0.5.0

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

func (PrismObjectOrganizationUpsertParams) URLQuery added in v0.9.0

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

type PrismObjectOrganizationUpsertResponse added in v0.5.0

type PrismObjectOrganizationUpsertResponse struct {
	ID string `json:"id" api:"required" format:"uuid"`
	// Properties keyed by property slug.
	Default map[string]interface{}                    `json:"default"`
	List    interface{}                               `json:"list"`
	JSON    prismObjectOrganizationUpsertResponseJSON `json:"-"`
}

Object returned by reads (get/create/patch/restore). id is always present.

func (*PrismObjectOrganizationUpsertResponse) UnmarshalJSON added in v0.5.0

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

type PrismObjectPropertiesParam

type PrismObjectPropertiesParam struct {
	// Properties keyed by property slug. Values can be strings, numbers, booleans,
	// arrays, or null. For select/multiselect properties, values may be option slugs
	// or option UUIDs on write; option slugs are returned on read.
	Default param.Field[map[string]interface{}] `json:"default"`
	List    param.Field[interface{}]            `json:"list"`
}

func (PrismObjectPropertiesParam) MarshalJSON

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

type PrismObjectService

PrismObjectService contains methods and other services that help with interacting with the micro 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 NewPrismObjectService method instead.

func NewPrismObjectService

func NewPrismObjectService(opts ...option.RequestOption) (r *PrismObjectService)

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

type PrismPropertyDeleteParams added in v0.9.0

type PrismPropertyDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Storage type of this property definition.
	Type   param.Field[PrismPropertyDeleteParamsType] `query:"type" api:"required"`
	ListID param.Field[string]                        `query:"list_id" format:"uuid"`
}

func (PrismPropertyDeleteParams) URLQuery added in v0.9.0

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

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

type PrismPropertyDeleteParamsObjectType added in v0.9.0

type PrismPropertyDeleteParamsObjectType string
const (
	PrismPropertyDeleteParamsObjectTypeComment       PrismPropertyDeleteParamsObjectType = "comment"
	PrismPropertyDeleteParamsObjectTypeDeal          PrismPropertyDeleteParamsObjectType = "deal"
	PrismPropertyDeleteParamsObjectTypeEngagement    PrismPropertyDeleteParamsObjectType = "engagement"
	PrismPropertyDeleteParamsObjectTypeIdentity      PrismPropertyDeleteParamsObjectType = "identity"
	PrismPropertyDeleteParamsObjectTypeAIChatThread  PrismPropertyDeleteParamsObjectType = "ai_chat_thread"
	PrismPropertyDeleteParamsObjectTypeAIChatMessage PrismPropertyDeleteParamsObjectType = "ai_chat_message"
	PrismPropertyDeleteParamsObjectTypeAgentArtifact PrismPropertyDeleteParamsObjectType = "agent_artifact"
	PrismPropertyDeleteParamsObjectTypeDocument      PrismPropertyDeleteParamsObjectType = "document"
	PrismPropertyDeleteParamsObjectTypeAction        PrismPropertyDeleteParamsObjectType = "action"
	PrismPropertyDeleteParamsObjectTypeEvent         PrismPropertyDeleteParamsObjectType = "event"
	PrismPropertyDeleteParamsObjectTypeOrganization  PrismPropertyDeleteParamsObjectType = "organization"
	PrismPropertyDeleteParamsObjectTypeContact       PrismPropertyDeleteParamsObjectType = "contact"
)

func (PrismPropertyDeleteParamsObjectType) IsKnown added in v0.9.0

type PrismPropertyDeleteParamsType added in v0.9.0

type PrismPropertyDeleteParamsType string

Storage type of this property definition.

const (
	PrismPropertyDeleteParamsTypeNum                   PrismPropertyDeleteParamsType = "num"
	PrismPropertyDeleteParamsTypeStr                   PrismPropertyDeleteParamsType = "str"
	PrismPropertyDeleteParamsTypeBool                  PrismPropertyDeleteParamsType = "bool"
	PrismPropertyDeleteParamsTypeDate                  PrismPropertyDeleteParamsType = "date"
	PrismPropertyDeleteParamsTypeText                  PrismPropertyDeleteParamsType = "text"
	PrismPropertyDeleteParamsTypeByte                  PrismPropertyDeleteParamsType = "byte"
	PrismPropertyDeleteParamsTypeSelectStr             PrismPropertyDeleteParamsType = "select_str"
	PrismPropertyDeleteParamsTypeMultiStr              PrismPropertyDeleteParamsType = "multi_str"
	PrismPropertyDeleteParamsTypeMultiselectStr        PrismPropertyDeleteParamsType = "multiselect_str"
	PrismPropertyDeleteParamsTypeJsonb                 PrismPropertyDeleteParamsType = "jsonb"
	PrismPropertyDeleteParamsTypeRefIdentity           PrismPropertyDeleteParamsType = "ref_identity"
	PrismPropertyDeleteParamsTypeRefUser               PrismPropertyDeleteParamsType = "ref_user"
	PrismPropertyDeleteParamsTypeRefOrganization       PrismPropertyDeleteParamsType = "ref_organization"
	PrismPropertyDeleteParamsTypeRefContact            PrismPropertyDeleteParamsType = "ref_contact"
	PrismPropertyDeleteParamsTypeRefThread             PrismPropertyDeleteParamsType = "ref_thread"
	PrismPropertyDeleteParamsTypeRefMessage            PrismPropertyDeleteParamsType = "ref_message"
	PrismPropertyDeleteParamsTypeRefEvent              PrismPropertyDeleteParamsType = "ref_event"
	PrismPropertyDeleteParamsTypeRefAccount            PrismPropertyDeleteParamsType = "ref_account"
	PrismPropertyDeleteParamsTypeRefAIChatThread       PrismPropertyDeleteParamsType = "ref_ai_chat_thread"
	PrismPropertyDeleteParamsTypeRefAIChatMessage      PrismPropertyDeleteParamsType = "ref_ai_chat_message"
	PrismPropertyDeleteParamsTypeMultirefAIChatMessage PrismPropertyDeleteParamsType = "multiref_ai_chat_message"
	PrismPropertyDeleteParamsTypeMultirefAgentArtifact PrismPropertyDeleteParamsType = "multiref_agent_artifact"
	PrismPropertyDeleteParamsTypeMultirefAction        PrismPropertyDeleteParamsType = "multiref_action"
	PrismPropertyDeleteParamsTypeMultirefComment       PrismPropertyDeleteParamsType = "multiref_comment"
	PrismPropertyDeleteParamsTypeMultirefContact       PrismPropertyDeleteParamsType = "multiref_contact"
	PrismPropertyDeleteParamsTypeMultirefLabel         PrismPropertyDeleteParamsType = "multiref_label"
	PrismPropertyDeleteParamsTypeMultirefThread        PrismPropertyDeleteParamsType = "multiref_thread"
	PrismPropertyDeleteParamsTypeMultirefMessages      PrismPropertyDeleteParamsType = "multiref_messages"
	PrismPropertyDeleteParamsTypeMultirefDocument      PrismPropertyDeleteParamsType = "multiref_document"
	PrismPropertyDeleteParamsTypeMultirefIdentity      PrismPropertyDeleteParamsType = "multiref_identity"
	PrismPropertyDeleteParamsTypeMultirefOrganization  PrismPropertyDeleteParamsType = "multiref_organization"
	PrismPropertyDeleteParamsTypeMultirefEngagement    PrismPropertyDeleteParamsType = "multiref_engagement"
	PrismPropertyDeleteParamsTypeMultirefAttendee      PrismPropertyDeleteParamsType = "multiref_attendee"
	PrismPropertyDeleteParamsTypeMultirefMeetingEntry  PrismPropertyDeleteParamsType = "multiref_meeting_entry"
	PrismPropertyDeleteParamsTypeMultirefReadReceipt   PrismPropertyDeleteParamsType = "multiref_read_receipt"
	PrismPropertyDeleteParamsTypeMultirefAccount       PrismPropertyDeleteParamsType = "multiref_account"
	PrismPropertyDeleteParamsTypeMultirefSource        PrismPropertyDeleteParamsType = "multiref_source"
)

func (PrismPropertyDeleteParamsType) IsKnown added in v0.9.0

func (r PrismPropertyDeleteParamsType) IsKnown() bool

type PrismPropertyListAllParams added in v0.5.0

type PrismPropertyListAllParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID   param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	Autofill param.Field[bool]   `query:"autofill"`
	// When false, return property definitions without hydrating select/multiselect
	// option rows. Defaults to true server-side (parseIncludeOptions). Accepts boolean
	// or query-string forms (true/false/0/1). Uses anyOf (not oneOf) so qs/AJV
	// boolean-vs-string ambiguity does not 400 when Speakeasy SDKs send
	// include_options=true.
	IncludeOptions param.Field[PrismPropertyListAllParamsIncludeOptionsUnion] `query:"include_options"`
	// Scope properties to a specific list/app. Scoping is strict: the response carries
	// only that list's definitions, not the workspace-global ones that also apply to
	// its records. Call once with `list_id` and once without to see everything a write
	// could resolve against.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
	// Case-insensitive substring match on the property name. Use this to find an
	// existing property before creating a new one.
	Term param.Field[string] `query:"term"`
}

func (PrismPropertyListAllParams) URLQuery added in v0.5.0

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

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

type PrismPropertyListAllParamsIncludeOptionsString added in v0.9.0

type PrismPropertyListAllParamsIncludeOptionsString string
const (
	PrismPropertyListAllParamsIncludeOptionsStringTrue  PrismPropertyListAllParamsIncludeOptionsString = "true"
	PrismPropertyListAllParamsIncludeOptionsStringFalse PrismPropertyListAllParamsIncludeOptionsString = "false"
	PrismPropertyListAllParamsIncludeOptionsString0     PrismPropertyListAllParamsIncludeOptionsString = "0"
	PrismPropertyListAllParamsIncludeOptionsString1     PrismPropertyListAllParamsIncludeOptionsString = "1"
)

func (PrismPropertyListAllParamsIncludeOptionsString) ImplementsPrismPropertyListAllParamsIncludeOptionsUnion added in v0.9.0

func (r PrismPropertyListAllParamsIncludeOptionsString) ImplementsPrismPropertyListAllParamsIncludeOptionsUnion()

func (PrismPropertyListAllParamsIncludeOptionsString) IsKnown added in v0.9.0

type PrismPropertyListAllParamsIncludeOptionsUnion added in v0.9.0

type PrismPropertyListAllParamsIncludeOptionsUnion interface {
	ImplementsPrismPropertyListAllParamsIncludeOptionsUnion()
}

When false, return property definitions without hydrating select/multiselect option rows. Defaults to true server-side (parseIncludeOptions). Accepts boolean or query-string forms (true/false/0/1). Uses anyOf (not oneOf) so qs/AJV boolean-vs-string ambiguity does not 400 when Speakeasy SDKs send include_options=true.

Satisfied by [shared.UnionBool], PrismPropertyListAllParamsIncludeOptionsString.

type PrismPropertyListAllResponse added in v0.5.0

type PrismPropertyListAllResponse map[string]interface{}

type PrismPropertyListParams added in v0.5.0

type PrismPropertyListParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID   param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	Autofill param.Field[bool]   `query:"autofill"`
	// When false, return property definitions without hydrating select/multiselect
	// option rows. Defaults to true server-side (parseIncludeOptions). Accepts boolean
	// or query-string forms (true/false/0/1). Uses anyOf (not oneOf) so qs/AJV
	// boolean-vs-string ambiguity does not 400 when Speakeasy SDKs send
	// include_options=true.
	IncludeOptions param.Field[PrismPropertyListParamsIncludeOptionsUnion] `query:"include_options"`
	// Scope properties to a specific list/app. Scoping is strict: the response carries
	// only that list's definitions, not the workspace-global ones that also apply to
	// its records. Call once with `list_id` and once without to see everything a write
	// could resolve against.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
	// Case-insensitive substring match on the property name. Use this to find an
	// existing property before creating a new one.
	Term param.Field[string] `query:"term"`
}

func (PrismPropertyListParams) URLQuery added in v0.5.0

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

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

type PrismPropertyListParamsIncludeOptionsString added in v0.9.0

type PrismPropertyListParamsIncludeOptionsString string
const (
	PrismPropertyListParamsIncludeOptionsStringTrue  PrismPropertyListParamsIncludeOptionsString = "true"
	PrismPropertyListParamsIncludeOptionsStringFalse PrismPropertyListParamsIncludeOptionsString = "false"
	PrismPropertyListParamsIncludeOptionsString0     PrismPropertyListParamsIncludeOptionsString = "0"
	PrismPropertyListParamsIncludeOptionsString1     PrismPropertyListParamsIncludeOptionsString = "1"
)

func (PrismPropertyListParamsIncludeOptionsString) ImplementsPrismPropertyListParamsIncludeOptionsUnion added in v0.9.0

func (r PrismPropertyListParamsIncludeOptionsString) ImplementsPrismPropertyListParamsIncludeOptionsUnion()

func (PrismPropertyListParamsIncludeOptionsString) IsKnown added in v0.9.0

type PrismPropertyListParamsIncludeOptionsUnion added in v0.9.0

type PrismPropertyListParamsIncludeOptionsUnion interface {
	ImplementsPrismPropertyListParamsIncludeOptionsUnion()
}

When false, return property definitions without hydrating select/multiselect option rows. Defaults to true server-side (parseIncludeOptions). Accepts boolean or query-string forms (true/false/0/1). Uses anyOf (not oneOf) so qs/AJV boolean-vs-string ambiguity does not 400 when Speakeasy SDKs send include_options=true.

Satisfied by [shared.UnionBool], PrismPropertyListParamsIncludeOptionsString.

type PrismPropertyListParamsObjectType added in v0.5.0

type PrismPropertyListParamsObjectType string
const (
	PrismPropertyListParamsObjectTypeComment       PrismPropertyListParamsObjectType = "comment"
	PrismPropertyListParamsObjectTypeDeal          PrismPropertyListParamsObjectType = "deal"
	PrismPropertyListParamsObjectTypeEngagement    PrismPropertyListParamsObjectType = "engagement"
	PrismPropertyListParamsObjectTypeIdentity      PrismPropertyListParamsObjectType = "identity"
	PrismPropertyListParamsObjectTypeAIChatThread  PrismPropertyListParamsObjectType = "ai_chat_thread"
	PrismPropertyListParamsObjectTypeAIChatMessage PrismPropertyListParamsObjectType = "ai_chat_message"
	PrismPropertyListParamsObjectTypeDocument      PrismPropertyListParamsObjectType = "document"
	PrismPropertyListParamsObjectTypeAction        PrismPropertyListParamsObjectType = "action"
	PrismPropertyListParamsObjectTypeEvent         PrismPropertyListParamsObjectType = "event"
	PrismPropertyListParamsObjectTypeOrganization  PrismPropertyListParamsObjectType = "organization"
	PrismPropertyListParamsObjectTypeContact       PrismPropertyListParamsObjectType = "contact"
)

func (PrismPropertyListParamsObjectType) IsKnown added in v0.5.0

type PrismPropertyListResponse added in v0.5.0

type PrismPropertyListResponse map[string]interface{}

type PrismPropertyNewParams added in v0.9.0

type PrismPropertyNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// New property definition. Check for an existing property first (GET the same path
	// with `term`) and reuse it rather than defining a near-duplicate — writes address
	// properties by slug, so two definitions sharing a slug leave no addressable
	// winner. For `select_str`/`multiselect_str` types you may pre-seed choices via
	// `options`.
	PropertyDefinitionCreate PropertyDefinitionCreateParam `json:"property_definition_create" api:"required"`
	IdempotencyKey           param.Field[string]           `header:"Idempotency-Key"`
}

func (PrismPropertyNewParams) MarshalJSON added in v0.9.0

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

type PrismPropertyNewParamsObjectType added in v0.9.0

type PrismPropertyNewParamsObjectType string
const (
	PrismPropertyNewParamsObjectTypeComment       PrismPropertyNewParamsObjectType = "comment"
	PrismPropertyNewParamsObjectTypeDeal          PrismPropertyNewParamsObjectType = "deal"
	PrismPropertyNewParamsObjectTypeEngagement    PrismPropertyNewParamsObjectType = "engagement"
	PrismPropertyNewParamsObjectTypeIdentity      PrismPropertyNewParamsObjectType = "identity"
	PrismPropertyNewParamsObjectTypeAIChatThread  PrismPropertyNewParamsObjectType = "ai_chat_thread"
	PrismPropertyNewParamsObjectTypeAIChatMessage PrismPropertyNewParamsObjectType = "ai_chat_message"
	PrismPropertyNewParamsObjectTypeAgentArtifact PrismPropertyNewParamsObjectType = "agent_artifact"
	PrismPropertyNewParamsObjectTypeDocument      PrismPropertyNewParamsObjectType = "document"
	PrismPropertyNewParamsObjectTypeAction        PrismPropertyNewParamsObjectType = "action"
	PrismPropertyNewParamsObjectTypeEvent         PrismPropertyNewParamsObjectType = "event"
	PrismPropertyNewParamsObjectTypeOrganization  PrismPropertyNewParamsObjectType = "organization"
	PrismPropertyNewParamsObjectTypeContact       PrismPropertyNewParamsObjectType = "contact"
)

func (PrismPropertyNewParamsObjectType) IsKnown added in v0.9.0

type PrismPropertyOptionDeleteParams added in v0.9.0

type PrismPropertyOptionDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Storage type for a property definition. Determines which per-type table holds
	// the values, and which display formats the property can take.
	Type   param.Field[PrismPropertyOptionDeleteParamsType] `query:"type" api:"required"`
	ListID param.Field[string]                              `query:"list_id" format:"uuid"`
}

func (PrismPropertyOptionDeleteParams) URLQuery added in v0.9.0

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

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

type PrismPropertyOptionDeleteParamsObjectType added in v0.9.0

type PrismPropertyOptionDeleteParamsObjectType string
const (
	PrismPropertyOptionDeleteParamsObjectTypeComment       PrismPropertyOptionDeleteParamsObjectType = "comment"
	PrismPropertyOptionDeleteParamsObjectTypeDeal          PrismPropertyOptionDeleteParamsObjectType = "deal"
	PrismPropertyOptionDeleteParamsObjectTypeEngagement    PrismPropertyOptionDeleteParamsObjectType = "engagement"
	PrismPropertyOptionDeleteParamsObjectTypeIdentity      PrismPropertyOptionDeleteParamsObjectType = "identity"
	PrismPropertyOptionDeleteParamsObjectTypeAIChatThread  PrismPropertyOptionDeleteParamsObjectType = "ai_chat_thread"
	PrismPropertyOptionDeleteParamsObjectTypeAIChatMessage PrismPropertyOptionDeleteParamsObjectType = "ai_chat_message"
	PrismPropertyOptionDeleteParamsObjectTypeAgentArtifact PrismPropertyOptionDeleteParamsObjectType = "agent_artifact"
	PrismPropertyOptionDeleteParamsObjectTypeDocument      PrismPropertyOptionDeleteParamsObjectType = "document"
	PrismPropertyOptionDeleteParamsObjectTypeAction        PrismPropertyOptionDeleteParamsObjectType = "action"
	PrismPropertyOptionDeleteParamsObjectTypeEvent         PrismPropertyOptionDeleteParamsObjectType = "event"
	PrismPropertyOptionDeleteParamsObjectTypeOrganization  PrismPropertyOptionDeleteParamsObjectType = "organization"
	PrismPropertyOptionDeleteParamsObjectTypeContact       PrismPropertyOptionDeleteParamsObjectType = "contact"
)

func (PrismPropertyOptionDeleteParamsObjectType) IsKnown added in v0.9.0

type PrismPropertyOptionDeleteParamsType added in v0.9.0

type PrismPropertyOptionDeleteParamsType string

Storage type for a property definition. Determines which per-type table holds the values, and which display formats the property can take.

const (
	PrismPropertyOptionDeleteParamsTypeNum                   PrismPropertyOptionDeleteParamsType = "num"
	PrismPropertyOptionDeleteParamsTypeStr                   PrismPropertyOptionDeleteParamsType = "str"
	PrismPropertyOptionDeleteParamsTypeBool                  PrismPropertyOptionDeleteParamsType = "bool"
	PrismPropertyOptionDeleteParamsTypeDate                  PrismPropertyOptionDeleteParamsType = "date"
	PrismPropertyOptionDeleteParamsTypeText                  PrismPropertyOptionDeleteParamsType = "text"
	PrismPropertyOptionDeleteParamsTypeByte                  PrismPropertyOptionDeleteParamsType = "byte"
	PrismPropertyOptionDeleteParamsTypeSelectStr             PrismPropertyOptionDeleteParamsType = "select_str"
	PrismPropertyOptionDeleteParamsTypeMultiStr              PrismPropertyOptionDeleteParamsType = "multi_str"
	PrismPropertyOptionDeleteParamsTypeMultiselectStr        PrismPropertyOptionDeleteParamsType = "multiselect_str"
	PrismPropertyOptionDeleteParamsTypeJsonb                 PrismPropertyOptionDeleteParamsType = "jsonb"
	PrismPropertyOptionDeleteParamsTypeRefIdentity           PrismPropertyOptionDeleteParamsType = "ref_identity"
	PrismPropertyOptionDeleteParamsTypeRefUser               PrismPropertyOptionDeleteParamsType = "ref_user"
	PrismPropertyOptionDeleteParamsTypeRefOrganization       PrismPropertyOptionDeleteParamsType = "ref_organization"
	PrismPropertyOptionDeleteParamsTypeRefContact            PrismPropertyOptionDeleteParamsType = "ref_contact"
	PrismPropertyOptionDeleteParamsTypeRefThread             PrismPropertyOptionDeleteParamsType = "ref_thread"
	PrismPropertyOptionDeleteParamsTypeRefMessage            PrismPropertyOptionDeleteParamsType = "ref_message"
	PrismPropertyOptionDeleteParamsTypeRefEvent              PrismPropertyOptionDeleteParamsType = "ref_event"
	PrismPropertyOptionDeleteParamsTypeRefAccount            PrismPropertyOptionDeleteParamsType = "ref_account"
	PrismPropertyOptionDeleteParamsTypeRefAIChatThread       PrismPropertyOptionDeleteParamsType = "ref_ai_chat_thread"
	PrismPropertyOptionDeleteParamsTypeRefAIChatMessage      PrismPropertyOptionDeleteParamsType = "ref_ai_chat_message"
	PrismPropertyOptionDeleteParamsTypeMultirefAIChatMessage PrismPropertyOptionDeleteParamsType = "multiref_ai_chat_message"
	PrismPropertyOptionDeleteParamsTypeMultirefAgentArtifact PrismPropertyOptionDeleteParamsType = "multiref_agent_artifact"
	PrismPropertyOptionDeleteParamsTypeMultirefAction        PrismPropertyOptionDeleteParamsType = "multiref_action"
	PrismPropertyOptionDeleteParamsTypeMultirefComment       PrismPropertyOptionDeleteParamsType = "multiref_comment"
	PrismPropertyOptionDeleteParamsTypeMultirefContact       PrismPropertyOptionDeleteParamsType = "multiref_contact"
	PrismPropertyOptionDeleteParamsTypeMultirefLabel         PrismPropertyOptionDeleteParamsType = "multiref_label"
	PrismPropertyOptionDeleteParamsTypeMultirefThread        PrismPropertyOptionDeleteParamsType = "multiref_thread"
	PrismPropertyOptionDeleteParamsTypeMultirefMessages      PrismPropertyOptionDeleteParamsType = "multiref_messages"
	PrismPropertyOptionDeleteParamsTypeMultirefDocument      PrismPropertyOptionDeleteParamsType = "multiref_document"
	PrismPropertyOptionDeleteParamsTypeMultirefIdentity      PrismPropertyOptionDeleteParamsType = "multiref_identity"
	PrismPropertyOptionDeleteParamsTypeMultirefOrganization  PrismPropertyOptionDeleteParamsType = "multiref_organization"
	PrismPropertyOptionDeleteParamsTypeMultirefEngagement    PrismPropertyOptionDeleteParamsType = "multiref_engagement"
	PrismPropertyOptionDeleteParamsTypeMultirefAttendee      PrismPropertyOptionDeleteParamsType = "multiref_attendee"
	PrismPropertyOptionDeleteParamsTypeMultirefMeetingEntry  PrismPropertyOptionDeleteParamsType = "multiref_meeting_entry"
	PrismPropertyOptionDeleteParamsTypeMultirefReadReceipt   PrismPropertyOptionDeleteParamsType = "multiref_read_receipt"
	PrismPropertyOptionDeleteParamsTypeMultirefAccount       PrismPropertyOptionDeleteParamsType = "multiref_account"
	PrismPropertyOptionDeleteParamsTypeMultirefSource        PrismPropertyOptionDeleteParamsType = "multiref_source"
)

func (PrismPropertyOptionDeleteParamsType) IsKnown added in v0.9.0

type PrismPropertyOptionNewParams added in v0.9.0

type PrismPropertyOptionNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// New option for a `select_str` or `multiselect_str` property. `type` identifies
	// the per-type option table to write.
	PropertyOptionCreate PropertyOptionCreateParam `json:"property_option_create" api:"required"`
	IdempotencyKey       param.Field[string]       `header:"Idempotency-Key"`
}

func (PrismPropertyOptionNewParams) MarshalJSON added in v0.9.0

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

type PrismPropertyOptionNewParamsObjectType added in v0.9.0

type PrismPropertyOptionNewParamsObjectType string
const (
	PrismPropertyOptionNewParamsObjectTypeComment       PrismPropertyOptionNewParamsObjectType = "comment"
	PrismPropertyOptionNewParamsObjectTypeDeal          PrismPropertyOptionNewParamsObjectType = "deal"
	PrismPropertyOptionNewParamsObjectTypeEngagement    PrismPropertyOptionNewParamsObjectType = "engagement"
	PrismPropertyOptionNewParamsObjectTypeIdentity      PrismPropertyOptionNewParamsObjectType = "identity"
	PrismPropertyOptionNewParamsObjectTypeAIChatThread  PrismPropertyOptionNewParamsObjectType = "ai_chat_thread"
	PrismPropertyOptionNewParamsObjectTypeAIChatMessage PrismPropertyOptionNewParamsObjectType = "ai_chat_message"
	PrismPropertyOptionNewParamsObjectTypeAgentArtifact PrismPropertyOptionNewParamsObjectType = "agent_artifact"
	PrismPropertyOptionNewParamsObjectTypeDocument      PrismPropertyOptionNewParamsObjectType = "document"
	PrismPropertyOptionNewParamsObjectTypeAction        PrismPropertyOptionNewParamsObjectType = "action"
	PrismPropertyOptionNewParamsObjectTypeEvent         PrismPropertyOptionNewParamsObjectType = "event"
	PrismPropertyOptionNewParamsObjectTypeOrganization  PrismPropertyOptionNewParamsObjectType = "organization"
	PrismPropertyOptionNewParamsObjectTypeContact       PrismPropertyOptionNewParamsObjectType = "contact"
)

func (PrismPropertyOptionNewParamsObjectType) IsKnown added in v0.9.0

type PrismPropertyOptionService added in v0.9.0

type PrismPropertyOptionService struct {
	Options []option.RequestOption
}

PrismPropertyOptionService contains methods and other services that help with interacting with the micro 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 NewPrismPropertyOptionService method instead.

func NewPrismPropertyOptionService added in v0.9.0

func NewPrismPropertyOptionService(opts ...option.RequestOption) (r *PrismPropertyOptionService)

NewPrismPropertyOptionService 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 (*PrismPropertyOptionService) Delete added in v0.9.0

Delete a property option

func (*PrismPropertyOptionService) New added in v0.9.0

Adds a single option to a `select_str` or `multiselect_str` property definition. Body must include `type` so the server knows which per-type option table to write.

func (*PrismPropertyOptionService) Update added in v0.9.0

Update a property option

type PrismPropertyOptionUpdateParams added in v0.9.0

type PrismPropertyOptionUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Partial update of a property option. `type` identifies the per-type option table
	// to write.
	PropertyOptionPatch PropertyOptionPatchParam `json:"property_option_patch" api:"required"`
	IdempotencyKey      param.Field[string]      `header:"Idempotency-Key"`
}

func (PrismPropertyOptionUpdateParams) MarshalJSON added in v0.9.0

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

type PrismPropertyOptionUpdateParamsObjectType added in v0.9.0

type PrismPropertyOptionUpdateParamsObjectType string
const (
	PrismPropertyOptionUpdateParamsObjectTypeComment       PrismPropertyOptionUpdateParamsObjectType = "comment"
	PrismPropertyOptionUpdateParamsObjectTypeDeal          PrismPropertyOptionUpdateParamsObjectType = "deal"
	PrismPropertyOptionUpdateParamsObjectTypeEngagement    PrismPropertyOptionUpdateParamsObjectType = "engagement"
	PrismPropertyOptionUpdateParamsObjectTypeIdentity      PrismPropertyOptionUpdateParamsObjectType = "identity"
	PrismPropertyOptionUpdateParamsObjectTypeAIChatThread  PrismPropertyOptionUpdateParamsObjectType = "ai_chat_thread"
	PrismPropertyOptionUpdateParamsObjectTypeAIChatMessage PrismPropertyOptionUpdateParamsObjectType = "ai_chat_message"
	PrismPropertyOptionUpdateParamsObjectTypeAgentArtifact PrismPropertyOptionUpdateParamsObjectType = "agent_artifact"
	PrismPropertyOptionUpdateParamsObjectTypeDocument      PrismPropertyOptionUpdateParamsObjectType = "document"
	PrismPropertyOptionUpdateParamsObjectTypeAction        PrismPropertyOptionUpdateParamsObjectType = "action"
	PrismPropertyOptionUpdateParamsObjectTypeEvent         PrismPropertyOptionUpdateParamsObjectType = "event"
	PrismPropertyOptionUpdateParamsObjectTypeOrganization  PrismPropertyOptionUpdateParamsObjectType = "organization"
	PrismPropertyOptionUpdateParamsObjectTypeContact       PrismPropertyOptionUpdateParamsObjectType = "contact"
)

func (PrismPropertyOptionUpdateParamsObjectType) IsKnown added in v0.9.0

type PrismPropertyService added in v0.5.0

type PrismPropertyService struct {
	Options []option.RequestOption
	Options *PrismPropertyOptionService
}

PrismPropertyService contains methods and other services that help with interacting with the micro 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 NewPrismPropertyService method instead.

func NewPrismPropertyService added in v0.5.0

func NewPrismPropertyService(opts ...option.RequestOption) (r *PrismPropertyService)

NewPrismPropertyService 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 (*PrismPropertyService) Delete added in v0.9.0

Removes the property definition and any of its options. Fails with 409 `property_in_use` if records still reference the property.

func (*PrismPropertyService) List added in v0.5.0

Get metadata properties by object type

func (*PrismPropertyService) ListAll added in v0.5.0

Get metadata properties

func (*PrismPropertyService) New added in v0.9.0

Define a new property on this object type, scoped to the calling team. Search the existing properties first (GET this path with `term`) and reuse a match instead of defining a second property for the same fact. Pass `list_id` in the body to scope the definition to one list/app; without it the property is workspace-global and appears on every list. A name already used in that scope, an explicitly requested slug already taken, or a slug that a shared property already owns all return 409 naming the definition to use instead. The property's display format is resolved from `type` automatically — pass `role_id` only to override it. For `select_str` and `multiselect_str` types you may pre-seed the choices via `options`.

func (*PrismPropertyService) Update added in v0.9.0

Patches the editable fields (`name`, `icon`, `enabled`) of a property definition. `type` and scoping fields are immutable; `type` must be supplied in the body so the server knows which per-type table to write.

type PrismPropertyUpdateParams added in v0.9.0

type PrismPropertyUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Partial update of a property definition. Only `name`, `icon`, `enabled`, and
	// `required` are editable. `type` identifies the per-type table to write.
	PropertyDefinitionPatch PropertyDefinitionPatchParam `json:"property_definition_patch" api:"required"`
	IdempotencyKey          param.Field[string]          `header:"Idempotency-Key"`
}

func (PrismPropertyUpdateParams) MarshalJSON added in v0.9.0

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

type PrismPropertyUpdateParamsObjectType added in v0.9.0

type PrismPropertyUpdateParamsObjectType string
const (
	PrismPropertyUpdateParamsObjectTypeComment       PrismPropertyUpdateParamsObjectType = "comment"
	PrismPropertyUpdateParamsObjectTypeDeal          PrismPropertyUpdateParamsObjectType = "deal"
	PrismPropertyUpdateParamsObjectTypeEngagement    PrismPropertyUpdateParamsObjectType = "engagement"
	PrismPropertyUpdateParamsObjectTypeIdentity      PrismPropertyUpdateParamsObjectType = "identity"
	PrismPropertyUpdateParamsObjectTypeAIChatThread  PrismPropertyUpdateParamsObjectType = "ai_chat_thread"
	PrismPropertyUpdateParamsObjectTypeAIChatMessage PrismPropertyUpdateParamsObjectType = "ai_chat_message"
	PrismPropertyUpdateParamsObjectTypeAgentArtifact PrismPropertyUpdateParamsObjectType = "agent_artifact"
	PrismPropertyUpdateParamsObjectTypeDocument      PrismPropertyUpdateParamsObjectType = "document"
	PrismPropertyUpdateParamsObjectTypeAction        PrismPropertyUpdateParamsObjectType = "action"
	PrismPropertyUpdateParamsObjectTypeEvent         PrismPropertyUpdateParamsObjectType = "event"
	PrismPropertyUpdateParamsObjectTypeOrganization  PrismPropertyUpdateParamsObjectType = "organization"
	PrismPropertyUpdateParamsObjectTypeContact       PrismPropertyUpdateParamsObjectType = "contact"
)

func (PrismPropertyUpdateParamsObjectType) IsKnown added in v0.9.0

type PrismService

type PrismService struct {
	Options    []option.RequestOption
	Properties *PrismPropertyService
	Imports    *PrismImportService
	Objects    *PrismObjectService
}

PrismService contains methods and other services that help with interacting with the micro 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 NewPrismService method instead.

func NewPrismService

func NewPrismService(opts ...option.RequestOption) (r *PrismService)

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

type PropertyDefinition added in v0.9.0

type PropertyDefinition struct {
	ID   string `json:"id" api:"required" format:"uuid"`
	Slug string `json:"slug" api:"required"`
	// Storage type for a property definition. Determines which per-type table holds
	// the values, and which display formats the property can take.
	Type PropertyDefinitionType `json:"type" api:"required"`
	// Reserved alias naming this definition, or null. `app_stage` marks the list
	// pipeline stage definition. Resolve stages by this field rather than by name,
	// slug, or team_id: a superseded native `status` definition can coexist with the
	// pipeline one and is otherwise identical on the wire.
	Alias PropertyDefinitionAlias `json:"alias" api:"nullable"`
	// Identifier of the list this definition is scoped to, when applicable.
	CRMID string `json:"crm_id" api:"nullable" format:"uuid"`
	// Canonical identifier of the list this definition is scoped to.
	ListID string `json:"list_id" api:"nullable" format:"uuid"`
	Locked bool   `json:"locked"`
	Name   string `json:"name" api:"nullable"`
	Native bool   `json:"native"`
	// Present only for select_str and multiselect_str types.
	Options []PropertyOption `json:"options"`
	// When true, records of this object type must carry a non-empty value for this
	// property on create, and a patch may not clear it.
	Required bool `json:"required"`
	// The property's display format. Always populated on definitions created through
	// this API; a null here means the definition predates that and will render as an
	// unknown format until it is patched.
	RoleID string                 `json:"role_id" api:"nullable" format:"uuid"`
	TeamID string                 `json:"team_id" api:"nullable" format:"uuid"`
	JSON   propertyDefinitionJSON `json:"-"`
}

Definition for a single property on an object type. Definitions with team_id and crm_id null are shared defaults; values may be scoped to a team and/or list (crm).

func (*PropertyDefinition) UnmarshalJSON added in v0.9.0

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

type PropertyDefinitionAlias added in v0.9.0

type PropertyDefinitionAlias string

Reserved alias naming this definition, or null. `app_stage` marks the list pipeline stage definition. Resolve stages by this field rather than by name, slug, or team_id: a superseded native `status` definition can coexist with the pipeline one and is otherwise identical on the wire.

const (
	PropertyDefinitionAliasAppStage PropertyDefinitionAlias = "app_stage"
)

func (PropertyDefinitionAlias) IsKnown added in v0.9.0

func (r PropertyDefinitionAlias) IsKnown() bool

type PropertyDefinitionCreateOptionParam added in v0.9.0

type PropertyDefinitionCreateOptionParam struct {
	Value       param.Field[string] `json:"value" api:"required"`
	ColorScheme param.Field[string] `json:"color_scheme"`
	Description param.Field[string] `json:"description"`
	Icon        param.Field[string] `json:"icon"`
	OptionGroup param.Field[string] `json:"option_group"`
	Slug        param.Field[string] `json:"slug"`
	SortIndex   param.Field[int64]  `json:"sort_index"`
}

func (PropertyDefinitionCreateOptionParam) MarshalJSON added in v0.9.0

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

type PropertyDefinitionCreateParam added in v0.9.0

type PropertyDefinitionCreateParam struct {
	// Human-readable name, unique within the scope the definition is created in. A
	// name already taken in that scope returns 409; the message names the existing
	// definition's id, slug and type so you can write to it instead.
	Name param.Field[string] `json:"name" api:"required"`
	// Storage type for a property definition. Determines which per-type table holds
	// the values, and which display formats the property can take.
	Type param.Field[PropertyDefinitionCreateType] `json:"type" api:"required"`
	Icon param.Field[string]                       `json:"icon"`
	// Scopes the definition to one list/app. Omit it only for a property that
	// genuinely belongs to the whole workspace: a definition created without `list_id`
	// is workspace-global and surfaces on every list of this object type.
	ListID param.Field[string] `json:"list_id" format:"uuid"`
	// Only honored when `type` is `select_str` or `multiselect_str`.
	Options param.Field[[]PropertyDefinitionCreateOptionParam] `json:"options"`
	// When true, records must carry a non-empty value for this property on create.
	// Defaults to false.
	Required param.Field[bool] `json:"required"`
	// Optional display format for the property, drawn from the workspace's property
	// roles. Omit it and the canonical role for `type` is applied (plain text, plain
	// number, checkbox). Supply it only to pick a narrower format such as email, URL
	// or currency; the role's data type must match `type`.
	RoleID param.Field[string] `json:"role_id" format:"uuid"`
	// URL-safe identifier. When omitted it defaults to a slugified `name` and is
	// disambiguated with a numeric suffix on conflict. When supplied explicitly it is
	// treated as part of your write contract and is never silently renamed — a
	// collision returns 409 instead.
	Slug param.Field[string] `json:"slug"`
}

New property definition. Check for an existing property first (GET the same path with `term`) and reuse it rather than defining a near-duplicate — writes address properties by slug, so two definitions sharing a slug leave no addressable winner. For `select_str`/`multiselect_str` types you may pre-seed choices via `options`.

func (PropertyDefinitionCreateParam) MarshalJSON added in v0.9.0

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

type PropertyDefinitionCreateType added in v0.9.0

type PropertyDefinitionCreateType string

Storage type for a property definition. Determines which per-type table holds the values, and which display formats the property can take.

const (
	PropertyDefinitionCreateTypeNum                   PropertyDefinitionCreateType = "num"
	PropertyDefinitionCreateTypeStr                   PropertyDefinitionCreateType = "str"
	PropertyDefinitionCreateTypeBool                  PropertyDefinitionCreateType = "bool"
	PropertyDefinitionCreateTypeDate                  PropertyDefinitionCreateType = "date"
	PropertyDefinitionCreateTypeText                  PropertyDefinitionCreateType = "text"
	PropertyDefinitionCreateTypeByte                  PropertyDefinitionCreateType = "byte"
	PropertyDefinitionCreateTypeSelectStr             PropertyDefinitionCreateType = "select_str"
	PropertyDefinitionCreateTypeMultiStr              PropertyDefinitionCreateType = "multi_str"
	PropertyDefinitionCreateTypeMultiselectStr        PropertyDefinitionCreateType = "multiselect_str"
	PropertyDefinitionCreateTypeJsonb                 PropertyDefinitionCreateType = "jsonb"
	PropertyDefinitionCreateTypeRefIdentity           PropertyDefinitionCreateType = "ref_identity"
	PropertyDefinitionCreateTypeRefUser               PropertyDefinitionCreateType = "ref_user"
	PropertyDefinitionCreateTypeRefOrganization       PropertyDefinitionCreateType = "ref_organization"
	PropertyDefinitionCreateTypeRefContact            PropertyDefinitionCreateType = "ref_contact"
	PropertyDefinitionCreateTypeRefThread             PropertyDefinitionCreateType = "ref_thread"
	PropertyDefinitionCreateTypeRefMessage            PropertyDefinitionCreateType = "ref_message"
	PropertyDefinitionCreateTypeRefEvent              PropertyDefinitionCreateType = "ref_event"
	PropertyDefinitionCreateTypeRefAccount            PropertyDefinitionCreateType = "ref_account"
	PropertyDefinitionCreateTypeRefAIChatThread       PropertyDefinitionCreateType = "ref_ai_chat_thread"
	PropertyDefinitionCreateTypeRefAIChatMessage      PropertyDefinitionCreateType = "ref_ai_chat_message"
	PropertyDefinitionCreateTypeMultirefAIChatMessage PropertyDefinitionCreateType = "multiref_ai_chat_message"
	PropertyDefinitionCreateTypeMultirefAgentArtifact PropertyDefinitionCreateType = "multiref_agent_artifact"
	PropertyDefinitionCreateTypeMultirefAction        PropertyDefinitionCreateType = "multiref_action"
	PropertyDefinitionCreateTypeMultirefComment       PropertyDefinitionCreateType = "multiref_comment"
	PropertyDefinitionCreateTypeMultirefContact       PropertyDefinitionCreateType = "multiref_contact"
	PropertyDefinitionCreateTypeMultirefLabel         PropertyDefinitionCreateType = "multiref_label"
	PropertyDefinitionCreateTypeMultirefThread        PropertyDefinitionCreateType = "multiref_thread"
	PropertyDefinitionCreateTypeMultirefMessages      PropertyDefinitionCreateType = "multiref_messages"
	PropertyDefinitionCreateTypeMultirefDocument      PropertyDefinitionCreateType = "multiref_document"
	PropertyDefinitionCreateTypeMultirefIdentity      PropertyDefinitionCreateType = "multiref_identity"
	PropertyDefinitionCreateTypeMultirefOrganization  PropertyDefinitionCreateType = "multiref_organization"
	PropertyDefinitionCreateTypeMultirefEngagement    PropertyDefinitionCreateType = "multiref_engagement"
	PropertyDefinitionCreateTypeMultirefAttendee      PropertyDefinitionCreateType = "multiref_attendee"
	PropertyDefinitionCreateTypeMultirefMeetingEntry  PropertyDefinitionCreateType = "multiref_meeting_entry"
	PropertyDefinitionCreateTypeMultirefReadReceipt   PropertyDefinitionCreateType = "multiref_read_receipt"
	PropertyDefinitionCreateTypeMultirefAccount       PropertyDefinitionCreateType = "multiref_account"
	PropertyDefinitionCreateTypeMultirefSource        PropertyDefinitionCreateType = "multiref_source"
)

func (PropertyDefinitionCreateType) IsKnown added in v0.9.0

func (r PropertyDefinitionCreateType) IsKnown() bool

type PropertyDefinitionPatchParam added in v0.9.0

type PropertyDefinitionPatchParam struct {
	// Storage type for a property definition. Determines which per-type table holds
	// the values, and which display formats the property can take.
	Type     param.Field[PropertyDefinitionPatchType] `json:"type" api:"required"`
	Enabled  param.Field[bool]                        `json:"enabled"`
	Icon     param.Field[string]                      `json:"icon"`
	ListID   param.Field[string]                      `json:"list_id" format:"uuid"`
	Name     param.Field[string]                      `json:"name"`
	Required param.Field[bool]                        `json:"required"`
}

Partial update of a property definition. Only `name`, `icon`, `enabled`, and `required` are editable. `type` identifies the per-type table to write.

func (PropertyDefinitionPatchParam) MarshalJSON added in v0.9.0

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

type PropertyDefinitionPatchType added in v0.9.0

type PropertyDefinitionPatchType string

Storage type for a property definition. Determines which per-type table holds the values, and which display formats the property can take.

const (
	PropertyDefinitionPatchTypeNum                   PropertyDefinitionPatchType = "num"
	PropertyDefinitionPatchTypeStr                   PropertyDefinitionPatchType = "str"
	PropertyDefinitionPatchTypeBool                  PropertyDefinitionPatchType = "bool"
	PropertyDefinitionPatchTypeDate                  PropertyDefinitionPatchType = "date"
	PropertyDefinitionPatchTypeText                  PropertyDefinitionPatchType = "text"
	PropertyDefinitionPatchTypeByte                  PropertyDefinitionPatchType = "byte"
	PropertyDefinitionPatchTypeSelectStr             PropertyDefinitionPatchType = "select_str"
	PropertyDefinitionPatchTypeMultiStr              PropertyDefinitionPatchType = "multi_str"
	PropertyDefinitionPatchTypeMultiselectStr        PropertyDefinitionPatchType = "multiselect_str"
	PropertyDefinitionPatchTypeJsonb                 PropertyDefinitionPatchType = "jsonb"
	PropertyDefinitionPatchTypeRefIdentity           PropertyDefinitionPatchType = "ref_identity"
	PropertyDefinitionPatchTypeRefUser               PropertyDefinitionPatchType = "ref_user"
	PropertyDefinitionPatchTypeRefOrganization       PropertyDefinitionPatchType = "ref_organization"
	PropertyDefinitionPatchTypeRefContact            PropertyDefinitionPatchType = "ref_contact"
	PropertyDefinitionPatchTypeRefThread             PropertyDefinitionPatchType = "ref_thread"
	PropertyDefinitionPatchTypeRefMessage            PropertyDefinitionPatchType = "ref_message"
	PropertyDefinitionPatchTypeRefEvent              PropertyDefinitionPatchType = "ref_event"
	PropertyDefinitionPatchTypeRefAccount            PropertyDefinitionPatchType = "ref_account"
	PropertyDefinitionPatchTypeRefAIChatThread       PropertyDefinitionPatchType = "ref_ai_chat_thread"
	PropertyDefinitionPatchTypeRefAIChatMessage      PropertyDefinitionPatchType = "ref_ai_chat_message"
	PropertyDefinitionPatchTypeMultirefAIChatMessage PropertyDefinitionPatchType = "multiref_ai_chat_message"
	PropertyDefinitionPatchTypeMultirefAgentArtifact PropertyDefinitionPatchType = "multiref_agent_artifact"
	PropertyDefinitionPatchTypeMultirefAction        PropertyDefinitionPatchType = "multiref_action"
	PropertyDefinitionPatchTypeMultirefComment       PropertyDefinitionPatchType = "multiref_comment"
	PropertyDefinitionPatchTypeMultirefContact       PropertyDefinitionPatchType = "multiref_contact"
	PropertyDefinitionPatchTypeMultirefLabel         PropertyDefinitionPatchType = "multiref_label"
	PropertyDefinitionPatchTypeMultirefThread        PropertyDefinitionPatchType = "multiref_thread"
	PropertyDefinitionPatchTypeMultirefMessages      PropertyDefinitionPatchType = "multiref_messages"
	PropertyDefinitionPatchTypeMultirefDocument      PropertyDefinitionPatchType = "multiref_document"
	PropertyDefinitionPatchTypeMultirefIdentity      PropertyDefinitionPatchType = "multiref_identity"
	PropertyDefinitionPatchTypeMultirefOrganization  PropertyDefinitionPatchType = "multiref_organization"
	PropertyDefinitionPatchTypeMultirefEngagement    PropertyDefinitionPatchType = "multiref_engagement"
	PropertyDefinitionPatchTypeMultirefAttendee      PropertyDefinitionPatchType = "multiref_attendee"
	PropertyDefinitionPatchTypeMultirefMeetingEntry  PropertyDefinitionPatchType = "multiref_meeting_entry"
	PropertyDefinitionPatchTypeMultirefReadReceipt   PropertyDefinitionPatchType = "multiref_read_receipt"
	PropertyDefinitionPatchTypeMultirefAccount       PropertyDefinitionPatchType = "multiref_account"
	PropertyDefinitionPatchTypeMultirefSource        PropertyDefinitionPatchType = "multiref_source"
)

func (PropertyDefinitionPatchType) IsKnown added in v0.9.0

func (r PropertyDefinitionPatchType) IsKnown() bool

type PropertyDefinitionType added in v0.9.0

type PropertyDefinitionType string

Storage type for a property definition. Determines which per-type table holds the values, and which display formats the property can take.

const (
	PropertyDefinitionTypeNum                   PropertyDefinitionType = "num"
	PropertyDefinitionTypeStr                   PropertyDefinitionType = "str"
	PropertyDefinitionTypeBool                  PropertyDefinitionType = "bool"
	PropertyDefinitionTypeDate                  PropertyDefinitionType = "date"
	PropertyDefinitionTypeText                  PropertyDefinitionType = "text"
	PropertyDefinitionTypeByte                  PropertyDefinitionType = "byte"
	PropertyDefinitionTypeSelectStr             PropertyDefinitionType = "select_str"
	PropertyDefinitionTypeMultiStr              PropertyDefinitionType = "multi_str"
	PropertyDefinitionTypeMultiselectStr        PropertyDefinitionType = "multiselect_str"
	PropertyDefinitionTypeJsonb                 PropertyDefinitionType = "jsonb"
	PropertyDefinitionTypeRefIdentity           PropertyDefinitionType = "ref_identity"
	PropertyDefinitionTypeRefUser               PropertyDefinitionType = "ref_user"
	PropertyDefinitionTypeRefOrganization       PropertyDefinitionType = "ref_organization"
	PropertyDefinitionTypeRefContact            PropertyDefinitionType = "ref_contact"
	PropertyDefinitionTypeRefThread             PropertyDefinitionType = "ref_thread"
	PropertyDefinitionTypeRefMessage            PropertyDefinitionType = "ref_message"
	PropertyDefinitionTypeRefEvent              PropertyDefinitionType = "ref_event"
	PropertyDefinitionTypeRefAccount            PropertyDefinitionType = "ref_account"
	PropertyDefinitionTypeRefAIChatThread       PropertyDefinitionType = "ref_ai_chat_thread"
	PropertyDefinitionTypeRefAIChatMessage      PropertyDefinitionType = "ref_ai_chat_message"
	PropertyDefinitionTypeMultirefAIChatMessage PropertyDefinitionType = "multiref_ai_chat_message"
	PropertyDefinitionTypeMultirefAgentArtifact PropertyDefinitionType = "multiref_agent_artifact"
	PropertyDefinitionTypeMultirefAction        PropertyDefinitionType = "multiref_action"
	PropertyDefinitionTypeMultirefComment       PropertyDefinitionType = "multiref_comment"
	PropertyDefinitionTypeMultirefContact       PropertyDefinitionType = "multiref_contact"
	PropertyDefinitionTypeMultirefLabel         PropertyDefinitionType = "multiref_label"
	PropertyDefinitionTypeMultirefThread        PropertyDefinitionType = "multiref_thread"
	PropertyDefinitionTypeMultirefMessages      PropertyDefinitionType = "multiref_messages"
	PropertyDefinitionTypeMultirefDocument      PropertyDefinitionType = "multiref_document"
	PropertyDefinitionTypeMultirefIdentity      PropertyDefinitionType = "multiref_identity"
	PropertyDefinitionTypeMultirefOrganization  PropertyDefinitionType = "multiref_organization"
	PropertyDefinitionTypeMultirefEngagement    PropertyDefinitionType = "multiref_engagement"
	PropertyDefinitionTypeMultirefAttendee      PropertyDefinitionType = "multiref_attendee"
	PropertyDefinitionTypeMultirefMeetingEntry  PropertyDefinitionType = "multiref_meeting_entry"
	PropertyDefinitionTypeMultirefReadReceipt   PropertyDefinitionType = "multiref_read_receipt"
	PropertyDefinitionTypeMultirefAccount       PropertyDefinitionType = "multiref_account"
	PropertyDefinitionTypeMultirefSource        PropertyDefinitionType = "multiref_source"
)

func (PropertyDefinitionType) IsKnown added in v0.9.0

func (r PropertyDefinitionType) IsKnown() bool

type PropertyOption added in v0.9.0

type PropertyOption struct {
	ID          string `json:"id" api:"required" format:"uuid"`
	Slug        string `json:"slug" api:"required"`
	ColorScheme string `json:"color_scheme" api:"nullable"`
	// Deprecated: deprecated
	CRMID       string `json:"crm_id" api:"nullable" format:"uuid"`
	Description string `json:"description" api:"nullable"`
	Icon        string `json:"icon" api:"nullable"`
	ListID      string `json:"list_id" api:"nullable" format:"uuid"`
	OptionGroup string `json:"option_group" api:"nullable"`
	SortIndex   int64  `json:"sort_index" api:"nullable"`
	// Display value for the option.
	Value string             `json:"value" api:"nullable"`
	JSON  propertyOptionJSON `json:"-"`
}

An enabled option for a select_str or multiselect_str property definition.

func (*PropertyOption) UnmarshalJSON added in v0.9.0

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

type PropertyOptionCreateParam added in v0.9.0

type PropertyOptionCreateParam struct {
	// Storage type for a property definition. Determines which per-type table holds
	// the values, and which display formats the property can take.
	Type param.Field[PropertyOptionCreateType] `json:"type" api:"required"`
	// Display value for the option.
	Value       param.Field[string] `json:"value" api:"required"`
	ColorScheme param.Field[string] `json:"color_scheme"`
	Description param.Field[string] `json:"description"`
	Icon        param.Field[string] `json:"icon"`
	// Scope the option to a specific list/app.
	ListID      param.Field[string] `json:"list_id" format:"uuid"`
	OptionGroup param.Field[string] `json:"option_group"`
	// URL-safe identifier. Defaults to a slugified `value`.
	Slug      param.Field[string] `json:"slug"`
	SortIndex param.Field[int64]  `json:"sort_index"`
}

New option for a `select_str` or `multiselect_str` property. `type` identifies the per-type option table to write.

func (PropertyOptionCreateParam) MarshalJSON added in v0.9.0

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

type PropertyOptionCreateType added in v0.9.0

type PropertyOptionCreateType string

Storage type for a property definition. Determines which per-type table holds the values, and which display formats the property can take.

const (
	PropertyOptionCreateTypeNum                   PropertyOptionCreateType = "num"
	PropertyOptionCreateTypeStr                   PropertyOptionCreateType = "str"
	PropertyOptionCreateTypeBool                  PropertyOptionCreateType = "bool"
	PropertyOptionCreateTypeDate                  PropertyOptionCreateType = "date"
	PropertyOptionCreateTypeText                  PropertyOptionCreateType = "text"
	PropertyOptionCreateTypeByte                  PropertyOptionCreateType = "byte"
	PropertyOptionCreateTypeSelectStr             PropertyOptionCreateType = "select_str"
	PropertyOptionCreateTypeMultiStr              PropertyOptionCreateType = "multi_str"
	PropertyOptionCreateTypeMultiselectStr        PropertyOptionCreateType = "multiselect_str"
	PropertyOptionCreateTypeJsonb                 PropertyOptionCreateType = "jsonb"
	PropertyOptionCreateTypeRefIdentity           PropertyOptionCreateType = "ref_identity"
	PropertyOptionCreateTypeRefUser               PropertyOptionCreateType = "ref_user"
	PropertyOptionCreateTypeRefOrganization       PropertyOptionCreateType = "ref_organization"
	PropertyOptionCreateTypeRefContact            PropertyOptionCreateType = "ref_contact"
	PropertyOptionCreateTypeRefThread             PropertyOptionCreateType = "ref_thread"
	PropertyOptionCreateTypeRefMessage            PropertyOptionCreateType = "ref_message"
	PropertyOptionCreateTypeRefEvent              PropertyOptionCreateType = "ref_event"
	PropertyOptionCreateTypeRefAccount            PropertyOptionCreateType = "ref_account"
	PropertyOptionCreateTypeRefAIChatThread       PropertyOptionCreateType = "ref_ai_chat_thread"
	PropertyOptionCreateTypeRefAIChatMessage      PropertyOptionCreateType = "ref_ai_chat_message"
	PropertyOptionCreateTypeMultirefAIChatMessage PropertyOptionCreateType = "multiref_ai_chat_message"
	PropertyOptionCreateTypeMultirefAgentArtifact PropertyOptionCreateType = "multiref_agent_artifact"
	PropertyOptionCreateTypeMultirefAction        PropertyOptionCreateType = "multiref_action"
	PropertyOptionCreateTypeMultirefComment       PropertyOptionCreateType = "multiref_comment"
	PropertyOptionCreateTypeMultirefContact       PropertyOptionCreateType = "multiref_contact"
	PropertyOptionCreateTypeMultirefLabel         PropertyOptionCreateType = "multiref_label"
	PropertyOptionCreateTypeMultirefThread        PropertyOptionCreateType = "multiref_thread"
	PropertyOptionCreateTypeMultirefMessages      PropertyOptionCreateType = "multiref_messages"
	PropertyOptionCreateTypeMultirefDocument      PropertyOptionCreateType = "multiref_document"
	PropertyOptionCreateTypeMultirefIdentity      PropertyOptionCreateType = "multiref_identity"
	PropertyOptionCreateTypeMultirefOrganization  PropertyOptionCreateType = "multiref_organization"
	PropertyOptionCreateTypeMultirefEngagement    PropertyOptionCreateType = "multiref_engagement"
	PropertyOptionCreateTypeMultirefAttendee      PropertyOptionCreateType = "multiref_attendee"
	PropertyOptionCreateTypeMultirefMeetingEntry  PropertyOptionCreateType = "multiref_meeting_entry"
	PropertyOptionCreateTypeMultirefReadReceipt   PropertyOptionCreateType = "multiref_read_receipt"
	PropertyOptionCreateTypeMultirefAccount       PropertyOptionCreateType = "multiref_account"
	PropertyOptionCreateTypeMultirefSource        PropertyOptionCreateType = "multiref_source"
)

func (PropertyOptionCreateType) IsKnown added in v0.9.0

func (r PropertyOptionCreateType) IsKnown() bool

type PropertyOptionPatchParam added in v0.9.0

type PropertyOptionPatchParam struct {
	// Storage type for a property definition. Determines which per-type table holds
	// the values, and which display formats the property can take.
	Type        param.Field[PropertyOptionPatchType] `json:"type" api:"required"`
	ColorScheme param.Field[string]                  `json:"color_scheme"`
	Description param.Field[string]                  `json:"description"`
	Enabled     param.Field[bool]                    `json:"enabled"`
	Icon        param.Field[string]                  `json:"icon"`
	ListID      param.Field[string]                  `json:"list_id" format:"uuid"`
	OptionGroup param.Field[string]                  `json:"option_group"`
	Slug        param.Field[string]                  `json:"slug"`
	SortIndex   param.Field[int64]                   `json:"sort_index"`
	Value       param.Field[string]                  `json:"value"`
}

Partial update of a property option. `type` identifies the per-type option table to write.

func (PropertyOptionPatchParam) MarshalJSON added in v0.9.0

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

type PropertyOptionPatchType added in v0.9.0

type PropertyOptionPatchType string

Storage type for a property definition. Determines which per-type table holds the values, and which display formats the property can take.

const (
	PropertyOptionPatchTypeNum                   PropertyOptionPatchType = "num"
	PropertyOptionPatchTypeStr                   PropertyOptionPatchType = "str"
	PropertyOptionPatchTypeBool                  PropertyOptionPatchType = "bool"
	PropertyOptionPatchTypeDate                  PropertyOptionPatchType = "date"
	PropertyOptionPatchTypeText                  PropertyOptionPatchType = "text"
	PropertyOptionPatchTypeByte                  PropertyOptionPatchType = "byte"
	PropertyOptionPatchTypeSelectStr             PropertyOptionPatchType = "select_str"
	PropertyOptionPatchTypeMultiStr              PropertyOptionPatchType = "multi_str"
	PropertyOptionPatchTypeMultiselectStr        PropertyOptionPatchType = "multiselect_str"
	PropertyOptionPatchTypeJsonb                 PropertyOptionPatchType = "jsonb"
	PropertyOptionPatchTypeRefIdentity           PropertyOptionPatchType = "ref_identity"
	PropertyOptionPatchTypeRefUser               PropertyOptionPatchType = "ref_user"
	PropertyOptionPatchTypeRefOrganization       PropertyOptionPatchType = "ref_organization"
	PropertyOptionPatchTypeRefContact            PropertyOptionPatchType = "ref_contact"
	PropertyOptionPatchTypeRefThread             PropertyOptionPatchType = "ref_thread"
	PropertyOptionPatchTypeRefMessage            PropertyOptionPatchType = "ref_message"
	PropertyOptionPatchTypeRefEvent              PropertyOptionPatchType = "ref_event"
	PropertyOptionPatchTypeRefAccount            PropertyOptionPatchType = "ref_account"
	PropertyOptionPatchTypeRefAIChatThread       PropertyOptionPatchType = "ref_ai_chat_thread"
	PropertyOptionPatchTypeRefAIChatMessage      PropertyOptionPatchType = "ref_ai_chat_message"
	PropertyOptionPatchTypeMultirefAIChatMessage PropertyOptionPatchType = "multiref_ai_chat_message"
	PropertyOptionPatchTypeMultirefAgentArtifact PropertyOptionPatchType = "multiref_agent_artifact"
	PropertyOptionPatchTypeMultirefAction        PropertyOptionPatchType = "multiref_action"
	PropertyOptionPatchTypeMultirefComment       PropertyOptionPatchType = "multiref_comment"
	PropertyOptionPatchTypeMultirefContact       PropertyOptionPatchType = "multiref_contact"
	PropertyOptionPatchTypeMultirefLabel         PropertyOptionPatchType = "multiref_label"
	PropertyOptionPatchTypeMultirefThread        PropertyOptionPatchType = "multiref_thread"
	PropertyOptionPatchTypeMultirefMessages      PropertyOptionPatchType = "multiref_messages"
	PropertyOptionPatchTypeMultirefDocument      PropertyOptionPatchType = "multiref_document"
	PropertyOptionPatchTypeMultirefIdentity      PropertyOptionPatchType = "multiref_identity"
	PropertyOptionPatchTypeMultirefOrganization  PropertyOptionPatchType = "multiref_organization"
	PropertyOptionPatchTypeMultirefEngagement    PropertyOptionPatchType = "multiref_engagement"
	PropertyOptionPatchTypeMultirefAttendee      PropertyOptionPatchType = "multiref_attendee"
	PropertyOptionPatchTypeMultirefMeetingEntry  PropertyOptionPatchType = "multiref_meeting_entry"
	PropertyOptionPatchTypeMultirefReadReceipt   PropertyOptionPatchType = "multiref_read_receipt"
	PropertyOptionPatchTypeMultirefAccount       PropertyOptionPatchType = "multiref_account"
	PropertyOptionPatchTypeMultirefSource        PropertyOptionPatchType = "multiref_source"
)

func (PropertyOptionPatchType) IsKnown added in v0.9.0

func (r PropertyOptionPatchType) IsKnown() bool

type TriggeredAutomation added in v0.9.0

type TriggeredAutomation struct {
	Kind TriggeredAutomationKind `json:"kind" api:"required"`
	Name string                  `json:"name" api:"required"`
	ID   string                  `json:"id" format:"uuid"`
	// Actions to run when the automation fires; each item has a `type` plus
	// type-specific fields.
	Actions []TriggeredAutomationAction `json:"actions"`
	// A changeset filter group (update automations only): a combinator plus an array
	// of transition clauses matching what is changing. Dot-paths (nested reference
	// filters) are NOT permitted — direct properties only.
	Changeset TriggeredAutomationChangeset `json:"changeset"`
	CreatedAt string                       `json:"created_at"`
	Enabled   bool                         `json:"enabled"`
	ListID    string                       `json:"list_id" api:"nullable" format:"uuid"`
	// Lifecycle automations only.
	OnCreate bool `json:"on_create"`
	// Lifecycle automations only.
	OnDelete bool `json:"on_delete"`
	// A filter group: a combinator plus an array of slug-based clauses. Dot-paths
	// (e.g. `organization.location`) express nested reference filters.
	State     TriggeredAutomationState `json:"state"`
	TeamID    string                   `json:"team_id" api:"nullable" format:"uuid"`
	UpdatedAt string                   `json:"updated_at" api:"nullable"`
	UserID    string                   `json:"user_id" api:"nullable"`
	JSON      triggeredAutomationJSON  `json:"-"`
}

A triggered automation. `kind` selects the shape: `update` fires on object updates and requires a `changeset` (from/to transition) filter plus an optional `state` precondition; `lifecycle` fires on create and/or delete (`on_create`/`on_delete`) and requires a `state` filter (no changeset). `state` permits dot-paths (nested reference filters); `changeset` is direct properties only. Object type is taken from the path.

func (*TriggeredAutomation) UnmarshalJSON added in v0.9.0

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

type TriggeredAutomationAction added in v0.9.0

type TriggeredAutomationAction struct {
	Type TriggeredAutomationActionsType `json:"type" api:"required"`
	// Required when `type` is `agent`. The agent to run.
	AgentID string `json:"agent_id" api:"nullable" format:"uuid"`
	// wait: cron schedule for the resume time. Exactly one of delay_seconds or
	// cron_expression.
	CronExpression string `json:"cron_expression" api:"nullable"`
	// wait: relative delay in seconds. Exactly one of delay_seconds or
	// cron_expression.
	DelaySeconds int64 `json:"delay_seconds" api:"nullable"`
	// Required when `type` is `email`. The property (on the recipient view object)
	// holding the recipient email address.
	RecipientEmailPropDefID string `json:"recipient_email_prop_def_id" api:"nullable" format:"uuid"`
	// Required when `type` is `linkedin`. The property (on the recipient view object)
	// holding the recipient LinkedIn provider id.
	RecipientProviderPropDefID string `json:"recipient_provider_prop_def_id" api:"nullable" format:"uuid"`
	// Required when `type` is `email` or `linkedin`. The saved prism view resolved at
	// send time to the recipient audience (its filter re-runs each step, so responders
	// drop out of later drip sends).
	RecipientViewID string `json:"recipient_view_id" api:"nullable" format:"uuid"`
	// Required when `type` is `email` or `linkedin`. Must be `contact` — the recipient
	// audience is a contact view (contacts carry the direct email / linkedin provider
	// property).
	RecipientViewObjectType string `json:"recipient_view_object_type" api:"nullable"`
	// Required when `type` is `email` or `linkedin`. The user (external id) the
	// message is sent as.
	SendAsUserID string `json:"send_as_user_id" api:"nullable"`
	// Required when `type` is `email`. The subject line; rendered as a Liquid template
	// per recipient.
	Subject string `json:"subject" api:"nullable"`
	// Required when `type` is `email` or `linkedin`. The email-template document whose
	// body is rendered (Liquid) per recipient.
	TemplateID string `json:"template_id" api:"nullable" format:"uuid"`
	// wait: IANA timezone for evaluating cron_expression (optional).
	Timezone string `json:"timezone" api:"nullable"`
	// Required when `type` is `webhook`. The id of the webhook the event is dispatched
	// to (async) when the automation fires.
	WebhookID   string                        `json:"webhook_id" api:"nullable" format:"uuid"`
	ExtraFields map[string]interface{}        `json:"-" api:"extrafields"`
	JSON        triggeredAutomationActionJSON `json:"-"`
}

An action the automation runs when it fires. `type` selects the kind; the remaining fields are type-specific (`agent` → `agent_id`, `webhook` → `webhook_id`, `email`/`linkedin` → the send-as user, template, and recipient-view fields). Generic: new action types add fields here.

func (*TriggeredAutomationAction) UnmarshalJSON added in v0.9.0

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

type TriggeredAutomationActionParam added in v0.9.0

type TriggeredAutomationActionParam struct {
	Type param.Field[TriggeredAutomationActionsType] `json:"type" api:"required"`
	// Required when `type` is `agent`. The agent to run.
	AgentID param.Field[string] `json:"agent_id" format:"uuid"`
	// wait: cron schedule for the resume time. Exactly one of delay_seconds or
	// cron_expression.
	CronExpression param.Field[string] `json:"cron_expression"`
	// wait: relative delay in seconds. Exactly one of delay_seconds or
	// cron_expression.
	DelaySeconds param.Field[int64] `json:"delay_seconds"`
	// Required when `type` is `email`. The property (on the recipient view object)
	// holding the recipient email address.
	RecipientEmailPropDefID param.Field[string] `json:"recipient_email_prop_def_id" format:"uuid"`
	// Required when `type` is `linkedin`. The property (on the recipient view object)
	// holding the recipient LinkedIn provider id.
	RecipientProviderPropDefID param.Field[string] `json:"recipient_provider_prop_def_id" format:"uuid"`
	// Required when `type` is `email` or `linkedin`. The saved prism view resolved at
	// send time to the recipient audience (its filter re-runs each step, so responders
	// drop out of later drip sends).
	RecipientViewID param.Field[string] `json:"recipient_view_id" format:"uuid"`
	// Required when `type` is `email` or `linkedin`. Must be `contact` — the recipient
	// audience is a contact view (contacts carry the direct email / linkedin provider
	// property).
	RecipientViewObjectType param.Field[string] `json:"recipient_view_object_type"`
	// Required when `type` is `email` or `linkedin`. The user (external id) the
	// message is sent as.
	SendAsUserID param.Field[string] `json:"send_as_user_id"`
	// Required when `type` is `email`. The subject line; rendered as a Liquid template
	// per recipient.
	Subject param.Field[string] `json:"subject"`
	// Required when `type` is `email` or `linkedin`. The email-template document whose
	// body is rendered (Liquid) per recipient.
	TemplateID param.Field[string] `json:"template_id" format:"uuid"`
	// wait: IANA timezone for evaluating cron_expression (optional).
	Timezone param.Field[string] `json:"timezone"`
	// Required when `type` is `webhook`. The id of the webhook the event is dispatched
	// to (async) when the automation fires.
	WebhookID   param.Field[string]    `json:"webhook_id" format:"uuid"`
	ExtraFields map[string]interface{} `json:"-,extras"`
}

An action the automation runs when it fires. `type` selects the kind; the remaining fields are type-specific (`agent` → `agent_id`, `webhook` → `webhook_id`, `email`/`linkedin` → the send-as user, template, and recipient-view fields). Generic: new action types add fields here.

func (TriggeredAutomationActionParam) MarshalJSON added in v0.9.0

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

type TriggeredAutomationActionsType added in v0.9.0

type TriggeredAutomationActionsType string
const (
	TriggeredAutomationActionsTypeAgent    TriggeredAutomationActionsType = "agent"
	TriggeredAutomationActionsTypeWebhook  TriggeredAutomationActionsType = "webhook"
	TriggeredAutomationActionsTypeWait     TriggeredAutomationActionsType = "wait"
	TriggeredAutomationActionsTypeEmail    TriggeredAutomationActionsType = "email"
	TriggeredAutomationActionsTypeLinkedin TriggeredAutomationActionsType = "linkedin"
)

func (TriggeredAutomationActionsType) IsKnown added in v0.9.0

type TriggeredAutomationChangeset added in v0.9.0

type TriggeredAutomationChangeset struct {
	Combinator TriggeredAutomationChangesetCombinator `json:"combinator"`
	// Each entry is a transition clause { slug: { from?: { comparator: value }, to?: {
	// comparator: value } } }. `from` matches the prior value, `to` the new value; an
	// empty body { slug: {} } matches any change to that property.
	Filter []map[string]interface{}         `json:"filter"`
	JSON   triggeredAutomationChangesetJSON `json:"-"`
}

A changeset filter group (update automations only): a combinator plus an array of transition clauses matching what is changing. Dot-paths (nested reference filters) are NOT permitted — direct properties only.

func (*TriggeredAutomationChangeset) UnmarshalJSON added in v0.9.0

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

type TriggeredAutomationChangesetCombinator added in v0.9.0

type TriggeredAutomationChangesetCombinator string
const (
	TriggeredAutomationChangesetCombinatorAnd TriggeredAutomationChangesetCombinator = "AND"
	TriggeredAutomationChangesetCombinatorOr  TriggeredAutomationChangesetCombinator = "OR"
)

func (TriggeredAutomationChangesetCombinator) IsKnown added in v0.9.0

type TriggeredAutomationChangesetParam added in v0.9.0

type TriggeredAutomationChangesetParam struct {
	Combinator param.Field[TriggeredAutomationChangesetCombinator] `json:"combinator"`
	// Each entry is a transition clause { slug: { from?: { comparator: value }, to?: {
	// comparator: value } } }. `from` matches the prior value, `to` the new value; an
	// empty body { slug: {} } matches any change to that property.
	Filter param.Field[[]map[string]interface{}] `json:"filter"`
}

A changeset filter group (update automations only): a combinator plus an array of transition clauses matching what is changing. Dot-paths (nested reference filters) are NOT permitted — direct properties only.

func (TriggeredAutomationChangesetParam) MarshalJSON added in v0.9.0

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

type TriggeredAutomationDeleteParams added in v0.9.0

type TriggeredAutomationDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type TriggeredAutomationDeleteParamsAutomationObjectType added in v0.9.0

type TriggeredAutomationDeleteParamsAutomationObjectType string

Object types that support triggered automations. Must match the triggered-automation whitelist in @micro/database migrate-sql (TRIGGERED_AUTOMATION_OBJECTS).

const (
	TriggeredAutomationDeleteParamsAutomationObjectTypeMessage         TriggeredAutomationDeleteParamsAutomationObjectType = "message"
	TriggeredAutomationDeleteParamsAutomationObjectTypeAction          TriggeredAutomationDeleteParamsAutomationObjectType = "action"
	TriggeredAutomationDeleteParamsAutomationObjectTypeEvent           TriggeredAutomationDeleteParamsAutomationObjectType = "event"
	TriggeredAutomationDeleteParamsAutomationObjectTypeDocument        TriggeredAutomationDeleteParamsAutomationObjectType = "document"
	TriggeredAutomationDeleteParamsAutomationObjectTypeIdentity        TriggeredAutomationDeleteParamsAutomationObjectType = "identity"
	TriggeredAutomationDeleteParamsAutomationObjectTypeLinkedinMessage TriggeredAutomationDeleteParamsAutomationObjectType = "linkedin_message"
	TriggeredAutomationDeleteParamsAutomationObjectTypeDeal            TriggeredAutomationDeleteParamsAutomationObjectType = "deal"
	TriggeredAutomationDeleteParamsAutomationObjectTypeOrganization    TriggeredAutomationDeleteParamsAutomationObjectType = "organization"
	TriggeredAutomationDeleteParamsAutomationObjectTypeContact         TriggeredAutomationDeleteParamsAutomationObjectType = "contact"
)

func (TriggeredAutomationDeleteParamsAutomationObjectType) IsKnown added in v0.9.0

type TriggeredAutomationGetParams added in v0.9.0

type TriggeredAutomationGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type TriggeredAutomationGetParamsAutomationObjectType added in v0.9.0

type TriggeredAutomationGetParamsAutomationObjectType string

Object types that support triggered automations. Must match the triggered-automation whitelist in @micro/database migrate-sql (TRIGGERED_AUTOMATION_OBJECTS).

const (
	TriggeredAutomationGetParamsAutomationObjectTypeMessage         TriggeredAutomationGetParamsAutomationObjectType = "message"
	TriggeredAutomationGetParamsAutomationObjectTypeAction          TriggeredAutomationGetParamsAutomationObjectType = "action"
	TriggeredAutomationGetParamsAutomationObjectTypeEvent           TriggeredAutomationGetParamsAutomationObjectType = "event"
	TriggeredAutomationGetParamsAutomationObjectTypeDocument        TriggeredAutomationGetParamsAutomationObjectType = "document"
	TriggeredAutomationGetParamsAutomationObjectTypeIdentity        TriggeredAutomationGetParamsAutomationObjectType = "identity"
	TriggeredAutomationGetParamsAutomationObjectTypeLinkedinMessage TriggeredAutomationGetParamsAutomationObjectType = "linkedin_message"
	TriggeredAutomationGetParamsAutomationObjectTypeDeal            TriggeredAutomationGetParamsAutomationObjectType = "deal"
	TriggeredAutomationGetParamsAutomationObjectTypeOrganization    TriggeredAutomationGetParamsAutomationObjectType = "organization"
	TriggeredAutomationGetParamsAutomationObjectTypeContact         TriggeredAutomationGetParamsAutomationObjectType = "contact"
)

func (TriggeredAutomationGetParamsAutomationObjectType) IsKnown added in v0.9.0

type TriggeredAutomationKind added in v0.9.0

type TriggeredAutomationKind string
const (
	TriggeredAutomationKindUpdate    TriggeredAutomationKind = "update"
	TriggeredAutomationKindLifecycle TriggeredAutomationKind = "lifecycle"
)

func (TriggeredAutomationKind) IsKnown added in v0.9.0

func (r TriggeredAutomationKind) IsKnown() bool

type TriggeredAutomationListParams added in v0.9.0

type TriggeredAutomationListParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Opaque pagination cursor (from a prior response's next_cursor); supersedes
	// page/limit when present.
	Cursor param.Field[string] `query:"cursor"`
	// Optional filter to a single automation kind. When omitted, both kinds are
	// returned.
	Kind param.Field[TriggeredAutomationListParamsKind] `query:"kind"`
	// Maximum items per page (<= 50; defaults to 50).
	Limit param.Field[int64] `query:"limit"`
	// List (CRM) id to scope the listing to. When omitted, automations owned by the
	// path team are returned.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
	// 1-based page number. Prefer cursor.
	Page param.Field[int64] `query:"page"`
}

func (TriggeredAutomationListParams) URLQuery added in v0.9.0

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

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

type TriggeredAutomationListParamsAutomationObjectType added in v0.9.0

type TriggeredAutomationListParamsAutomationObjectType string

Object types that support triggered automations. Must match the triggered-automation whitelist in @micro/database migrate-sql (TRIGGERED_AUTOMATION_OBJECTS).

const (
	TriggeredAutomationListParamsAutomationObjectTypeMessage         TriggeredAutomationListParamsAutomationObjectType = "message"
	TriggeredAutomationListParamsAutomationObjectTypeAction          TriggeredAutomationListParamsAutomationObjectType = "action"
	TriggeredAutomationListParamsAutomationObjectTypeEvent           TriggeredAutomationListParamsAutomationObjectType = "event"
	TriggeredAutomationListParamsAutomationObjectTypeDocument        TriggeredAutomationListParamsAutomationObjectType = "document"
	TriggeredAutomationListParamsAutomationObjectTypeIdentity        TriggeredAutomationListParamsAutomationObjectType = "identity"
	TriggeredAutomationListParamsAutomationObjectTypeLinkedinMessage TriggeredAutomationListParamsAutomationObjectType = "linkedin_message"
	TriggeredAutomationListParamsAutomationObjectTypeDeal            TriggeredAutomationListParamsAutomationObjectType = "deal"
	TriggeredAutomationListParamsAutomationObjectTypeOrganization    TriggeredAutomationListParamsAutomationObjectType = "organization"
	TriggeredAutomationListParamsAutomationObjectTypeContact         TriggeredAutomationListParamsAutomationObjectType = "contact"
)

func (TriggeredAutomationListParamsAutomationObjectType) IsKnown added in v0.9.0

type TriggeredAutomationListParamsKind added in v0.9.0

type TriggeredAutomationListParamsKind string

Optional filter to a single automation kind. When omitted, both kinds are returned.

const (
	TriggeredAutomationListParamsKindUpdate    TriggeredAutomationListParamsKind = "update"
	TriggeredAutomationListParamsKindLifecycle TriggeredAutomationListParamsKind = "lifecycle"
)

func (TriggeredAutomationListParamsKind) IsKnown added in v0.9.0

type TriggeredAutomationListResponse added in v0.9.0

type TriggeredAutomationListResponse struct {
	Data []TriggeredAutomation `json:"data" api:"required"`
	// True if more automations exist beyond this page.
	HasMore bool `json:"has_more" api:"required"`
	// Opaque cursor for the next page; null when has_more is false.
	NextCursor string                              `json:"next_cursor" api:"nullable"`
	JSON       triggeredAutomationListResponseJSON `json:"-"`
}

func (*TriggeredAutomationListResponse) UnmarshalJSON added in v0.9.0

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

type TriggeredAutomationNewParams added in v0.9.0

type TriggeredAutomationNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// A triggered automation. `kind` selects the shape: `update` fires on object
	// updates and requires a `changeset` (from/to transition) filter plus an optional
	// `state` precondition; `lifecycle` fires on create and/or delete
	// (`on_create`/`on_delete`) and requires a `state` filter (no changeset). `state`
	// permits dot-paths (nested reference filters); `changeset` is direct properties
	// only. Object type is taken from the path.
	TriggeredAutomation TriggeredAutomationParam `json:"triggered_automation" api:"required"`
	IdempotencyKey      param.Field[string]      `header:"Idempotency-Key"`
}

func (TriggeredAutomationNewParams) MarshalJSON added in v0.9.0

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

type TriggeredAutomationNewParamsAutomationObjectType added in v0.9.0

type TriggeredAutomationNewParamsAutomationObjectType string

Object types that support triggered automations. Must match the triggered-automation whitelist in @micro/database migrate-sql (TRIGGERED_AUTOMATION_OBJECTS).

const (
	TriggeredAutomationNewParamsAutomationObjectTypeMessage         TriggeredAutomationNewParamsAutomationObjectType = "message"
	TriggeredAutomationNewParamsAutomationObjectTypeAction          TriggeredAutomationNewParamsAutomationObjectType = "action"
	TriggeredAutomationNewParamsAutomationObjectTypeEvent           TriggeredAutomationNewParamsAutomationObjectType = "event"
	TriggeredAutomationNewParamsAutomationObjectTypeDocument        TriggeredAutomationNewParamsAutomationObjectType = "document"
	TriggeredAutomationNewParamsAutomationObjectTypeIdentity        TriggeredAutomationNewParamsAutomationObjectType = "identity"
	TriggeredAutomationNewParamsAutomationObjectTypeLinkedinMessage TriggeredAutomationNewParamsAutomationObjectType = "linkedin_message"
	TriggeredAutomationNewParamsAutomationObjectTypeDeal            TriggeredAutomationNewParamsAutomationObjectType = "deal"
	TriggeredAutomationNewParamsAutomationObjectTypeOrganization    TriggeredAutomationNewParamsAutomationObjectType = "organization"
	TriggeredAutomationNewParamsAutomationObjectTypeContact         TriggeredAutomationNewParamsAutomationObjectType = "contact"
)

func (TriggeredAutomationNewParamsAutomationObjectType) IsKnown added in v0.9.0

type TriggeredAutomationParam added in v0.9.0

type TriggeredAutomationParam struct {
	Kind param.Field[TriggeredAutomationKind] `json:"kind" api:"required"`
	Name param.Field[string]                  `json:"name" api:"required"`
	ID   param.Field[string]                  `json:"id" format:"uuid"`
	// Actions to run when the automation fires; each item has a `type` plus
	// type-specific fields.
	Actions param.Field[[]TriggeredAutomationActionParam] `json:"actions"`
	// A changeset filter group (update automations only): a combinator plus an array
	// of transition clauses matching what is changing. Dot-paths (nested reference
	// filters) are NOT permitted — direct properties only.
	Changeset param.Field[TriggeredAutomationChangesetParam] `json:"changeset"`
	CreatedAt param.Field[string]                            `json:"created_at"`
	Enabled   param.Field[bool]                              `json:"enabled"`
	ListID    param.Field[string]                            `json:"list_id" format:"uuid"`
	// Lifecycle automations only.
	OnCreate param.Field[bool] `json:"on_create"`
	// Lifecycle automations only.
	OnDelete param.Field[bool] `json:"on_delete"`
	// A filter group: a combinator plus an array of slug-based clauses. Dot-paths
	// (e.g. `organization.location`) express nested reference filters.
	State     param.Field[TriggeredAutomationStateParam] `json:"state"`
	TeamID    param.Field[string]                        `json:"team_id" format:"uuid"`
	UpdatedAt param.Field[string]                        `json:"updated_at"`
	UserID    param.Field[string]                        `json:"user_id"`
}

A triggered automation. `kind` selects the shape: `update` fires on object updates and requires a `changeset` (from/to transition) filter plus an optional `state` precondition; `lifecycle` fires on create and/or delete (`on_create`/`on_delete`) and requires a `state` filter (no changeset). `state` permits dot-paths (nested reference filters); `changeset` is direct properties only. Object type is taken from the path.

func (TriggeredAutomationParam) MarshalJSON added in v0.9.0

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

type TriggeredAutomationService added in v0.9.0

type TriggeredAutomationService struct {
	Options []option.RequestOption
}

TriggeredAutomationService contains methods and other services that help with interacting with the micro 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 NewTriggeredAutomationService method instead.

func NewTriggeredAutomationService added in v0.9.0

func NewTriggeredAutomationService(opts ...option.RequestOption) (r *TriggeredAutomationService)

NewTriggeredAutomationService 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 (*TriggeredAutomationService) Delete added in v0.9.0

Delete a triggered automation and its filter trees

func (*TriggeredAutomationService) Get added in v0.9.0

Read a triggered automation

func (*TriggeredAutomationService) List added in v0.9.0

List triggered automations for an owner

func (*TriggeredAutomationService) New added in v0.9.0

Create a triggered automation (state + changeset filter trees)

func (*TriggeredAutomationService) Update added in v0.9.0

Replace a triggered automation (idempotent full write of the whole tree)

type TriggeredAutomationState added in v0.9.0

type TriggeredAutomationState struct {
	Combinator TriggeredAutomationStateCombinator `json:"combinator"`
	// Each entry is { slug: { comparator: value } }
	Filter []map[string]interface{}     `json:"filter"`
	JSON   triggeredAutomationStateJSON `json:"-"`
}

A filter group: a combinator plus an array of slug-based clauses. Dot-paths (e.g. `organization.location`) express nested reference filters.

func (*TriggeredAutomationState) UnmarshalJSON added in v0.9.0

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

type TriggeredAutomationStateCombinator added in v0.9.0

type TriggeredAutomationStateCombinator string
const (
	TriggeredAutomationStateCombinatorAnd TriggeredAutomationStateCombinator = "AND"
	TriggeredAutomationStateCombinatorOr  TriggeredAutomationStateCombinator = "OR"
)

func (TriggeredAutomationStateCombinator) IsKnown added in v0.9.0

type TriggeredAutomationStateParam added in v0.9.0

type TriggeredAutomationStateParam struct {
	Combinator param.Field[TriggeredAutomationStateCombinator] `json:"combinator"`
	// Each entry is { slug: { comparator: value } }
	Filter param.Field[[]map[string]interface{}] `json:"filter"`
}

A filter group: a combinator plus an array of slug-based clauses. Dot-paths (e.g. `organization.location`) express nested reference filters.

func (TriggeredAutomationStateParam) MarshalJSON added in v0.9.0

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

type TriggeredAutomationUpdateParams added in v0.9.0

type TriggeredAutomationUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// A triggered automation. `kind` selects the shape: `update` fires on object
	// updates and requires a `changeset` (from/to transition) filter plus an optional
	// `state` precondition; `lifecycle` fires on create and/or delete
	// (`on_create`/`on_delete`) and requires a `state` filter (no changeset). `state`
	// permits dot-paths (nested reference filters); `changeset` is direct properties
	// only. Object type is taken from the path.
	TriggeredAutomation TriggeredAutomationParam `json:"triggered_automation" api:"required"`
}

func (TriggeredAutomationUpdateParams) MarshalJSON added in v0.9.0

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

type TriggeredAutomationUpdateParamsAutomationObjectType added in v0.9.0

type TriggeredAutomationUpdateParamsAutomationObjectType string

Object types that support triggered automations. Must match the triggered-automation whitelist in @micro/database migrate-sql (TRIGGERED_AUTOMATION_OBJECTS).

const (
	TriggeredAutomationUpdateParamsAutomationObjectTypeMessage         TriggeredAutomationUpdateParamsAutomationObjectType = "message"
	TriggeredAutomationUpdateParamsAutomationObjectTypeAction          TriggeredAutomationUpdateParamsAutomationObjectType = "action"
	TriggeredAutomationUpdateParamsAutomationObjectTypeEvent           TriggeredAutomationUpdateParamsAutomationObjectType = "event"
	TriggeredAutomationUpdateParamsAutomationObjectTypeDocument        TriggeredAutomationUpdateParamsAutomationObjectType = "document"
	TriggeredAutomationUpdateParamsAutomationObjectTypeIdentity        TriggeredAutomationUpdateParamsAutomationObjectType = "identity"
	TriggeredAutomationUpdateParamsAutomationObjectTypeLinkedinMessage TriggeredAutomationUpdateParamsAutomationObjectType = "linkedin_message"
	TriggeredAutomationUpdateParamsAutomationObjectTypeDeal            TriggeredAutomationUpdateParamsAutomationObjectType = "deal"
	TriggeredAutomationUpdateParamsAutomationObjectTypeOrganization    TriggeredAutomationUpdateParamsAutomationObjectType = "organization"
	TriggeredAutomationUpdateParamsAutomationObjectTypeContact         TriggeredAutomationUpdateParamsAutomationObjectType = "contact"
)

func (TriggeredAutomationUpdateParamsAutomationObjectType) IsKnown added in v0.9.0

type ViewDeleteParams

type ViewDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type ViewDeleteParamsObjectType added in v0.9.0

type ViewDeleteParamsObjectType string
const (
	ViewDeleteParamsObjectTypeComment      ViewDeleteParamsObjectType = "comment"
	ViewDeleteParamsObjectTypeAction       ViewDeleteParamsObjectType = "action"
	ViewDeleteParamsObjectTypeDeal         ViewDeleteParamsObjectType = "deal"
	ViewDeleteParamsObjectTypeEngagement   ViewDeleteParamsObjectType = "engagement"
	ViewDeleteParamsObjectTypeDocument     ViewDeleteParamsObjectType = "document"
	ViewDeleteParamsObjectTypeEvent        ViewDeleteParamsObjectType = "event"
	ViewDeleteParamsObjectTypeIdentity     ViewDeleteParamsObjectType = "identity"
	ViewDeleteParamsObjectTypeOrganization ViewDeleteParamsObjectType = "organization"
)

func (ViewDeleteParamsObjectType) IsKnown added in v0.9.0

func (r ViewDeleteParamsObjectType) IsKnown() bool

type ViewGetParams

type ViewGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Forwarded to the records sub-resource when `include=records`.
	Cursor param.Field[string] `query:"cursor"`
	// Comma-separated list of optional sub-resources to inline. Currently the only
	// recognized value is `records` — when present, the response is `{view, records}`
	// rather than the bare view bundle.
	Include param.Field[string] `query:"include"`
	// Forwarded to the records sub-resource when `include=records`.
	Limit param.Field[int64] `query:"limit"`
	// Forwarded to the records sub-resource when `include=records`.
	Page param.Field[int64] `query:"page"`
}

func (ViewGetParams) URLQuery added in v0.5.0

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

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

type ViewGetParamsObjectType added in v0.9.0

type ViewGetParamsObjectType string
const (
	ViewGetParamsObjectTypeComment      ViewGetParamsObjectType = "comment"
	ViewGetParamsObjectTypeAction       ViewGetParamsObjectType = "action"
	ViewGetParamsObjectTypeDeal         ViewGetParamsObjectType = "deal"
	ViewGetParamsObjectTypeEngagement   ViewGetParamsObjectType = "engagement"
	ViewGetParamsObjectTypeDocument     ViewGetParamsObjectType = "document"
	ViewGetParamsObjectTypeEvent        ViewGetParamsObjectType = "event"
	ViewGetParamsObjectTypeIdentity     ViewGetParamsObjectType = "identity"
	ViewGetParamsObjectTypeOrganization ViewGetParamsObjectType = "organization"
)

func (ViewGetParamsObjectType) IsKnown added in v0.9.0

func (r ViewGetParamsObjectType) IsKnown() bool

type ViewGetResponse

type ViewGetResponse struct {
	ID                   string `json:"id" format:"uuid"`
	AggregationPropDefID string `json:"aggregation_prop_def_id" api:"nullable" format:"uuid"`
	AggregationType      string `json:"aggregation_type" api:"nullable"`
	// This field can have the runtime type of [map[string]interface{}].
	ColumnLayout interface{}               `json:"column_layout"`
	Combinator   ViewGetResponseCombinator `json:"combinator"`
	CreatedAt    string                    `json:"created_at"`
	// This field can have the runtime type of [[]map[string]interface{}].
	Filter interface{} `json:"filter"`
	// Property slug to group by
	GroupBy string `json:"group_by" api:"nullable"`
	// This field can have the runtime type of [[]interface{}].
	GroupHiddenOptionIDs interface{} `json:"group_hidden_option_ids"`
	GroupHideEmpty       bool        `json:"group_hide_empty" api:"nullable"`
	GroupSort            string      `json:"group_sort" api:"nullable"`
	Icon                 string      `json:"icon" api:"nullable"`
	ListID               string      `json:"list_id" api:"nullable" format:"uuid"`
	Name                 string      `json:"name"`
	// This field can have the runtime type of
	// [ViewGetResponseViewBundleWithRecordsRecords].
	Records interface{} `json:"records"`
	// This field can have the runtime type of [[]string].
	Select interface{} `json:"select"`
	// This field can have the runtime type of [[]map[string]interface{}].
	Sort      interface{} `json:"sort"`
	SortOrder int64       `json:"sort_order" api:"nullable"`
	TeamID    string      `json:"team_id" api:"nullable" format:"uuid"`
	UpdatedAt string      `json:"updated_at" api:"nullable"`
	UserID    string      `json:"user_id" api:"nullable"`
	// This field can have the runtime type of
	// [ViewGetResponseViewBundleWithRecordsView].
	View     interface{}         `json:"view"`
	ViewType string              `json:"view_type"`
	JSON     viewGetResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

A view (saved configuration for displaying records of a given object type) plus its select/filter/sort children. Properties in select/filter/sort are referenced by slug.

func (ViewGetResponse) AsUnion added in v0.5.0

AsUnion returns a ViewGetResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are ViewGetResponseViewBundle, ViewGetResponseViewBundleWithRecords.

func (*ViewGetResponse) UnmarshalJSON

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

type ViewGetResponseCombinator

type ViewGetResponseCombinator string
const (
	ViewGetResponseCombinatorAnd ViewGetResponseCombinator = "AND"
	ViewGetResponseCombinatorOr  ViewGetResponseCombinator = "OR"
)

func (ViewGetResponseCombinator) IsKnown

func (r ViewGetResponseCombinator) IsKnown() bool

type ViewGetResponseUnion added in v0.5.0

type ViewGetResponseUnion interface {
	// contains filtered or unexported methods
}

A view (saved configuration for displaying records of a given object type) plus its select/filter/sort children. Properties in select/filter/sort are referenced by slug.

Union satisfied by ViewGetResponseViewBundle or ViewGetResponseViewBundleWithRecords.

type ViewGetResponseViewBundle added in v0.5.0

type ViewGetResponseViewBundle struct {
	Name                 string                              `json:"name" api:"required"`
	ViewType             string                              `json:"view_type" api:"required"`
	ID                   string                              `json:"id" format:"uuid"`
	AggregationPropDefID string                              `json:"aggregation_prop_def_id" api:"nullable" format:"uuid"`
	AggregationType      string                              `json:"aggregation_type" api:"nullable"`
	ColumnLayout         map[string]interface{}              `json:"column_layout" api:"nullable"`
	Combinator           ViewGetResponseViewBundleCombinator `json:"combinator"`
	CreatedAt            string                              `json:"created_at"`
	// Each entry is { slug: { comparator: value } }
	Filter []map[string]interface{} `json:"filter"`
	// Property slug to group by
	GroupBy              string        `json:"group_by" api:"nullable"`
	GroupHiddenOptionIDs []interface{} `json:"group_hidden_option_ids" api:"nullable"`
	GroupHideEmpty       bool          `json:"group_hide_empty" api:"nullable"`
	GroupSort            string        `json:"group_sort" api:"nullable"`
	Icon                 string        `json:"icon" api:"nullable"`
	ListID               string        `json:"list_id" api:"nullable" format:"uuid"`
	// Property slugs (dot-paths permitted for refs)
	Select []string `json:"select"`
	// Each entry is { slug: 'asc' | 'desc' }
	Sort      []map[string]interface{}      `json:"sort"`
	SortOrder int64                         `json:"sort_order" api:"nullable"`
	TeamID    string                        `json:"team_id" api:"nullable" format:"uuid"`
	UpdatedAt string                        `json:"updated_at" api:"nullable"`
	UserID    string                        `json:"user_id" api:"nullable"`
	JSON      viewGetResponseViewBundleJSON `json:"-"`
}

A view (saved configuration for displaying records of a given object type) plus its select/filter/sort children. Properties in select/filter/sort are referenced by slug.

func (*ViewGetResponseViewBundle) UnmarshalJSON added in v0.5.0

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

type ViewGetResponseViewBundleCombinator added in v0.5.0

type ViewGetResponseViewBundleCombinator string
const (
	ViewGetResponseViewBundleCombinatorAnd ViewGetResponseViewBundleCombinator = "AND"
	ViewGetResponseViewBundleCombinatorOr  ViewGetResponseViewBundleCombinator = "OR"
)

func (ViewGetResponseViewBundleCombinator) IsKnown added in v0.5.0

type ViewGetResponseViewBundleWithRecords added in v0.5.0

type ViewGetResponseViewBundleWithRecords struct {
	Records ViewGetResponseViewBundleWithRecordsRecords `json:"records" api:"required"`
	// A view (saved configuration for displaying records of a given object type) plus
	// its select/filter/sort children. Properties in select/filter/sort are referenced
	// by slug.
	View ViewGetResponseViewBundleWithRecordsView `json:"view" api:"required"`
	JSON viewGetResponseViewBundleWithRecordsJSON `json:"-"`
}

Returned by `GET /views/{viewId}?include=records`. Same `records` shape as the standalone list-view-records endpoint.

func (*ViewGetResponseViewBundleWithRecords) UnmarshalJSON added in v0.5.0

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

type ViewGetResponseViewBundleWithRecordsRecords added in v0.5.0

type ViewGetResponseViewBundleWithRecordsRecords struct {
	Data       []map[string]interface{}                        `json:"data" api:"required"`
	HasMore    bool                                            `json:"has_more" api:"required"`
	NextCursor string                                          `json:"next_cursor" api:"nullable"`
	JSON       viewGetResponseViewBundleWithRecordsRecordsJSON `json:"-"`
}

func (*ViewGetResponseViewBundleWithRecordsRecords) UnmarshalJSON added in v0.5.0

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

type ViewGetResponseViewBundleWithRecordsView added in v0.5.0

type ViewGetResponseViewBundleWithRecordsView struct {
	Name                 string                                             `json:"name" api:"required"`
	ViewType             string                                             `json:"view_type" api:"required"`
	ID                   string                                             `json:"id" format:"uuid"`
	AggregationPropDefID string                                             `json:"aggregation_prop_def_id" api:"nullable" format:"uuid"`
	AggregationType      string                                             `json:"aggregation_type" api:"nullable"`
	ColumnLayout         map[string]interface{}                             `json:"column_layout" api:"nullable"`
	Combinator           ViewGetResponseViewBundleWithRecordsViewCombinator `json:"combinator"`
	CreatedAt            string                                             `json:"created_at"`
	// Each entry is { slug: { comparator: value } }
	Filter []map[string]interface{} `json:"filter"`
	// Property slug to group by
	GroupBy              string        `json:"group_by" api:"nullable"`
	GroupHiddenOptionIDs []interface{} `json:"group_hidden_option_ids" api:"nullable"`
	GroupHideEmpty       bool          `json:"group_hide_empty" api:"nullable"`
	GroupSort            string        `json:"group_sort" api:"nullable"`
	Icon                 string        `json:"icon" api:"nullable"`
	ListID               string        `json:"list_id" api:"nullable" format:"uuid"`
	// Property slugs (dot-paths permitted for refs)
	Select []string `json:"select"`
	// Each entry is { slug: 'asc' | 'desc' }
	Sort      []map[string]interface{}                     `json:"sort"`
	SortOrder int64                                        `json:"sort_order" api:"nullable"`
	TeamID    string                                       `json:"team_id" api:"nullable" format:"uuid"`
	UpdatedAt string                                       `json:"updated_at" api:"nullable"`
	UserID    string                                       `json:"user_id" api:"nullable"`
	JSON      viewGetResponseViewBundleWithRecordsViewJSON `json:"-"`
}

A view (saved configuration for displaying records of a given object type) plus its select/filter/sort children. Properties in select/filter/sort are referenced by slug.

func (*ViewGetResponseViewBundleWithRecordsView) UnmarshalJSON added in v0.5.0

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

type ViewGetResponseViewBundleWithRecordsViewCombinator added in v0.5.0

type ViewGetResponseViewBundleWithRecordsViewCombinator string
const (
	ViewGetResponseViewBundleWithRecordsViewCombinatorAnd ViewGetResponseViewBundleWithRecordsViewCombinator = "AND"
	ViewGetResponseViewBundleWithRecordsViewCombinatorOr  ViewGetResponseViewBundleWithRecordsViewCombinator = "OR"
)

func (ViewGetResponseViewBundleWithRecordsViewCombinator) IsKnown added in v0.5.0

type ViewListParams added in v0.9.0

type ViewListParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Opaque pagination cursor (from a prior response's next_cursor); supersedes
	// page/limit when present.
	Cursor param.Field[string] `query:"cursor"`
	// Maximum items per page (<= 50; defaults to 50).
	Limit param.Field[int64] `query:"limit"`
	// List (CRM) id to scope the listing to. When omitted, views owned by the path
	// team are returned.
	ListID param.Field[string] `query:"list_id" format:"uuid"`
	// 1-based page number. Prefer cursor.
	Page param.Field[int64] `query:"page"`
}

func (ViewListParams) URLQuery added in v0.9.0

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

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

type ViewListParamsObjectType added in v0.9.0

type ViewListParamsObjectType string
const (
	ViewListParamsObjectTypeComment      ViewListParamsObjectType = "comment"
	ViewListParamsObjectTypeAction       ViewListParamsObjectType = "action"
	ViewListParamsObjectTypeDeal         ViewListParamsObjectType = "deal"
	ViewListParamsObjectTypeEngagement   ViewListParamsObjectType = "engagement"
	ViewListParamsObjectTypeDocument     ViewListParamsObjectType = "document"
	ViewListParamsObjectTypeEvent        ViewListParamsObjectType = "event"
	ViewListParamsObjectTypeIdentity     ViewListParamsObjectType = "identity"
	ViewListParamsObjectTypeOrganization ViewListParamsObjectType = "organization"
)

func (ViewListParamsObjectType) IsKnown added in v0.9.0

func (r ViewListParamsObjectType) IsKnown() bool

type ViewListResponse added in v0.9.0

type ViewListResponse struct {
	Data []ViewListResponseData `json:"data" api:"required"`
	// True if more views exist beyond this page.
	HasMore bool `json:"has_more" api:"required"`
	// Opaque cursor for the next page; null when has_more is false.
	NextCursor string               `json:"next_cursor" api:"nullable"`
	JSON       viewListResponseJSON `json:"-"`
}

func (*ViewListResponse) UnmarshalJSON added in v0.9.0

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

type ViewListResponseData added in v0.9.0

type ViewListResponseData struct {
	Name                 string                         `json:"name" api:"required"`
	ViewType             string                         `json:"view_type" api:"required"`
	ID                   string                         `json:"id" format:"uuid"`
	AggregationPropDefID string                         `json:"aggregation_prop_def_id" api:"nullable" format:"uuid"`
	AggregationType      string                         `json:"aggregation_type" api:"nullable"`
	ColumnLayout         map[string]interface{}         `json:"column_layout" api:"nullable"`
	Combinator           ViewListResponseDataCombinator `json:"combinator"`
	CreatedAt            string                         `json:"created_at"`
	// Each entry is { slug: { comparator: value } }
	Filter []map[string]interface{} `json:"filter"`
	// Property slug to group by
	GroupBy              string        `json:"group_by" api:"nullable"`
	GroupHiddenOptionIDs []interface{} `json:"group_hidden_option_ids" api:"nullable"`
	GroupHideEmpty       bool          `json:"group_hide_empty" api:"nullable"`
	GroupSort            string        `json:"group_sort" api:"nullable"`
	Icon                 string        `json:"icon" api:"nullable"`
	ListID               string        `json:"list_id" api:"nullable" format:"uuid"`
	// Property slugs (dot-paths permitted for refs)
	Select []string `json:"select"`
	// Each entry is { slug: 'asc' | 'desc' }
	Sort      []map[string]interface{} `json:"sort"`
	SortOrder int64                    `json:"sort_order" api:"nullable"`
	TeamID    string                   `json:"team_id" api:"nullable" format:"uuid"`
	UpdatedAt string                   `json:"updated_at" api:"nullable"`
	UserID    string                   `json:"user_id" api:"nullable"`
	JSON      viewListResponseDataJSON `json:"-"`
}

A view (saved configuration for displaying records of a given object type) plus its select/filter/sort children. Properties in select/filter/sort are referenced by slug.

func (*ViewListResponseData) UnmarshalJSON added in v0.9.0

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

type ViewListResponseDataCombinator added in v0.9.0

type ViewListResponseDataCombinator string
const (
	ViewListResponseDataCombinatorAnd ViewListResponseDataCombinator = "AND"
	ViewListResponseDataCombinatorOr  ViewListResponseDataCombinator = "OR"
)

func (ViewListResponseDataCombinator) IsKnown added in v0.9.0

type ViewNewParams

type ViewNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	PathTeamID           param.Field[string]                  `path:"teamId" api:"required" format:"uuid"`
	Name                 param.Field[string]                  `json:"name" api:"required"`
	ViewType             param.Field[string]                  `json:"view_type" api:"required"`
	ID                   param.Field[string]                  `json:"id" format:"uuid"`
	AggregationPropDefID param.Field[string]                  `json:"aggregation_prop_def_id" format:"uuid"`
	AggregationType      param.Field[string]                  `json:"aggregation_type"`
	ColumnLayout         param.Field[map[string]interface{}]  `json:"column_layout"`
	Combinator           param.Field[ViewNewParamsCombinator] `json:"combinator"`
	CreatedAt            param.Field[string]                  `json:"created_at"`
	// Each entry is { slug: { comparator: value } }
	Filter param.Field[[]map[string]interface{}] `json:"filter"`
	// Property slug to group by
	GroupBy              param.Field[string]        `json:"group_by"`
	GroupHiddenOptionIDs param.Field[[]interface{}] `json:"group_hidden_option_ids"`
	GroupHideEmpty       param.Field[bool]          `json:"group_hide_empty"`
	GroupSort            param.Field[string]        `json:"group_sort"`
	Icon                 param.Field[string]        `json:"icon"`
	ListID               param.Field[string]        `json:"list_id" format:"uuid"`
	// Property slugs (dot-paths permitted for refs)
	Select param.Field[[]string] `json:"select"`
	// Each entry is { slug: 'asc' | 'desc' }
	Sort           param.Field[[]map[string]interface{}] `json:"sort"`
	SortOrder      param.Field[int64]                    `json:"sort_order"`
	BodyTeamID     param.Field[string]                   `json:"team_id" format:"uuid"`
	UpdatedAt      param.Field[string]                   `json:"updated_at"`
	UserID         param.Field[string]                   `json:"user_id"`
	IdempotencyKey param.Field[string]                   `header:"Idempotency-Key"`
}

func (ViewNewParams) MarshalJSON

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

type ViewNewParamsCombinator

type ViewNewParamsCombinator string
const (
	ViewNewParamsCombinatorAnd ViewNewParamsCombinator = "AND"
	ViewNewParamsCombinatorOr  ViewNewParamsCombinator = "OR"
)

func (ViewNewParamsCombinator) IsKnown

func (r ViewNewParamsCombinator) IsKnown() bool

type ViewNewParamsObjectType added in v0.9.0

type ViewNewParamsObjectType string
const (
	ViewNewParamsObjectTypeComment      ViewNewParamsObjectType = "comment"
	ViewNewParamsObjectTypeAction       ViewNewParamsObjectType = "action"
	ViewNewParamsObjectTypeDeal         ViewNewParamsObjectType = "deal"
	ViewNewParamsObjectTypeEngagement   ViewNewParamsObjectType = "engagement"
	ViewNewParamsObjectTypeDocument     ViewNewParamsObjectType = "document"
	ViewNewParamsObjectTypeEvent        ViewNewParamsObjectType = "event"
	ViewNewParamsObjectTypeIdentity     ViewNewParamsObjectType = "identity"
	ViewNewParamsObjectTypeOrganization ViewNewParamsObjectType = "organization"
)

func (ViewNewParamsObjectType) IsKnown added in v0.9.0

func (r ViewNewParamsObjectType) IsKnown() bool

type ViewNewResponse

type ViewNewResponse struct {
	Name                 string                    `json:"name" api:"required"`
	ViewType             string                    `json:"view_type" api:"required"`
	ID                   string                    `json:"id" format:"uuid"`
	AggregationPropDefID string                    `json:"aggregation_prop_def_id" api:"nullable" format:"uuid"`
	AggregationType      string                    `json:"aggregation_type" api:"nullable"`
	ColumnLayout         map[string]interface{}    `json:"column_layout" api:"nullable"`
	Combinator           ViewNewResponseCombinator `json:"combinator"`
	CreatedAt            string                    `json:"created_at"`
	// Each entry is { slug: { comparator: value } }
	Filter []map[string]interface{} `json:"filter"`
	// Property slug to group by
	GroupBy              string        `json:"group_by" api:"nullable"`
	GroupHiddenOptionIDs []interface{} `json:"group_hidden_option_ids" api:"nullable"`
	GroupHideEmpty       bool          `json:"group_hide_empty" api:"nullable"`
	GroupSort            string        `json:"group_sort" api:"nullable"`
	Icon                 string        `json:"icon" api:"nullable"`
	ListID               string        `json:"list_id" api:"nullable" format:"uuid"`
	// Property slugs (dot-paths permitted for refs)
	Select []string `json:"select"`
	// Each entry is { slug: 'asc' | 'desc' }
	Sort      []map[string]interface{} `json:"sort"`
	SortOrder int64                    `json:"sort_order" api:"nullable"`
	TeamID    string                   `json:"team_id" api:"nullable" format:"uuid"`
	UpdatedAt string                   `json:"updated_at" api:"nullable"`
	UserID    string                   `json:"user_id" api:"nullable"`
	JSON      viewNewResponseJSON      `json:"-"`
}

A view (saved configuration for displaying records of a given object type) plus its select/filter/sort children. Properties in select/filter/sort are referenced by slug.

func (*ViewNewResponse) UnmarshalJSON

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

type ViewNewResponseCombinator

type ViewNewResponseCombinator string
const (
	ViewNewResponseCombinatorAnd ViewNewResponseCombinator = "AND"
	ViewNewResponseCombinatorOr  ViewNewResponseCombinator = "OR"
)

func (ViewNewResponseCombinator) IsKnown

func (r ViewNewResponseCombinator) IsKnown() bool

type ViewRecordListParams

type ViewRecordListParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
	// to fetch the next page. When set, `page` and `limit` are derived from the
	// cursor.
	Cursor param.Field[string] `query:"cursor"`
	Limit  param.Field[int64]  `query:"limit"`
	// Page number (1-based). Prefer `cursor`.
	Page param.Field[int64] `query:"page"`
}

func (ViewRecordListParams) URLQuery

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

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

type ViewRecordListParamsObjectType added in v0.9.0

type ViewRecordListParamsObjectType string
const (
	ViewRecordListParamsObjectTypeComment      ViewRecordListParamsObjectType = "comment"
	ViewRecordListParamsObjectTypeAction       ViewRecordListParamsObjectType = "action"
	ViewRecordListParamsObjectTypeDeal         ViewRecordListParamsObjectType = "deal"
	ViewRecordListParamsObjectTypeEngagement   ViewRecordListParamsObjectType = "engagement"
	ViewRecordListParamsObjectTypeDocument     ViewRecordListParamsObjectType = "document"
	ViewRecordListParamsObjectTypeEvent        ViewRecordListParamsObjectType = "event"
	ViewRecordListParamsObjectTypeIdentity     ViewRecordListParamsObjectType = "identity"
	ViewRecordListParamsObjectTypeOrganization ViewRecordListParamsObjectType = "organization"
)

func (ViewRecordListParamsObjectType) IsKnown added in v0.9.0

type ViewRecordListResponse

type ViewRecordListResponse struct {
	Data []map[string]interface{} `json:"data" api:"required"`
	// True if more records exist beyond this page.
	HasMore bool `json:"has_more" api:"required"`
	// Opaque cursor for the next page; null when `has_more` is false.
	NextCursor string                     `json:"next_cursor" api:"nullable"`
	JSON       viewRecordListResponseJSON `json:"-"`
}

func (*ViewRecordListResponse) UnmarshalJSON added in v0.5.0

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

type ViewRecordPinParams

type ViewRecordPinParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

type ViewRecordPinParamsObjectType added in v0.9.0

type ViewRecordPinParamsObjectType string
const (
	ViewRecordPinParamsObjectTypeComment      ViewRecordPinParamsObjectType = "comment"
	ViewRecordPinParamsObjectTypeAction       ViewRecordPinParamsObjectType = "action"
	ViewRecordPinParamsObjectTypeDeal         ViewRecordPinParamsObjectType = "deal"
	ViewRecordPinParamsObjectTypeEngagement   ViewRecordPinParamsObjectType = "engagement"
	ViewRecordPinParamsObjectTypeDocument     ViewRecordPinParamsObjectType = "document"
	ViewRecordPinParamsObjectTypeEvent        ViewRecordPinParamsObjectType = "event"
	ViewRecordPinParamsObjectTypeIdentity     ViewRecordPinParamsObjectType = "identity"
	ViewRecordPinParamsObjectTypeOrganization ViewRecordPinParamsObjectType = "organization"
)

func (ViewRecordPinParamsObjectType) IsKnown added in v0.9.0

func (r ViewRecordPinParamsObjectType) IsKnown() bool

type ViewRecordReorderParams

type ViewRecordReorderParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID         param.Field[string]   `path:"teamId" api:"required" format:"uuid"`
	ObjectIDs      param.Field[[]string] `json:"object_ids" api:"required" format:"uuid"`
	IdempotencyKey param.Field[string]   `header:"Idempotency-Key"`
}

func (ViewRecordReorderParams) MarshalJSON

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

type ViewRecordReorderParamsObjectType added in v0.9.0

type ViewRecordReorderParamsObjectType string
const (
	ViewRecordReorderParamsObjectTypeComment      ViewRecordReorderParamsObjectType = "comment"
	ViewRecordReorderParamsObjectTypeAction       ViewRecordReorderParamsObjectType = "action"
	ViewRecordReorderParamsObjectTypeDeal         ViewRecordReorderParamsObjectType = "deal"
	ViewRecordReorderParamsObjectTypeEngagement   ViewRecordReorderParamsObjectType = "engagement"
	ViewRecordReorderParamsObjectTypeDocument     ViewRecordReorderParamsObjectType = "document"
	ViewRecordReorderParamsObjectTypeEvent        ViewRecordReorderParamsObjectType = "event"
	ViewRecordReorderParamsObjectTypeIdentity     ViewRecordReorderParamsObjectType = "identity"
	ViewRecordReorderParamsObjectTypeOrganization ViewRecordReorderParamsObjectType = "organization"
)

func (ViewRecordReorderParamsObjectType) IsKnown added in v0.9.0

type ViewRecordService

type ViewRecordService struct {
	Options []option.RequestOption
}

ViewRecordService contains methods and other services that help with interacting with the micro 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 NewViewRecordService method instead.

func NewViewRecordService

func NewViewRecordService(opts ...option.RequestOption) (r *ViewRecordService)

NewViewRecordService 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 (*ViewRecordService) List

List records selected by a view (filters and sorts applied; pinned record_order overlaid first)

func (*ViewRecordService) Pin

func (r *ViewRecordService) Pin(ctx context.Context, objectType ViewRecordPinParamsObjectType, viewID string, objectID string, params ViewRecordPinParams, opts ...option.RequestOption) (err error)

Pin a record to the view (append to record_order)

func (*ViewRecordService) Reorder

Bulk reorder pinned records

func (*ViewRecordService) Unpin

func (r *ViewRecordService) Unpin(ctx context.Context, objectType ViewRecordUnpinParamsObjectType, viewID string, objectID string, body ViewRecordUnpinParams, opts ...option.RequestOption) (err error)

Unpin a record from the view

type ViewRecordUnpinParams

type ViewRecordUnpinParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type ViewRecordUnpinParamsObjectType added in v0.9.0

type ViewRecordUnpinParamsObjectType string
const (
	ViewRecordUnpinParamsObjectTypeComment      ViewRecordUnpinParamsObjectType = "comment"
	ViewRecordUnpinParamsObjectTypeAction       ViewRecordUnpinParamsObjectType = "action"
	ViewRecordUnpinParamsObjectTypeDeal         ViewRecordUnpinParamsObjectType = "deal"
	ViewRecordUnpinParamsObjectTypeEngagement   ViewRecordUnpinParamsObjectType = "engagement"
	ViewRecordUnpinParamsObjectTypeDocument     ViewRecordUnpinParamsObjectType = "document"
	ViewRecordUnpinParamsObjectTypeEvent        ViewRecordUnpinParamsObjectType = "event"
	ViewRecordUnpinParamsObjectTypeIdentity     ViewRecordUnpinParamsObjectType = "identity"
	ViewRecordUnpinParamsObjectTypeOrganization ViewRecordUnpinParamsObjectType = "organization"
)

func (ViewRecordUnpinParamsObjectType) IsKnown added in v0.9.0

type ViewService

type ViewService struct {
	Options []option.RequestOption
	Records *ViewRecordService
}

ViewService contains methods and other services that help with interacting with the micro 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 NewViewService method instead.

func NewViewService

func NewViewService(opts ...option.RequestOption) (r *ViewService)

NewViewService 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 (*ViewService) Delete

func (r *ViewService) Delete(ctx context.Context, objectType ViewDeleteParamsObjectType, viewID string, body ViewDeleteParams, opts ...option.RequestOption) (err error)

Delete a view bundle

func (*ViewService) Get

func (r *ViewService) Get(ctx context.Context, objectType ViewGetParamsObjectType, viewID string, params ViewGetParams, opts ...option.RequestOption) (res *ViewGetResponse, err error)

Returns the view bundle. Pass `?include=records` to also fetch a page of records selected by the view in the same call; the response is then wrapped as `{view, records}`.

func (*ViewService) List added in v0.9.0

func (r *ViewService) List(ctx context.Context, objectType ViewListParamsObjectType, params ViewListParams, opts ...option.RequestOption) (res *ViewListResponse, err error)

Returns saved view bundles for the path team. Pass `?list_id=` to scope to a list (CRM) instead. Cursor pagination matches other Prism list endpoints.

func (*ViewService) New

func (r *ViewService) New(ctx context.Context, objectType ViewNewParamsObjectType, params ViewNewParams, opts ...option.RequestOption) (res *ViewNewResponse, err error)

Create a view bundle (view + select/filter/sort)

func (*ViewService) Update

func (r *ViewService) Update(ctx context.Context, objectType ViewUpdateParamsObjectType, viewID string, params ViewUpdateParams, opts ...option.RequestOption) (res *ViewUpdateResponse, err error)

Update a view bundle (select/filter/sort arrays are replaced wholesale when supplied)

type ViewUpdateParams

type ViewUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	PathTeamID           param.Field[string]                     `path:"teamId" api:"required" format:"uuid"`
	AggregationPropDefID param.Field[string]                     `json:"aggregation_prop_def_id" format:"uuid"`
	AggregationType      param.Field[string]                     `json:"aggregation_type"`
	ColumnLayout         param.Field[map[string]interface{}]     `json:"column_layout"`
	Combinator           param.Field[ViewUpdateParamsCombinator] `json:"combinator"`
	Filter               param.Field[[]map[string]interface{}]   `json:"filter"`
	GroupBy              param.Field[string]                     `json:"group_by"`
	GroupHiddenOptionIDs param.Field[[]interface{}]              `json:"group_hidden_option_ids"`
	GroupHideEmpty       param.Field[bool]                       `json:"group_hide_empty"`
	GroupSort            param.Field[string]                     `json:"group_sort"`
	Icon                 param.Field[string]                     `json:"icon"`
	ListID               param.Field[string]                     `json:"list_id" format:"uuid"`
	Name                 param.Field[string]                     `json:"name"`
	Select               param.Field[[]string]                   `json:"select"`
	Sort                 param.Field[[]map[string]interface{}]   `json:"sort"`
	SortOrder            param.Field[int64]                      `json:"sort_order"`
	BodyTeamID           param.Field[string]                     `json:"team_id" format:"uuid"`
	UserID               param.Field[string]                     `json:"user_id"`
	ViewType             param.Field[string]                     `json:"view_type"`
	IdempotencyKey       param.Field[string]                     `header:"Idempotency-Key"`
}

func (ViewUpdateParams) MarshalJSON

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

type ViewUpdateParamsCombinator

type ViewUpdateParamsCombinator string
const (
	ViewUpdateParamsCombinatorAnd ViewUpdateParamsCombinator = "AND"
	ViewUpdateParamsCombinatorOr  ViewUpdateParamsCombinator = "OR"
)

func (ViewUpdateParamsCombinator) IsKnown

func (r ViewUpdateParamsCombinator) IsKnown() bool

type ViewUpdateParamsObjectType added in v0.9.0

type ViewUpdateParamsObjectType string
const (
	ViewUpdateParamsObjectTypeComment      ViewUpdateParamsObjectType = "comment"
	ViewUpdateParamsObjectTypeAction       ViewUpdateParamsObjectType = "action"
	ViewUpdateParamsObjectTypeDeal         ViewUpdateParamsObjectType = "deal"
	ViewUpdateParamsObjectTypeEngagement   ViewUpdateParamsObjectType = "engagement"
	ViewUpdateParamsObjectTypeDocument     ViewUpdateParamsObjectType = "document"
	ViewUpdateParamsObjectTypeEvent        ViewUpdateParamsObjectType = "event"
	ViewUpdateParamsObjectTypeIdentity     ViewUpdateParamsObjectType = "identity"
	ViewUpdateParamsObjectTypeOrganization ViewUpdateParamsObjectType = "organization"
)

func (ViewUpdateParamsObjectType) IsKnown added in v0.9.0

func (r ViewUpdateParamsObjectType) IsKnown() bool

type ViewUpdateResponse

type ViewUpdateResponse struct {
	Name                 string                       `json:"name" api:"required"`
	ViewType             string                       `json:"view_type" api:"required"`
	ID                   string                       `json:"id" format:"uuid"`
	AggregationPropDefID string                       `json:"aggregation_prop_def_id" api:"nullable" format:"uuid"`
	AggregationType      string                       `json:"aggregation_type" api:"nullable"`
	ColumnLayout         map[string]interface{}       `json:"column_layout" api:"nullable"`
	Combinator           ViewUpdateResponseCombinator `json:"combinator"`
	CreatedAt            string                       `json:"created_at"`
	// Each entry is { slug: { comparator: value } }
	Filter []map[string]interface{} `json:"filter"`
	// Property slug to group by
	GroupBy              string        `json:"group_by" api:"nullable"`
	GroupHiddenOptionIDs []interface{} `json:"group_hidden_option_ids" api:"nullable"`
	GroupHideEmpty       bool          `json:"group_hide_empty" api:"nullable"`
	GroupSort            string        `json:"group_sort" api:"nullable"`
	Icon                 string        `json:"icon" api:"nullable"`
	ListID               string        `json:"list_id" api:"nullable" format:"uuid"`
	// Property slugs (dot-paths permitted for refs)
	Select []string `json:"select"`
	// Each entry is { slug: 'asc' | 'desc' }
	Sort      []map[string]interface{} `json:"sort"`
	SortOrder int64                    `json:"sort_order" api:"nullable"`
	TeamID    string                   `json:"team_id" api:"nullable" format:"uuid"`
	UpdatedAt string                   `json:"updated_at" api:"nullable"`
	UserID    string                   `json:"user_id" api:"nullable"`
	JSON      viewUpdateResponseJSON   `json:"-"`
}

A view (saved configuration for displaying records of a given object type) plus its select/filter/sort children. Properties in select/filter/sort are referenced by slug.

func (*ViewUpdateResponse) UnmarshalJSON

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

type ViewUpdateResponseCombinator

type ViewUpdateResponseCombinator string
const (
	ViewUpdateResponseCombinatorAnd ViewUpdateResponseCombinator = "AND"
	ViewUpdateResponseCombinatorOr  ViewUpdateResponseCombinator = "OR"
)

func (ViewUpdateResponseCombinator) IsKnown

func (r ViewUpdateResponseCombinator) IsKnown() bool

type Webhook added in v0.9.0

type Webhook struct {
	ID        string    `json:"id" api:"required" format:"uuid"`
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Disabled webhooks are skipped at delivery time.
	Enabled bool   `json:"enabled" api:"required"`
	Name    string `json:"name" api:"required"`
	TeamID  string `json:"team_id" api:"required" format:"uuid"`
	// Endpoint events are delivered to.
	URL string `json:"url" api:"required" format:"uri"`
	// True once the endpoint has completed the verification handshake.
	Verified    bool      `json:"verified" api:"required"`
	Description string    `json:"description" api:"nullable"`
	UpdatedAt   time.Time `json:"updated_at" api:"nullable" format:"date-time"`
	// Stable token replayed to the endpoint (as the `micro_hook_token` query param)
	// during the verification handshake. The endpoint may check it to confirm the
	// request originated from Micro.
	VerificationToken string      `json:"verification_token"`
	VerifiedAt        time.Time   `json:"verified_at" api:"nullable" format:"date-time"`
	JSON              webhookJSON `json:"-"`
}

A registered webhook endpoint.

func (*Webhook) UnmarshalJSON added in v0.9.0

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

type WebhookCreateParam added in v0.9.0

type WebhookCreateParam struct {
	Name param.Field[string] `json:"name" api:"required"`
	// HTTP(S) endpoint. Rejected if it resolves to a private/internal address.
	URL         param.Field[string] `json:"url" api:"required" format:"uri"`
	Description param.Field[string] `json:"description"`
	Enabled     param.Field[bool]   `json:"enabled"`
}

On create, the dispatcher asynchronously runs a verification handshake: it sends a GET to `url` with `micro_hook_mode=subscribe`, a one-time `micro_hook_challenge`, and the webhook's `micro_hook_token`. The endpoint must respond 200 and echo the challenge value verbatim in the body; on success the webhook's `verified` flag flips to true. A failed handshake does not fail creation — re-run it later via the verify endpoint.

func (WebhookCreateParam) MarshalJSON added in v0.9.0

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

type WebhookDeleteParams added in v0.9.0

type WebhookDeleteParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type WebhookDelivery added in v0.9.0

type WebhookDelivery struct {
	CreatedAt  time.Time             `json:"created_at" api:"required" format:"date-time"`
	DeliveryID string                `json:"delivery_id" api:"required" format:"uuid"`
	Status     WebhookDeliveryStatus `json:"status" api:"required"`
	Type       WebhookDeliveryType   `json:"type" api:"required"`
	WebhookID  string                `json:"webhook_id" api:"required" format:"uuid"`
	// Number of attempts made so far (including async retries).
	Attempts int64 `json:"attempts" api:"nullable"`
	// Event name (e.g. `webhook.test`); `verification` for handshake runs.
	Event string `json:"event" api:"nullable"`
	// HTTP status of the latest attempt; null on a transport error.
	StatusCode int64               `json:"status_code" api:"nullable"`
	TeamID     string              `json:"team_id" api:"nullable" format:"uuid"`
	UpdatedAt  time.Time           `json:"updated_at" api:"nullable" format:"date-time"`
	URL        string              `json:"url"`
	JSON       webhookDeliveryJSON `json:"-"`
}

A webhook delivery — one logical event delivery to an endpoint, grouping its attempts. Status and status_code reflect the latest attempt.

func (*WebhookDelivery) UnmarshalJSON added in v0.9.0

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

type WebhookDeliveryDetail added in v0.9.0

type WebhookDeliveryDetail struct {
	AttemptHistory []WebhookDeliveryDetailAttemptHistory `json:"attempt_history"`
	JSON           webhookDeliveryDetailJSON             `json:"-"`
	WebhookDelivery
}

A delivery plus its full attempt timeline.

func (*WebhookDeliveryDetail) UnmarshalJSON added in v0.9.0

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

type WebhookDeliveryDetailAttemptHistory added in v0.9.0

type WebhookDeliveryDetailAttemptHistory struct {
	// 1-based attempt number.
	Attempt   int64                                     `json:"attempt" api:"required"`
	CreatedAt time.Time                                 `json:"created_at" api:"required" format:"date-time"`
	Status    WebhookDeliveryDetailAttemptHistoryStatus `json:"status" api:"required"`
	// Failure reason, when status is failed.
	Error string `json:"error" api:"nullable"`
	// Body sent to the endpoint (delivery only); may be truncated.
	RequestBody string `json:"request_body" api:"nullable"`
	// Body returned by the endpoint; may be truncated.
	ResponseBody string                                  `json:"response_body" api:"nullable"`
	StatusCode   int64                                   `json:"status_code" api:"nullable"`
	JSON         webhookDeliveryDetailAttemptHistoryJSON `json:"-"`
}

A single HTTP attempt within a delivery (including async retries).

func (*WebhookDeliveryDetailAttemptHistory) UnmarshalJSON added in v0.9.0

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

type WebhookDeliveryDetailAttemptHistoryStatus added in v0.9.0

type WebhookDeliveryDetailAttemptHistoryStatus string
const (
	WebhookDeliveryDetailAttemptHistoryStatusSuccess WebhookDeliveryDetailAttemptHistoryStatus = "success"
	WebhookDeliveryDetailAttemptHistoryStatusFailed  WebhookDeliveryDetailAttemptHistoryStatus = "failed"
)

func (WebhookDeliveryDetailAttemptHistoryStatus) IsKnown added in v0.9.0

type WebhookDeliveryGetParams added in v0.9.0

type WebhookDeliveryGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type WebhookDeliveryListParams added in v0.9.0

type WebhookDeliveryListParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Only deliveries at or after this ISO-8601 timestamp.
	After param.Field[time.Time] `query:"after" format:"date-time"`
	// Only deliveries at or before this ISO-8601 timestamp.
	Before param.Field[time.Time] `query:"before" format:"date-time"`
	// Opaque cursor from a previous response's `next_cursor`.
	Cursor param.Field[string] `query:"cursor"`
	// Page size (1–100, default 25).
	Limit param.Field[int64] `query:"limit"`
	// Filter by outcome.
	Status param.Field[WebhookDeliveryListParamsStatus] `query:"status"`
	// Filter by run type. Defaults to `delivery` (event deliveries). Pass `all` to
	// include verification handshakes.
	Type param.Field[WebhookDeliveryListParamsType] `query:"type"`
}

func (WebhookDeliveryListParams) URLQuery added in v0.9.0

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

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

type WebhookDeliveryListParamsStatus added in v0.9.0

type WebhookDeliveryListParamsStatus string

Filter by outcome.

const (
	WebhookDeliveryListParamsStatusSuccess WebhookDeliveryListParamsStatus = "success"
	WebhookDeliveryListParamsStatusFailed  WebhookDeliveryListParamsStatus = "failed"
)

func (WebhookDeliveryListParamsStatus) IsKnown added in v0.9.0

type WebhookDeliveryListParamsType added in v0.9.0

type WebhookDeliveryListParamsType string

Filter by run type. Defaults to `delivery` (event deliveries). Pass `all` to include verification handshakes.

const (
	WebhookDeliveryListParamsTypeDelivery     WebhookDeliveryListParamsType = "delivery"
	WebhookDeliveryListParamsTypeVerification WebhookDeliveryListParamsType = "verification"
	WebhookDeliveryListParamsTypeAll          WebhookDeliveryListParamsType = "all"
)

func (WebhookDeliveryListParamsType) IsKnown added in v0.9.0

func (r WebhookDeliveryListParamsType) IsKnown() bool

type WebhookDeliveryListResponse added in v0.9.0

type WebhookDeliveryListResponse struct {
	Data []WebhookDelivery `json:"data" api:"required"`
	// Pass as `cursor` to fetch the next page; null when there are no more.
	NextCursor string                          `json:"next_cursor" api:"nullable"`
	JSON       webhookDeliveryListResponseJSON `json:"-"`
}

func (*WebhookDeliveryListResponse) UnmarshalJSON added in v0.9.0

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

type WebhookDeliveryService added in v0.9.0

type WebhookDeliveryService struct {
	Options []option.RequestOption
}

WebhookDeliveryService contains methods and other services that help with interacting with the micro 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 NewWebhookDeliveryService method instead.

func NewWebhookDeliveryService added in v0.9.0

func NewWebhookDeliveryService(opts ...option.RequestOption) (r *WebhookDeliveryService)

NewWebhookDeliveryService 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 (*WebhookDeliveryService) Get added in v0.9.0

func (r *WebhookDeliveryService) Get(ctx context.Context, webhookID string, deliveryID string, query WebhookDeliveryGetParams, opts ...option.RequestOption) (res *WebhookDeliveryDetail, err error)

A single delivery plus its full attempt timeline (including async retries).

func (*WebhookDeliveryService) List added in v0.9.0

An endpoint's deliveries, newest first, with optional status / type / time-range filters and cursor pagination.

type WebhookDeliveryStatus added in v0.9.0

type WebhookDeliveryStatus string
const (
	WebhookDeliveryStatusSuccess WebhookDeliveryStatus = "success"
	WebhookDeliveryStatusFailed  WebhookDeliveryStatus = "failed"
)

func (WebhookDeliveryStatus) IsKnown added in v0.9.0

func (r WebhookDeliveryStatus) IsKnown() bool

type WebhookDeliveryType added in v0.9.0

type WebhookDeliveryType string
const (
	WebhookDeliveryTypeDelivery     WebhookDeliveryType = "delivery"
	WebhookDeliveryTypeVerification WebhookDeliveryType = "verification"
)

func (WebhookDeliveryType) IsKnown added in v0.9.0

func (r WebhookDeliveryType) IsKnown() bool

type WebhookGetParams added in v0.9.0

type WebhookGetParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type WebhookListDeliveriesParams added in v0.9.0

type WebhookListDeliveriesParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Opaque cursor from a previous response's `next_cursor`.
	Cursor param.Field[string] `query:"cursor"`
	// Page size (1–100, default 25).
	Limit param.Field[int64] `query:"limit"`
	// Filter by outcome.
	Status param.Field[WebhookListDeliveriesParamsStatus] `query:"status"`
	// Filter by run type. Defaults to `delivery` (event deliveries). Pass `all` to
	// include verification handshakes.
	Type param.Field[WebhookListDeliveriesParamsType] `query:"type"`
}

func (WebhookListDeliveriesParams) URLQuery added in v0.9.0

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

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

type WebhookListDeliveriesParamsStatus added in v0.9.0

type WebhookListDeliveriesParamsStatus string

Filter by outcome.

const (
	WebhookListDeliveriesParamsStatusSuccess WebhookListDeliveriesParamsStatus = "success"
	WebhookListDeliveriesParamsStatusFailed  WebhookListDeliveriesParamsStatus = "failed"
)

func (WebhookListDeliveriesParamsStatus) IsKnown added in v0.9.0

type WebhookListDeliveriesParamsType added in v0.9.0

type WebhookListDeliveriesParamsType string

Filter by run type. Defaults to `delivery` (event deliveries). Pass `all` to include verification handshakes.

const (
	WebhookListDeliveriesParamsTypeDelivery     WebhookListDeliveriesParamsType = "delivery"
	WebhookListDeliveriesParamsTypeVerification WebhookListDeliveriesParamsType = "verification"
	WebhookListDeliveriesParamsTypeAll          WebhookListDeliveriesParamsType = "all"
)

func (WebhookListDeliveriesParamsType) IsKnown added in v0.9.0

type WebhookListDeliveriesResponse added in v0.9.0

type WebhookListDeliveriesResponse struct {
	Data []WebhookDelivery `json:"data" api:"required"`
	// Pass as `cursor` to fetch the next page; null when there are no more.
	NextCursor string                            `json:"next_cursor" api:"nullable"`
	JSON       webhookListDeliveriesResponseJSON `json:"-"`
}

func (*WebhookListDeliveriesResponse) UnmarshalJSON added in v0.9.0

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

type WebhookListParams added in v0.9.0

type WebhookListParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type WebhookListResponse added in v0.9.0

type WebhookListResponse struct {
	Data []Webhook               `json:"data" api:"required"`
	JSON webhookListResponseJSON `json:"-"`
}

func (*WebhookListResponse) UnmarshalJSON added in v0.9.0

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

type WebhookNewParams added in v0.9.0

type WebhookNewParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// On create, the dispatcher asynchronously runs a verification handshake: it sends
	// a GET to `url` with `micro_hook_mode=subscribe`, a one-time
	// `micro_hook_challenge`, and the webhook's `micro_hook_token`. The endpoint must
	// respond 200 and echo the challenge value verbatim in the body; on success the
	// webhook's `verified` flag flips to true. A failed handshake does not fail
	// creation — re-run it later via the verify endpoint.
	WebhookCreate WebhookCreateParam `json:"webhook_create" api:"required"`
}

func (WebhookNewParams) MarshalJSON added in v0.9.0

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

type WebhookPingParams added in v0.9.0

type WebhookPingParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Arbitrary JSON payload body.
	Data param.Field[map[string]interface{}] `json:"data"`
	// Event name to send.
	Event param.Field[string] `json:"event"`
}

func (WebhookPingParams) MarshalJSON added in v0.9.0

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

type WebhookPingResponse added in v0.9.0

type WebhookPingResponse struct {
	Dispatched bool                    `json:"dispatched" api:"required"`
	Event      string                  `json:"event" api:"required"`
	WebhookID  string                  `json:"webhook_id" api:"required" format:"uuid"`
	JSON       webhookPingResponseJSON `json:"-"`
}

func (*WebhookPingResponse) UnmarshalJSON added in v0.9.0

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

type WebhookService added in v0.9.0

type WebhookService struct {
	Options    []option.RequestOption
	Deliveries *WebhookDeliveryService
}

WebhookService contains methods and other services that help with interacting with the micro API.

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

func NewWebhookService added in v0.9.0

func NewWebhookService(opts ...option.RequestOption) (r *WebhookService)

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

func (*WebhookService) Delete added in v0.9.0

func (r *WebhookService) Delete(ctx context.Context, webhookID string, body WebhookDeleteParams, opts ...option.RequestOption) (err error)

Delete a webhook

func (*WebhookService) Get added in v0.9.0

func (r *WebhookService) Get(ctx context.Context, webhookID string, query WebhookGetParams, opts ...option.RequestOption) (res *Webhook, err error)

Get a webhook

func (*WebhookService) List added in v0.9.0

Lists the team's webhooks. Signing secrets are never included.

func (*WebhookService) ListDeliveries added in v0.9.0

Account-wide delivery feed across all of the team's webhooks, newest first.

func (*WebhookService) New added in v0.9.0

func (r *WebhookService) New(ctx context.Context, params WebhookNewParams, opts ...option.RequestOption) (res *WebhookWithSecret, err error)

Registers a webhook and enqueues an asynchronous verification handshake (run by the dispatcher). The response includes the signing `secret`, shown only this once; `verified` is false until the handshake passes.

func (*WebhookService) Ping added in v0.9.0

func (r *WebhookService) Ping(ctx context.Context, webhookID string, params WebhookPingParams, opts ...option.RequestOption) (res *WebhookPingResponse, err error)

Fire-and-forget test delivery through the async dispatcher. The webhook must be enabled and verified.

func (*WebhookService) Update added in v0.9.0

func (r *WebhookService) Update(ctx context.Context, webhookID string, params WebhookUpdateParams, opts ...option.RequestOption) (res *WebhookUpdateResponse, err error)

Updates mutable fields. Changing `url` resets verification and re-runs the handshake.

func (*WebhookService) Verify added in v0.9.0

func (r *WebhookService) Verify(ctx context.Context, webhookID string, body WebhookVerifyParams, opts ...option.RequestOption) (res *WebhookVerifyResponse, err error)

Re-runs the GET challenge/echo handshake against the webhook's url and updates its verified state.

type WebhookUpdateParam added in v0.9.0

type WebhookUpdateParam struct {
	Description param.Field[string] `json:"description"`
	Enabled     param.Field[bool]   `json:"enabled"`
	Name        param.Field[string] `json:"name"`
	URL         param.Field[string] `json:"url" format:"uri"`
}

Partial update. Changing `url` resets verification and re-runs the handshake.

func (WebhookUpdateParam) MarshalJSON added in v0.9.0

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

type WebhookUpdateParams added in v0.9.0

type WebhookUpdateParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
	// Partial update. Changing `url` resets verification and re-runs the handshake.
	WebhookUpdate WebhookUpdateParam `json:"webhook_update" api:"required"`
}

func (WebhookUpdateParams) MarshalJSON added in v0.9.0

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

type WebhookUpdateResponse added in v0.9.0

type WebhookUpdateResponse struct {
	// Status of the verification handshake enqueued by this request. The handshake
	// runs asynchronously in the dispatcher; poll the webhook (its `verified` flag
	// flips to true on success) to observe the outcome.
	Verification WebhookUpdateResponseVerification `json:"verification"`
	JSON         webhookUpdateResponseJSON         `json:"-"`
	Webhook
}

A webhook plus the status of a verification handshake enqueued by this request.

func (*WebhookUpdateResponse) UnmarshalJSON added in v0.9.0

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

type WebhookUpdateResponseVerification added in v0.9.0

type WebhookUpdateResponseVerification struct {
	// Always `pending` at the moment of the response — the dispatcher has been asked
	// to run the handshake but has not reported back yet.
	Status WebhookUpdateResponseVerificationStatus `json:"status" api:"required"`
	JSON   webhookUpdateResponseVerificationJSON   `json:"-"`
}

Status of the verification handshake enqueued by this request. The handshake runs asynchronously in the dispatcher; poll the webhook (its `verified` flag flips to true on success) to observe the outcome.

func (*WebhookUpdateResponseVerification) UnmarshalJSON added in v0.9.0

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

type WebhookUpdateResponseVerificationStatus added in v0.9.0

type WebhookUpdateResponseVerificationStatus string

Always `pending` at the moment of the response — the dispatcher has been asked to run the handshake but has not reported back yet.

const (
	WebhookUpdateResponseVerificationStatusPending WebhookUpdateResponseVerificationStatus = "pending"
)

func (WebhookUpdateResponseVerificationStatus) IsKnown added in v0.9.0

type WebhookVerifyParams added in v0.9.0

type WebhookVerifyParams struct {
	// Use [option.WithTeamID] on the client to set a global default for this field.
	TeamID param.Field[string] `path:"teamId" api:"required" format:"uuid"`
}

type WebhookVerifyResponse added in v0.9.0

type WebhookVerifyResponse struct {
	// Status of the verification handshake enqueued by this request. The handshake
	// runs asynchronously in the dispatcher; poll the webhook (its `verified` flag
	// flips to true on success) to observe the outcome.
	Verification WebhookVerifyResponseVerification `json:"verification"`
	JSON         webhookVerifyResponseJSON         `json:"-"`
	Webhook
}

A webhook plus the status of a verification handshake enqueued by this request.

func (*WebhookVerifyResponse) UnmarshalJSON added in v0.9.0

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

type WebhookVerifyResponseVerification added in v0.9.0

type WebhookVerifyResponseVerification struct {
	// Always `pending` at the moment of the response — the dispatcher has been asked
	// to run the handshake but has not reported back yet.
	Status WebhookVerifyResponseVerificationStatus `json:"status" api:"required"`
	JSON   webhookVerifyResponseVerificationJSON   `json:"-"`
}

Status of the verification handshake enqueued by this request. The handshake runs asynchronously in the dispatcher; poll the webhook (its `verified` flag flips to true on success) to observe the outcome.

func (*WebhookVerifyResponseVerification) UnmarshalJSON added in v0.9.0

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

type WebhookVerifyResponseVerificationStatus added in v0.9.0

type WebhookVerifyResponseVerificationStatus string

Always `pending` at the moment of the response — the dispatcher has been asked to run the handshake but has not reported back yet.

const (
	WebhookVerifyResponseVerificationStatusPending WebhookVerifyResponseVerificationStatus = "pending"
)

func (WebhookVerifyResponseVerificationStatus) IsKnown added in v0.9.0

type WebhookWithSecret added in v0.9.0

type WebhookWithSecret struct {
	// HMAC signing secret (prefix `whsec_`). Store it now — it is never returned
	// again. The dispatcher signs each delivered payload with it so your endpoint can
	// verify authenticity.
	Secret string `json:"secret" api:"required"`
	// Status of the verification handshake enqueued by this request. The handshake
	// runs asynchronously in the dispatcher; poll the webhook (its `verified` flag
	// flips to true on success) to observe the outcome.
	Verification WebhookWithSecretVerification `json:"verification"`
	JSON         webhookWithSecretJSON         `json:"-"`
	Webhook
}

Returned ONLY on creation. Includes the signing secret (shown once) and the pending verification status.

func (*WebhookWithSecret) UnmarshalJSON added in v0.9.0

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

type WebhookWithSecretVerification added in v0.9.0

type WebhookWithSecretVerification struct {
	// Always `pending` at the moment of the response — the dispatcher has been asked
	// to run the handshake but has not reported back yet.
	Status WebhookWithSecretVerificationStatus `json:"status" api:"required"`
	JSON   webhookWithSecretVerificationJSON   `json:"-"`
}

Status of the verification handshake enqueued by this request. The handshake runs asynchronously in the dispatcher; poll the webhook (its `verified` flag flips to true on success) to observe the outcome.

func (*WebhookWithSecretVerification) UnmarshalJSON added in v0.9.0

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

type WebhookWithSecretVerificationStatus added in v0.9.0

type WebhookWithSecretVerificationStatus string

Always `pending` at the moment of the response — the dispatcher has been asked to run the handshake but has not reported back yet.

const (
	WebhookWithSecretVerificationStatusPending WebhookWithSecretVerificationStatus = "pending"
)

func (WebhookWithSecretVerificationStatus) IsKnown added in v0.9.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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