openapi

package
v0.0.0-...-1b2da27 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 2 Imported by: 0

README

OpenAPI Definitions

This package contains Go types generated from OpenAPI specs defined in https://github.com/amp-labs/openapi.

Generating Go Types

Generated Go types live in *.gen.go files in this directory.

If you haven't yet, you'll first need to install oapi-codegen:

go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest

To regenerate the Go structs, run:

make gen

Updating types

  • Make changes to the OpenAPI specs in the openapi repo.
  • Run make gen/<yaml> in this repo to generate Go types.
  • Create a PR in this repo with the changes.

Documentation

Overview

Package openapi provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.

Package openapi provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssociationChangeEvent

type AssociationChangeEvent struct {
	// Enabled If always, the integration will subscribe to association change events.
	Enabled *AssociationChangeEventEnabled `json:"enabled,omitempty"`

	// IncludeFullRecords If true, the integration will include full records in the event payload.
	IncludeFullRecords *bool `json:"includeFullRecords,omitempty"`
}

AssociationChangeEvent defines model for AssociationChangeEvent.

type AssociationChangeEventEnabled

type AssociationChangeEventEnabled string

AssociationChangeEventEnabled If always, the integration will subscribe to association change events.

const (
	AssociationChangeEventEnabledAlways AssociationChangeEventEnabled = "always"
)

Defines values for AssociationChangeEventEnabled.

type Backfill

type Backfill struct {
	DefaultPeriod DefaultPeriod `json:"defaultPeriod"`
}

Backfill defines model for Backfill.

type BackfillConfig

type BackfillConfig struct {
	DefaultPeriod DefaultPeriodConfig `json:"defaultPeriod"`
}

BackfillConfig defines model for BackfillConfig.

type BaseConfigContent

type BaseConfigContent struct {
	// Module The SaaS module that we are integrating with.
	Module string `json:"module,omitempty"`

	// Provider The SaaS API that we are integrating with.
	Provider *string          `json:"provider,omitempty"`
	Proxy    *BaseProxyConfig `json:"proxy,omitempty"`
	Read     *BaseReadConfig  `json:"read,omitempty"`
	Write    *BaseWriteConfig `json:"write,omitempty"`
}

BaseConfigContent defines model for BaseConfigContent.

type BaseProxyConfig

type BaseProxyConfig struct {
	Enabled *bool `json:"enabled,omitempty"`

	// UseModule Default is false. If this is set to true, the base URL for the proxy action will be the module's base URL. Otherwise, it is assumed that the base URL is the provider's root base URL.
	UseModule *bool `json:"useModule,omitempty"`
}

BaseProxyConfig defines model for BaseProxyConfig.

type BaseReadConfig

type BaseReadConfig struct {
	// Objects This is a map of object names to their configuration.
	Objects *map[string]BaseReadConfigObject `json:"objects,omitempty"`
}

BaseReadConfig defines model for BaseReadConfig.

type BaseReadConfigObject

type BaseReadConfigObject struct {
	Backfill *BackfillConfig `json:"backfill,omitempty"`

	// Destination The name of the destination that the result should be sent to.
	Destination string `json:"destination,omitempty"`

	// Disabled If this flag is set to true, scheduled reads associated with this object will be paused, and on-demand reads will not be allowed.
	Disabled *bool `json:"disabled,omitempty"`

	// DynamicMappingsInput An array containing all available dynamic field and value mappings for this installation, provided by the InstallIntegration component. This array represents the complete set of possible mappings, regardless of which ones are currently selected. The actual selected mappings are stored separately in the selectedFieldMappings property.
	DynamicMappingsInput *DynamicMappingsInput `json:"dynamicMappingsInput,omitempty"`

	// ObjectName The name of the object to read from.
	ObjectName *string `json:"objectName,omitempty" validate:"required"`

	// Schedule The schedule for reading the object, in cron syntax.
	Schedule string `json:"schedule,omitempty"`

	// SelectedFieldMappings This is a map of mapToNames to field names. (A mapTo name is the name the builder wants to map a field to when it lands in their destination.)
	SelectedFieldMappings *map[string]string `json:"selectedFieldMappings,omitempty"`

	// SelectedFields This is a map of field names to booleans indicating whether they should be read. If a field is already included in `selectedFieldMappings`, it does not need to be included here.
	SelectedFields *map[string]bool `json:"selectedFields,omitempty"`

	// SelectedFieldsAuto If selectedFieldsAuto is set to all, all fields will be read.
	SelectedFieldsAuto *SelectedFieldsAutoConfig `json:"selectedFieldsAuto,omitempty"`

	// SelectedValueMappings This is a map of field names to their value mappings.
	SelectedValueMappings map[string]SelectedValueMappings `json:"selectedValueMappings,omitempty"`
}

BaseReadConfigObject defines model for BaseReadConfigObject.

type BaseSubscribeConfig

type BaseSubscribeConfig struct {
	Objects *map[string]BaseSubscribeConfigObject `json:"objects,omitempty"`
}

BaseSubscribeConfig defines model for BaseSubscribeConfig.

type BaseSubscribeConfigObject

type BaseSubscribeConfigObject struct {
	CreateEvent *ConfigCreateEvent `json:"createEvent,omitempty"`
	DeleteEvent *ConfigDeleteEvent `json:"deleteEvent,omitempty"`

	// Destination The name of the destination that the result should be sent to.
	Destination string `json:"destination"`

	// InheritFieldsAndMappings Whether to inherit fields and mappings from the read config.
	InheritFieldsAndMappings bool `json:"inheritFieldsAndMappings"`

	// ObjectName The name of the object to subscribe to.
	ObjectName  string             `json:"objectName" validate:"required"`
	UpdateEvent *ConfigUpdateEvent `json:"updateEvent,omitempty"`
}

BaseSubscribeConfigObject defines model for BaseSubscribeConfigObject.

type BaseWriteConfig

type BaseWriteConfig struct {
	// Objects This is a map of object names to their configuration.
	Objects *map[string]BaseWriteConfigObject `json:"objects,omitempty"`
}

BaseWriteConfig defines model for BaseWriteConfig.

type BaseWriteConfigObject

type BaseWriteConfigObject struct {
	// ObjectName The name of the object to write to.
	ObjectName string `json:"objectName" validate:"required"`

	// SelectedFieldSettings This is a map of field names to their settings.
	SelectedFieldSettings map[string]FieldSetting `json:"selectedFieldSettings,omitempty"`

	// SelectedValueDefaults This is a map of field names to default values. These values will be used when writing to the object.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	SelectedValueDefaults map[string]ValueDefault `json:"selectedValueDefaults,omitempty"`
}

BaseWriteConfigObject defines model for BaseWriteConfigObject.

type ConfigContent

type ConfigContent struct {
	// Module The SaaS module that we are integrating with.
	Module string `json:"module,omitempty"`

	// Provider The SaaS API that we are integrating with.
	Provider  string           `json:"provider"`
	Proxy     *BaseProxyConfig `json:"proxy,omitempty"`
	Read      *ReadConfig      `json:"read,omitempty"`
	Subscribe *SubscribeConfig `json:"subscribe,omitempty"`
	Write     *WriteConfig     `json:"write,omitempty"`
}

ConfigContent defines model for ConfigContent.

type ConfigCreateEvent

type ConfigCreateEvent struct {
	// Enabled Conditions to enable create events.
	Enabled ConfigCreateEventEnabled `json:"enabled" validate:"oneof=always never"`
}

ConfigCreateEvent defines model for ConfigCreateEvent.

type ConfigCreateEventEnabled

type ConfigCreateEventEnabled string

ConfigCreateEventEnabled Conditions to enable create events.

const (
	ConfigCreateEventEnabledAlways ConfigCreateEventEnabled = "always"
	ConfigCreateEventEnabledNever  ConfigCreateEventEnabled = "never"
)

Defines values for ConfigCreateEventEnabled.

type ConfigDeleteEvent

type ConfigDeleteEvent struct {
	// Enabled Conditions to enable delete events.
	Enabled ConfigDeleteEventEnabled `json:"enabled" validate:"oneof=always never"`
}

ConfigDeleteEvent defines model for ConfigDeleteEvent.

type ConfigDeleteEventEnabled

type ConfigDeleteEventEnabled string

ConfigDeleteEventEnabled Conditions to enable delete events.

const (
	ConfigDeleteEventEnabledAlways ConfigDeleteEventEnabled = "always"
	ConfigDeleteEventEnabledNever  ConfigDeleteEventEnabled = "never"
)

Defines values for ConfigDeleteEventEnabled.

type ConfigUpdateEvent

type ConfigUpdateEvent struct {
	// Enabled Conditions to enable update events.
	Enabled ConfigUpdateEventEnabled `json:"enabled" validate:"oneof=always never"`

	// RequiredWatchFields The fields that should be watched.
	RequiredWatchFields *[]string `json:"requiredWatchFields,omitempty"`

	// WatchFieldsAuto Whether to watch fields all fields automatically.
	WatchFieldsAuto *ConfigUpdateEventWatchFieldsAuto `json:"watchFieldsAuto,omitempty"`
}

ConfigUpdateEvent defines model for ConfigUpdateEvent.

type ConfigUpdateEventEnabled

type ConfigUpdateEventEnabled string

ConfigUpdateEventEnabled Conditions to enable update events.

const (
	ConfigUpdateEventEnabledAlways ConfigUpdateEventEnabled = "always"
	ConfigUpdateEventEnabledNever  ConfigUpdateEventEnabled = "never"
)

Defines values for ConfigUpdateEventEnabled.

type ConfigUpdateEventWatchFieldsAuto

type ConfigUpdateEventWatchFieldsAuto string

ConfigUpdateEventWatchFieldsAuto Whether to watch fields all fields automatically.

const (
	All ConfigUpdateEventWatchFieldsAuto = "all"
)

Defines values for ConfigUpdateEventWatchFieldsAuto.

type CreateEvent

type CreateEvent struct {
	// Enabled If always, the integration will subscribe to create events by default.
	Enabled *CreateEventEnabled `json:"enabled,omitempty"`
}

CreateEvent defines model for CreateEvent.

type CreateEventEnabled

type CreateEventEnabled string

CreateEventEnabled If always, the integration will subscribe to create events by default.

const (
	CreateEventEnabledAlways CreateEventEnabled = "always"
)

Defines values for CreateEventEnabled.

type DefaultPeriod

type DefaultPeriod struct {
	// Days Number of days in past to backfill from. 0 is no backfill. e.g) if 10, then backfill last 10 days of data. Required if fullHistory is not set.
	Days *int `json:"days,omitempty" validate:"required_without=FullHistory,omitempty,min=0"`

	// FullHistory If true, backfill all history. Required if days is not set.
	FullHistory *bool `json:"fullHistory,omitempty" validate:"required_without=Days"`
}

DefaultPeriod defines model for DefaultPeriod.

type DefaultPeriodConfig

type DefaultPeriodConfig struct {
	// Days Number of days in past to backfill from. 0 is no backfill. e.g) if 10, then backfill last 10 days of data. Required if fullHistory is not set.
	Days *int `json:"days,omitempty" validate:"required_without=FullHistory,omitempty,min=0"`

	// FullHistory If true, backfill all history. Required if days is not set.
	FullHistory *bool `json:"fullHistory,omitempty" validate:"required_without=Days"`
}

DefaultPeriodConfig defines model for DefaultPeriodConfig.

type DeleteEvent

type DeleteEvent struct {
	// Enabled If always, the integration will subscribe to delete events by default.
	Enabled *DeleteEventEnabled `json:"enabled,omitempty"`
}

DeleteEvent defines model for DeleteEvent.

type DeleteEventEnabled

type DeleteEventEnabled string

DeleteEventEnabled If always, the integration will subscribe to delete events by default.

const (
	DeleteEventEnabledAlways DeleteEventEnabled = "always"
)

Defines values for DeleteEventEnabled.

type Delivery

type Delivery struct {
	// Mode The data delivery mode for this object. If not specified, defaults to automatic.
	Mode *DeliveryMode `json:"mode,omitempty"`

	// PageSize The number of records to receive per data delivery.
	PageSize *int `json:"pageSize,omitempty"`
}

Delivery defines model for Delivery.

type DeliveryMode

type DeliveryMode string

DeliveryMode The data delivery mode for this object. If not specified, defaults to automatic.

const (
	Auto      DeliveryMode = "auto"
	OnRequest DeliveryMode = "onRequest"
)

Defines values for DeliveryMode.

type DynamicMappingsInput

type DynamicMappingsInput = []DynamicMappingsInputEntry

DynamicMappingsInput An array containing all available dynamic field and value mappings for this installation, provided by the InstallIntegration component. This array represents the complete set of possible mappings, regardless of which ones are currently selected. The actual selected mappings are stored separately in the selectedFieldMappings property.

type DynamicMappingsInputEntry

type DynamicMappingsInputEntry struct {
	// FieldName The name of the field in SaaS provider, if present, then we will not prompt the user to map the field.
	FieldName *string `json:"fieldName,omitempty"`

	// MapToDisplayName Optional display name of the field to show the user in the mapping UI.
	MapToDisplayName *string `json:"mapToDisplayName,omitempty"`

	// MapToName The name of the field in your application.
	MapToName string `json:"mapToName"`

	// MappedValues If you would like the user to map a set of possible values, this is the list of possible values of the field in your application.
	MappedValues *[]DynamicMappingsInputMappedValue `json:"mappedValues,omitempty"`

	// Prompt Optional prompt to show the user in the mapping UI.
	Prompt *string `json:"prompt,omitempty"`
}

DynamicMappingsInputEntry defines model for DynamicMappingsInputEntry.

type DynamicMappingsInputMappedValue

type DynamicMappingsInputMappedValue struct {
	MappedDisplayValue string `json:"mappedDisplayValue"`
	MappedValue        string `json:"mappedValue"`
}

DynamicMappingsInputMappedValue defines model for DynamicMappingsInputMappedValue.

type FieldMetadata

type FieldMetadata struct {
	// DisplayName The display name of the field from the provider API.
	DisplayName string `json:"displayName"`

	// FieldName The name of the field from the provider API.
	FieldName string `json:"fieldName"`

	// ProviderType Raw field type from the provider API.
	ProviderType string `json:"providerType,omitempty"`

	// ReadOnly Whether the field is read-only.
	ReadOnly bool `json:"readOnly,omitempty"`

	// ValueType A normalized field type
	ValueType FieldMetadataValueType `json:"valueType,omitempty"`

	// Values If the valueType is singleSelect or multiSelect, this is a list of possible values
	Values []FieldValue `json:"values,omitempty"`
}

FieldMetadata Metadata about a field. Please note that different providers have different levels of support for field metadata. Please reach out to support@withampersand.com if need expanded support for a particular provider.

type FieldMetadataValueType

type FieldMetadataValueType string

FieldMetadataValueType A normalized field type

const (
	Boolean      FieldMetadataValueType = "boolean"
	Date         FieldMetadataValueType = "date"
	Datetime     FieldMetadataValueType = "datetime"
	Float        FieldMetadataValueType = "float"
	Int          FieldMetadataValueType = "int"
	MultiSelect  FieldMetadataValueType = "multiSelect"
	Other        FieldMetadataValueType = "other"
	SingleSelect FieldMetadataValueType = "singleSelect"
	String       FieldMetadataValueType = "string"
)

Defines values for FieldMetadataValueType.

type FieldSetting

type FieldSetting struct {
	// Default Only use one of stringValue, integerValue, booleanValue.
	Default *FieldSettingDefault `json:"default,omitempty"`

	// WriteOnCreate Whether the default value should be applied when creating a record.
	WriteOnCreate FieldSettingWriteOnCreate `json:"writeOnCreate,omitempty"`

	// WriteOnUpdate Whether the default value should be applied when updating a record.
	WriteOnUpdate FieldSettingWriteOnUpdate `json:"writeOnUpdate,omitempty"`
}

FieldSetting defines model for FieldSetting.

type FieldSettingDefault

type FieldSettingDefault struct {
	// BooleanValue The default boolean value to apply to a field
	BooleanValue *bool `json:"booleanValue,omitempty"`

	// IntegerValue The default integer value to apply to a field
	IntegerValue *int `json:"integerValue,omitempty"`

	// StringValue The default string value to apply to a field
	StringValue *string `json:"stringValue,omitempty"`
}

FieldSettingDefault Only use one of stringValue, integerValue, booleanValue.

type FieldSettingWriteOnCreate

type FieldSettingWriteOnCreate string

FieldSettingWriteOnCreate Whether the default value should be applied when creating a record.

const (
	FieldSettingWriteOnCreateAlways FieldSettingWriteOnCreate = "always"
	FieldSettingWriteOnCreateNever  FieldSettingWriteOnCreate = "never"
)

Defines values for FieldSettingWriteOnCreate.

type FieldSettingWriteOnUpdate

type FieldSettingWriteOnUpdate string

FieldSettingWriteOnUpdate Whether the default value should be applied when updating a record.

const (
	FieldSettingWriteOnUpdateAlways FieldSettingWriteOnUpdate = "always"
	FieldSettingWriteOnUpdateNever  FieldSettingWriteOnUpdate = "never"
)

Defines values for FieldSettingWriteOnUpdate.

type FieldValue

type FieldValue struct {
	// DisplayValue The human-readable display value
	DisplayValue string `json:"displayValue"`

	// Value The internal value used by the system
	Value string `json:"value"`
}

FieldValue Represents a field value

type HydratedIntegration

type HydratedIntegration struct {
	DisplayName string                    `json:"displayName,omitempty"`
	Module      string                    `json:"module,omitempty"`
	Name        string                    `json:"name"`
	Provider    string                    `json:"provider"`
	Proxy       *HydratedIntegrationProxy `json:"proxy,omitempty"`
	Read        *HydratedIntegrationRead  `json:"read,omitempty"`
	Write       *HydratedIntegrationWrite `json:"write,omitempty"`
}

HydratedIntegration defines model for HydratedIntegration.

type HydratedIntegrationField

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

HydratedIntegrationField defines model for HydratedIntegrationField.

func (HydratedIntegrationField) AsHydratedIntegrationFieldExistent

func (t HydratedIntegrationField) AsHydratedIntegrationFieldExistent() (HydratedIntegrationFieldExistent, error)

AsHydratedIntegrationFieldExistent returns the union data inside the HydratedIntegrationField as a HydratedIntegrationFieldExistent

func (HydratedIntegrationField) AsIntegrationFieldMapping

func (t HydratedIntegrationField) AsIntegrationFieldMapping() (IntegrationFieldMapping, error)

AsIntegrationFieldMapping returns the union data inside the HydratedIntegrationField as a IntegrationFieldMapping

func (*HydratedIntegrationField) FromHydratedIntegrationFieldExistent

func (t *HydratedIntegrationField) FromHydratedIntegrationFieldExistent(v HydratedIntegrationFieldExistent) error

FromHydratedIntegrationFieldExistent overwrites any union data inside the HydratedIntegrationField as the provided HydratedIntegrationFieldExistent

func (*HydratedIntegrationField) FromIntegrationFieldMapping

func (t *HydratedIntegrationField) FromIntegrationFieldMapping(v IntegrationFieldMapping) error

FromIntegrationFieldMapping overwrites any union data inside the HydratedIntegrationField as the provided IntegrationFieldMapping

func (HydratedIntegrationField) MarshalJSON

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

func (*HydratedIntegrationField) MergeHydratedIntegrationFieldExistent

func (t *HydratedIntegrationField) MergeHydratedIntegrationFieldExistent(v HydratedIntegrationFieldExistent) error

MergeHydratedIntegrationFieldExistent performs a merge with any union data inside the HydratedIntegrationField, using the provided HydratedIntegrationFieldExistent

func (*HydratedIntegrationField) MergeIntegrationFieldMapping

func (t *HydratedIntegrationField) MergeIntegrationFieldMapping(v IntegrationFieldMapping) error

MergeIntegrationFieldMapping performs a merge with any union data inside the HydratedIntegrationField, using the provided IntegrationFieldMapping

func (*HydratedIntegrationField) UnmarshalJSON

func (t *HydratedIntegrationField) UnmarshalJSON(b []byte) error

type HydratedIntegrationFieldExistent

type HydratedIntegrationFieldExistent struct {
	DisplayName string `json:"displayName"`
	FieldName   string `json:"fieldName"`

	// MapToDisplayName The display name to map to in the destination.
	MapToDisplayName string `json:"mapToDisplayName,omitempty"`

	// MapToName The field name to map to in the destination.
	MapToName string `json:"mapToName,omitempty"`
}

HydratedIntegrationFieldExistent defines model for HydratedIntegrationFieldExistent.

type HydratedIntegrationObject

type HydratedIntegrationObject struct {
	// AllFields This is a list of all fields on the object for a particular SaaS instance, including their display names. Prefer using allFieldsMetadata instead.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	AllFields *[]HydratedIntegrationField `json:"allFields,omitempty"`

	// AllFieldsMetadata This is a map of all fields on the object including their metadata (such as display name and type), the keys of the map are the field names.
	AllFieldsMetadata *map[string]FieldMetadata `json:"allFieldsMetadata,omitempty"`
	Backfill          *Backfill                 `json:"backfill,omitempty"`
	Destination       string                    `json:"destination"`
	DisplayName       string                    `json:"displayName"`

	// Error Error message if there was an issue hydrating this object.
	Error string `json:"error,omitempty"`

	// MapToDisplayName A display name to map to.
	MapToDisplayName string `json:"mapToDisplayName,omitempty"`

	// MapToName An object name to map to.
	MapToName          string                      `json:"mapToName,omitempty"`
	ObjectName         string                      `json:"objectName"`
	OptionalFields     *[]HydratedIntegrationField `json:"optionalFields,omitempty"`
	OptionalFieldsAuto *OptionalFieldsAutoOption   `json:"optionalFieldsAuto,omitempty"`
	RequiredFields     *[]HydratedIntegrationField `json:"requiredFields,omitempty"`
	Schedule           string                      `json:"schedule"`
}

HydratedIntegrationObject defines model for HydratedIntegrationObject.

type HydratedIntegrationProxy

type HydratedIntegrationProxy struct {
	Enabled *bool `json:"enabled,omitempty"`

	// UseModule Default is false. If this is set to true, the base URL for the proxy action will be the module's base URL. Otherwise, it is assumed that the base URL is the provider's root base URL.
	UseModule *bool `json:"useModule,omitempty"`
}

HydratedIntegrationProxy defines model for HydratedIntegrationProxy.

type HydratedIntegrationRead

type HydratedIntegrationRead struct {
	Objects *[]HydratedIntegrationObject `json:"objects,omitempty"`
}

HydratedIntegrationRead defines model for HydratedIntegrationRead.

type HydratedIntegrationWrite

type HydratedIntegrationWrite struct {
	Objects *[]HydratedIntegrationWriteObject `json:"objects,omitempty"`
}

HydratedIntegrationWrite defines model for HydratedIntegrationWrite.

type HydratedIntegrationWriteObject

type HydratedIntegrationWriteObject struct {
	DisplayName string `json:"displayName"`
	ObjectName  string `json:"objectName"`

	// ValueDefaults Configuration to set default write values for object fields.
	ValueDefaults *ValueDefaults `json:"valueDefaults,omitempty"`
}

HydratedIntegrationWriteObject defines model for HydratedIntegrationWriteObject.

type Integration

type Integration struct {
	DisplayName string                `json:"displayName,omitempty"`
	Module      string                `json:"module,omitempty"`
	Name        string                `json:"name"`
	Provider    string                `json:"provider"`
	Proxy       *IntegrationProxy     `json:"proxy,omitempty"`
	Read        *IntegrationRead      `json:"read,omitempty"`
	Subscribe   *IntegrationSubscribe `json:"subscribe,omitempty"`
	Write       *IntegrationWrite     `json:"write,omitempty"`
}

Integration defines model for Integration.

type IntegrationField

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

IntegrationField defines model for IntegrationField.

func (IntegrationField) AsIntegrationFieldExistent

func (t IntegrationField) AsIntegrationFieldExistent() (IntegrationFieldExistent, error)

AsIntegrationFieldExistent returns the union data inside the IntegrationField as a IntegrationFieldExistent

func (IntegrationField) AsIntegrationFieldMapping

func (t IntegrationField) AsIntegrationFieldMapping() (IntegrationFieldMapping, error)

AsIntegrationFieldMapping returns the union data inside the IntegrationField as a IntegrationFieldMapping

func (*IntegrationField) FromIntegrationFieldExistent

func (t *IntegrationField) FromIntegrationFieldExistent(v IntegrationFieldExistent) error

FromIntegrationFieldExistent overwrites any union data inside the IntegrationField as the provided IntegrationFieldExistent

func (*IntegrationField) FromIntegrationFieldMapping

func (t *IntegrationField) FromIntegrationFieldMapping(v IntegrationFieldMapping) error

FromIntegrationFieldMapping overwrites any union data inside the IntegrationField as the provided IntegrationFieldMapping

func (IntegrationField) MarshalJSON

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

func (*IntegrationField) MergeIntegrationFieldExistent

func (t *IntegrationField) MergeIntegrationFieldExistent(v IntegrationFieldExistent) error

MergeIntegrationFieldExistent performs a merge with any union data inside the IntegrationField, using the provided IntegrationFieldExistent

func (*IntegrationField) MergeIntegrationFieldMapping

func (t *IntegrationField) MergeIntegrationFieldMapping(v IntegrationFieldMapping) error

MergeIntegrationFieldMapping performs a merge with any union data inside the IntegrationField, using the provided IntegrationFieldMapping

func (*IntegrationField) UnmarshalJSON

func (t *IntegrationField) UnmarshalJSON(b []byte) error

type IntegrationFieldExistent

type IntegrationFieldExistent struct {
	FieldName string `json:"fieldName"`

	// MapToDisplayName The display name to map to.
	MapToDisplayName string `json:"mapToDisplayName,omitempty"`

	// MapToName The field name to map to.
	MapToName string `json:"mapToName,omitempty"`
}

IntegrationFieldExistent defines model for IntegrationFieldExistent.

type IntegrationFieldMapping

type IntegrationFieldMapping struct {
	Default          *string `json:"default,omitempty"`
	MapToDisplayName *string `json:"mapToDisplayName,omitempty"`
	MapToName        string  `json:"mapToName"`
	Prompt           *string `json:"prompt,omitempty"`
}

IntegrationFieldMapping defines model for IntegrationFieldMapping.

type IntegrationObject

type IntegrationObject struct {
	Backfill    *Backfill `json:"backfill,omitempty"`
	Delivery    *Delivery `json:"delivery,omitempty"`
	Destination string    `json:"destination"`

	// Enabled If set to `always`, the integration will automatically install upon user connection and skip the user field selection step.
	Enabled IntegrationObjectEnabled `json:"enabled,omitempty"`

	// MapToDisplayName A display name to map to.
	MapToDisplayName string `json:"mapToDisplayName,omitempty"`

	// MapToName An object name to map to.
	MapToName          string                    `json:"mapToName,omitempty"`
	ObjectName         string                    `json:"objectName"`
	OptionalFields     *[]IntegrationField       `json:"optionalFields,omitempty"`
	OptionalFieldsAuto *OptionalFieldsAutoOption `json:"optionalFieldsAuto,omitempty"`
	RequiredFields     *[]IntegrationField       `json:"requiredFields,omitempty"`
	Schedule           string                    `json:"schedule"`
}

IntegrationObject defines model for IntegrationObject.

type IntegrationObjectEnabled

type IntegrationObjectEnabled string

IntegrationObjectEnabled If set to `always`, the integration will automatically install upon user connection and skip the user field selection step.

const (
	IntegrationObjectEnabledAlways IntegrationObjectEnabled = "always"
)

Defines values for IntegrationObjectEnabled.

type IntegrationProxy

type IntegrationProxy struct {
	Enabled *bool `json:"enabled,omitempty"`

	// UseModule Default is false. If this is set to true, the base URL for the proxy action will be the module's base URL. Otherwise, it is assumed that the base URL is the provider's root base URL.
	UseModule *bool `json:"useModule,omitempty"`
}

IntegrationProxy defines model for IntegrationProxy.

type IntegrationRead

type IntegrationRead struct {
	Objects *[]IntegrationObject `json:"objects,omitempty"`
}

IntegrationRead defines model for IntegrationRead.

type IntegrationSubscribe

type IntegrationSubscribe struct {
	Objects *[]IntegrationSubscribeObject `json:"objects,omitempty"`
}

IntegrationSubscribe defines model for IntegrationSubscribe.

type IntegrationSubscribeObject

type IntegrationSubscribeObject struct {
	AssociationChangeEvent *AssociationChangeEvent `json:"associationChangeEvent,omitempty"`
	CreateEvent            *CreateEvent            `json:"createEvent,omitempty"`
	DeleteEvent            *DeleteEvent            `json:"deleteEvent,omitempty"`
	Destination            string                  `json:"destination"`

	// InheritFieldsAndMapping If true, the integration will inherit the fields and mapping from the read object.
	InheritFieldsAndMapping bool         `json:"inheritFieldsAndMapping,omitempty"`
	ObjectName              string       `json:"objectName"`
	OtherEvents             *OtherEvents `json:"otherEvents,omitempty"`
	UpdateEvent             *UpdateEvent `json:"updateEvent,omitempty"`
}

IntegrationSubscribeObject defines model for IntegrationSubscribeObject.

type IntegrationWrite

type IntegrationWrite struct {
	Objects *[]IntegrationWriteObject `json:"objects,omitempty"`
}

IntegrationWrite defines model for IntegrationWrite.

type IntegrationWriteObject

type IntegrationWriteObject struct {
	// InheritMapping If true, the write object will inherit the mapping from the read object. If false, the write object will have no mapping.
	InheritMapping *bool  `json:"inheritMapping,omitempty"`
	ObjectName     string `json:"objectName"`

	// ValueDefaults Configuration to set default write values for object fields.
	ValueDefaults *ValueDefaults `json:"valueDefaults,omitempty"`
}

IntegrationWriteObject defines model for IntegrationWriteObject.

type Manifest

type Manifest struct {
	Integrations []Integration `json:"integrations"`

	// SpecVersion The version of the manifest spec that this file conforms to.
	SpecVersion string `json:"specVersion"`
}

Manifest This is the schema of the manifest file that is used to define the integrations of the project.

type OptionalFieldsAutoOption

type OptionalFieldsAutoOption string

OptionalFieldsAutoOption defines model for OptionalFieldsAutoOption.

const (
	OptionalFieldsAutoOptionAll OptionalFieldsAutoOption = "all"
)

Defines values for OptionalFieldsAutoOption.

type OtherEvents

type OtherEvents = []string

OtherEvents defines model for OtherEvents.

type ReadConfig

type ReadConfig struct {
	Objects map[string]ReadConfigObject `json:"objects"`
}

ReadConfig defines model for ReadConfig.

type ReadConfigObject

type ReadConfigObject struct {
	Backfill *BackfillConfig `json:"backfill,omitempty"`

	// Destination The name of the destination that the result should be sent to.
	Destination string `json:"destination,omitempty"`

	// Disabled If this flag is set to true, scheduled reads associated with this object will be paused, and on-demand reads will not be allowed.
	Disabled *bool `json:"disabled,omitempty"`

	// DynamicMappingsInput An array containing all available dynamic field and value mappings for this installation, provided by the InstallIntegration component. This array represents the complete set of possible mappings, regardless of which ones are currently selected. The actual selected mappings are stored separately in the selectedFieldMappings property.
	DynamicMappingsInput *DynamicMappingsInput `json:"dynamicMappingsInput,omitempty"`

	// ObjectName The name of the object to read from.
	ObjectName string `json:"objectName" validate:"required"`

	// Schedule The schedule for reading the object, in cron syntax.
	Schedule string `json:"schedule,omitempty"`

	// SelectedFieldMappings This is a map of mapToNames to field names. (A mapTo name is the name the builder wants to map a field to when it lands in their destination.)
	SelectedFieldMappings map[string]string `json:"selectedFieldMappings"`

	// SelectedFields This is a map of field names to booleans indicating whether they should be read. If a field is already included in `selectedFieldMappings`, it does not need to be included here.
	SelectedFields map[string]bool `json:"selectedFields"`

	// SelectedFieldsAuto If selectedFieldsAuto is set to all, all fields will be read.
	SelectedFieldsAuto *SelectedFieldsAutoConfig `json:"selectedFieldsAuto,omitempty"`

	// SelectedValueMappings This is a map of field names to their value mappings.
	SelectedValueMappings map[string]SelectedValueMappings `json:"selectedValueMappings,omitempty"`
}

ReadConfigObject defines model for ReadConfigObject.

type SelectedFieldsAutoConfig

type SelectedFieldsAutoConfig string

SelectedFieldsAutoConfig If selectedFieldsAuto is set to all, all fields will be read.

const (
	SelectedFieldsAll SelectedFieldsAutoConfig = "all"
)

Defines values for SelectedFieldsAutoConfig.

type SelectedValueMappings

type SelectedValueMappings map[string]string

SelectedValueMappings This is a map of values to their mappings. The key is the value delivered to the webhook, the value is the value coming from the provider API.

type SubscribeConfig

type SubscribeConfig struct {
	Objects map[string]SubscribeConfigObject `json:"objects"`
}

SubscribeConfig defines model for SubscribeConfig.

type SubscribeConfigObject

type SubscribeConfigObject struct {
	CreateEvent *ConfigCreateEvent `json:"createEvent,omitempty"`
	DeleteEvent *ConfigDeleteEvent `json:"deleteEvent,omitempty"`

	// Destination The name of the destination that the result should be sent to.
	Destination string `json:"destination"`

	// InheritFieldsAndMappings Whether to inherit fields and mappings from the read config.
	InheritFieldsAndMappings bool `json:"inheritFieldsAndMappings"`

	// ObjectName The name of the object to subscribe to.
	ObjectName  string             `json:"objectName" validate:"required"`
	UpdateEvent *ConfigUpdateEvent `json:"updateEvent,omitempty"`
}

SubscribeConfigObject defines model for SubscribeConfigObject.

type UpdateEvent

type UpdateEvent struct {
	// Enabled If always, the integration will subscribe to update events by default.
	Enabled             *UpdateEventEnabled `json:"enabled,omitempty"`
	RequiredWatchFields *[]string           `json:"requiredWatchFields,omitempty"`

	// WatchFieldsAuto If `all`, the integration will watch all fields for updates. If `selected`, the integration will watch only the fields that are selected by the user. If `inheritFieldsAndMapping` is true for Subscribe action, the integration will watch the selected fields from read action that are selected by the user.
	WatchFieldsAuto *UpdateEventWatchFieldsAuto `json:"watchFieldsAuto,omitempty"`
}

UpdateEvent defines model for UpdateEvent.

type UpdateEventEnabled

type UpdateEventEnabled string

UpdateEventEnabled If always, the integration will subscribe to update events by default.

const (
	Always UpdateEventEnabled = "always"
)

Defines values for UpdateEventEnabled.

type UpdateEventWatchFieldsAuto

type UpdateEventWatchFieldsAuto string

UpdateEventWatchFieldsAuto If `all`, the integration will watch all fields for updates. If `selected`, the integration will watch only the fields that are selected by the user. If `inheritFieldsAndMapping` is true for Subscribe action, the integration will watch the selected fields from read action that are selected by the user.

const (
	UpdateEventWatchFieldsAutoAll      UpdateEventWatchFieldsAuto = "all"
	UpdateEventWatchFieldsAutoSelected UpdateEventWatchFieldsAuto = "selected"
)

Defines values for UpdateEventWatchFieldsAuto.

type UpdateInstallationConfigContent

type UpdateInstallationConfigContent = BaseConfigContent

UpdateInstallationConfigContent defines model for UpdateInstallationConfigContent.

type UpdateInstallationReadConfig

type UpdateInstallationReadConfig = BaseReadConfig

UpdateInstallationReadConfig defines model for UpdateInstallationReadConfig.

type UpdateInstallationReadConfigObject

type UpdateInstallationReadConfigObject = BaseReadConfigObject

UpdateInstallationReadConfigObject defines model for UpdateInstallationReadConfigObject.

type ValueDefault

type ValueDefault = any

ValueDefault defines model for ValueDefault.

type ValueDefaultBoolean

type ValueDefaultBoolean struct {
	// ApplyOnUpdate Whether the default value should be applied when updating a record.
	// If set to `always`, the default value will be applied when updating a record.
	// If set to `never`, the default value will not be applied when updating a record,
	// only when creating a record.
	// If unspecified, then `always` is assumed.
	ApplyOnUpdate *ValueDefaultBooleanApplyOnUpdate `json:"applyOnUpdate,omitempty"`

	// Value The value to be used as a default.
	Value bool `json:"value"`
}

ValueDefaultBoolean defines model for ValueDefaultBoolean.

type ValueDefaultBooleanApplyOnUpdate

type ValueDefaultBooleanApplyOnUpdate string

ValueDefaultBooleanApplyOnUpdate Whether the default value should be applied when updating a record. If set to `always`, the default value will be applied when updating a record. If set to `never`, the default value will not be applied when updating a record, only when creating a record. If unspecified, then `always` is assumed.

const (
	ValueDefaultBooleanApplyOnUpdateAlways ValueDefaultBooleanApplyOnUpdate = "always"
	ValueDefaultBooleanApplyOnUpdateNever  ValueDefaultBooleanApplyOnUpdate = "never"
)

Defines values for ValueDefaultBooleanApplyOnUpdate.

type ValueDefaultInteger

type ValueDefaultInteger struct {
	// ApplyOnUpdate Whether the default value should be applied when updating a record.
	// If set to `always`, the default value will be applied when updating a record.
	// If set to `never`, the default value will not be applied when updating a record,
	// only when creating a record.
	// If unspecified, then `always` is assumed.
	ApplyOnUpdate *ValueDefaultIntegerApplyOnUpdate `json:"applyOnUpdate,omitempty"`

	// Value The value to be used as a default.
	Value int `json:"value"`
}

ValueDefaultInteger defines model for ValueDefaultInteger.

type ValueDefaultIntegerApplyOnUpdate

type ValueDefaultIntegerApplyOnUpdate string

ValueDefaultIntegerApplyOnUpdate Whether the default value should be applied when updating a record. If set to `always`, the default value will be applied when updating a record. If set to `never`, the default value will not be applied when updating a record, only when creating a record. If unspecified, then `always` is assumed.

const (
	ValueDefaultIntegerApplyOnUpdateAlways ValueDefaultIntegerApplyOnUpdate = "always"
	ValueDefaultIntegerApplyOnUpdateNever  ValueDefaultIntegerApplyOnUpdate = "never"
)

Defines values for ValueDefaultIntegerApplyOnUpdate.

type ValueDefaultString

type ValueDefaultString struct {
	// ApplyOnUpdate Whether the default value should be applied when updating a record.
	// If set to `always`, the default value will be applied when updating a record.
	// If set to `never`, the default value will not be applied when updating a record,
	// only when creating a record.
	// If unspecified, then `always` is assumed.
	ApplyOnUpdate *ValueDefaultStringApplyOnUpdate `json:"applyOnUpdate,omitempty"`

	// Value The value to be used as a default.
	Value string `json:"value"`
}

ValueDefaultString defines model for ValueDefaultString.

type ValueDefaultStringApplyOnUpdate

type ValueDefaultStringApplyOnUpdate string

ValueDefaultStringApplyOnUpdate Whether the default value should be applied when updating a record. If set to `always`, the default value will be applied when updating a record. If set to `never`, the default value will not be applied when updating a record, only when creating a record. If unspecified, then `always` is assumed.

const (
	ValueDefaultStringApplyOnUpdateAlways ValueDefaultStringApplyOnUpdate = "always"
	ValueDefaultStringApplyOnUpdateNever  ValueDefaultStringApplyOnUpdate = "never"
)

Defines values for ValueDefaultStringApplyOnUpdate.

type ValueDefaults

type ValueDefaults struct {
	// AllowAnyFields If true, users can set default values for any field.
	AllowAnyFields *bool `json:"allowAnyFields,omitempty"`
}

ValueDefaults Configuration to set default write values for object fields.

type WriteConfig

type WriteConfig struct {
	Objects *map[string]WriteConfigObject `json:"objects,omitempty"`
}

WriteConfig defines model for WriteConfig.

type WriteConfigObject

type WriteConfigObject struct {
	// ObjectName The name of the object to write to.
	ObjectName string `json:"objectName" validate:"required"`

	// SelectedFieldSettings This is a map of field names to their settings.
	SelectedFieldSettings map[string]FieldSetting `json:"selectedFieldSettings,omitempty"`

	// SelectedValueDefaults This is a map of field names to default values. These values will be used when writing to the object.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	SelectedValueDefaults map[string]ValueDefault `json:"selectedValueDefaults,omitempty"`
}

WriteConfigObject defines model for WriteConfigObject.

Jump to

Keyboard shortcuts

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