Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package client is the FlowCatalyst platform HTTP API client. Resource access is aggregate-scoped: each aggregate has its own type returned by an accessor method on *FlowCatalystClient (c.EventTypes(), c.Subscriptions(), …) that holds a reference back to the client and exposes List/Get/Create/Update/Delete/Sync methods.

Authentication: pass a static bearer token via WithToken, or a dynamic provider via WithTokenProvider (e.g. an OAuth2 client- credentials grant that refreshes ahead of expiry). Both forms feed the same Authorization header on every request.

Index

Constants

View Source
const OnBehalfOfHeader = "X-On-Behalf-Of"

OnBehalfOfHeader names the person a service account acts for. The platform records it in the audit row of a platform-config set, delete or reveal, and honours it only from service accounts.

View Source
const SecretMask = "***"

SecretMask is the literal the platform returns as the value of every property whose valueType is SECRET, from every ordinary read (Get, and the response to Set) and for every caller. The plaintext is available only through PlatformConfigResource.RevealSecret.

Variables

View Source
var ErrInvalidOnBehalfOf = errors.New("fcsdk: on-behalf-of must be at most 256 characters with no control characters")

ErrInvalidOnBehalfOf is returned before anything is sent when the value given to WithOnBehalfOf is too long or holds a control character.

Functions

func EncodeQuery

func EncodeQuery(pairs ...string) string

EncodeQuery builds a "?a=1&b=2" suffix from name/value pairs, omitting empty values. Pass an even number of strings.

func WithOnBehalfOf

func WithOnBehalfOf(ctx context.Context, who string) context.Context

WithOnBehalfOf returns a context whose calls send X-On-Behalf-Of: who (an id or an email, never a token), so the platform's audit row names the person a service account acts for:

ctx = client.WithOnBehalfOf(ctx, user.ID)
c.PlatformConfig().Set(ctx, "orders", "ftp", "password", req)

A blank who sends nothing. The platform uses it on platform-config set, delete and reveal; other endpoints ignore it.

Types

type APIAuth

type APIAuth interface {
	// contains filtered or unexported methods
}

APIAuth is how an api-poll logs in to the API: APINoAuth, APIBasicAuth, APIBearerAuth, APIKeyAuth, APIClientCredentialsAuth, APILoginAuth, or Unrecognized.

type APIBasicAuth

type APIBasicAuth struct {
	Username string    `json:"username"`
	Password SecretRef `json:"password"`
}

APIBasicAuth sends basic credentials.

func (APIBasicAuth) MarshalJSON

func (a APIBasicAuth) MarshalJSON() ([]byte, error)

type APIBearerAuth

type APIBearerAuth struct {
	Token SecretRef `json:"token"`
}

APIBearerAuth sends a bearer token.

func (APIBearerAuth) MarshalJSON

func (a APIBearerAuth) MarshalJSON() ([]byte, error)

type APIClientCredentialsAuth

type APIClientCredentialsAuth struct {
	TokenURL      string    `json:"tokenUrl"`
	ClientID      string    `json:"clientId"`
	ClientSecret  SecretRef `json:"clientSecret"`
	Scope         *string   `json:"scope,omitempty"`
	Audience      *string   `json:"audience,omitempty"`
	CredentialsIn string    `json:"credentialsIn"`
}

APIClientCredentialsAuth gets a token with the OAuth client credentials grant. CredentialsIn is BASIC_HEADER or BODY.

func (APIClientCredentialsAuth) MarshalJSON

func (a APIClientCredentialsAuth) MarshalJSON() ([]byte, error)

type APICursor

type APICursor struct {
	From    string  `json:"from"`
	Param   string  `json:"param"`
	Initial *string `json:"initial,omitempty"`
}

APICursor is what in an answer moves the next request on. From is a path such as $.next, Param the query parameter it is sent in.

type APIError

type APIError struct {
	// StatusCode is the HTTP status returned by the platform.
	StatusCode int
	// Body is the raw response body. May contain a structured error
	// envelope (see Code, Message, Details below) or a plain string.
	Body string
}

APIError is returned when the platform responds with a non-2xx status code. Inspect via errors.As(err, &client.APIError{}).

func (*APIError) Code

func (e *APIError) Code() string

Code returns the platform's error code if the body is a structured envelope (e.g. {"code": "EVENT_TYPE_NOT_FOUND", "message": "..."}), or "" if the body is unstructured.

func (*APIError) Error

func (e *APIError) Error() string

Error renders a human-readable summary. Includes the status code and the structured Code if one is present in the body.

func (*APIError) IsConflict

func (e *APIError) IsConflict() bool

IsConflict is a convenience for status 409.

func (*APIError) IsForbidden

func (e *APIError) IsForbidden() bool

IsForbidden is a convenience for status 403.

func (*APIError) IsNotFound

func (e *APIError) IsNotFound() bool

IsNotFound is a convenience for status 404.

func (*APIError) IsUnauthorized

func (e *APIError) IsUnauthorized() bool

IsUnauthorized is a convenience for status 401.

func (*APIError) Message

func (e *APIError) Message() string

Message returns the platform's error message if present.

func (*APIError) Retryable

func (e *APIError) Retryable() bool

Retryable reports whether the caller should retry the request. The usual transient statuses (408, 425, 429, 500, 502, 503, 504) qualify.

type APIHeader

type APIHeader struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

APIHeader is sent on every request; none of them is secret.

type APIHeaderResults

type APIHeaderResults struct {
	Name   string  `json:"name"`
	Equals *string `json:"equals,omitempty"`
}

APIHeaderResults has results when the answer carries the header, optionally with the value Equals (ignoring case).

func (APIHeaderResults) MarshalJSON

func (r APIHeaderResults) MarshalJSON() ([]byte, error)

type APIJSONPathResults

type APIJSONPathResults struct {
	Path string `json:"path"`
}

APIJSONPathResults has results when Path ($.items) holds a non-empty array or a value that is not null, false or empty.

func (APIJSONPathResults) MarshalJSON

func (r APIJSONPathResults) MarshalJSON() ([]byte, error)

type APIKeyAuth

type APIKeyAuth struct {
	Header string    `json:"header"`
	Value  SecretRef `json:"value"`
}

APIKeyAuth sends a secret in a header.

func (APIKeyAuth) MarshalJSON

func (a APIKeyAuth) MarshalJSON() ([]byte, error)

type APILoginAuth

type APILoginAuth struct {
	URL           string            `json:"url"`
	Format        string            `json:"format"`
	UsernameField string            `json:"usernameField"`
	PasswordField string            `json:"passwordField"`
	Username      string            `json:"username"`
	Password      SecretRef         `json:"password"`
	ExtraFields   map[string]string `json:"extraFields,omitempty"`
	TokenPath     string            `json:"tokenPath"`
	ExpiresInPath *string           `json:"expiresInPath,omitempty"`
	Lifetime      string            `json:"lifetime"`
	Header        string            `json:"header"`
	Prefix        string            `json:"prefix"`
}

APILoginAuth posts a username and password to a login endpoint and reads the token from the answer. Format is FORM or JSON.

func (APILoginAuth) MarshalJSON

func (a APILoginAuth) MarshalJSON() ([]byte, error)

type APINoAuth

type APINoAuth struct{}

APINoAuth sends no credentials.

func (APINoAuth) MarshalJSON

func (a APINoAuth) MarshalJSON() ([]byte, error)

type APIPollSource

type APIPollSource struct {
	URL     string      `json:"url"`
	Method  string      `json:"method"`
	Headers []APIHeader `json:"headers,omitempty"`
	Body    *string     `json:"body,omitempty"`
	Auth    APIAuth     `json:"auth"`
	Results APIResults  `json:"results"`
	Cursor  *APICursor  `json:"cursor,omitempty"`
	// Every is the wait after an answer with results, IdleDelay after one
	// without.
	Every     string `json:"every"`
	IdleDelay string `json:"idleDelay"`
}

APIPollSource makes one request per poll to an HTTP API and splits the answer.

func (APIPollSource) MarshalJSON

func (s APIPollSource) MarshalJSON() ([]byte, error)

func (*APIPollSource) UnmarshalJSON

func (s *APIPollSource) UnmarshalJSON(data []byte) error

type APIRecordsResults

type APIRecordsResults struct{}

APIRecordsResults has results when the split makes at least one record of the answer.

func (APIRecordsResults) MarshalJSON

func (r APIRecordsResults) MarshalJSON() ([]byte, error)

type APIResults

type APIResults interface {
	// contains filtered or unexported methods
}

APIResults is how an api-poll tells an answer has results: APIRecordsResults, APIJSONPathResults, APIHeaderResults, or Unrecognized.

type AWSCredential

type AWSCredential struct {
	AccessKeyID     string    `json:"accessKeyId"`
	SecretAccessKey SecretRef `json:"secretAccessKey"`
}

AWSCredential is an access key; the secret half is a name.

type AddNoteRequest

type AddNoteRequest struct {
	Category string `json:"category"`
	Text     string `json:"text"`
}

AddNoteRequest — body for POST /api/clients/{id}/notes.

type AddNoteResponse

type AddNoteResponse struct {
	Message string `json:"message"`
}

AddNoteResponse — { message } envelope from add-note endpoint.

type AddSchemaVersionRequest

type AddSchemaVersionRequest struct {
	// Version names the new schema version (e.g. "1.1"); the platform
	// requires it.
	Version string          `json:"version"`
	Schema  json.RawMessage `json:"schema"`
}

AddSchemaVersionRequest is the body for POST /api/event-types/{id}/versions.

type ApplicationListResponse

type ApplicationListResponse struct {
	Applications []ApplicationResponse `json:"applications"`
	Total        uint64                `json:"total,omitempty"`
}

ApplicationListResponse — GET /api/applications.

type ApplicationResponse

type ApplicationResponse struct {
	ID               string `json:"id"`
	Code             string `json:"code"`
	Name             string `json:"name"`
	Description      string `json:"description,omitempty"`
	ApplicationType  string `json:"type"`
	DefaultBaseURL   string `json:"defaultBaseUrl,omitempty"`
	IconURL          string `json:"iconUrl,omitempty"`
	LogoMimeType     string `json:"logoMimeType,omitempty"`
	Website          string `json:"website,omitempty"`
	ServiceAccountID string `json:"serviceAccountId,omitempty"`
	// HasLoginClient reports whether a login OAuth client is provisioned
	// for the application.
	HasLoginClient bool   `json:"hasLoginClient"`
	Active         bool   `json:"active"`
	CreatedAt      string `json:"createdAt"`
	UpdatedAt      string `json:"updatedAt"`
}

ApplicationResponse is the platform's application aggregate.

type ApplicationsResource

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

ApplicationsResource — /api/applications/*.

func (*ApplicationsResource) Activate

Activate — POST /api/applications/{id}/activate.

func (*ApplicationsResource) Create

Create — POST /api/applications. Returns the new application's id.

func (*ApplicationsResource) Deactivate

Deactivate — POST /api/applications/{id}/deactivate.

func (*ApplicationsResource) Delete

func (r *ApplicationsResource) Delete(ctx context.Context, id string) error

Delete — DELETE /api/applications/{id}.

func (*ApplicationsResource) DisableForClient

func (r *ApplicationsResource) DisableForClient(ctx context.Context, id, clientID string) error

DisableForClient — POST /api/applications/{id}/clients/{clientId}/disable (204 No Content).

func (*ApplicationsResource) EnableForClient

func (r *ApplicationsResource) EnableForClient(ctx context.Context, id, clientID string) error

EnableForClient — POST /api/applications/{id}/clients/{clientId}/enable (204 No Content).

func (*ApplicationsResource) Get

Get — GET /api/applications/{id}.

func (*ApplicationsResource) GetByCode

GetByCode — GET /api/applications/by-code/{code}.

func (*ApplicationsResource) GetClientConfig

func (r *ApplicationsResource) GetClientConfig(ctx context.Context, id, clientID string) (*ClientConfigResponse, error)

GetClientConfig — GET /api/applications/{id}/clients/{clientId}: the application's configuration for one client. The platform has no route that edits it; EnableForClient / DisableForClient flip it on and off.

func (*ApplicationsResource) LinkServiceAccount

func (r *ApplicationsResource) LinkServiceAccount(ctx context.Context, id string, req *LinkServiceAccountRequest) error

LinkServiceAccount — POST /api/applications/{id}/service-account. Points the application at an existing service account (the platform answers 204). The application's current account is on ApplicationResponse.ServiceAccountID; read the account itself with ServiceAccounts().Get.

func (*ApplicationsResource) List

func (r *ApplicationsResource) List(ctx context.Context, appType string, active *bool) (*ApplicationListResponse, error)

List — GET /api/applications?type=&active=. The platform returns every matching application in one response (there is no paging). Pass an empty appType and a nil active to list them all.

func (*ApplicationsResource) ListClients

ListClients — GET /api/applications/{id}/clients.

func (*ApplicationsResource) ListRoles

func (r *ApplicationsResource) ListRoles(ctx context.Context, id string) ([]string, error)

ListRoles — GET /api/applications/by-id/{id}/roles. The platform answers `{ roles: [name, ...] }`; this returns the role names.

The platform mounts the admin TSID lookup under /by-id so it doesn't collide with the SDK's /{appCode}/roles/sync route.

func (*ApplicationsResource) ProvisionServiceAccount

func (r *ApplicationsResource) ProvisionServiceAccount(ctx context.Context, id string) (*ProvisionServiceAccountResponse, error)

ProvisionServiceAccount — POST /api/applications/{id}/provision-service-account. The response carries the new client secret exactly once.

func (*ApplicationsResource) Update

Update — PUT /api/applications/{id}. The platform answers 204 No Content; call Get(id) for the updated record.

type ApplyIngestionSetRequest

type ApplyIngestionSetRequest struct {
	Items []IngestionSetItem `json:"items"`
	Files []SetFile          `json:"files,omitempty"`
}

ApplyIngestionSetRequest — PUT /api/ingestion-sets/{name}. No two items may share an application, client and code; Files (at most 2 MB in all) are kept with the apply.

type AssignRoleRequest

type AssignRoleRequest struct {
	Role string `json:"role"`
}

AssignRoleRequest — body for POST /api/principals/{id}/roles. The backend expects { role }, not { roleName }.

type AuditLogFilters

type AuditLogFilters struct {
	EntityType  string
	EntityID    string
	Operation   string
	PrincipalID string
	// ApplicationIDs and ClientIDs filter to those ids (sent as CSV).
	ApplicationIDs []string
	ClientIDs      []string
	// After is the opaque cursor from a previous page's NextCursor.
	After string
	// PageSize defaults to 50 server-side and is capped at 200.
	PageSize *uint32
}

AuditLogFilters — query parameters for GET /api/audit-logs. The listing is cursor-paged: pass the previous page's NextCursor as After.

type AuditLogListResponse

type AuditLogListResponse struct {
	AuditLogs  []AuditLogResponse `json:"auditLogs"`
	HasMore    bool               `json:"hasMore"`
	NextCursor string             `json:"nextCursor,omitempty"`
}

AuditLogListResponse — GET /api/audit-logs, cursor-paged: while HasMore is true, pass NextCursor as AuditLogFilters.After to fetch the next page.

type AuditLogResponse

type AuditLogResponse struct {
	ID         string `json:"id"`
	Operation  string `json:"operation"`
	EntityType string `json:"entityType"`
	EntityID   string `json:"entityId"`
	// OperationJSON is the serialised operation payload, when recorded.
	OperationJSON string `json:"operationJson,omitempty"`
	PrincipalID   string `json:"principalId,omitempty"`
	PrincipalName string `json:"principalName,omitempty"`
	ApplicationID string `json:"applicationId,omitempty"`
	ClientID      string `json:"clientId,omitempty"`
	PerformedAt   string `json:"performedAt"`
}

AuditLogResponse is a single audit log row.

type AuditLogsResource

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

AuditLogsResource — /api/audit-logs/*.

func (*AuditLogsResource) Get

Get — GET /api/audit-logs/{id}.

func (*AuditLogsResource) List

List — GET /api/audit-logs with optional filters.

type CSVSplit

type CSVSplit struct {
	Header bool `json:"header"`
}

CSVSplit makes one record per line; Header drops the first line.

func (CSVSplit) MarshalJSON

func (s CSVSplit) MarshalJSON() ([]byte, error)

type ClientAccessGrantResponse

type ClientAccessGrantResponse struct {
	ID        string `json:"id"`
	ClientID  string `json:"clientId"`
	GrantedAt string `json:"grantedAt"`
	ExpiresAt string `json:"expiresAt,omitempty"`
}

ClientAccessGrantResponse — one item from GET /api/principals/{id}/client-access.

type ClientAccessListResponse

type ClientAccessListResponse struct {
	Grants []ClientAccessGrantResponse `json:"grants"`
}

ClientAccessListResponse — GET /api/principals/{id}/client-access.

type ClientApplicationResponse

type ClientApplicationResponse struct {
	ID               string `json:"id"`
	Code             string `json:"code"`
	Name             string `json:"name"`
	Description      string `json:"description,omitempty"`
	IconURL          string `json:"iconUrl,omitempty"`
	Active           bool   `json:"active,omitempty"`
	EnabledForClient bool   `json:"enabledForClient,omitempty"`
}

ClientApplicationResponse — one entry in GET /api/clients/{id}/applications.

type ClientApplicationsResponse

type ClientApplicationsResponse struct {
	Applications []ClientApplicationResponse `json:"applications"`
	Total        uint64                      `json:"total,omitempty"`
}

ClientApplicationsResponse — GET /api/clients/{id}/applications.

type ClientConfigResponse

type ClientConfigResponse struct {
	ID              string `json:"id"`
	ApplicationID   string `json:"applicationId"`
	ClientID        string `json:"clientId"`
	Enabled         bool   `json:"enabled"`
	BaseURLOverride string `json:"baseUrlOverride,omitempty"`
	// ConfigJSON is the free-form per-client configuration document.
	ConfigJSON json.RawMessage `json:"configJson,omitempty"`
	CreatedAt  string          `json:"createdAt"`
	UpdatedAt  string          `json:"updatedAt"`
}

ClientConfigResponse — one application-to-client configuration, as returned by GET /api/applications/{id}/clients.

type ClientConfigsResponse

type ClientConfigsResponse struct {
	ClientConfigs []ClientConfigResponse `json:"items"`
}

ClientConfigsResponse — GET /api/applications/{id}/clients, which wraps the entries in `items`.

type ClientListResponse

type ClientListResponse struct {
	Clients []ClientResponse `json:"clients"`
	Total   uint64           `json:"total,omitempty"`
}

ClientListResponse — GET /api/clients.

type ClientResponse

type ClientResponse struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	Identifier      string `json:"identifier"`
	Status          string `json:"status"`
	StatusReason    string `json:"statusReason,omitempty"`
	StatusChangedAt string `json:"statusChangedAt,omitempty"`
	// Notes is the client's audit-note history.
	Notes     []NoteResponse `json:"notes"`
	CreatedAt string         `json:"createdAt"`
	UpdatedAt string         `json:"updatedAt"`
}

ClientResponse is the platform's client (tenant) aggregate.

type ClientsResource

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

ClientsResource — /api/clients/*.

func (*ClientsResource) Activate

Activate — POST /api/clients/{id}/activate.

func (*ClientsResource) AddNote

AddNote — POST /api/clients/{id}/notes.

func (*ClientsResource) Create

Create — POST /api/clients.

func (*ClientsResource) Deactivate

Deactivate — POST /api/clients/{id}/deactivate.

func (*ClientsResource) Delete

func (r *ClientsResource) Delete(ctx context.Context, id string) error

Delete — DELETE /api/clients/{id}.

func (*ClientsResource) DisableApplication

func (r *ClientsResource) DisableApplication(ctx context.Context, clientID, applicationID string) error

DisableApplication — POST /api/clients/{clientId}/applications/{applicationId}/disable (204 No Content).

func (*ClientsResource) EnableApplication

func (r *ClientsResource) EnableApplication(ctx context.Context, clientID, applicationID string) error

EnableApplication — POST /api/clients/{clientId}/applications/{applicationId}/enable (204 No Content).

func (*ClientsResource) Get

Get — GET /api/clients/{id}.

func (*ClientsResource) GetByIdentifier

func (r *ClientsResource) GetByIdentifier(ctx context.Context, identifier string) (*ClientResponse, error)

GetByIdentifier — GET /api/clients/by-identifier/{identifier}.

func (*ClientsResource) List

List — GET /api/clients. The platform takes no filters or paging and returns every client; narrow the result with Search.

func (*ClientsResource) ListApplications

func (r *ClientsResource) ListApplications(ctx context.Context, clientID string) (*ClientApplicationsResponse, error)

ListApplications — GET /api/clients/{id}/applications (with enabled status).

func (*ClientsResource) Search

func (r *ClientsResource) Search(ctx context.Context, query string) (*ClientListResponse, error)

Search — GET /api/clients/search?q=...

func (*ClientsResource) Suspend

Suspend — POST /api/clients/{id}/suspend.

func (*ClientsResource) Update

Update — PUT /api/clients/{id}. The platform answers 204 No Content; call Get(id) for the updated record.

func (*ClientsResource) UpdateApplications

func (r *ClientsResource) UpdateApplications(ctx context.Context, clientID string, req *UpdateClientApplicationsRequest) error

UpdateApplications — PUT /api/clients/{id}/applications (bulk enable list; 204 No Content).

type CompletionStatus

type CompletionStatus string

CompletionStatus marks a finished instance.

const (
	CompletionStatusSuccess CompletionStatus = "SUCCESS"
	CompletionStatusFailure CompletionStatus = "FAILURE"
)

type ConfigEntry

type ConfigEntry struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

ConfigEntry is a per-subscription custom config key/value.

type ConfigResponse

type ConfigResponse struct {
	ID              string `json:"id"`
	ApplicationCode string `json:"applicationCode"`
	Section         string `json:"section"`
	Property        string `json:"property"`
	Scope           string `json:"scope"`
	ClientID        string `json:"clientId,omitempty"`
	// ClientIdentifier is the client's identifier beside its stored id (on
	// list answers).
	ClientIdentifier string `json:"clientIdentifier,omitempty"`
	ValueType        string `json:"valueType"`
	// Value is "***" for SECRET properties; see RevealSecret.
	Value       string `json:"value"`
	Description string `json:"description,omitempty"`
	CreatedAt   string `json:"createdAt"`
	UpdatedAt   string `json:"updatedAt"`
}

ConfigResponse is one platform-config property. When ValueType is SECRET, Value is always SecretMask ("***"): use RevealSecret for the plaintext.

type ConnectionResponse

type ConnectionResponse struct {
	ID               string `json:"id"`
	Code             string `json:"code"`
	Name             string `json:"name"`
	Description      string `json:"description,omitempty"`
	ExternalID       string `json:"externalId,omitempty"`
	Status           string `json:"status"`
	ServiceAccountID string `json:"serviceAccountId"`
	ClientID         string `json:"clientId,omitempty"`
	ClientIdentifier string `json:"clientIdentifier,omitempty"`
	// ApplicationCode is the owning application, empty for a shared connection.
	ApplicationCode string `json:"applicationCode,omitempty"`
	// Source is how the connection was created (e.g. UI or SDK).
	Source    string `json:"source"`
	CreatedAt string `json:"createdAt"`
	UpdatedAt string `json:"updatedAt"`
}

ConnectionResponse is the platform's connection aggregate.

type ConnectionsListResponse

type ConnectionsListResponse struct {
	Connections []ConnectionResponse `json:"connections"`
	Total       uint64               `json:"total,omitempty"`
}

ConnectionsListResponse — GET /api/connections.

type ConnectionsResource

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

ConnectionsResource — /api/connections/*.

func (*ConnectionsResource) Activate

Activate — POST /api/connections/{id}/activate. Returns the updated connection.

func (*ConnectionsResource) Create

Create — POST /api/connections. The platform answers 201 with the whole connection.

func (*ConnectionsResource) Delete

func (r *ConnectionsResource) Delete(ctx context.Context, id string) error

Delete — DELETE /api/connections/{id}.

func (*ConnectionsResource) Get

Get — GET /api/connections/{id}.

func (*ConnectionsResource) List

func (r *ConnectionsResource) List(ctx context.Context, clientID, status string) (*ConnectionsListResponse, error)

List — GET /api/connections?clientId=&status=. Empty strings are omitted.

func (*ConnectionsResource) Pause

Pause — POST /api/connections/{id}/pause. Returns the updated connection.

func (*ConnectionsResource) Sync

func (r *ConnectionsResource) Sync(ctx context.Context, appCode string, req *SyncConnectionsRequest, removeUnlisted bool) (*SyncResult, error)

Sync — POST /api/applications/{appCode}/connections/sync. Sync connections before the subscriptions that name them by ConnectionCode.

func (*ConnectionsResource) Update

Update — PUT /api/connections/{id}. The platform answers 204 No Content.

type CreateApplicationRequest

type CreateApplicationRequest struct {
	Code            string `json:"code"`
	Name            string `json:"name"`
	Description     string `json:"description,omitempty"`
	ApplicationType string `json:"type,omitempty"`
	DefaultBaseURL  string `json:"defaultBaseUrl,omitempty"`
	IconURL         string `json:"iconUrl,omitempty"`
	// Logo is inline logo markup (e.g. SVG); LogoMimeType names its media type.
	LogoMimeType string `json:"logoMimeType,omitempty"`
	Website      string `json:"website,omitempty"`
}

CreateApplicationRequest — POST /api/applications.

type CreateClientRequest

type CreateClientRequest struct {
	Identifier string `json:"identifier"`
	Name       string `json:"name"`
}

CreateClientRequest — POST /api/clients.

type CreateConnectionRequest

type CreateConnectionRequest struct {
	Code             string `json:"code"`
	Name             string `json:"name"`
	Description      string `json:"description,omitempty"`
	ServiceAccountID string `json:"serviceAccountId"`
	ExternalID       string `json:"externalId,omitempty"`
	ClientID         string `json:"clientId,omitempty"`
	// ApplicationCode owns the connection to that application; empty
	// leaves it unowned.
	ApplicationCode string `json:"applicationCode,omitempty"`
}

CreateConnectionRequest — POST /api/connections.

type CreateDispatchPoolRequest

type CreateDispatchPoolRequest struct {
	Code        string `json:"code"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	// Concurrency is the max concurrent in-flight dispatches.
	Concurrency uint32 `json:"concurrency,omitempty"`
	// RateLimit is messages per minute; nil leaves the pool unthrottled.
	RateLimit *uint32 `json:"rateLimit,omitempty"`
	ClientID  string  `json:"clientId,omitempty"`
}

CreateDispatchPoolRequest — POST /api/dispatch-pools.

type CreateEnrolmentCodeRequest added in v0.0.12

type CreateEnrolmentCodeRequest struct {
	ClientID string `json:"clientId"`
	// Mode is PERSONAL or SHARED.
	Mode     string   `json:"mode"`
	AppCodes []string `json:"appCodes"`
	// AssignedWorkerID is for PERSONAL devices only.
	AssignedWorkerID *string `json:"assignedWorkerId,omitempty"`
	Label            *string `json:"label,omitempty"`
}

CreateEnrolmentCodeRequest — POST /api/field-devices/enrolment-codes.

type CreateEventTypeRequest

type CreateEventTypeRequest struct {
	// Code follows {app}:{domain}:{aggregate}:{event}.
	Code string `json:"code"`
	// Human-readable name.
	Name string `json:"name"`
	// Optional description.
	Description string `json:"description,omitempty"`
	// Optional initial JSON schema. Use json.RawMessage to keep the
	// shape opaque end-to-end.
	Schema json.RawMessage `json:"schema,omitempty"`
	// Client ID for multi-tenant scoping.
	ClientID string `json:"clientId,omitempty"`
	// ClientScoped marks the event type as scoped to ClientID.
	ClientScoped bool `json:"clientScoped,omitempty"`
}

CreateEventTypeRequest is the body for POST /api/event-types.

type CreateIngestionRequest

type CreateIngestionRequest struct {
	Application        string          `json:"application"`
	Client             string          `json:"client"`
	Code               string          `json:"code"`
	Name               string          `json:"name"`
	Note               string          `json:"note,omitempty"`
	Source             IngestionSource `json:"source"`
	Split              IngestionSplit  `json:"split"`
	Target             IngestionTarget `json:"target"`
	KeepFailedPayloads bool            `json:"keepFailedPayloads,omitempty"`
	// Live makes the first version live; the platform's default is true, false
	// saves it to be made live later.
	Live *bool `json:"live,omitempty"`
}

CreateIngestionRequest — POST /api/ingestions. Application is the code of an INTEGRATION application, Client a client id (clt_...) or identifier, Code lowercase letters, digits and hyphens, unique within both.

type CreateProcessRequest

type CreateProcessRequest struct {
	Code        string   `json:"code"`
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	Body        string   `json:"body,omitempty"`
	DiagramType string   `json:"diagramType,omitempty"`
	Tags        []string `json:"tags,omitempty"`
}

CreateProcessRequest — POST /api/processes. Code is {application}:{subdomain}:{process-name}; Body is the diagram source (typically Mermaid), DiagramType defaults to mermaid.

type CreateRoleRequest

type CreateRoleRequest struct {
	ApplicationCode string   `json:"applicationCode"`
	RoleName        string   `json:"roleName"`
	DisplayName     string   `json:"displayName"`
	Description     string   `json:"description,omitempty"`
	Permissions     []string `json:"permissions,omitempty"`
	// ClientManaged is required by the platform, so false is sent, not omitted.
	ClientManaged bool `json:"clientManaged"`
}

CreateRoleRequest — POST /api/roles.

type CreateScheduledJobRequest

type CreateScheduledJobRequest struct {
	Code        string `json:"code"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	// ClientID empty = platform-scoped (anchor only); set = client-scoped.
	ClientID string `json:"clientId,omitempty"`
	// ApplicationID is the registered Application that owns this job — a
	// separate axis from ClientID (tenant vs. registered app). Optional.
	ApplicationID string          `json:"applicationId,omitempty"`
	Crons         []string        `json:"crons"`
	Timezone      string          `json:"timezone,omitempty"`
	Payload       json.RawMessage `json:"payload,omitempty"`
	// Concurrent and TracksCompletion are required by the platform, so false
	// is sent, not omitted.
	Concurrent          bool   `json:"concurrent"`
	TracksCompletion    bool   `json:"tracksCompletion"`
	TimeoutSeconds      *int32 `json:"timeoutSeconds,omitempty"`
	DeliveryMaxAttempts *int32 `json:"deliveryMaxAttempts,omitempty"`
	TargetURL           string `json:"targetUrl,omitempty"`
}

CreateScheduledJobRequest — POST /api/scheduled-jobs.

type CreateSubscriptionRequest

type CreateSubscriptionRequest struct {
	Code             string             `json:"code"`
	Name             string             `json:"name"`
	Description      string             `json:"description,omitempty"`
	Endpoint         string             `json:"endpoint"`
	ConnectionID     string             `json:"connectionId,omitempty"`
	EventTypes       []EventTypeBinding `json:"eventTypes,omitempty"`
	ClientID         string             `json:"clientId,omitempty"`
	DispatchPoolID   string             `json:"dispatchPoolId,omitempty"`
	ServiceAccountID string             `json:"serviceAccountId,omitempty"`
	Mode             string             `json:"mode,omitempty"`
	TimeoutSeconds   *uint32            `json:"timeoutSeconds,omitempty"`
	MaxRetries       *uint32            `json:"maxRetries,omitempty"`
	DataOnly         bool               `json:"dataOnly,omitempty"`
	// ClientScoped scopes the subscription to ClientID.
	ClientScoped  bool          `json:"clientScoped,omitempty"`
	CustomConfig  []ConfigEntry `json:"customConfig,omitempty"`
	MaxAgeSeconds *uint32       `json:"maxAgeSeconds,omitempty"`
	DelaySeconds  *uint32       `json:"delaySeconds,omitempty"`
	Sequence      *int32        `json:"sequence,omitempty"`
	Queue         string        `json:"queue,omitempty"`
}

CreateSubscriptionRequest — POST /api/subscriptions.

type CreateUserRequest

type CreateUserRequest struct {
	Email    string `json:"email"`
	Password string `json:"password,omitempty"`
	Name     string `json:"name"`
	ClientID string `json:"clientId,omitempty"`
	// EnforcePasswordComplexity: pass *false to skip the platform's
	// upper/lower/digit/special rules (2-char minimum still applies).
	// Use when your application enforces its own password policy.
	EnforcePasswordComplexity *bool `json:"enforcePasswordComplexity,omitempty"`
	// Scope is ANCHOR, PARTNER or CLIENT; empty lets the platform derive it
	// (CLIENT unless the email domain maps to ANCHOR or PARTNER).
	Scope string `json:"scope,omitempty"`
	// SendInvitation emails the user an invitation to set their password.
	SendInvitation *bool `json:"sendInvitation,omitempty"`
	// ReturnInviteLink returns the invitation link in
	// PrincipalResponse.InviteLink instead of relying on email delivery.
	ReturnInviteLink *bool `json:"returnInviteLink,omitempty"`
	// InviteRedirectURI is where the invitation flow sends the user once
	// they have set their password.
	InviteRedirectURI string `json:"inviteRedirectUri,omitempty"`
}

CreateUserRequest — POST /api/principals/users.

type CreatedResponse

type CreatedResponse struct {
	ID string `json:"id"`
}

CreatedResponse — returned by create endpoints that emit only an id.

type CustomSource

type CustomSource struct {
	Type     string         `json:"type"`
	Settings map[string]any `json:"settings,omitempty"`
}

CustomSource is a kind a runtime extension supplies (and camel-route, which the Camel runtime reports): the typed escape hatch. The platform stores the settings and knows nothing else about them; a secret setting is the secret's name.

func (CustomSource) MarshalJSON

func (s CustomSource) MarshalJSON() ([]byte, error)

type DatabasePollSource

type DatabasePollSource struct {
	JDBCURL  string        `json:"jdbcUrl"`
	Username string        `json:"username"`
	Password SecretRef     `json:"password"`
	Table    string        `json:"table"`
	Track    DatabaseTrack `json:"track"`
	MaxRows  int           `json:"maxRows"`
	Every    string        `json:"every"`
}

DatabasePollSource reads the rows of a table or view; each row is one record, so the split is always NoSplit.

func (DatabasePollSource) MarshalJSON

func (s DatabasePollSource) MarshalJSON() ([]byte, error)

func (*DatabasePollSource) UnmarshalJSON

func (s *DatabasePollSource) UnmarshalJSON(data []byte) error

type DatabaseTrack

type DatabaseTrack interface {
	// contains filtered or unexported methods
}

DatabaseTrack tells a database poll's rows read from rows not yet read: WatermarkTrack, StatusTrack, or Unrecognized.

type DispatchPoolListResponse

type DispatchPoolListResponse struct {
	Pools []DispatchPoolResponse `json:"pools"`
	Total uint64                 `json:"total"`
}

DispatchPoolListResponse — GET /api/dispatch-pools.

type DispatchPoolResponse

type DispatchPoolResponse struct {
	ID          string `json:"id"`
	Code        string `json:"code"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Concurrency uint32 `json:"concurrency"`
	// RateLimit is messages per minute; nil means unthrottled.
	RateLimit        *uint32 `json:"rateLimit,omitempty"`
	Status           string  `json:"status"`
	ClientID         string  `json:"clientId,omitempty"`
	ClientIdentifier string  `json:"clientIdentifier,omitempty"`
	CreatedAt        string  `json:"createdAt"`
	UpdatedAt        string  `json:"updatedAt"`
}

DispatchPoolResponse is the platform's dispatch pool.

type DispatchPoolsResource

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

DispatchPoolsResource — /api/dispatch-pools/*.

func (*DispatchPoolsResource) Activate

func (r *DispatchPoolsResource) Activate(ctx context.Context, id string) error

Activate — POST /api/dispatch-pools/{id}/activate (204 No Content).

func (*DispatchPoolsResource) Archive

func (r *DispatchPoolsResource) Archive(ctx context.Context, id string) error

Archive — POST /api/dispatch-pools/{id}/archive (204 No Content). The pool is kept and no longer dispatches; Delete removes it.

func (*DispatchPoolsResource) Create

Create — POST /api/dispatch-pools. Returns the new pool's id; call Get for the pool.

func (*DispatchPoolsResource) Delete

func (r *DispatchPoolsResource) Delete(ctx context.Context, id string) error

Delete — DELETE /api/dispatch-pools/{id} (204 No Content).

func (*DispatchPoolsResource) Get

Get — GET /api/dispatch-pools/{id}.

func (*DispatchPoolsResource) List

func (r *DispatchPoolsResource) List(ctx context.Context, clientID, status string) (*DispatchPoolListResponse, error)

List — GET /api/dispatch-pools?clientId=&status=.

func (*DispatchPoolsResource) Suspend

func (r *DispatchPoolsResource) Suspend(ctx context.Context, id string) error

Suspend — POST /api/dispatch-pools/{id}/suspend (204 No Content).

func (*DispatchPoolsResource) Sync

func (r *DispatchPoolsResource) Sync(ctx context.Context, appCode string, req *SyncDispatchPoolsRequest, removeUnlisted bool) (*SyncResult, error)

Sync — POST /api/applications/{appCode}/dispatch-pools/sync.

func (*DispatchPoolsResource) Update

Update — PUT /api/dispatch-pools/{id}. The platform answers 204 No Content; call Get(id) for the updated pool.

type DocsResource

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

DocsResource — an application's documentation pages, shown to administrators under Platform → Documentation.

func (*DocsResource) Sync

func (r *DocsResource) Sync(ctx context.Context, appCode string, req *SyncDocsRequest) (*SyncResult, error)

Sync — POST /api/applications/{appCode}/docs/sync. Declarative full replace: the pages sent ARE the application's set (there is no removeUnlisted flag; an empty list removes every page). At most 100 pages, 512 KiB each, 4 MiB in all.

type EnsureFieldWorkerRequest added in v0.0.12

type EnsureFieldWorkerRequest struct {
	ClientID   string  `json:"clientId"`
	WorkerCode string  `json:"workerCode"`
	Name       string  `json:"name"`
	Email      *string `json:"email,omitempty"`
	// AppCodes are the applications the worker may sign in to; granted
	// additively.
	AppCodes []string `json:"appCodes,omitempty"`
	// Pin is a supervisor-entered PIN for a NEW worker (stored with
	// pinChangeRequired); ignored for an existing worker. Omit it and the
	// worker cannot sign in until a PIN reset.
	Pin *string `json:"pin,omitempty"`
}

EnsureFieldWorkerRequest — POST /api/field-workers.

type EventTypeBinding

type EventTypeBinding struct {
	EventTypeCode string `json:"eventTypeCode"`
	// EventTypeID and SpecVersion pin the binding to an event type row and
	// schema version; both are optional.
	EventTypeID string `json:"eventTypeId,omitempty"`
	Filter      string `json:"filter,omitempty"`
	SpecVersion string `json:"specVersion,omitempty"`
}

EventTypeBinding pairs an event type code/pattern with an optional filter expression. Patterns support `*` wildcards per segment.

type EventTypeFilters

type EventTypeFilters struct {
	Application string
	Subdomain   string
	Aggregate   string
	Status      string
	ClientID    string
}

EventTypeFilters — query parameters for GET /api/event-types. Empty fields are omitted.

type EventTypeListResponse

type EventTypeListResponse struct {
	Items []EventTypeResponse `json:"items"`
}

EventTypeListResponse — GET /api/event-types returns `{ items: [...] }`.

type EventTypeResponse

type EventTypeResponse struct {
	ID          string `json:"id"`
	Code        string `json:"code"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Status      string `json:"status"`
	Application string `json:"application"`
	Subdomain   string `json:"subdomain"`
	Aggregate   string `json:"aggregate"`
	// EventName is the last segment of Code.
	EventName string `json:"eventName"`
	// Source is how the event type was created (e.g. UI or SDK).
	Source       string                `json:"source"`
	ClientID     string                `json:"clientId,omitempty"`
	CreatedBy    string                `json:"createdBy,omitempty"`
	SpecVersions []SpecVersionResponse `json:"specVersions"`
	CreatedAt    string                `json:"createdAt"`
	UpdatedAt    string                `json:"updatedAt"`
}

EventTypeResponse is the platform's event-type representation.

type EventTypesResource

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

EventTypesResource is the accessor for /api/event-types/*. Construct via FlowCatalystClient.EventTypes.

func (*EventTypesResource) AddSchemaVersion

AddSchemaVersion — POST /api/event-types/{id}/versions.

func (*EventTypesResource) Archive

func (r *EventTypesResource) Archive(ctx context.Context, id string) error

Archive — DELETE /api/event-types/{id}. The platform soft-archives: the row is retained with status flipped to ARCHIVED. Named Archive (not Delete) to make that explicit.

func (*EventTypesResource) Create

Create — POST /api/event-types. Returns the new event type's id; call Get for the event type.

func (*EventTypesResource) Get

Get — GET /api/event-types/{id}.

func (*EventTypesResource) GetByCode

func (r *EventTypesResource) GetByCode(ctx context.Context, code string) (*EventTypeResponse, error)

GetByCode — GET /api/event-types/by-code/{code}.

func (*EventTypesResource) List

List — GET /api/event-types with optional filters (nil lists everything).

func (*EventTypesResource) Sync

func (r *EventTypesResource) Sync(ctx context.Context, appCode string, req *SyncEventTypesRequest, removeUnlisted bool) (*SyncResult, error)

Sync — POST /api/applications/{appCode}/event-types/sync. Declarative reconciliation: the request's eventTypes list becomes the desired state. With removeUnlisted=true the server archives any existing event types not in the request.

func (*EventTypesResource) Update

Update — PUT /api/event-types/{id}. The platform answers 204 No Content; call Get(id) for the updated event type.

type FieldAppRef added in v0.0.12

type FieldAppRef struct {
	ID   string `json:"id"`
	Code string `json:"code"`
	Name string `json:"name"`
}

FieldAppRef names an application.

type FieldDeviceFilters added in v0.0.12

type FieldDeviceFilters struct {
	// Status is ACTIVE, SUSPENDED or REVOKED.
	Status string
	// Mode is PERSONAL or SHARED.
	Mode     string
	Page     *uint32
	PageSize *uint32
}

FieldDeviceFilters — query parameters for GET /api/field-devices.

type FieldDeviceListResponse added in v0.0.12

type FieldDeviceListResponse struct {
	Devices []FieldDeviceResponse `json:"devices"`
	Total   int64                 `json:"total"`
	Page    int                   `json:"page"`
	Size    int                   `json:"size"`
}

FieldDeviceListResponse — GET /api/field-devices.

type FieldDeviceResponse added in v0.0.12

type FieldDeviceResponse struct {
	ID       string `json:"id"`
	ClientID string `json:"clientId"`
	// Mode is PERSONAL or SHARED.
	Mode     string `json:"mode"`
	Label    string `json:"label,omitempty"`
	Platform string `json:"platform,omitempty"`
	Model    string `json:"model,omitempty"`
	// Jkt is the RFC 7638 thumbprint of the device key.
	Jkt string `json:"jkt"`
	// AttestationLevel is STRONGBOX, TEE, SOFTWARE or NONE.
	AttestationLevel string  `json:"attestationLevel"`
	AssignedWorkerID *string `json:"assignedWorkerId,omitempty"`
	// Status is ACTIVE, SUSPENDED or REVOKED.
	Status         string        `json:"status"`
	Apps           []FieldAppRef `json:"apps"`
	ActiveSessions int           `json:"activeSessions"`
	EnrolledAt     string        `json:"enrolledAt"`
	LastSeenAt     string        `json:"lastSeenAt,omitempty"`
}

FieldDeviceResponse is an enrolled field device.

type FieldDevicesResource added in v0.0.12

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

FieldDevicesResource — /api/field-devices/*.

func (*FieldDevicesResource) Activate added in v0.0.12

func (r *FieldDevicesResource) Activate(ctx context.Context, id string) error

Activate — POST /api/field-devices/{id}/activate.

func (*FieldDevicesResource) CreateEnrolmentCode added in v0.0.12

CreateEnrolmentCode — POST /api/field-devices/enrolment-codes.

func (*FieldDevicesResource) Get added in v0.0.12

Get — GET /api/field-devices/{id}.

func (*FieldDevicesResource) List added in v0.0.12

List — GET /api/field-devices for one client, with optional filters.

func (*FieldDevicesResource) Revoke added in v0.0.12

func (r *FieldDevicesResource) Revoke(ctx context.Context, id string) error

Revoke — POST /api/field-devices/{id}/revoke. Permanent; revokes its sessions.

func (*FieldDevicesResource) Suspend added in v0.0.12

func (r *FieldDevicesResource) Suspend(ctx context.Context, id string) error

Suspend — POST /api/field-devices/{id}/suspend. Revokes its sessions.

type FieldEnrolmentCodeResponse added in v0.0.12

type FieldEnrolmentCodeResponse struct {
	Code string `json:"code"`
	// QrPayload is the string to render as a QR code
	// (fcfield:1:<baseUrl>:<code>).
	QrPayload string `json:"qrPayload"`
	ExpiresAt string `json:"expiresAt"`
}

FieldEnrolmentCodeResponse is a freshly minted single-use code.

type FieldPoliciesResource added in v0.0.12

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

FieldPoliciesResource — /api/field-policies/*.

func (*FieldPoliciesResource) Get added in v0.0.12

Get — GET /api/field-policies/{clientId}.

func (*FieldPoliciesResource) Put added in v0.0.12

Put — PUT /api/field-policies/{clientId}. Returns the resulting policy.

type FieldPolicyResponse added in v0.0.12

type FieldPolicyResponse struct {
	ClientID           string `json:"clientId"`
	PinMinLength       int    `json:"pinMinLength"`
	SoftLockThreshold  int    `json:"softLockThreshold"`
	SoftLockSecs       int    `json:"softLockSecs"`
	HardLockThreshold  int    `json:"hardLockThreshold"`
	SharedIdleSecs     int    `json:"sharedIdleSecs"`
	PersonalIdleSecs   int    `json:"personalIdleSecs"`
	ShiftMaxSecs       int    `json:"shiftMaxSecs"`
	RequireAttestation bool   `json:"requireAttestation"`
	PinReauthDays      int    `json:"pinReauthDays"`
	// IsDefault is true when the client has no stored policy and these are
	// the platform defaults.
	IsDefault bool   `json:"isDefault"`
	UpdatedAt string `json:"updatedAt,omitempty"`
}

FieldPolicyResponse is a client's effective field policy.

type FieldTokenIntrospectRequest added in v0.0.12

type FieldTokenIntrospectRequest struct {
	Token string `json:"token"`
}

FieldTokenIntrospectRequest — POST /api/field-tokens/introspect.

type FieldTokenIntrospectResponse added in v0.0.12

type FieldTokenIntrospectResponse struct {
	Active     bool     `json:"active"`
	Sub        string   `json:"sub,omitempty"`
	ClientID   string   `json:"clientId,omitempty"`
	WorkerCode string   `json:"workerCode,omitempty"`
	DeviceID   string   `json:"deviceId,omitempty"`
	AppCode    string   `json:"appCode,omitempty"`
	Amr        []string `json:"amr,omitempty"`
	AuthTime   string   `json:"authTime,omitempty"`
	Exp        string   `json:"exp,omitempty"`
}

FieldTokenIntrospectResponse is the online check of a field access token. Only Active is set when the token is unusable (bad signature, expired, revoked session, suspended worker or device, or outside the caller's reach).

type FieldTokensResource added in v0.0.12

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

FieldTokensResource — /api/field-tokens/*.

func (*FieldTokensResource) Introspect added in v0.0.12

Introspect — POST /api/field-tokens/introspect. Use it when an offline signature check (auth.FieldTokenVerifier) is not enough and the session must still be live.

type FieldWorkerAppRef added in v0.0.12

type FieldWorkerAppRef struct {
	ID        string `json:"id"`
	Code      string `json:"code"`
	Name      string `json:"name"`
	Source    string `json:"source"`
	GrantedAt string `json:"grantedAt"`
}

FieldWorkerAppRef is one application a worker is granted.

type FieldWorkerFilters added in v0.0.12

type FieldWorkerFilters struct {
	// Q is a case-insensitive prefix matched against name and worker code.
	Q string
	// AppCode limits to workers granted this application.
	AppCode string
	// Status is ACTIVE or DISABLED.
	Status string
	// Page is 0-based; PageSize defaults to 100 (max 1000). nil takes the
	// platform default.
	Page     *uint32
	PageSize *uint32
}

FieldWorkerFilters — query parameters for GET /api/field-workers.

type FieldWorkerListResponse added in v0.0.12

type FieldWorkerListResponse struct {
	Workers []FieldWorkerResponse `json:"workers"`
	Total   int64                 `json:"total"`
	Page    int                   `json:"page"`
	Size    int                   `json:"size"`
}

FieldWorkerListResponse — GET /api/field-workers.

type FieldWorkerResponse added in v0.0.12

type FieldWorkerResponse struct {
	ID         string `json:"id"`
	ClientID   string `json:"clientId"`
	WorkerCode string `json:"workerCode"`
	Name       string `json:"name"`
	Email      string `json:"email,omitempty"`
	// Status is ACTIVE or DISABLED (suspended).
	Status string `json:"status"`
	// HasPin is false until a PIN is set (the worker cannot sign in).
	HasPin            bool `json:"hasPin"`
	PinChangeRequired bool `json:"pinChangeRequired"`
	// Locked is true while a soft or hard lock is in force.
	Locked             bool                `json:"locked"`
	HardLocked         bool                `json:"hardLocked"`
	LockedUntil        string              `json:"lockedUntil,omitempty"`
	FailedSinceSuccess int                 `json:"failedSinceSuccess"`
	LastLoginAt        string              `json:"lastLoginAt,omitempty"`
	Apps               []FieldWorkerAppRef `json:"apps"`
	CreatedAt          string              `json:"createdAt"`
	UpdatedAt          string              `json:"updatedAt"`
	// Created is set only on the ensure response: false when the worker
	// already existed.
	Created *bool `json:"created,omitempty"`
}

FieldWorkerResponse is a field worker. The PIN hash is never exposed.

type FieldWorkerSignInListResponse added in v0.0.12

type FieldWorkerSignInListResponse struct {
	SignIns []FieldWorkerSignInResponse `json:"signIns"`
	Total   int64                       `json:"total"`
	Page    int                         `json:"page"`
	Size    int                         `json:"size"`
}

FieldWorkerSignInListResponse — GET /api/field-workers/{id}/sign-ins.

type FieldWorkerSignInResponse added in v0.0.12

type FieldWorkerSignInResponse struct {
	ID string `json:"id"`
	// Outcome is SUCCESS or FAILURE.
	Outcome       string `json:"outcome"`
	FailureReason string `json:"failureReason,omitempty"`
	AuthMethod    string `json:"authMethod"`
	DeviceID      string `json:"deviceId,omitempty"`
	AppCode       string `json:"appCode,omitempty"`
	IPAddress     string `json:"ipAddress,omitempty"`
	AttemptedAt   string `json:"attemptedAt"`
}

FieldWorkerSignInResponse is one sign-in attempt.

type FieldWorkersResource added in v0.0.12

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

FieldWorkersResource — /api/field-workers/*.

func (*FieldWorkersResource) Activate added in v0.0.12

func (r *FieldWorkersResource) Activate(ctx context.Context, id string) error

Activate — POST /api/field-workers/{id}/activate.

func (*FieldWorkersResource) Delete added in v0.0.12

func (r *FieldWorkersResource) Delete(ctx context.Context, id string) error

Delete — DELETE /api/field-workers/{id}. Revokes the worker's sessions first. The { message } response is discarded.

func (*FieldWorkersResource) Ensure added in v0.0.12

Ensure — POST /api/field-workers. Creates the worker for (clientId, workerCode) if absent and grants the listed applications; the response's Created says which happened.

func (*FieldWorkersResource) Get added in v0.0.12

Get — GET /api/field-workers/{id}.

func (*FieldWorkersResource) GrantApp added in v0.0.12

func (r *FieldWorkersResource) GrantApp(ctx context.Context, id, appCode string) error

GrantApp — POST /api/field-workers/{id}/apps.

func (*FieldWorkersResource) List added in v0.0.12

List — GET /api/field-workers for one client, with optional filters.

func (*FieldWorkersResource) ResetPin added in v0.0.12

ResetPin — POST /api/field-workers/{id}/pin-reset. A nil req (or nil Pin) makes the platform generate a temporary PIN, returned once in TemporaryPin.

func (*FieldWorkersResource) RevokeApp added in v0.0.12

func (r *FieldWorkersResource) RevokeApp(ctx context.Context, id, appCode string) error

RevokeApp — DELETE /api/field-workers/{id}/apps/{appCode}. Also revokes that application's sessions.

func (*FieldWorkersResource) SignIns added in v0.0.12

func (r *FieldWorkersResource) SignIns(ctx context.Context, id string, page, pageSize *uint32) (*FieldWorkerSignInListResponse, error)

SignIns — GET /api/field-workers/{id}/sign-ins, newest first. page and pageSize are optional (nil takes the platform default).

func (*FieldWorkersResource) Suspend added in v0.0.12

func (r *FieldWorkersResource) Suspend(ctx context.Context, id string) error

Suspend — POST /api/field-workers/{id}/suspend. Revokes the worker's sessions.

func (*FieldWorkersResource) Unlock added in v0.0.12

func (r *FieldWorkersResource) Unlock(ctx context.Context, id string) error

Unlock — POST /api/field-workers/{id}/unlock. Clears soft and hard locks.

func (*FieldWorkersResource) Update added in v0.0.12

Update — PUT /api/field-workers/{id}. Returns the refreshed worker.

type FireRequest

type FireRequest struct {
	CorrelationID string `json:"correlationId,omitempty"`
}

FireRequest — body for POST /api/scheduled-jobs/{id}/fire.

type FireResponse

type FireResponse struct {
	ID             string `json:"id"`
	InstanceID     string `json:"instanceId"`
	ScheduledJobID string `json:"scheduledJobId"`
}

FireResponse — the 202 from a manual fire. InstanceID is the new firing; ID repeats it (the platform's generic id member) and ScheduledJobID names the job.

type FlowCatalystClient

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

FlowCatalystClient is the entry point to the platform API.

func New

func New(baseURL string, opts ...Option) *FlowCatalystClient

New builds a FlowCatalystClient.

func (*FlowCatalystClient) Applications

func (c *FlowCatalystClient) Applications() *ApplicationsResource

Applications returns the applications resource accessor — /api/applications/*.

func (*FlowCatalystClient) AuditLogs

func (c *FlowCatalystClient) AuditLogs() *AuditLogsResource

AuditLogs returns the audit logs accessor — /api/audit-logs/*.

func (*FlowCatalystClient) BaseURL

func (c *FlowCatalystClient) BaseURL() string

BaseURL returns the configured platform base URL.

func (*FlowCatalystClient) Clients

func (c *FlowCatalystClient) Clients() *ClientsResource

Clients returns the clients (tenants) accessor — /api/clients/*.

func (*FlowCatalystClient) Connections

func (c *FlowCatalystClient) Connections() *ConnectionsResource

Connections returns the connections accessor — /api/connections/*.

func (*FlowCatalystClient) Delete

func (c *FlowCatalystClient) Delete(ctx context.Context, path string, out any) error

Delete performs an authenticated DELETE. If out is non-nil, the body is decoded into it (some delete endpoints return the updated entity).

func (*FlowCatalystClient) DispatchPools

func (c *FlowCatalystClient) DispatchPools() *DispatchPoolsResource

DispatchPools returns the dispatch-pools resource accessor — /api/dispatch-pools/*.

func (*FlowCatalystClient) Docs

func (c *FlowCatalystClient) Docs() *DocsResource

Docs returns the documentation accessor — /api/applications/{appCode}/docs/*.

func (*FlowCatalystClient) EventTypes

func (c *FlowCatalystClient) EventTypes() *EventTypesResource

EventTypes returns the event-types resource accessor — /api/event-types/*.

func (*FlowCatalystClient) FieldDevices added in v0.0.12

func (c *FlowCatalystClient) FieldDevices() *FieldDevicesResource

FieldDevices returns the field-devices accessor — /api/field-devices/*.

func (*FlowCatalystClient) FieldPolicies added in v0.0.12

func (c *FlowCatalystClient) FieldPolicies() *FieldPoliciesResource

FieldPolicies returns the field-policies accessor — /api/field-policies/*.

func (*FlowCatalystClient) FieldTokens added in v0.0.12

func (c *FlowCatalystClient) FieldTokens() *FieldTokensResource

FieldTokens returns the field-tokens accessor — /api/field-tokens/*.

func (*FlowCatalystClient) FieldWorkers added in v0.0.12

func (c *FlowCatalystClient) FieldWorkers() *FieldWorkersResource

FieldWorkers returns the field-workers accessor — /api/field-workers/*.

func (*FlowCatalystClient) Get

func (c *FlowCatalystClient) Get(ctx context.Context, path string, out any) error

Get performs an authenticated GET against the platform. out is json-unmarshalled into. If out is nil, the response body is discarded.

func (*FlowCatalystClient) GetRouter

func (c *FlowCatalystClient) GetRouter(ctx context.Context, path string, out any) error

GetRouter is Get against the router base URL (different host).

func (*FlowCatalystClient) IngestionSets

func (c *FlowCatalystClient) IngestionSets() *IngestionSetsResource

IngestionSets returns the ingestion-sets resource accessor.

func (*FlowCatalystClient) Ingestions

func (c *FlowCatalystClient) Ingestions() *IngestionsResource

Ingestions returns the ingestions resource accessor.

func (*FlowCatalystClient) Me

func (c *FlowCatalystClient) Me() *MeResource

Me returns the current-user accessor — /api/me/*.

func (*FlowCatalystClient) OpenAPI

func (c *FlowCatalystClient) OpenAPI() *OpenAPIResource

OpenAPI returns the openapi sync accessor — /api/applications/{appCode}/openapi/*.

func (*FlowCatalystClient) Patch

func (c *FlowCatalystClient) Patch(ctx context.Context, path string, body, out any) error

Patch performs an authenticated PATCH with a JSON body.

func (*FlowCatalystClient) Permissions

func (c *FlowCatalystClient) Permissions() *PermissionsResource

Permissions returns the permissions catalogue accessor — /api/roles/permissions/*.

func (*FlowCatalystClient) PlatformConfig

func (c *FlowCatalystClient) PlatformConfig() *PlatformConfigResource

PlatformConfig returns the platform-config accessor — /api/config/*.

func (*FlowCatalystClient) Post

func (c *FlowCatalystClient) Post(ctx context.Context, path string, body, out any) error

Post performs an authenticated POST with a JSON body.

func (*FlowCatalystClient) Principals

func (c *FlowCatalystClient) Principals() *PrincipalsResource

Principals returns the principals resource accessor — /api/principals/*.

func (*FlowCatalystClient) Processes

func (c *FlowCatalystClient) Processes() *ProcessesResource

Processes returns the processes resource accessor — /api/processes/*.

func (*FlowCatalystClient) Put

func (c *FlowCatalystClient) Put(ctx context.Context, path string, body, out any) error

Put performs an authenticated PUT with a JSON body.

func (*FlowCatalystClient) Roles

func (c *FlowCatalystClient) Roles() *RolesResource

Roles returns the roles resource accessor — /api/roles/*.

func (*FlowCatalystClient) Router

func (c *FlowCatalystClient) Router() *RouterResource

Router returns the message-router monitoring accessor. Uses routerBaseURL (or baseURL as fallback) — distinct host from the rest of the API.

func (*FlowCatalystClient) RouterBaseURL

func (c *FlowCatalystClient) RouterBaseURL() string

RouterBaseURL returns the configured router base URL.

func (*FlowCatalystClient) ScheduledJobs

func (c *FlowCatalystClient) ScheduledJobs() *ScheduledJobsResource

ScheduledJobs returns the scheduled-jobs accessor — /api/scheduled-jobs/*.

func (*FlowCatalystClient) ServiceAccounts

func (c *FlowCatalystClient) ServiceAccounts() *ServiceAccountsResource

ServiceAccounts returns the service-accounts accessor.

func (*FlowCatalystClient) Subscriptions

func (c *FlowCatalystClient) Subscriptions() *SubscriptionsResource

Subscriptions returns the subscriptions resource accessor — /api/subscriptions/*.

type GrantClientAccessRequest

type GrantClientAccessRequest struct {
	ClientID string `json:"clientId"`
}

GrantClientAccessRequest — body for POST /api/principals/{id}/client-access.

type GrantFieldWorkerAppRequest added in v0.0.12

type GrantFieldWorkerAppRequest struct {
	AppCode string `json:"appCode"`
}

GrantFieldWorkerAppRequest — POST /api/field-workers/{id}/apps.

type GrantPermissionRequest

type GrantPermissionRequest struct {
	Permission string `json:"permission"`
}

GrantPermissionRequest — body for POST /api/roles/{name}/permissions.

type HTTPAccept added in v0.0.11

type HTTPAccept struct {
	ContentTypes []string       `json:"contentTypes,omitempty"`
	Body         HTTPAcceptBody `json:"body,omitempty"`
}

HTTPAccept is what an HTTP source takes: ContentTypes are media types as type/subtype without parameters (empty takes any; another answers 415), and Body the check of the body (a failure answers 400).

type HTTPAcceptBody added in v0.0.11

type HTTPAcceptBody string

HTTPAcceptBody is the check an HTTP source makes of a request's body.

const (
	AcceptBodyNone       HTTPAcceptBody = "NONE"        // no check (the default)
	AcceptBodyJSON       HTTPAcceptBody = "JSON"        // it parses
	AcceptBodyJSONObject HTTPAcceptBody = "JSON_OBJECT" // a non-empty JSON object
	AcceptBodyXML        HTTPAcceptBody = "XML"         // well-formed XML, without a DOCTYPE
)

The body checks of an HTTP source.

type HTTPAuth

type HTTPAuth interface {
	// contains filtered or unexported methods
}

HTTPAuth is how the caller of an HTTP source authenticates: HTTPFlowCatalystTokenAuth, HTTPBasicAuth, HTTPBearerAuth, or Unrecognized.

type HTTPBasicAuth

type HTTPBasicAuth struct {
	Username string    `json:"username"`
	Password SecretRef `json:"password"`
}

HTTPBasicAuth checks a username and a password held as a secret.

func (HTTPBasicAuth) MarshalJSON

func (a HTTPBasicAuth) MarshalJSON() ([]byte, error)

type HTTPBearerAuth

type HTTPBearerAuth struct {
	Token SecretRef `json:"token"`
}

HTTPBearerAuth checks a bearer token held as a secret.

func (HTTPBearerAuth) MarshalJSON

func (a HTTPBearerAuth) MarshalJSON() ([]byte, error)

type HTTPFlowCatalystTokenAuth

type HTTPFlowCatalystTokenAuth struct {
	Application string  `json:"application"`
	PrincipalID *string `json:"principalId,omitempty"`
}

HTTPFlowCatalystTokenAuth accepts the caller's own platform access token, which must reach the client and the Application (a code). PrincipalID (prn_...) narrows it to one principal.

func (HTTPFlowCatalystTokenAuth) MarshalJSON

func (a HTTPFlowCatalystTokenAuth) MarshalJSON() ([]byte, error)

type HTTPSource

type HTTPSource struct {
	Auth      HTTPAuth    `json:"auth"`
	RateLimit *RateLimit  `json:"rateLimit,omitempty"`
	Accept    *HTTPAccept `json:"accept,omitempty"`
}

HTTPSource is a body posted to the endpoint the runtime exposes for the ingestion. Accept, when set, is what a request must be to be taken.

func (HTTPSource) MarshalJSON

func (s HTTPSource) MarshalJSON() ([]byte, error)

func (*HTTPSource) UnmarshalJSON

func (s *HTTPSource) UnmarshalJSON(data []byte) error

type InPipelineBatchRequest

type InPipelineBatchRequest struct {
	MessageIDs []string `json:"messageIds"`
}

InPipelineBatchRequest — body for /check-batch. Capped at 5000 ids.

type InPipelineCheckResponse

type InPipelineCheckResponse struct {
	MessageID  string            `json:"messageId"`
	InPipeline bool              `json:"inPipeline"`
	Detail     *InPipelineDetail `json:"detail,omitempty"`
}

InPipelineCheckResponse — GET /monitoring/in-flight-messages/check. InPipeline=true means the router currently holds the message; the caller should not re-enqueue. InPipeline=false → safe to resend.

type InPipelineDetail

type InPipelineDetail struct {
	MessageID           string `json:"messageId"`
	BrokerMessageID     string `json:"brokerMessageId,omitempty"`
	QueueID             string `json:"queueId"`
	PoolCode            string `json:"poolCode"`
	ElapsedTimeMs       uint64 `json:"elapsedTimeMs"`
	AddedToInPipelineAt string `json:"addedToInPipelineAt"`
}

InPipelineDetail — populated when InPipeline=true.

type IngestionConfigStatus

type IngestionConfigStatus struct {
	Status    string                `json:"status"`
	Key       string                `json:"key,omitempty"`
	UpdatedAt string                `json:"updatedAt,omitempty"`
	Problems  []IngestionFieldError `json:"problems,omitempty"`
}

IngestionConfigStatus is where an ingestion's source settings stand. Status is INLINE (in the definition), or the config entry the source names: SET, MISSING (the ingestion does not run until it is set) or INVALID (Problems says why). Key is the entry's key, absent while the settings are inline.

type IngestionDefinition

type IngestionDefinition struct {
	Name               string          `json:"name"`
	Source             IngestionSource `json:"source"`
	Split              IngestionSplit  `json:"split"`
	Target             IngestionTarget `json:"target"`
	KeepFailedPayloads bool            `json:"keepFailedPayloads,omitempty"`
}

IngestionDefinition is the part of an ingestion a version holds, without its identity: what a test of an unsaved definition takes.

type IngestionFailureFilters

type IngestionFailureFilters struct {
	After       string
	Limit       *uint32
	Category    string
	Undismissed bool
}

IngestionFailureFilters narrows Failures. Category is "payload" or "rejected"; Undismissed keeps only failures nobody has dismissed (with Category "rejected": the ingestion's open notices).

type IngestionFailureListResponse

type IngestionFailureListResponse struct {
	Failures   []IngestionFailureResponse `json:"failures"`
	HasMore    bool                       `json:"hasMore"`
	NextCursor string                     `json:"nextCursor,omitempty"`
}

IngestionFailureListResponse — GET /api/ingestions/{id}/failures, cursor-paged like IngestionListResponse.

type IngestionFailureResponse

type IngestionFailureResponse struct {
	ID           string `json:"id"`
	Kind         string `json:"kind"`
	Message      string `json:"message"`
	AfterRecords int64  `json:"afterRecords"`
	OccurredAt   string `json:"occurredAt"`
	Excerpt      string `json:"excerpt,omitempty"`
	RuntimeID    string `json:"runtimeId,omitempty"`
	Version      int64  `json:"version,omitempty"`
	// Category is "payload" (the source's data was at fault) or "rejected"
	// (the platform refused the runtime's jobs permanently: a notice);
	// empty for other failures.
	Category    string `json:"category,omitempty"`
	CreatedAt   string `json:"createdAt,omitempty"`
	DismissedAt string `json:"dismissedAt,omitempty"`
	DismissedBy string `json:"dismissedBy,omitempty"`
}

IngestionFailureResponse is one failure the runtime reported. Excerpt is the start of the payload, only for an ingestion that keeps failed payloads.

type IngestionFieldError

type IngestionFieldError struct {
	Field   string `json:"field"`
	Code    string `json:"code"`
	Message string `json:"message"`
}

IngestionFieldError is one problem with a settings field.

type IngestionHistoryEntry

type IngestionHistoryEntry struct {
	ID            string          `json:"id"`
	Operation     string          `json:"operation"`
	PerformedAt   string          `json:"performedAt"`
	PrincipalID   string          `json:"principalId,omitempty"`
	PrincipalName string          `json:"principalName,omitempty"`
	Details       json.RawMessage `json:"details,omitempty"`
}

IngestionHistoryEntry is one operation in an ingestion's audit history. Details is the command the operation ran with.

type IngestionHistoryResponse

type IngestionHistoryResponse struct {
	Entries []IngestionHistoryEntry `json:"entries"`
	HasMore bool                    `json:"hasMore"`
}

IngestionHistoryResponse — GET /api/ingestions/{id}/history, offset-paged.

type IngestionListResponse

type IngestionListResponse struct {
	Ingestions []IngestionResponse `json:"ingestions"`
	HasMore    bool                `json:"hasMore"`
	NextCursor string              `json:"nextCursor,omitempty"`
}

IngestionListResponse — GET /api/ingestions, cursor-paged: while HasMore is true, pass NextCursor as ListIngestionsFilters.After for the next page.

type IngestionResponse

type IngestionResponse struct {
	ID                 string          `json:"id"`
	ApplicationID      string          `json:"applicationId"`
	ApplicationCode    string          `json:"applicationCode"`
	ClientID           string          `json:"clientId"`
	ClientIdentifier   string          `json:"clientIdentifier"`
	Code               string          `json:"code"`
	Status             string          `json:"status"`
	Version            int64           `json:"version"`
	LatestVersion      int64           `json:"latestVersion"`
	CreatedAt          string          `json:"createdAt"`
	UpdatedAt          string          `json:"updatedAt"`
	Name               string          `json:"name"`
	Source             IngestionSource `json:"source"`
	Split              IngestionSplit  `json:"split"`
	Target             IngestionTarget `json:"target"`
	KeepFailedPayloads bool            `json:"keepFailedPayloads,omitempty"`
	ManagedBy          string          `json:"managedBy,omitempty"`
	RuntimeNotice      string          `json:"runtimeNotice,omitempty"`
	// Notices counts undismissed notices (failures the platform refused,
	// category "rejected"); LatestNotice is the newest one's message.
	Notices        int64  `json:"notices,omitempty"`
	LatestNotice   string `json:"latestNotice,omitempty"`
	LatestNoticeAt string `json:"latestNoticeAt,omitempty"`
	// Warnings names what the definition says that will not run as meant.
	Warnings []string `json:"warnings,omitempty"`
	// Config is where the source's settings stand.
	Config *IngestionConfigStatus `json:"config,omitempty"`
	// Save is what a create or update did (set on those answers only).
	Save *IngestionSaveOutcome `json:"save,omitempty"`
}

IngestionResponse is the platform's ingestion aggregate. Status is ACTIVE or PAUSED. ManagedBy is the id of the set that owns it (read-only until the set is released).

func (*IngestionResponse) UnmarshalJSON

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

UnmarshalJSON reads the source and split as their typed members.

type IngestionSaveOutcome

type IngestionSaveOutcome struct {
	Outcome         string `json:"outcome"`
	Version         int64  `json:"version"`
	AwaitingPromote bool   `json:"awaitingPromote"`
	Message         string `json:"message,omitempty"`
}

IngestionSaveOutcome is what a create, update or version save did. Outcome is SAVED, MADE_LIVE, DRAFT, DRAFT_EXISTS or UNCHANGED; AwaitingPromote is true for a draft that someone with promote must make live.

type IngestionSecretFetch

type IngestionSecretFetch struct {
	RuntimeID     string `json:"runtimeId"`
	Version       int64  `json:"version,omitempty"`
	PrincipalID   string `json:"principalId,omitempty"`
	LastFetchedAt string `json:"lastFetchedAt"`
	FetchCount    int64  `json:"fetchCount"`
}

IngestionSecretFetch is when a runtime last fetched a bound secret.

type IngestionSecretListResponse

type IngestionSecretListResponse struct {
	Secrets []IngestionSecretResponse `json:"secrets"`
	// NamesHidden: the source's settings are in a config entry and the names
	// it binds are withheld from a caller who cannot update ingestions.
	NamesHidden bool `json:"namesHidden,omitempty"`
}

IngestionSecretListResponse — GET /api/ingestions/{id}/secrets.

type IngestionSecretResponse

type IngestionSecretResponse struct {
	Name    string                 `json:"name"`
	Bound   bool                   `json:"bound"`
	Fetches []IngestionSecretFetch `json:"fetches"`
}

IngestionSecretResponse is a secret name the ingestion binds (or bound), with the runtimes' last fetches of it. Values are never returned.

type IngestionSetApplyListResponse

type IngestionSetApplyListResponse struct {
	Applies []IngestionSetApplyResponse `json:"applies"`
}

IngestionSetApplyListResponse — GET /api/ingestion-sets/{name}/applies.

type IngestionSetApplyResponse

type IngestionSetApplyResponse struct {
	ID          string      `json:"id"`
	Set         string      `json:"set"`
	AppliedAt   string      `json:"appliedAt"`
	Items       int64       `json:"items"`
	Files       int64       `json:"files"`
	Changes     []SetChange `json:"changes"`
	AppliedBy   string      `json:"appliedBy,omitempty"`
	GoingBackTo string      `json:"goingBackTo,omitempty"`
}

IngestionSetApplyResponse is one recorded apply. Items and Files count what it was given; GoingBackTo is the earlier apply it applied again.

type IngestionSetArchiveResponse

type IngestionSetArchiveResponse struct {
	Set         string             `json:"set"`
	ApplyID     string             `json:"applyId"`
	AppliedAt   string             `json:"appliedAt"`
	AppliedBy   string             `json:"appliedBy"`
	Items       []IngestionSetItem `json:"items"`
	Files       []SetFile          `json:"files"`
	GoingBackTo string             `json:"goingBackTo,omitempty"`
}

IngestionSetArchiveResponse is an apply as it was archived: its items and files.

type IngestionSetItem

type IngestionSetItem struct {
	Application        string          `json:"application"`
	Client             string          `json:"client"`
	Code               string          `json:"code"`
	Name               string          `json:"name"`
	Active             *bool           `json:"active,omitempty"`
	Source             IngestionSource `json:"source"`
	Split              IngestionSplit  `json:"split"`
	Target             IngestionTarget `json:"target"`
	KeepFailedPayloads bool            `json:"keepFailedPayloads,omitempty"`
}

IngestionSetItem is one ingestion of a set: a definition with its identity. Active is the platform's default (true) when nil; an apply sets it, so a pause made since is undone.

func (*IngestionSetItem) UnmarshalJSON

func (i *IngestionSetItem) UnmarshalJSON(data []byte) error

UnmarshalJSON reads the source and split as their typed members.

type IngestionSetListResponse

type IngestionSetListResponse struct {
	Sets []IngestionSetResponse `json:"sets"`
}

IngestionSetListResponse — GET /api/ingestion-sets.

type IngestionSetPlanResponse

type IngestionSetPlanResponse struct {
	Name    string      `json:"name"`
	DryRun  bool        `json:"dryRun"`
	Changes []SetChange `json:"changes"`
	ApplyID string      `json:"applyId,omitempty"`
}

IngestionSetPlanResponse — the answer to an apply or a reapply. ApplyID is absent for a dry run and for an apply that changed nothing.

type IngestionSetReleaseResponse

type IngestionSetReleaseResponse struct {
	Name     string `json:"name"`
	Released int64  `json:"released"`
}

IngestionSetReleaseResponse — POST /api/ingestion-sets/{name}/release.

type IngestionSetResponse

type IngestionSetResponse struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	Ingestions int64  `json:"ingestions"`
	CreatedAt  string `json:"createdAt"`
	UpdatedAt  string `json:"updatedAt"`
}

IngestionSetResponse is a set and how many ingestions it owns.

type IngestionSetsResource

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

IngestionSetsResource — /api/ingestion-sets/*. A set owns its ingestions (read-only to edits) until it is released.

func (*IngestionSetsResource) Apply

Apply — PUT /api/ingestion-sets/{name}. One transaction: any unresolvable item fails the whole apply, and an ingestion the set owns but no longer lists is deleted. dryRun checks and reports the changes, writing nothing; nil omits the flag.

func (*IngestionSetsResource) GetApply

func (r *IngestionSetsResource) GetApply(ctx context.Context, name, applyID string) (*IngestionSetArchiveResponse, error)

GetApply — GET /api/ingestion-sets/{name}/applies/{applyId}: the apply's archived items and files.

func (*IngestionSetsResource) List

List — GET /api/ingestion-sets.

func (*IngestionSetsResource) ListApplies

ListApplies — GET /api/ingestion-sets/{name}/applies.

func (*IngestionSetsResource) Reapply

func (r *IngestionSetsResource) Reapply(ctx context.Context, name, applyID string, dryRun *bool) (*IngestionSetPlanResponse, error)

Reapply — POST /api/ingestion-sets/{name}/applies/{applyId}/reapply applies an archived apply's items again as a new apply. dryRun as in Apply.

func (*IngestionSetsResource) Release

Release — POST /api/ingestion-sets/{name}/release ends the set's ownership and changes nothing else.

type IngestionSource

type IngestionSource interface {
	// contains filtered or unexported methods
}

IngestionSource is where an ingestion's data comes from: one of HTTPSource, SFTPSource, S3Source, SQSSource, RabbitMQSource, DatabasePollSource, APIPollSource, CustomSource, or Unrecognized.

func DecodeIngestionSource

func DecodeIngestionSource(data []byte) (IngestionSource, error)

DecodeIngestionSource reads a source object by its kind.

type IngestionSourceKindListResponse

type IngestionSourceKindListResponse struct {
	Kinds []IngestionSourceKindResponse `json:"kinds"`
}

IngestionSourceKindListResponse — GET /api/ingestion-source-kinds.

type IngestionSourceKindResponse

type IngestionSourceKindResponse struct {
	Kind        string `json:"kind"`
	BuiltIn     bool   `json:"builtIn"`
	SingleOwner bool   `json:"singleOwner"`
	Description string `json:"description,omitempty"`
	// RequiredPermission is what creating or changing an ingestion of this
	// kind needs.
	RequiredPermission string          `json:"requiredPermission,omitempty"`
	Settings           json.RawMessage `json:"settings,omitempty"`
}

IngestionSourceKindResponse is a source kind the platform or a live runtime carries. Settings is the kind's settings as the runtime describes them.

type IngestionSplit

type IngestionSplit interface {
	// contains filtered or unexported methods
}

IngestionSplit is how a payload becomes records: one of NoSplit, CSVSplit, JSONSplit, XMLSplit, or Unrecognized.

func DecodeIngestionSplit

func DecodeIngestionSplit(data []byte) (IngestionSplit, error)

DecodeIngestionSplit reads a split object by its kind.

type IngestionTarget

type IngestionTarget struct {
	Kind           IngestionTargetKind `json:"kind,omitempty"`
	Code           string              `json:"code"`
	TargetURL      string              `json:"targetUrl,omitempty"`
	Pool           string              `json:"pool,omitempty"`
	Connection     string              `json:"connection,omitempty"`
	ServiceAccount string              `json:"serviceAccount,omitempty"`
	Mode           IngestionTargetMode `json:"mode,omitempty"`
	BatchSize      int64               `json:"batchSize"`
	DataOnly       bool                `json:"dataOnly,omitempty"`
	WrapNonJSON    bool                `json:"wrapNonJson,omitempty"`
}

IngestionTarget is what each record becomes: a dispatch job (Kind empty or TargetKindDispatchJob) or an event (TargetKindEvent).

For a dispatch job, Code is the job's code, Pool a dispatch pool code, and Connection and ServiceAccount optional codes that may not both be set (a connection's account signs; neither is unsigned delivery). TargetURL may be left empty only when the source names a config entry that gives it. DataOnly delivers the record itself, with its own content type, instead of the platform envelope.

For an event, Code is an existing event type's code and only BatchSize and WrapNonJSON may be set besides: the subscriptions decide where the event goes. WrapNonJSON delivers a record that is not JSON as {"contentType", "body"}; it is required unless the records are known to be JSON (a JSON split, or no split on an HTTP source whose Accept.Body is JSON or JSON_OBJECT).

type IngestionTargetKind added in v0.0.11

type IngestionTargetKind string

IngestionTargetKind is what each record becomes.

const (
	TargetKindDispatchJob IngestionTargetKind = "DISPATCH_JOB" // the default when absent
	TargetKindEvent       IngestionTargetKind = "EVENT"
)

The kinds of an ingestion target.

type IngestionTargetMode

type IngestionTargetMode string

IngestionTargetMode is how a failed record treats the ones behind it.

const (
	TargetModeImmediate    IngestionTargetMode = "IMMEDIATE"
	TargetModeNextOnError  IngestionTargetMode = "NEXT_ON_ERROR"
	TargetModeBlockOnError IngestionTargetMode = "BLOCK_ON_ERROR"
)

The modes of an ingestion target.

type IngestionTestResponse

type IngestionTestResponse struct {
	ID          string   `json:"id"`
	Kind        string   `json:"kind"`
	Status      string   `json:"status"`
	CreatedAt   string   `json:"createdAt"`
	ExpiresAt   string   `json:"expiresAt"`
	IngestionID string   `json:"ingestionId,omitempty"`
	RuntimeID   string   `json:"runtimeId,omitempty"`
	CompletedAt string   `json:"completedAt,omitempty"`
	Outcome     string   `json:"outcome,omitempty"`
	Records     int64    `json:"records,omitempty"`
	Excerpt     string   `json:"excerpt,omitempty"`
	Notice      string   `json:"notice,omitempty"`
	Steps       []string `json:"steps,omitempty"`
}

IngestionTestResponse is a connection test. Status is PENDING, RUNNING, DONE or EXPIRED; once DONE, Outcome is RESULTS, NO_RESULTS, REFUSED, FAILED or NOT_SUPPORTED. Notice is set while no live runtime carries the kind: the test waits, nothing has failed.

type IngestionVersionListResponse

type IngestionVersionListResponse struct {
	Versions []IngestionVersionResponse `json:"versions"`
}

IngestionVersionListResponse — GET /api/ingestions/{id}/versions.

type IngestionVersionResponse

type IngestionVersionResponse struct {
	ID                 string          `json:"id"`
	Version            int64           `json:"version"`
	Live               bool            `json:"live"`
	CreatedAt          string          `json:"createdAt"`
	CreatedBy          string          `json:"createdBy,omitempty"`
	AppliedFrom        string          `json:"appliedFrom,omitempty"`
	Name               string          `json:"name"`
	Note               string          `json:"note,omitempty"`
	Source             IngestionSource `json:"source"`
	Split              IngestionSplit  `json:"split"`
	Target             IngestionTarget `json:"target"`
	KeepFailedPayloads bool            `json:"keepFailedPayloads,omitempty"`
	// Draft is a version saved but not live; Digest identifies its
	// definition (equal definitions have equal digests).
	Draft  bool                  `json:"draft,omitempty"`
	Digest string                `json:"digest,omitempty"`
	Save   *IngestionSaveOutcome `json:"save,omitempty"`
	// Warnings names what the saved definition says that will not run as
	// meant, such as CONFIG_MISSING (the answer of SaveVersion only).
	Warnings []string `json:"warnings,omitempty"`
}

IngestionVersionResponse is one saved version of an ingestion.

func (*IngestionVersionResponse) UnmarshalJSON

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

UnmarshalJSON reads the source and split as their typed members.

type IngestionsResource

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

IngestionsResource — /api/ingestions/*, /api/ingestion-source-kinds and /api/ingestion-tests/*. The runtime's own API (/api/ingestion-runtime/v1/*) is not here: it is the runtime's client, not an application's.

func (*IngestionsResource) Create

Create — POST /api/ingestions. The platform answers 201 with the whole ingestion; a code already used is a 409 INGESTION_CODE_EXISTS.

func (*IngestionsResource) Definition

func (r *IngestionsResource) Definition(ctx context.Context, id string) (string, error)

Definition — GET /api/ingestions/{id}/definition: the YAML document that `fcdev ingest apply` reads back.

func (*IngestionsResource) Delete

func (r *IngestionsResource) Delete(ctx context.Context, id string) error

Delete — DELETE /api/ingestions/{id}.

func (*IngestionsResource) DismissFailure

func (r *IngestionsResource) DismissFailure(ctx context.Context, id, failureID string) (*IngestionFailureResponse, error)

DismissFailure — POST /api/ingestions/{id}/failures/{failureId}/dismiss: marks a failure (a notice) dismissed; it stays in the history.

func (*IngestionsResource) Failures

Failures — GET /api/ingestions/{id}/failures, newest first, cursor-paged: pass the previous page's NextCursor as After. Empty fields are omitted.

func (*IngestionsResource) Get

Get — GET /api/ingestions/{id}.

func (*IngestionsResource) GetTest

GetTest — GET /api/ingestion-tests/{id}.

func (*IngestionsResource) History

func (r *IngestionsResource) History(ctx context.Context, id string, limit, offset *uint32) (*IngestionHistoryResponse, error)

History — GET /api/ingestions/{id}/history, offset-paged. Nil limit and offset are omitted.

func (*IngestionsResource) List

List — GET /api/ingestions. Page on with the answer's NextCursor.

func (*IngestionsResource) ListVersions

ListVersions — GET /api/ingestions/{id}/versions.

func (*IngestionsResource) MakeVersionLive

func (r *IngestionsResource) MakeVersionLive(ctx context.Context, id, version string) (*IngestionResponse, error)

MakeVersionLive — POST /api/ingestions/{id}/versions/{version}/live. Returns the updated ingestion.

func (*IngestionsResource) Pause

Pause — POST /api/ingestions/{id}/pause. Returns the updated ingestion.

func (*IngestionsResource) Resume

Resume — POST /api/ingestions/{id}/resume. Returns the updated ingestion.

func (*IngestionsResource) SaveVersion

SaveVersion — POST /api/ingestions/{id}/versions. The platform answers 201 with the saved version.

func (*IngestionsResource) Secrets

Secrets — GET /api/ingestions/{id}/secrets: the secret names the live definition binds and when each runtime last fetched them.

func (*IngestionsResource) SourceKinds

SourceKinds — GET /api/ingestion-source-kinds: the built-in kinds plus the kinds the live runtimes report.

func (*IngestionsResource) TestConnection

TestConnection — POST /api/ingestion-tests. Queues a test (the platform answers 202); poll GetTest for the result.

func (*IngestionsResource) Update

Update — PUT /api/ingestions/{id}. Returns the updated ingestion.

type InstanceCompleteRequest

type InstanceCompleteRequest struct {
	Status CompletionStatus `json:"status"`
	Result json.RawMessage  `json:"result,omitempty"`
}

InstanceCompleteRequest — mark a running instance complete.

type InstanceFilters

type InstanceFilters struct {
	Status string
	Page   *uint32
	Size   *uint32
}

InstanceFilters — query parameters for instance listings. The platform filters instances by status only.

type InstanceLogListResponse

type InstanceLogListResponse struct {
	Logs  []InstanceLogResponse `json:"logs"`
	Total uint64                `json:"total,omitempty"`
}

InstanceLogListResponse — the log lines of an instance. The platform answers GET /api/scheduled-jobs/instances/{id}/logs with a bare array (at most 500 lines, oldest first); ListInstanceLogs wraps it, with Total the number of lines returned.

type InstanceLogRequest

type InstanceLogRequest struct {
	Message  string          `json:"message"`
	Level    LogLevel        `json:"level"`
	Metadata json.RawMessage `json:"metadata,omitempty"`
}

InstanceLogRequest — append a log entry to a running instance. The platform requires Level; LogForInstance sends LogLevelInfo when it is empty.

type InstanceLogResponse

type InstanceLogResponse struct {
	ID             string          `json:"id"`
	InstanceID     string          `json:"instanceId"`
	ScheduledJobID string          `json:"scheduledJobId,omitempty"`
	ClientID       string          `json:"clientId,omitempty"`
	Level          string          `json:"level"`
	Message        string          `json:"message"`
	Metadata       json.RawMessage `json:"metadata,omitempty"`
	CreatedAt      string          `json:"createdAt"`
}

InstanceLogResponse — one log line from an instance.

type JSONSplit

type JSONSplit struct {
	ArrayPath string `json:"arrayPath"`
}

JSONSplit makes one record per element of the array at ArrayPath: $ for a top-level array, or $.field.field.

func (JSONSplit) MarshalJSON

func (s JSONSplit) MarshalJSON() ([]byte, error)

type LinkServiceAccountRequest

type LinkServiceAccountRequest struct {
	ServiceAccountID   string `json:"serviceAccountId"`
	ServiceAccountCode string `json:"serviceAccountCode"`
}

LinkServiceAccountRequest — body for POST /api/applications/{id}/service-account. Both members are required; the platform checks they name the same account.

type ListIngestionsFilters

type ListIngestionsFilters struct {
	ApplicationCode string
	ClientID        string
	Q               string
	Status          string
	Kind            string
	After           string
	Limit           *uint32
}

ListIngestionsFilters narrows GET /api/ingestions. Empty fields are omitted; ClientID takes an id or an identifier. After is the cursor from a previous page's NextCursor; Limit is 1 to 200.

type LogLevel

type LogLevel string

LogLevel for instance log entries. Use the Log* constants.

const (
	LogLevelDebug LogLevel = "DEBUG"
	LogLevelInfo  LogLevel = "INFO"
	LogLevelWarn  LogLevel = "WARN"
	LogLevelError LogLevel = "ERROR"
)

type MeResource

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

MeResource — /api/me/*.

func (*MeResource) Client

func (r *MeResource) Client(ctx context.Context, clientID string) (*MyClient, error)

Client — GET /api/me/clients/{id}.

func (*MeResource) ClientApplications

func (r *MeResource) ClientApplications(ctx context.Context, clientID string) (*MyApplicationsResponse, error)

ClientApplications — GET /api/me/clients/{id}/applications.

func (*MeResource) Clients

func (r *MeResource) Clients(ctx context.Context) (*MyClientsResponse, error)

Clients — GET /api/me/clients. Access is determined by user scope: ANCHOR → all active clients; PARTNER → IDP-granted + explicit grants; CLIENT → home client + IDP + explicit grants.

type MyApplication

type MyApplication struct {
	ID           string `json:"id"`
	Code         string `json:"code"`
	Name         string `json:"name"`
	Description  string `json:"description,omitempty"`
	IconURL      string `json:"iconUrl,omitempty"`
	BaseURL      string `json:"baseUrl,omitempty"`
	Website      string `json:"website,omitempty"`
	LogoMimeType string `json:"logoMimeType,omitempty"`
}

MyApplication is one application accessible within a tenant.

type MyApplicationsResponse

type MyApplicationsResponse struct {
	Applications []MyApplication `json:"applications"`
	Total        uint64          `json:"total,omitempty"`
	ClientID     string          `json:"clientId,omitempty"`
}

MyApplicationsResponse — GET /api/me/clients/{id}/applications.

type MyClient

type MyClient struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	Identifier string `json:"identifier"`
	Status     string `json:"status,omitempty"`
	CreatedAt  string `json:"createdAt,omitempty"`
	UpdatedAt  string `json:"updatedAt,omitempty"`
}

MyClient is a tenant accessible to the current user.

type MyClientsResponse

type MyClientsResponse struct {
	Clients []MyClient `json:"clients"`
	Total   uint64     `json:"total,omitempty"`
}

MyClientsResponse — GET /api/me/clients.

type NoSplit

type NoSplit struct{}

NoSplit makes one record of the payload.

func (NoSplit) MarshalJSON

func (s NoSplit) MarshalJSON() ([]byte, error)

type NoteResponse

type NoteResponse struct {
	Category string `json:"category"`
	Text     string `json:"text"`
	AddedBy  string `json:"addedBy,omitempty"`
	AddedAt  string `json:"addedAt"`
}

NoteResponse is one note on a client.

type OAuthClientCredentials

type OAuthClientCredentials struct {
	ID           string `json:"id"`
	ClientID     string `json:"clientId"`
	ClientSecret string `json:"clientSecret,omitempty"`
}

OAuthClientCredentials identifies an OAuth client. ClientSecret is present only in the response that created it.

type OpenAPIResource

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

OpenAPIResource — /api/applications/{appCode}/openapi/*.

func (*OpenAPIResource) Sync

Sync publishes or replaces this application's OpenAPI document. Each call replaces the currently-published spec; resubmitting the same content is detected on the server side via Unchanged=true.

type Option

type Option func(*FlowCatalystClient)

Option configures a FlowCatalystClient.

func WithHTTPClient

func WithHTTPClient(h *http.Client) Option

WithHTTPClient overrides the underlying *http.Client. Use this for custom transports, proxies, or TLS configuration.

func WithRetry

func WithRetry(attempts int, baseDelay time.Duration) Option

WithRetry configures transient-error retry. attempts is the total number of attempts (including the first), delay is the base delay between attempts (exponential backoff is applied internally). Default: 3 attempts, 100ms base.

func WithRouterBaseURL

func WithRouterBaseURL(u string) Option

WithRouterBaseURL overrides the message-router base URL for /monitoring/in-flight-messages/* endpoints. Default: same as baseURL.

func WithTimeout

func WithTimeout(d time.Duration) Option

WithTimeout sets a per-request timeout (default 30s). Applied via context.WithTimeout inside do.

func WithToken

func WithToken(token string) Option

WithToken sets a static bearer token. Convenience over WithTokenProvider for cases where the token doesn't expire.

func WithTokenProvider

func WithTokenProvider(p TokenProvider) Option

WithTokenProvider sets a dynamic token source. Use this with an OAuth2 client-credentials manager that refreshes ahead of expiry.

type PermissionListResponse

type PermissionListResponse struct {
	Permissions []PermissionResponse `json:"permissions"`
	Total       uint64               `json:"total,omitempty"`
}

PermissionListResponse — GET /api/roles/permissions.

type PermissionResponse

type PermissionResponse struct {
	Permission  string `json:"permission"`
	Name        string `json:"name"`
	Category    string `json:"category,omitempty"`
	Description string `json:"description,omitempty"`
}

PermissionResponse is one permission catalogue entry. Permission is the canonical `application:context:aggregate:action` code.

type PermissionsResource

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

PermissionsResource — /api/roles/permissions/*.

func (*PermissionsResource) Get

Get — GET /api/roles/permissions/{name}.

func (*PermissionsResource) List

List — GET /api/roles/permissions.

type PlatformConfigResource

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

PlatformConfigResource — /api/config/*.

func (*PlatformConfigResource) Delete

func (r *PlatformConfigResource) Delete(ctx context.Context, app, section, property, clientID string) error

Delete — DELETE /api/config/{app}/{section}/{property}?clientId=. Empty clientID deletes the global value.

func (*PlatformConfigResource) Get

func (r *PlatformConfigResource) Get(ctx context.Context, app, section, property, clientID string) (*ConfigResponse, error)

Get — GET /api/config/{app}/{section}/{property}?clientId=. Empty clientID is omitted. A SECRET property comes back with Value "***" (SecretMask); call RevealSecret for its plaintext.

func (*PlatformConfigResource) RevealSecret

func (r *PlatformConfigResource) RevealSecret(ctx context.Context, app, section, property, clientID string) (*SecretResponse, error)

RevealSecret — GET /api/config/{app}/{section}/{property}/secret?clientId=. The only way to read a SECRET property's plaintext; every other read returns "***". Empty clientID is omitted.

Errors are *APIError: 403 when the caller holds neither platform:admin:config:reveal nor (for an application's service account) platform:application-service:config:reveal, or names a client it is not linked to (an application's account reaches its own client ids, else the clients its application is enabled for); 404 when the property does not exist; 400 with Code() "NOT_A_SECRET" when the property is PLAIN (use Get). To have the audit row name the person a service account acts for, call it with a context from WithOnBehalfOf.

Every reveal is audited by the platform. The result is deliberately not cached by the SDK (wrap the call in your own TTL cache if you need one), and the value is never logged or placed in an error by the SDK.

func (*PlatformConfigResource) Set

func (r *PlatformConfigResource) Set(ctx context.Context, app, section, property string, req *SetConfigPropertyRequest) (*ConfigResponse, error)

Set — PUT /api/config/{app}/{section}/{property}. Returns the stored property; for a SECRET the returned Value is "***".

type PrincipalFilters

type PrincipalFilters struct {
	ClientID string
	Type     string
	Active   string
	// Email is sent as `q`, the platform's case-insensitive substring search
	// over name and email; it is not an exact-match filter.
	Email string
	// Roles filters to principals holding the role(s) (the platform's `roles`
	// parameter; comma-separated for several).
	Roles string
	// Page and PageSize page the listing; nil takes the platform default.
	Page     *uint32
	PageSize *uint32
	// SortField and SortOrder order it (SortOrder is "asc" or "desc").
	SortField string
	SortOrder string
}

PrincipalFilters — query parameters for GET /api/principals.

type PrincipalListResponse

type PrincipalListResponse struct {
	Principals []PrincipalResponse `json:"principals"`
	Total      uint64              `json:"total,omitempty"`
}

PrincipalListResponse — GET /api/principals.

type PrincipalResponse

type PrincipalResponse struct {
	ID               string   `json:"id"`
	PrincipalType    string   `json:"type"`
	Scope            string   `json:"scope"`
	ClientID         string   `json:"clientId,omitempty"`
	Name             string   `json:"name"`
	Active           bool     `json:"active"`
	Email            string   `json:"email,omitempty"`
	IdpType          string   `json:"idpType,omitempty"`
	Roles            []string `json:"roles,omitempty"`
	IsAnchorUser     bool     `json:"isAnchorUser,omitempty"`
	GrantedClientIDs []string `json:"grantedClientIds,omitempty"`
	// ServiceAccountID is set for SERVICE principals.
	ServiceAccountID string `json:"serviceAccountId,omitempty"`
	// HasDeveloperCredential reports whether a developer credential is set.
	HasDeveloperCredential       bool     `json:"hasDeveloperCredential"`
	DeveloperCredentialUpdatedAt string   `json:"developerCredentialUpdatedAt,omitempty"`
	TwoFactorMethods             []string `json:"twoFactorMethods,omitempty"`
	// InviteLink is set only on the create-user response, when
	// CreateUserRequest.ReturnInviteLink was requested.
	InviteLink string `json:"inviteLink,omitempty"`
	CreatedAt  string `json:"createdAt"`
	UpdatedAt  string `json:"updatedAt"`
}

PrincipalResponse is the platform's principal aggregate.

type PrincipalRoleListResponse

type PrincipalRoleListResponse struct {
	Roles []PrincipalRoleResponse `json:"roles"`
}

PrincipalRoleListResponse — GET /api/principals/{id}/roles.

type PrincipalRoleResponse

type PrincipalRoleResponse struct {
	ID               string `json:"id"`
	RoleName         string `json:"roleName"`
	AssignmentSource string `json:"assignmentSource"`
	AssignedAt       string `json:"assignedAt"`
}

PrincipalRoleResponse — one item from GET /api/principals/{id}/roles. Matches the platform's RoleAssignmentDto.

type PrincipalsResource

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

PrincipalsResource — /api/principals/*.

func (*PrincipalsResource) Activate

func (r *PrincipalsResource) Activate(ctx context.Context, id string) error

Activate — POST /api/principals/{id}/activate. Platform returns { message } only; call Get(id) for the refreshed record.

func (*PrincipalsResource) AddRole

func (r *PrincipalsResource) AddRole(ctx context.Context, id, roleName string) (*PrincipalResponse, error)

AddRole — POST /api/principals/{id}/roles (additive — keeps existing roles). Distinct from SetRoles which replaces the full set. Returns the updated principal.

func (*PrincipalsResource) ClientAccessGrants

func (r *PrincipalsResource) ClientAccessGrants(ctx context.Context, id string) (*ClientAccessListResponse, error)

ClientAccessGrants — GET /api/principals/{id}/client-access.

func (*PrincipalsResource) CreateUser

CreateUser — POST /api/principals/users.

func (*PrincipalsResource) Deactivate

func (r *PrincipalsResource) Deactivate(ctx context.Context, id string) error

Deactivate — POST /api/principals/{id}/deactivate. Like Activate, the { message } response is discarded.

func (*PrincipalsResource) FindByEmail

func (r *PrincipalsResource) FindByEmail(ctx context.Context, email string) (*PrincipalListResponse, error)

FindByEmail — convenience over List. The platform only offers a substring search (`q`), so the result is narrowed client-side to principals whose email equals the argument (case-insensitive). Callers should pick the expected one by email rather than assuming index 0.

func (*PrincipalsResource) Get

Get — GET /api/principals/{id}.

func (*PrincipalsResource) GrantClientAccess

func (r *PrincipalsResource) GrantClientAccess(ctx context.Context, principalID, clientID string) (*ClientAccessGrantResponse, error)

GrantClientAccess — POST /api/principals/{id}/client-access. Returns the grant.

func (*PrincipalsResource) List

List — GET /api/principals with optional filters.

func (*PrincipalsResource) RemoveRole

func (r *PrincipalsResource) RemoveRole(ctx context.Context, id, roleName string) (*PrincipalResponse, error)

RemoveRole — DELETE /api/principals/{id}/roles/{roleName}. Returns the updated principal.

func (*PrincipalsResource) ResetPassword

func (r *PrincipalsResource) ResetPassword(ctx context.Context, principalID string, req *ResetPasswordRequest) error

ResetPassword — POST /api/principals/{id}/reset-password. The platform answers { message } only, which this discards.

func (*PrincipalsResource) RevokeClientAccess

func (r *PrincipalsResource) RevokeClientAccess(ctx context.Context, principalID, clientID string) error

RevokeClientAccess — DELETE /api/principals/{id}/client-access/{clientId}.

func (*PrincipalsResource) Roles

Roles — GET /api/principals/{id}/roles.

func (*PrincipalsResource) SetRoles

func (r *PrincipalsResource) SetRoles(ctx context.Context, id string, roles []string) (*SetRolesResponse, error)

SetRoles — PUT /api/principals/{id}/roles. Replaces the full set; the response says what was added and removed.

func (*PrincipalsResource) Sync

func (r *PrincipalsResource) Sync(ctx context.Context, appCode string, req *SyncPrincipalsRequest, removeUnlisted bool) (*SyncResult, error)

Sync — POST /api/applications/{appCode}/principals/sync. When removeUnlisted is true the platform strips SDK-sourced role assignments from principals not in the list (principals themselves are never deleted by sync).

func (*PrincipalsResource) SyncUsers

SyncUsers — POST /api/principals/sync. The application-less twin of Sync: a declarative user upsert keyed on email with NO application scope. Use it to "just sync users" — migrating accounts and (via SyncPrincipalItem.PasswordHash) their existing password hashes — without wrapping the call in an application. Pure upsert: it never strips roles from unlisted users.

func (*PrincipalsResource) Update

Update — PUT /api/principals/{id}.

type ProcessFilters

type ProcessFilters struct {
	Application string
	Subdomain   string
	Status      string
}

ProcessFilters — query parameters for GET /api/processes. Empty fields are omitted.

type ProcessListResponse

type ProcessListResponse struct {
	Items []ProcessResponse `json:"items"`
}

ProcessListResponse — GET /api/processes.

type ProcessResponse

type ProcessResponse struct {
	ID          string   `json:"id"`
	Code        string   `json:"code"`
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	Status      string   `json:"status"`
	Source      string   `json:"source"`
	Application string   `json:"application"`
	Subdomain   string   `json:"subdomain"`
	ProcessName string   `json:"processName"`
	Body        string   `json:"body"`
	DiagramType string   `json:"diagramType"`
	Tags        []string `json:"tags"`
	CreatedBy   string   `json:"createdBy,omitempty"`
	CreatedAt   string   `json:"createdAt"`
	UpdatedAt   string   `json:"updatedAt"`
}

ProcessResponse is the platform's process documentation aggregate.

type ProcessesResource

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

ProcessesResource — /api/processes/*.

func (*ProcessesResource) Archive

func (r *ProcessesResource) Archive(ctx context.Context, id string) error

Archive — POST /api/processes/{id}/archive (204 No Content). The process is kept, marked archived.

func (*ProcessesResource) Create

Create — POST /api/processes. Returns the new process's id; call Get for the process.

func (*ProcessesResource) Delete

func (r *ProcessesResource) Delete(ctx context.Context, id string) error

Delete — DELETE /api/processes/{id} (204 No Content): removes the process for good. Most callers want Archive instead.

func (*ProcessesResource) Get

Get — GET /api/processes/{id}.

func (*ProcessesResource) GetByCode

func (r *ProcessesResource) GetByCode(ctx context.Context, code string) (*ProcessResponse, error)

GetByCode — GET /api/processes/by-code/{code}.

func (*ProcessesResource) List

List — GET /api/processes with optional filters (nil lists everything).

func (*ProcessesResource) Sync

func (r *ProcessesResource) Sync(ctx context.Context, appCode string, req *SyncProcessesRequest, removeUnlisted bool) (*SyncResult, error)

Sync — POST /api/applications/{appCode}/processes/sync.

func (*ProcessesResource) Update

Update — PUT /api/processes/{id}. The platform answers 204 No Content; call Get(id) for the updated process.

type ProvisionServiceAccountResponse

type ProvisionServiceAccountResponse struct {
	Message        string                    `json:"message"`
	ServiceAccount ServiceAccountCredentials `json:"serviceAccount"`
}

ProvisionServiceAccountResponse — POST /api/applications/{id}/provision-service-account.

type PutFieldPolicyRequest added in v0.0.12

type PutFieldPolicyRequest struct {
	PinMinLength       *int `json:"pinMinLength,omitempty"`      // 4 to 12 (6)
	SoftLockThreshold  *int `json:"softLockThreshold,omitempty"` // 1 to 20 (5)
	SoftLockSecs       *int `json:"softLockSecs,omitempty"`      // 30 to 86400 (900)
	HardLockThreshold  *int `json:"hardLockThreshold,omitempty"` // softLockThreshold to 50 (10)
	SharedIdleSecs     *int `json:"sharedIdleSecs,omitempty"`    // 60 to 86400 (900)
	PersonalIdleSecs   *int `json:"personalIdleSecs,omitempty"`  // 60 to 86400 (7200)
	ShiftMaxSecs       *int `json:"shiftMaxSecs,omitempty"`      // 3600 to 86400 (50400)
	RequireAttestation bool `json:"requireAttestation"`
	PinReauthDays      *int `json:"pinReauthDays,omitempty"` // 1 to 90 (7)
}

PutFieldPolicyRequest — PUT /api/field-policies/{clientId}. A nil member takes the platform default (shown per field).

type QueryBuilder

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

QueryBuilder accumulates optional query parameters and renders them as "?a=1&b=2" (or "" if nothing was set). Use Set methods that match the source type so callers don't have to format pointer types themselves.

func NewQuery

func NewQuery() *QueryBuilder

NewQuery returns an empty QueryBuilder.

func (*QueryBuilder) Bool

func (q *QueryBuilder) Bool(name string, value *bool) *QueryBuilder

Bool appends a *bool param if non-nil ("true"/"false").

func (*QueryBuilder) Encode

func (q *QueryBuilder) Encode() string

Encode renders the query suffix, including the leading "?". Returns "" if no params were set.

func (*QueryBuilder) String

func (q *QueryBuilder) String(name, value string) *QueryBuilder

String appends a string param if non-empty.

func (*QueryBuilder) Uint32

func (q *QueryBuilder) Uint32(name string, value *uint32) *QueryBuilder

Uint32 appends a *uint32 param if non-nil.

type RabbitMQSource

type RabbitMQSource struct {
	URI      string    `json:"uri"`
	Queue    string    `json:"queue"`
	Username string    `json:"username"`
	Password SecretRef `json:"password"`
}

RabbitMQSource consumes messages from a queue. URI is amqp:// or amqps:// without a login.

func (RabbitMQSource) MarshalJSON

func (s RabbitMQSource) MarshalJSON() ([]byte, error)

type RateLimit

type RateLimit struct {
	Requests int    `json:"requests"`
	Per      string `json:"per"`
}

RateLimit accepts at most Requests per Per (ISO 8601), counted per runtime.

type ReplaceRolesRequest

type ReplaceRolesRequest struct {
	Roles []string `json:"roles"`
}

ReplaceRolesRequest — body for PUT /api/principals/{id}/roles.

type ResetFieldWorkerPinRequest added in v0.0.12

type ResetFieldWorkerPinRequest struct {
	Pin *string `json:"pin,omitempty"`
}

ResetFieldWorkerPinRequest — POST /api/field-workers/{id}/pin-reset. Omit Pin for a random temporary PIN, returned once.

type ResetFieldWorkerPinResponse added in v0.0.12

type ResetFieldWorkerPinResponse struct {
	// TemporaryPin is present only when the platform generated the PIN. It is
	// shown once and cannot be retrieved again.
	TemporaryPin      *string `json:"temporaryPin,omitempty"`
	PinChangeRequired bool    `json:"pinChangeRequired"`
}

ResetFieldWorkerPinResponse is the outcome of a PIN reset.

type ResetPasswordRequest

type ResetPasswordRequest struct {
	NewPassword               string `json:"newPassword"`
	EnforcePasswordComplexity *bool  `json:"enforcePasswordComplexity,omitempty"`
}

ResetPasswordRequest — POST /api/principals/{id}/reset-password.

type RoleListResponse

type RoleListResponse struct {
	Roles []RoleResponse `json:"roles"`
	Total uint64         `json:"total,omitempty"`
}

RoleListResponse — GET /api/roles.

type RoleResponse

type RoleResponse struct {
	ID              string   `json:"id"`
	Name            string   `json:"name"`
	DisplayName     string   `json:"displayName"`
	Description     string   `json:"description,omitempty"`
	ApplicationCode string   `json:"applicationCode"`
	ApplicationID   string   `json:"applicationId,omitempty"`
	Permissions     []string `json:"permissions"`
	Source          string   `json:"source"`
	ClientManaged   bool     `json:"clientManaged"`
	CreatedAt       string   `json:"createdAt"`
	UpdatedAt       string   `json:"updatedAt"`
}

RoleResponse is the platform's role aggregate.

type RolesResource

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

RolesResource — /api/roles/*.

func (*RolesResource) Create

Create — POST /api/roles. Returns { id } only; call Get(name) for the full record.

func (*RolesResource) Delete

func (r *RolesResource) Delete(ctx context.Context, name string) error

Delete — DELETE /api/roles/{name}.

func (*RolesResource) Get

func (r *RolesResource) Get(ctx context.Context, name string) (*RoleResponse, error)

Get — GET /api/roles/{name}.

func (*RolesResource) GetByCode

func (r *RolesResource) GetByCode(ctx context.Context, code string) (*RoleResponse, error)

GetByCode — GET /api/roles/by-code/{code} (`application:role-name`).

func (*RolesResource) GrantPermission

func (r *RolesResource) GrantPermission(ctx context.Context, roleName, permission string) (*RoleResponse, error)

GrantPermission — POST /api/roles/{name}/permissions. Returns the updated role.

func (*RolesResource) List

List — GET /api/roles.

func (*RolesResource) ListForApplication

func (r *RolesResource) ListForApplication(ctx context.Context, applicationID string) ([]RoleResponse, error)

ListForApplication — GET /api/roles/by-application/{applicationId}. The platform answers a bare array of roles.

func (*RolesResource) RevokePermission

func (r *RolesResource) RevokePermission(ctx context.Context, roleName, permission string) (*RoleResponse, error)

RevokePermission — DELETE /api/roles/{name}/permissions/{permission}. Returns the updated role.

func (*RolesResource) Sync

func (r *RolesResource) Sync(ctx context.Context, appCode string, req *SyncRolesRequest, removeUnlisted bool) (*SyncResult, error)

Sync — POST /api/applications/{appCode}/roles/sync.

func (*RolesResource) Update

func (r *RolesResource) Update(ctx context.Context, name string, req *UpdateRoleRequest) error

Update — PUT /api/roles/{name}. Platform responds with 204.

type RouterResource

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

RouterResource — message-router monitoring endpoints. Uses routerBaseURL (or baseURL as fallback).

func (*RouterResource) InPipeline

func (r *RouterResource) InPipeline(ctx context.Context, messageID string) (*InPipelineCheckResponse, error)

InPipeline — GET /monitoring/in-flight-messages/check?messageId=... Returns whether the router currently holds the message.

func (*RouterResource) InPipelineBatch

func (r *RouterResource) InPipelineBatch(ctx context.Context, messageIDs []string) (map[string]bool, error)

InPipelineBatch — POST /monitoring/in-flight-messages/check-batch. Returns messageId → bool for each input. Server caps the batch at 5000.

type S3Source

type S3Source struct {
	Region string `json:"region"`
	Bucket string `json:"bucket"`
	// Prefix is folder names each ending in "/"; nil is the top of the bucket.
	Prefix *string `json:"prefix,omitempty"`
	Every  string  `json:"every"`
	// Credential is the access key to read with; nil uses the runtime's own identity.
	Credential *AWSCredential `json:"credential,omitempty"`
}

S3Source polls the objects directly under a prefix of a bucket.

func (S3Source) MarshalJSON

func (s S3Source) MarshalJSON() ([]byte, error)

type SFTPSource

type SFTPSource struct {
	Host       string    `json:"host"`
	Port       int       `json:"port"`
	Directory  string    `json:"directory"`
	Username   string    `json:"username"`
	Credential SecretRef `json:"credential"`
	// KnownHosts is the server's host key as a known_hosts line. The runtime
	// refuses to connect without it unless AcceptAnyHostKey is set.
	KnownHosts *string `json:"knownHosts,omitempty"`
	// AcceptAnyHostKey connects without checking who the server is (not with
	// KnownHosts). Setting it needs platform:ingestion:ingestion:bind-secrets.
	AcceptAnyHostKey bool `json:"acceptAnyHostKey,omitempty"`
	// Include is a file name pattern such as *.csv; nil takes every file.
	Include *string `json:"include,omitempty"`
	Every   string  `json:"every"`
}

SFTPSource polls files in a directory on an SFTP server.

func (SFTPSource) MarshalJSON

func (s SFTPSource) MarshalJSON() ([]byte, error)

type SQSSource

type SQSSource struct {
	Region     string         `json:"region"`
	Queue      string         `json:"queue"`
	Credential *AWSCredential `json:"credential,omitempty"`
}

SQSSource consumes messages from a queue, named, not its URL.

func (SQSSource) MarshalJSON

func (s SQSSource) MarshalJSON() ([]byte, error)

type SaveIngestionVersionRequest

type SaveIngestionVersionRequest struct {
	Name               string          `json:"name"`
	Note               string          `json:"note,omitempty"`
	Source             IngestionSource `json:"source"`
	Split              IngestionSplit  `json:"split"`
	Target             IngestionTarget `json:"target"`
	KeepFailedPayloads bool            `json:"keepFailedPayloads,omitempty"`
	// Live also makes the saved version live (needs the promote permission).
	Live *bool `json:"live,omitempty"`
}

SaveIngestionVersionRequest — POST /api/ingestions/{id}/versions. A saved version is not run until it is live.

type ScheduledJobFilters

type ScheduledJobFilters struct {
	ClientID string
	Status   string
	Search   string
	Page     *uint32
	Size     *uint32
}

ScheduledJobFilters — query parameters for GET /api/scheduled-jobs. Pass ClientID = "platform" to filter platform-scoped only.

type ScheduledJobInstanceListResponse

type ScheduledJobInstanceListResponse struct {
	Data       []ScheduledJobInstanceResponse `json:"data"`
	Page       uint32                         `json:"page"`
	Size       uint32                         `json:"size"`
	Total      uint64                         `json:"total"`
	TotalPages uint32                         `json:"total_pages"`
}

ScheduledJobInstanceListResponse — paginated list for ListInstances().

type ScheduledJobInstanceResponse

type ScheduledJobInstanceResponse struct {
	ID               string          `json:"id"`
	ScheduledJobID   string          `json:"scheduledJobId"`
	ClientID         string          `json:"clientId,omitempty"`
	JobCode          string          `json:"jobCode"`
	TriggerKind      string          `json:"triggerKind"`
	ScheduledFor     string          `json:"scheduledFor,omitempty"`
	FiredAt          string          `json:"firedAt"`
	DeliveredAt      string          `json:"deliveredAt,omitempty"`
	CompletedAt      string          `json:"completedAt,omitempty"`
	Status           string          `json:"status"`
	DeliveryAttempts int32           `json:"deliveryAttempts"`
	DeliveryError    string          `json:"deliveryError,omitempty"`
	CompletionStatus string          `json:"completionStatus,omitempty"`
	CompletionResult json.RawMessage `json:"completionResult,omitempty"`
	CorrelationID    string          `json:"correlationId,omitempty"`
	CreatedAt        string          `json:"createdAt"`
}

ScheduledJobInstanceResponse — one firing of a scheduled job.

type ScheduledJobListResponse

type ScheduledJobListResponse struct {
	Data       []ScheduledJobResponse `json:"data"`
	Page       uint32                 `json:"page"`
	Size       uint32                 `json:"size"`
	Total      uint64                 `json:"total"`
	TotalPages uint32                 `json:"total_pages"`
}

ScheduledJobListResponse — paginated list for List().

type ScheduledJobResponse

type ScheduledJobResponse struct {
	ID                  string          `json:"id"`
	ClientID            string          `json:"clientId,omitempty"`
	ApplicationID       string          `json:"applicationId,omitempty"`
	Code                string          `json:"code"`
	Name                string          `json:"name"`
	Description         string          `json:"description,omitempty"`
	Status              string          `json:"status"`
	Crons               []string        `json:"crons"`
	Timezone            string          `json:"timezone"`
	Payload             json.RawMessage `json:"payload,omitempty"`
	Concurrent          bool            `json:"concurrent"`
	TracksCompletion    bool            `json:"tracksCompletion"`
	TimeoutSeconds      *int32          `json:"timeoutSeconds,omitempty"`
	DeliveryMaxAttempts int32           `json:"deliveryMaxAttempts"`
	TargetURL           string          `json:"targetUrl,omitempty"`
	LastFiredAt         string          `json:"lastFiredAt,omitempty"`
	CreatedAt           string          `json:"createdAt"`
	UpdatedAt           string          `json:"updatedAt"`
	CreatedBy           string          `json:"createdBy,omitempty"`
	UpdatedBy           string          `json:"updatedBy,omitempty"`
	Version             int32           `json:"version"`
	// HasActiveInstance: computed; true if any non-terminal instance exists.
	HasActiveInstance bool `json:"hasActiveInstance,omitempty"`
}

ScheduledJobResponse is the platform's scheduled job aggregate.

type ScheduledJobsResource

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

ScheduledJobsResource — /api/scheduled-jobs/*.

func (*ScheduledJobsResource) Archive

func (r *ScheduledJobsResource) Archive(ctx context.Context, id string) error

Archive — POST /api/scheduled-jobs/{id}/archive (204 No Content; soft delete, kept for audit).

func (*ScheduledJobsResource) CompleteInstance

func (r *ScheduledJobsResource) CompleteInstance(ctx context.Context, instanceID string, req *InstanceCompleteRequest) error

CompleteInstance — SDK callback to mark an instance complete. POST /api/scheduled-jobs/instances/{id}/complete (204 No Content); read the finished instance with GetInstance.

func (*ScheduledJobsResource) Create

Create — POST /api/scheduled-jobs. Returns { id } only.

func (*ScheduledJobsResource) Delete

func (r *ScheduledJobsResource) Delete(ctx context.Context, id string) error

Delete — DELETE /api/scheduled-jobs/{id} (hard delete).

func (*ScheduledJobsResource) Fire

Fire — POST /api/scheduled-jobs/{id}/fire (202 Accepted). Returns the new instance id.

func (*ScheduledJobsResource) Get

Get — GET /api/scheduled-jobs/{id}.

func (*ScheduledJobsResource) GetByCode

func (r *ScheduledJobsResource) GetByCode(ctx context.Context, code, clientID string) (*ScheduledJobResponse, error)

GetByCode — GET /api/scheduled-jobs/by-code/{code}. Optional client scope.

func (*ScheduledJobsResource) GetInstance

func (r *ScheduledJobsResource) GetInstance(ctx context.Context, instanceID string) (*ScheduledJobInstanceResponse, error)

GetInstance — GET /api/scheduled-jobs/instances/{id}.

func (*ScheduledJobsResource) List

List — GET /api/scheduled-jobs with filters + pagination.

func (*ScheduledJobsResource) ListInstanceLogs

func (r *ScheduledJobsResource) ListInstanceLogs(ctx context.Context, instanceID string) (*InstanceLogListResponse, error)

ListInstanceLogs — GET /api/scheduled-jobs/instances/{id}/logs.

func (*ScheduledJobsResource) ListInstances

ListInstances — GET /api/scheduled-jobs/{jobId}/instances with filters.

func (*ScheduledJobsResource) LogForInstance

func (r *ScheduledJobsResource) LogForInstance(ctx context.Context, instanceID string, req *InstanceLogRequest) error

LogForInstance — SDK callback to append a log entry to a running instance. POST /api/scheduled-jobs/instances/{id}/log. An empty Level is sent as LogLevelInfo (the platform requires one). The platform answers 204 No Content.

func (*ScheduledJobsResource) Pause

func (r *ScheduledJobsResource) Pause(ctx context.Context, id string) error

Pause — POST /api/scheduled-jobs/{id}/pause (204 No Content).

func (*ScheduledJobsResource) Resume

func (r *ScheduledJobsResource) Resume(ctx context.Context, id string) error

Resume — POST /api/scheduled-jobs/{id}/resume (204 No Content).

func (*ScheduledJobsResource) Sync

Sync — POST /api/applications/{appCode}/scheduled-jobs/sync. Unlike other syncs, scheduled-jobs sync puts ArchiveUnlisted in the body (not removeUnlisted in the query) and returns per-code lists rather than counts.

func (*ScheduledJobsResource) Update

Update — PUT /api/scheduled-jobs/{id}. The platform answers 204 No Content; call Get(id) for the updated job.

type SecretRef

type SecretRef struct {
	Name string `json:"name"`
}

SecretRef names a secret. The runtime resolves the name against the ingestion's own client.

type SecretResponse

type SecretResponse struct {
	ApplicationCode string `json:"applicationCode"`
	Section         string `json:"section"`
	Property        string `json:"property"`
	ClientID        string `json:"clientId,omitempty"`
	// Value is the plaintext secret. Never log it.
	Value string `json:"value"`
	// UpdatedAt is the value's version: it changes whenever the secret is
	// set. Compare it to detect rotation.
	UpdatedAt string `json:"updatedAt"`
}

SecretResponse is the plaintext of one SECRET property, as returned by RevealSecret. Value is sensitive: String, GoString and LogValue (slog) omit it, so printing or logging the struct with %v, %+v, %#v or slog does not leak it. Reading the Value field and encoding/json are not redacted; do not marshal this struct into logs.

func (SecretResponse) GoString

func (s SecretResponse) GoString() string

GoString implements fmt.GoStringer (%#v) with the value redacted.

func (SecretResponse) LogValue

func (s SecretResponse) LogValue() slog.Value

LogValue implements slog.LogValuer with the value redacted.

func (SecretResponse) String

func (s SecretResponse) String() string

String renders the response with the value redacted.

type ServiceAccountCredentials

type ServiceAccountCredentials struct {
	Name        string                 `json:"name"`
	PrincipalID string                 `json:"principalId"`
	OAuthClient OAuthClientCredentials `json:"oauthClient"`
}

ServiceAccountCredentials is the service account created by ProvisionServiceAccount, with the OAuth client that authenticates it.

type ServiceAccountResponse

type ServiceAccountResponse struct {
	ID            string `json:"id"`
	Code          string `json:"code"`
	Name          string `json:"name"`
	Description   string `json:"description,omitempty"`
	Active        bool   `json:"active"`
	ApplicationID string `json:"applicationId,omitempty"`
	// AuthType is the credential scheme, e.g. BEARER_TOKEN.
	AuthType      string   `json:"authType"`
	ClientIDs     []string `json:"clientIds"`
	OAuthClientID string   `json:"oauthClientId,omitempty"`
	PrincipalID   string   `json:"principalId,omitempty"`
	Roles         []string `json:"roles"`
	Scope         string   `json:"scope,omitempty"`
	LastUsedAt    string   `json:"lastUsedAt,omitempty"`
	CreatedAt     string   `json:"createdAt"`
	UpdatedAt     string   `json:"updatedAt"`
}

ServiceAccountResponse is the platform's service-account record.

type ServiceAccountsResource

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

ServiceAccountsResource — /api/service-accounts/*. Only the read is exposed; an application's account is linked with ApplicationsResource.LinkServiceAccount.

func (*ServiceAccountsResource) Get

Get — GET /api/service-accounts/{id}.

type SetChange

type SetChange struct {
	Application string   `json:"application"`
	Client      string   `json:"client"`
	Code        string   `json:"code"`
	Action      string   `json:"action"`
	Changed     []string `json:"changed"`
	IngestionID string   `json:"ingestionId,omitempty"`
	Warnings    []string `json:"warnings,omitempty"`
}

SetChange is what an apply does (or would do) to one ingestion. Action is CREATE, CHANGE, ADOPT, UNCHANGED or REMOVE; Changed names the fields.

type SetConfigPropertyRequest

type SetConfigPropertyRequest struct {
	// Value is required. For a SECRET property it is the plaintext to store
	// (the platform encrypts it at rest).
	Value string `json:"value"`
	// ValueType is PLAIN or SECRET. Empty leaves the platform default.
	ValueType   string `json:"valueType,omitempty"`
	Description string `json:"description,omitempty"`
	// ClientID scopes the property to one client. Empty sets the global value.
	ClientID string `json:"clientId,omitempty"`
}

SetConfigPropertyRequest — PUT /api/config/{app}/{section}/{property}.

type SetFile

type SetFile struct {
	Path    string `json:"path"`
	Content string `json:"content"`
}

SetFile is a definition file as it is in the repository, kept with an apply.

type SetRolesResponse

type SetRolesResponse struct {
	Added   []string                `json:"added"`
	Removed []string                `json:"removed"`
	Roles   []PrincipalRoleResponse `json:"roles"`
}

SetRolesResponse — PUT /api/principals/{id}/roles: the role names added and removed by the replace, and the resulting assignments.

type SpecVersionResponse

type SpecVersionResponse struct {
	Version   string          `json:"version"`
	Status    string          `json:"status"`
	Schema    json.RawMessage `json:"schema"`
	CreatedAt string          `json:"createdAt"`
}

SpecVersionResponse is one schema version on an event type.

type StatusChangeRequest

type StatusChangeRequest struct {
	Reason string `json:"reason"`
}

StatusChangeRequest — body for suspend / deactivate.

type StatusChangeResponse

type StatusChangeResponse struct {
	Message string `json:"message"`
}

StatusChangeResponse — { message } envelope from status-change endpoints.

type StatusTrack

type StatusTrack struct {
	Column    string `json:"column"`
	KeyColumn string `json:"keyColumn"`
	Pending   string `json:"pending"`
	Processed string `json:"processed"`
}

StatusTrack reads rows whose status column holds Pending and sets it to Processed once they are dispatch jobs.

func (StatusTrack) MarshalJSON

func (t StatusTrack) MarshalJSON() ([]byte, error)

type SubscriptionListResponse

type SubscriptionListResponse struct {
	Subscriptions []SubscriptionResponse `json:"subscriptions"`
	Total         uint64                 `json:"total,omitempty"`
}

SubscriptionListResponse — GET /api/subscriptions.

type SubscriptionResponse

type SubscriptionResponse struct {
	ID               string             `json:"id"`
	Code             string             `json:"code"`
	Name             string             `json:"name"`
	Description      string             `json:"description,omitempty"`
	ClientID         string             `json:"clientId,omitempty"`
	ClientIdentifier string             `json:"clientIdentifier,omitempty"`
	EventTypes       []EventTypeBinding `json:"eventTypes,omitempty"`
	Endpoint         string             `json:"endpoint"`
	ConnectionID     string             `json:"connectionId,omitempty"`
	Queue            string             `json:"queue,omitempty"`
	Source           string             `json:"source,omitempty"`
	Status           string             `json:"status"`
	MaxAgeSeconds    uint32             `json:"maxAgeSeconds,omitempty"`
	DispatchPoolID   string             `json:"dispatchPoolId,omitempty"`
	DispatchPoolCode string             `json:"dispatchPoolCode,omitempty"`
	DelaySeconds     uint32             `json:"delaySeconds,omitempty"`
	Sequence         int32              `json:"sequence,omitempty"`
	Mode             string             `json:"mode"`
	TimeoutSeconds   uint32             `json:"timeoutSeconds,omitempty"`
	MaxRetries       uint32             `json:"maxRetries,omitempty"`
	ServiceAccountID string             `json:"serviceAccountId,omitempty"`
	DataOnly         bool               `json:"dataOnly,omitempty"`
	ApplicationCode  string             `json:"applicationCode,omitempty"`
	ClientScoped     bool               `json:"clientScoped,omitempty"`
	CustomConfig     []ConfigEntry      `json:"customConfig,omitempty"`
	CreatedBy        string             `json:"createdBy,omitempty"`
	CreatedAt        string             `json:"createdAt"`
	UpdatedAt        string             `json:"updatedAt"`
}

SubscriptionResponse is the platform's subscription representation.

type SubscriptionsResource

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

SubscriptionsResource — /api/subscriptions/*.

func (*SubscriptionsResource) Create

Create — POST /api/subscriptions. Returns the new subscription's id; call Get for the subscription.

func (*SubscriptionsResource) Delete

func (r *SubscriptionsResource) Delete(ctx context.Context, id string) error

Delete — DELETE /api/subscriptions/{id}.

func (*SubscriptionsResource) Get

Get — GET /api/subscriptions/{id}.

func (*SubscriptionsResource) List

func (r *SubscriptionsResource) List(ctx context.Context, clientID, status string) (*SubscriptionListResponse, error)

List — GET /api/subscriptions?clientId=&status=.

func (*SubscriptionsResource) Pause

func (r *SubscriptionsResource) Pause(ctx context.Context, id string) error

Pause — POST /api/subscriptions/{id}/pause.

func (*SubscriptionsResource) Resume

func (r *SubscriptionsResource) Resume(ctx context.Context, id string) error

Resume — POST /api/subscriptions/{id}/resume.

func (*SubscriptionsResource) Sync

func (r *SubscriptionsResource) Sync(ctx context.Context, appCode string, req *SyncSubscriptionsRequest, removeUnlisted bool) (*SyncResult, error)

Sync — POST /api/applications/{appCode}/subscriptions/sync.

func (*SubscriptionsResource) Update

Update — PUT /api/subscriptions/{id}. The platform answers 204 No Content; call Get(id) for the updated subscription.

type SyncConnectionItem

type SyncConnectionItem struct {
	Code        string `json:"code"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	ExternalID  string `json:"externalId,omitempty"`
}

SyncConnectionItem — one connection in the per-app sync payload. A connection carries nothing environment-specific: the platform assigns the application's own service account, so one definition serves every environment. It exists so a subscription's ConnectionCode resolves.

type SyncConnectionsRequest

type SyncConnectionsRequest struct {
	ClientID    string               `json:"clientId,omitempty"`
	Connections []SyncConnectionItem `json:"connections"`
}

SyncConnectionsRequest — body for the per-app sync endpoint. ClientID scopes the batch to one client: its id or its identifier slug (prefer the slug). Empty syncs global connections.

type SyncDispatchPoolItem

type SyncDispatchPoolItem struct {
	Code        string `json:"code"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Concurrency uint32 `json:"concurrency,omitempty"`
	// RateLimit is messages per minute; nil for concurrency-only.
	RateLimit *uint32 `json:"rateLimit,omitempty"`
}

SyncDispatchPoolItem — one item in the sync payload.

type SyncDispatchPoolsRequest

type SyncDispatchPoolsRequest struct {
	Pools []SyncDispatchPoolItem `json:"pools"`
}

SyncDispatchPoolsRequest — body for the per-app sync endpoint.

type SyncDocInput

type SyncDocInput struct {
	Slug    string `json:"slug"`
	Title   string `json:"title,omitempty"`
	Content string `json:"content"`
}

SyncDocInput — one documentation page. Slug is the page id, kebab-case and unique within the application; Content is Markdown (Mermaid fences render as diagrams); Title defaults to the content's first "# " heading, then the slug.

type SyncDocsRequest

type SyncDocsRequest struct {
	Docs []SyncDocInput `json:"docs"`
}

SyncDocsRequest — body for POST /api/applications/{appCode}/docs/sync.

type SyncEventTypeItem

type SyncEventTypeItem struct {
	Code        string `json:"code"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

SyncEventTypeItem is one event type in the per-app sync payload. The sync declares code, name and description only: schemas are added with AddSchemaVersion.

type SyncEventTypesRequest

type SyncEventTypesRequest struct {
	EventTypes []SyncEventTypeItem `json:"eventTypes"`
}

SyncEventTypesRequest is the body for the per-app sync endpoint.

type SyncOpenAPISpecRequest

type SyncOpenAPISpecRequest struct {
	Spec json.RawMessage `json:"spec"`
}

SyncOpenAPISpecRequest — body for POST /api/applications/{appCode}/openapi/sync.

type SyncOpenAPISpecResponse

type SyncOpenAPISpecResponse struct {
	ApplicationCode      string `json:"applicationCode"`
	SpecID               string `json:"specId"`
	Version              string `json:"version"`
	Status               string `json:"status"`
	ArchivedPriorVersion string `json:"archivedPriorVersion,omitempty"`
	HasBreaking          bool   `json:"hasBreaking"`
	// Unchanged is true when the submitted spec is byte-identical to the
	// currently published version — the platform short-circuits and
	// returns the existing SpecID/Version.
	Unchanged bool `json:"unchanged"`
}

SyncOpenAPISpecResponse — result of an openapi sync.

type SyncPrincipalItem

type SyncPrincipalItem struct {
	Email  string   `json:"email"`
	Name   string   `json:"name"`
	Roles  []string `json:"roles,omitempty"`
	Active bool     `json:"active"`
	// PasswordHash carries an already-hashed credential (e.g. an upstream
	// Laravel bcrypt/argon2i hash) so a migrated user keeps their existing
	// password. Stored verbatim by the platform — NOT re-hashed; the login
	// flow verifies it and re-encodes it to the native scheme on first login.
	// Omit (nil) for OIDC users or to leave an existing password untouched.
	PasswordHash *string `json:"passwordHash,omitempty"`
}

SyncPrincipalItem — one entry in the per-app sync payload. Matched by email. Role names omit the `<app>:` prefix — the platform adds it.

type SyncPrincipalsRequest

type SyncPrincipalsRequest struct {
	Principals []SyncPrincipalItem `json:"principals"`
}

SyncPrincipalsRequest — body for the per-app sync endpoint.

type SyncProcessInput

type SyncProcessInput struct {
	Code        string   `json:"code"`
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	Body        string   `json:"body,omitempty"`
	DiagramType string   `json:"diagramType,omitempty"`
	Tags        []string `json:"tags,omitempty"`
}

SyncProcessInput — one item in the sync payload.

type SyncProcessesRequest

type SyncProcessesRequest struct {
	Processes []SyncProcessInput `json:"processes"`
}

SyncProcessesRequest — body for the per-app sync endpoint.

type SyncResult

type SyncResult struct {
	ApplicationCode string   `json:"applicationCode"`
	Created         uint32   `json:"created"`
	Updated         uint32   `json:"updated"`
	Deleted         uint32   `json:"deleted"`
	SyncedCodes     []string `json:"syncedCodes"`
	// PasswordHashIgnored (principal syncs only): the emails, lower-cased,
	// whose passwordHash was ignored because the user already exists (the
	// platform stores a hash only on a user the sync creates).
	PasswordHashIgnored []string `json:"passwordHashIgnored,omitempty"`
	// SkippedRoles (application principal sync only): role names that are
	// not roles and so were assigned to no one (lower-cased, each once, in
	// payload order). The rest of the sync applied.
	SkippedRoles []string `json:"skippedRoles,omitempty"`
}

SyncResult is the response body returned by every per-resource sync endpoint.

type SyncRoleItem

type SyncRoleItem struct {
	Name          string   `json:"name"`
	DisplayName   string   `json:"displayName,omitempty"`
	Description   string   `json:"description,omitempty"`
	Permissions   []string `json:"permissions,omitempty"`
	ClientManaged bool     `json:"clientManaged,omitempty"`
}

SyncRoleItem — one entry in the per-app sync payload.

type SyncRolesRequest

type SyncRolesRequest struct {
	Roles []SyncRoleItem `json:"roles"`
}

SyncRolesRequest — body for the per-app sync endpoint.

type SyncScheduledJobItem

type SyncScheduledJobItem struct {
	Code             string          `json:"code"`
	Name             string          `json:"name"`
	Description      string          `json:"description,omitempty"`
	Crons            []string        `json:"crons"`
	Timezone         string          `json:"timezone,omitempty"`
	Payload          json.RawMessage `json:"payload,omitempty"`
	Concurrent       bool            `json:"concurrent,omitempty"`
	TracksCompletion bool            `json:"tracksCompletion,omitempty"`
	TimeoutSeconds   *int32          `json:"timeoutSeconds,omitempty"`
	// DeliveryMaxAttempts: defaults to 3 server-side when omitted (nil).
	DeliveryMaxAttempts *int32 `json:"deliveryMaxAttempts,omitempty"`
	TargetURL           string `json:"targetUrl,omitempty"`
}

SyncScheduledJobItem — one entry in the sync payload.

type SyncScheduledJobsRequest

type SyncScheduledJobsRequest struct {
	ClientID        string                 `json:"clientId,omitempty"`
	Jobs            []SyncScheduledJobItem `json:"jobs"`
	ArchiveUnlisted bool                   `json:"archiveUnlisted,omitempty"`
}

SyncScheduledJobsRequest — body for the per-app sync endpoint. ClientID empty syncs platform-scoped jobs (anchor only). ArchiveUnlisted archives jobs not in the list (note: this is in the body, not the query — distinct from other sync endpoints).

type SyncScheduledJobsResult

type SyncScheduledJobsResult struct {
	ApplicationCode string   `json:"applicationCode"`
	Created         []string `json:"created"`
	Updated         []string `json:"updated"`
	Archived        []string `json:"archived"`
}

SyncScheduledJobsResult — distinct shape from other sync endpoints: returns per-code lists rather than counts.

type SyncSubscriptionItem

type SyncSubscriptionItem struct {
	Code         string `json:"code"`
	Name         string `json:"name"`
	Description  string `json:"description,omitempty"`
	Target       string `json:"target"`
	ConnectionID string `json:"connectionId,omitempty"`
	// ConnectionCode names the delivering connection by code, stable across
	// environments (prefer it to ConnectionID). It resolves among this
	// application's connections, or among the shared (application-less)
	// ones when SharedConnection is set; a client-scoped sync prefers its
	// client's connection and falls back to a global one.
	ConnectionCode   string             `json:"connectionCode,omitempty"`
	SharedConnection bool               `json:"sharedConnection,omitempty"`
	EventTypes       []EventTypeBinding `json:"eventTypes"`
	DispatchPoolCode string             `json:"dispatchPoolCode,omitempty"`
	Mode             string             `json:"mode,omitempty"`
	MaxRetries       *uint32            `json:"maxRetries,omitempty"`
	TimeoutSeconds   *uint32            `json:"timeoutSeconds,omitempty"`
	DataOnly         bool               `json:"dataOnly,omitempty"`
}

SyncSubscriptionItem matches the platform's SyncSubscriptionInput.

type SyncSubscriptionsRequest

type SyncSubscriptionsRequest struct {
	ClientID      string                 `json:"clientId,omitempty"`
	Subscriptions []SyncSubscriptionItem `json:"subscriptions"`
}

SyncSubscriptionsRequest — body for the per-app sync endpoint. ClientID scopes the batch to one client: its id or its identifier slug (prefer the slug: ids differ per environment). Empty syncs global subscriptions.

type SyncUsersResult

type SyncUsersResult struct {
	Created      uint32   `json:"created"`
	Updated      uint32   `json:"updated"`
	Deleted      uint32   `json:"deleted"`
	SyncedEmails []string `json:"syncedEmails"`
	// PasswordHashIgnored lists the emails (lower-cased) whose passwordHash
	// was ignored because the user already exists.
	PasswordHashIgnored []string `json:"passwordHashIgnored,omitempty"`
}

SyncUsersResult — the response of POST /api/principals/sync. Unlike the per-application syncs it names the synced principals by email, and carries no application code.

type TestIngestionRequest

type TestIngestionRequest struct {
	IngestionID string               `json:"ingestionId,omitempty"`
	Application string               `json:"application,omitempty"`
	Client      string               `json:"client,omitempty"`
	Definition  *IngestionDefinition `json:"definition,omitempty"`
}

TestIngestionRequest — POST /api/ingestion-tests. Give IngestionID to test a saved ingestion's live definition, or Application, Client and Definition to test one without saving it.

type TokenProvider

type TokenProvider func(ctx context.Context) (string, error)

TokenProvider returns a fresh bearer token (without the "Bearer " prefix) each time the client needs to make a request. Implementations MUST be safe for concurrent use.

type Unrecognized

type Unrecognized struct {
	// Raw is the member's JSON, kind included.
	Raw json.RawMessage
}

Unrecognized is a union member this SDK has no type for: a kind the platform or a runtime extension added later, or an object without a kind. It keeps the JSON as read and writes it back unchanged.

func (Unrecognized) Kind

func (u Unrecognized) Kind() string

Kind is the member's "kind", empty when it has none.

func (Unrecognized) MarshalJSON

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

MarshalJSON writes the member as it was read.

type UpdateApplicationRequest

type UpdateApplicationRequest struct {
	Name           *string `json:"name,omitempty"`
	Description    *string `json:"description,omitempty"`
	DefaultBaseURL *string `json:"defaultBaseUrl,omitempty"`
	IconURL        *string `json:"iconUrl,omitempty"`
	LogoMimeType   *string `json:"logoMimeType,omitempty"`
	Website        *string `json:"website,omitempty"`
}

UpdateApplicationRequest — PUT /api/applications/{id}.

type UpdateClientApplicationsRequest

type UpdateClientApplicationsRequest struct {
	EnabledApplicationIDs []string `json:"enabledApplicationIds"`
}

UpdateClientApplicationsRequest — bulk enable/disable.

type UpdateClientRequest

type UpdateClientRequest struct {
	Name *string `json:"name,omitempty"`
}

UpdateClientRequest — PUT /api/clients/{id}.

type UpdateConnectionRequest

type UpdateConnectionRequest struct {
	// Name is required by the platform on every update.
	Name        string  `json:"name"`
	Description *string `json:"description,omitempty"`
	ExternalID  *string `json:"externalId,omitempty"`
	Status      *string `json:"status,omitempty"`
	// ApplicationCode re-homes the connection to that application.
	ApplicationCode *string `json:"applicationCode,omitempty"`
}

UpdateConnectionRequest — PUT /api/connections/{id}.

type UpdateDispatchPoolRequest

type UpdateDispatchPoolRequest struct {
	Name        *string `json:"name,omitempty"`
	Description *string `json:"description,omitempty"`
	Concurrency *uint32 `json:"concurrency,omitempty"`
	RateLimit   *uint32 `json:"rateLimit,omitempty"`
}

UpdateDispatchPoolRequest — PUT /api/dispatch-pools/{id}.

type UpdateEventTypeRequest

type UpdateEventTypeRequest struct {
	// Name is required by the platform on every update.
	Name         string  `json:"name"`
	Description  *string `json:"description,omitempty"`
	ClientScoped *bool   `json:"clientScoped,omitempty"`
}

UpdateEventTypeRequest is the body for PUT /api/event-types/{id}.

type UpdateFieldWorkerRequest added in v0.0.12

type UpdateFieldWorkerRequest struct {
	Name  string  `json:"name"`
	Email *string `json:"email,omitempty"`
}

UpdateFieldWorkerRequest — PUT /api/field-workers/{id}.

type UpdateIngestionRequest

type UpdateIngestionRequest struct {
	// ExpectedVersion is the live version the caller read (0 when none is
	// live); a different current version is a 409.
	ExpectedVersion    int64           `json:"expectedVersion"`
	Name               string          `json:"name"`
	Note               string          `json:"note,omitempty"`
	Source             IngestionSource `json:"source"`
	Split              IngestionSplit  `json:"split"`
	Target             IngestionTarget `json:"target"`
	KeepFailedPayloads bool            `json:"keepFailedPayloads,omitempty"`
}

UpdateIngestionRequest — PUT /api/ingestions/{id}.

type UpdatePrincipalRequest

type UpdatePrincipalRequest struct {
	Name   *string `json:"name,omitempty"`
	Email  *string `json:"email,omitempty"`
	Active *bool   `json:"active,omitempty"`
}

UpdatePrincipalRequest — PUT /api/principals/{id}.

type UpdateProcessRequest

type UpdateProcessRequest struct {
	Name        *string  `json:"name,omitempty"`
	Description *string  `json:"description,omitempty"`
	Body        *string  `json:"body,omitempty"`
	DiagramType *string  `json:"diagramType,omitempty"`
	Tags        []string `json:"tags,omitempty"`
}

UpdateProcessRequest — PUT /api/processes/{id}. Nil leaves a field as is.

type UpdateRoleRequest

type UpdateRoleRequest struct {
	DisplayName   *string `json:"displayName,omitempty"`
	Description   *string `json:"description,omitempty"`
	ClientManaged *bool   `json:"clientManaged,omitempty"`
	// Permissions replaces the role's permission set when non-nil.
	Permissions []string `json:"permissions,omitempty"`
}

UpdateRoleRequest — PUT /api/roles/{name}.

type UpdateScheduledJobRequest

type UpdateScheduledJobRequest struct {
	Name                *string         `json:"name,omitempty"`
	Description         *string         `json:"description,omitempty"`
	Crons               []string        `json:"crons,omitempty"`
	Timezone            *string         `json:"timezone,omitempty"`
	Payload             json.RawMessage `json:"payload,omitempty"`
	Concurrent          *bool           `json:"concurrent,omitempty"`
	TracksCompletion    *bool           `json:"tracksCompletion,omitempty"`
	TimeoutSeconds      *int32          `json:"timeoutSeconds,omitempty"`
	DeliveryMaxAttempts *int32          `json:"deliveryMaxAttempts,omitempty"`
	TargetURL           *string         `json:"targetUrl,omitempty"`
}

UpdateScheduledJobRequest — PUT /api/scheduled-jobs/{id}. All optional.

type UpdateSubscriptionRequest

type UpdateSubscriptionRequest struct {
	Name           *string `json:"name,omitempty"`
	Description    *string `json:"description,omitempty"`
	Endpoint       *string `json:"endpoint,omitempty"`
	ConnectionID   *string `json:"connectionId,omitempty"`
	TimeoutSeconds *uint32 `json:"timeoutSeconds,omitempty"`
	MaxRetries     *uint32 `json:"maxRetries,omitempty"`
	// The members below replace the stored value when non-nil.
	EventTypes       *[]EventTypeBinding `json:"eventTypes,omitempty"`
	CustomConfig     *[]ConfigEntry      `json:"customConfig,omitempty"`
	DispatchPoolID   *string             `json:"dispatchPoolId,omitempty"`
	ServiceAccountID *string             `json:"serviceAccountId,omitempty"`
	Mode             *string             `json:"mode,omitempty"`
	DataOnly         *bool               `json:"dataOnly,omitempty"`
	MaxAgeSeconds    *uint32             `json:"maxAgeSeconds,omitempty"`
	DelaySeconds     *uint32             `json:"delaySeconds,omitempty"`
	Queue            *string             `json:"queue,omitempty"`
}

UpdateSubscriptionRequest — PUT /api/subscriptions/{id}.

type WatermarkTrack

type WatermarkTrack struct {
	Column string `json:"column"`
	Type   string `json:"type"`
}

WatermarkTrack reads rows in the order of a column that only grows and keeps the highest value read outside the table. Type is NUMBER or TIMESTAMP.

func (WatermarkTrack) MarshalJSON

func (t WatermarkTrack) MarshalJSON() ([]byte, error)

type XMLSplit

type XMLSplit struct {
	Element string `json:"element"`
}

XMLSplit makes one record per occurrence of Element.

func (XMLSplit) MarshalJSON

func (s XMLSplit) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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