openapi

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 4 Imported by: 0

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.8.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.8.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.8.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenOpts added in v1.2.0

type AccessTokenOpts struct {
	// AttachmentType How the access token should be attached to requests.
	AttachmentType AccessTokenOptsAttachmentType `json:"attachmentType" validate:"required"`

	// DocsURL URL with more information about how access token is used.
	//
	// Example: https://docs.example.com/oauth2-access-token-usage
	DocsURL string `json:"docsURL,omitempty"`

	// Header Configuration for access token in header. Must be provided if type is in-header.
	Header *AccessTokenOptsHeader `json:"header,omitempty"`
}

AccessTokenOpts Configuration that defines how an OAuth 2.0 access token is attached to outbound API requests. When provided, this configuration overrides the default access-token handling behavior for the connector.

type AccessTokenOptsAttachmentType added in v1.2.0

type AccessTokenOptsAttachmentType string

AccessTokenOptsAttachmentType How the access token should be attached to requests.

const (
	AccessTokenOptsAttachmentTypeAccessTokenHeaderAttachment AccessTokenOptsAttachmentType = "accessTokenHeaderAttachment"
)

Defines values for AccessTokenOptsAttachmentType.

func (AccessTokenOptsAttachmentType) Valid added in v1.2.0

Valid indicates whether the value is a known member of the AccessTokenOptsAttachmentType enum.

type AccessTokenOptsHeader added in v1.2.0

type AccessTokenOptsHeader struct {
	// Name The name of the header to be used for the access token.
	//
	// Example: X-Access-Token
	Name string `json:"name"`

	// ValuePrefix The prefix to be added to the access token value when it is sent in the header.
	//
	// Example: Bearer
	ValuePrefix string `json:"valuePrefix,omitempty"`
}

AccessTokenOptsHeader Configuration for access token in header. Must be provided if type is in-header.

type ApiKeyAsBasicOpts added in v1.0.4

type ApiKeyAsBasicOpts struct {
	// FieldUsed whether the API key should be used as the username or password.
	//
	// Example: username
	FieldUsed ApiKeyAsBasicOptsFieldUsed `json:"fieldUsed,omitempty"`

	// KeyFormat How to transform the API key in to a basic auth user:pass string. The %s is replaced with the API key value.
	//
	// Example: api:%s
	KeyFormat string `json:"keyFormat,omitempty"`
}

ApiKeyAsBasicOpts when this object is present, it means that this provider uses Basic Auth to actually collect an API key

type ApiKeyAsBasicOptsFieldUsed added in v1.0.4

type ApiKeyAsBasicOptsFieldUsed string

ApiKeyAsBasicOptsFieldUsed whether the API key should be used as the username or password.

Example: username

const (
	ApiKeyAsBasicOptsFieldUsedPasswordField ApiKeyAsBasicOptsFieldUsed = "password"
	ApiKeyAsBasicOptsFieldUsedUsernameField ApiKeyAsBasicOptsFieldUsed = "username"
)

Defines values for ApiKeyAsBasicOptsFieldUsed.

func (ApiKeyAsBasicOptsFieldUsed) Valid added in v1.2.0

func (e ApiKeyAsBasicOptsFieldUsed) Valid() bool

Valid indicates whether the value is a known member of the ApiKeyAsBasicOptsFieldUsed enum.

type ApiKeyOpts added in v1.0.4

type ApiKeyOpts struct {
	// AttachmentType How the API key should be attached to requests.
	AttachmentType ApiKeyOptsAttachmentType `json:"attachmentType" validate:"required"`

	// DocsURL URL with more information about how to get or use an API key.
	//
	// Example: https://docs.example.com/api-key
	DocsURL string `json:"docsURL,omitempty"`

	// Header Configuration for API key in header. Must be provided if type is in-header.
	Header *ApiKeyOptsHeader `json:"header,omitempty"`

	// Query Configuration for API key in query parameter. Must be provided if type is in-query.
	Query *ApiKeyOptsQuery `json:"query,omitempty"`
}

ApiKeyOpts Configuration for API key. Must be provided if authType is apiKey.

type ApiKeyOptsAttachmentType added in v1.0.4

type ApiKeyOptsAttachmentType string

ApiKeyOptsAttachmentType How the API key should be attached to requests.

const (
	ApiKeyOptsAttachmentTypeHeader ApiKeyOptsAttachmentType = "header"
	ApiKeyOptsAttachmentTypeQuery  ApiKeyOptsAttachmentType = "query"
)

Defines values for ApiKeyOptsAttachmentType.

func (ApiKeyOptsAttachmentType) Valid added in v1.2.0

func (e ApiKeyOptsAttachmentType) Valid() bool

Valid indicates whether the value is a known member of the ApiKeyOptsAttachmentType enum.

type ApiKeyOptsHeader added in v1.0.4

type ApiKeyOptsHeader struct {
	// Name The name of the header to be used for the API key.
	//
	// Example: X-Api-Key
	Name string `json:"name"`

	// ValuePrefix The prefix to be added to the API key value when it is sent in the header.
	//
	// Example: Bearer
	ValuePrefix string `json:"valuePrefix,omitempty"`
}

ApiKeyOptsHeader Configuration for API key in header. Must be provided if type is in-header.

type ApiKeyOptsQuery added in v1.0.4

type ApiKeyOptsQuery struct {
	// Name The name of the query parameter to be used for the API key.
	//
	// Example: api_key
	Name string `json:"name"`
}

ApiKeyOptsQuery Configuration for API key in query parameter. Must be provided if type is in-query.

type ApiProblem

type ApiProblem struct {
	// Causes A list of problems that caused this problem. This can be used to represent multiple
	// root causes. There is no guaranteed ordering of the causes.
	//
	//
	// Example: ["database connection failed","database query failed","unable to fetch user"]
	Causes *[]string `json:"causes,omitempty"`

	// Context Additional context for the problem
	//
	// Example: {"name":"Rick Sanchez"}
	Context *map[string]interface{} `json:"context,omitempty"`

	// Detail A human-readable explanation specific to this occurrence of the problem
	Detail *string `json:"detail,omitempty"`

	// Href An absolute URI that, when dereferenced, provides human-readable documentation for the problem type (e.g. using HTML).
	Href *string `json:"href,omitempty"`

	// Instance An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
	Instance *string `json:"instance,omitempty"`

	// Remedy A brief description of how to resolve the problem
	//
	// Example: Shorten your input to be under 100 characters
	Remedy *string `json:"remedy,omitempty"`

	// RequestId A unique identifier for the request, useful for debugging
	//
	// Example: 89eb1ffb-2a54-4105-aaae-7bf990f1aa69#87715
	RequestId *string `json:"requestId,omitempty"`

	// RetryAfter A timestamp after which the request can be retried, formatted as RFC-3339
	//
	// Example: 2024-04-22T18:55:28.456076Z
	RetryAfter *time.Time `json:"retryAfter,omitempty"`

	// Retryable Whether the request can be retried
	//
	// Example: false
	Retryable *bool `json:"retryable,omitempty"`

	// Status The HTTP status code generated by the origin server for this occurrence of the problem.
	//
	// Example: 503
	Status *int32 `json:"status,omitempty"`

	// Subsystem The subsystem that generated the problem
	//
	// Example: api
	Subsystem *string `json:"subsystem,omitempty"`

	// SupportEmail An email address to contact for support
	//
	// Example: support@withampersand.com
	SupportEmail *openapi_types.Email `json:"supportEmail,omitempty"`

	// SupportPhone A phone number to contact for support
	//
	// Example: +1-555-555-5555
	SupportPhone *string `json:"supportPhone,omitempty"`

	// SupportUrl A URL to contact for support
	//
	// Example: https://withampersand.com/support
	SupportUrl *string `json:"supportUrl,omitempty"`

	// Time The time the problem occurred, formatted as RFC-3339
	//
	// Example: 2024-04-22T18:55:28.456076Z
	Time *time.Time `json:"time,omitempty"`

	// Title A short summary of the problem type. Written in English and readable for engineers (usually not suited for non technical stakeholders and not localized).
	//
	// Example: Service Unavailable
	Title *string `json:"title,omitempty"`

	// Type An absolute URI that identifies the problem type
	Type *string `json:"type,omitempty"`
}

ApiProblem defines model for ApiProblem.

type AssociationChangeEvent added in v1.0.8

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 added in v1.0.8

type AssociationChangeEventEnabled string

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

const (
	AssociationChangeEventEnabledAlways AssociationChangeEventEnabled = "always"
)

Defines values for AssociationChangeEventEnabled.

func (AssociationChangeEventEnabled) Valid added in v1.2.0

Valid indicates whether the value is a known member of the AssociationChangeEventEnabled enum.

type AuthHealthCheck added in v1.0.9

type AuthHealthCheck struct {
	// Method The HTTP method to use for the health check. If not set, defaults to GET.
	//
	// Example: GET
	Method string `json:"method,omitempty"`

	// SuccessStatusCodes The HTTP status codes that indicate a successful health check. If not set, defaults to 200 and 204.
	//
	// Example: [200,204]
	SuccessStatusCodes []int `json:"successStatusCodes,omitempty"`

	// Url a no-op URL to check the health of the credentials. The URL MUST not mutate any state. If the provider doesn't have such an endpoint, then don't provide credentialsHealthCheck.
	//
	// Example: https://api.example.com/health-check
	Url string `json:"url"`
}

AuthHealthCheck A URL to check the health of a provider's credentials. It's used to see if the credentials are valid and if the provider is reachable.

type AuthType added in v1.0.4

type AuthType string

AuthType The type of authentication required by the provider.

const (
	AuthTypeApiKey AuthType = "apiKey"
	AuthTypeBasic  AuthType = "basic"
	AuthTypeCustom AuthType = "custom"
	AuthTypeJwt    AuthType = "jwt"
	AuthTypeNone   AuthType = "none"
	AuthTypeOauth2 AuthType = "oauth2"
)

Defines values for AuthType.

func (AuthType) Valid added in v1.2.0

func (e AuthType) Valid() bool

Valid indicates whether the value is a known member of the AuthType enum.

type Backfill added in v1.0.3

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

Backfill defines model for Backfill.

type BasicAuthOpts added in v1.0.4

type BasicAuthOpts struct {
	// ApiKeyAsBasic If true, the provider uses an API key which then gets encoded as a basic auth user:pass string.
	//
	// Example: true
	ApiKeyAsBasic bool `json:"apiKeyAsBasic,omitempty"`

	// ApiKeyAsBasicOpts when this object is present, it means that this provider uses Basic Auth to actually collect an API key
	ApiKeyAsBasicOpts *ApiKeyAsBasicOpts `json:"apiKeyAsBasicOpts,omitempty"`

	// DocsURL URL with more information about how to get or use an API key.
	//
	// Example: https://docs.example.com/api-key
	DocsURL string `json:"docsURL,omitempty"`
}

BasicAuthOpts Configuration for Basic Auth. Optional.

type BatchWriteSupport added in v1.2.0

type BatchWriteSupport struct {
	Create BatchWriteSupportConfig `json:"create"`
	Delete BatchWriteSupportConfig `json:"delete"`
	Update BatchWriteSupportConfig `json:"update"`
	Upsert BatchWriteSupportConfig `json:"upsert"`
}

BatchWriteSupport defines model for BatchWriteSupport.

type BatchWriteSupportConfig added in v1.2.0

type BatchWriteSupportConfig struct {
	// DefaultRecordLimit The default number of records supported in a batch
	DefaultRecordLimit *int `json:"defaultRecordLimit,omitempty"`

	// ObjectRecordLimits Defines object-level overrides for batch record limits. Keys represent object names, and values specify the maximum number of records per batch for those objects.
	ObjectRecordLimits *map[string]int `json:"objectRecordLimits,omitempty"`

	// Supported Whether this type of batch write operation is supported
	Supported bool `json:"supported"`
}

BatchWriteSupportConfig defines model for BatchWriteSupportConfig.

type BulkWriteSupport added in v1.0.4

type BulkWriteSupport struct {
	Delete bool `json:"delete"`
	Insert bool `json:"insert"`
	Update bool `json:"update"`
	Upsert bool `json:"upsert"`
}

BulkWriteSupport defines model for BulkWriteSupport.

type CatalogType added in v1.0.4

type CatalogType map[string]ProviderInfo

CatalogType defines model for CatalogType.

type CatalogWrapper added in v1.0.4

type CatalogWrapper struct {
	Catalog CatalogType `json:"catalog"`

	// Timestamp An RFC3339 formatted timestamp of when the catalog was generated.
	//
	// Example: 2024-07-30T15:14:51-07:00
	Timestamp string `json:"timestamp" validate:"required"`
}

CatalogWrapper defines model for CatalogWrapper.

type CreateEvent added in v1.0.8

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 added in v1.0.8

type CreateEventEnabled string

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

const (
	CreateEventEnabledAlways CreateEventEnabled = "always"
)

Defines values for CreateEventEnabled.

func (CreateEventEnabled) Valid added in v1.2.0

func (e CreateEventEnabled) Valid() bool

Valid indicates whether the value is a known member of the CreateEventEnabled enum.

type CustomAuthHeader added in v1.0.9

type CustomAuthHeader struct {
	// Name The name of the header.
	//
	// Example: X-Custom-Auth
	Name string `json:"name"`

	// ValueTemplate The value of the header, represented as a Golang text/template expression. Only the backend will interpret this.
	//
	// Example: Bearer {{ .token }}
	ValueTemplate string `json:"valueTemplate" skipSubstitutions:"true"`
}

CustomAuthHeader A custom header to be used for authentication. Automatically added by the backend.

type CustomAuthInput added in v1.0.9

type CustomAuthInput struct {
	// DisplayName The human-readable name for the custom auth input field.
	//
	// Example: Custom Auth Input
	DisplayName string `json:"displayName"`

	// DocsURL URL with details about this authentication mechanism and how to use it. Might be specific to this field, or a general URL for the provider. Optional.
	//
	// Example: https://docs.example.com/custom-auth-input
	DocsURL string `json:"docsURL,omitempty"`

	// FieldType How the frontend should render this input. "fieldTypeText" is an unmasked field (not sensitive), "fieldTypePassword" is a masked field (sensitive), and "fieldTypeSelect" is a dropdown populated from options. Defaults to "fieldTypePassword" when omitted.
	//
	// Example: fieldTypePassword
	FieldType CustomAuthInputFieldType `json:"fieldType,omitempty"`

	// Name The internal identifier for the custom auth input field.
	//
	// Example: custom_auth_input
	Name string `json:"name"`

	// Options The dropdown options, used only when fieldType is "select".
	Options []CustomAuthInputOption `json:"options,omitempty"`

	// Prompt Some helpful text or context to be displayed to the user when asking for this input.
	//
	// Example: See Authorization section of provider docs to obtain this value
	Prompt string `json:"prompt,omitempty"`
}

CustomAuthInput A custom input field for authentication. This is used by the frontend to dynamically render input fields for custom auth. The backend will not interpret this. It will however receive the value of this field before making a request (in the connection secrets).

type CustomAuthInputFieldType added in v1.2.0

type CustomAuthInputFieldType string

CustomAuthInputFieldType How the frontend should render this input. "fieldTypeText" is an unmasked field (not sensitive), "fieldTypePassword" is a masked field (sensitive), and "fieldTypeSelect" is a dropdown populated from options. Defaults to "fieldTypePassword" when omitted.

Example: fieldTypePassword

const (
	CustomAuthInputFieldTypeFieldTypePassword CustomAuthInputFieldType = "fieldTypePassword"
	CustomAuthInputFieldTypeFieldTypeSelect   CustomAuthInputFieldType = "fieldTypeSelect"
	CustomAuthInputFieldTypeFieldTypeText     CustomAuthInputFieldType = "fieldTypeText"
)

Defines values for CustomAuthInputFieldType.

func (CustomAuthInputFieldType) Valid added in v1.2.0

func (e CustomAuthInputFieldType) Valid() bool

Valid indicates whether the value is a known member of the CustomAuthInputFieldType enum.

type CustomAuthInputOption added in v1.2.0

type CustomAuthInputOption struct {
	// Label The human-readable label shown for this option.
	//
	// Example: Production
	Label string `json:"label"`

	// Value The value stored when this option is selected.
	//
	// Example: prod
	Value string `json:"value"`
}

CustomAuthInputOption A selectable option for a custom auth input whose fieldType is "select".

type CustomAuthOpts added in v1.0.9

type CustomAuthOpts struct {
	// Headers A list of custom headers to be used for authentication. The backend will add these headers.
	Headers []CustomAuthHeader `json:"headers,omitempty"`

	// Inputs A list of custom input fields for authentication. The frontend will render these input fields and the backend will receive the values of these fields before making a request.
	Inputs []CustomAuthInput `json:"inputs,omitempty"`

	// MultiStep Whether this provider uses a multi-step custom auth flow (browser redirects and/or server-side credential-exchange calls) driven by the /custom-auth/connect endpoint, rather than static header/query-param injection. The step definitions and handlers live in the connectors library, not the catalog; this flag is the signal that lets clients tell "multi-step custom" apart from plain "custom" at a glance.
	//
	// Example: true
	MultiStep bool `json:"multiStep,omitempty"`

	// ProviderInputs Input fields the builder configures on their provider app (e.g. client secrets, subscription keys) rather than the consumer. Routed to storage by fieldType. Optional.
	ProviderInputs []CustomAuthInput `json:"providerInputs,omitempty"`

	// QueryParams A list of custom query parameters to be used for authentication. The backend will add these query parameters.
	QueryParams []CustomAuthQueryParam `json:"queryParams,omitempty"`
}

CustomAuthOpts Configuration for custom auth. Optional.

type CustomAuthQueryParam added in v1.0.9

type CustomAuthQueryParam struct {
	// Name The name of the query parameter.
	//
	// Example: custom_auth
	Name string `json:"name"`

	// ValueTemplate The value of the query parameter, represented as a Golang text/template expression. Only the backend will interpret this.
	//
	// Example: {{ .token }}
	ValueTemplate string `json:"valueTemplate" skipSubstitutions:"true"`
}

CustomAuthQueryParam A custom query parameter to be used for authentication. Automatically added by the backend.

type DefaultPeriod added in v1.0.3

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.
	//
	// Example: 30
	Days *int `json:"days,omitempty" validate:"required_without=FullHistory,omitempty,min=0"`

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

DefaultPeriod defines model for DefaultPeriod.

type DeleteEvent added in v1.0.8

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 added in v1.0.8

type DeleteEventEnabled string

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

const (
	DeleteEventEnabledAlways DeleteEventEnabled = "always"
)

Defines values for DeleteEventEnabled.

func (DeleteEventEnabled) Valid added in v1.2.0

func (e DeleteEventEnabled) Valid() bool

Valid indicates whether the value is a known member of the DeleteEventEnabled enum.

type Delivery added in v1.0.5

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 added in v1.0.5

type DeliveryMode string

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

const (
	DeliveryModeAuto      DeliveryMode = "auto"
	DeliveryModeOnRequest DeliveryMode = "onRequest"
)

Defines values for DeliveryMode.

func (DeliveryMode) Valid added in v1.2.0

func (e DeliveryMode) Valid() bool

Valid indicates whether the value is a known member of the DeliveryMode enum.

type FieldChangedEvent added in v1.2.0

type FieldChangedEvent struct {
	// Enabled If always, the integration will monitor for field changes by default.
	Enabled FieldChangedEventEnabled `json:"enabled"`
}

FieldChangedEvent Configuration for detecting when fields are changed.

type FieldChangedEventEnabled added in v1.2.0

type FieldChangedEventEnabled string

FieldChangedEventEnabled If always, the integration will monitor for field changes by default.

const (
	FieldChangedEventEnabledAlways FieldChangedEventEnabled = "always"
)

Defines values for FieldChangedEventEnabled.

func (FieldChangedEventEnabled) Valid added in v1.2.0

func (e FieldChangedEventEnabled) Valid() bool

Valid indicates whether the value is a known member of the FieldChangedEventEnabled enum.

type FieldCreatedEvent added in v1.2.0

type FieldCreatedEvent struct {
	// Enabled If always, the integration will monitor for new fields by default.
	Enabled FieldCreatedEventEnabled `json:"enabled"`
}

FieldCreatedEvent Configuration for detecting when new fields are created.

type FieldCreatedEventEnabled added in v1.2.0

type FieldCreatedEventEnabled string

FieldCreatedEventEnabled If always, the integration will monitor for new fields by default.

const (
	FieldCreatedEventEnabledAlways FieldCreatedEventEnabled = "always"
)

Defines values for FieldCreatedEventEnabled.

func (FieldCreatedEventEnabled) Valid added in v1.2.0

func (e FieldCreatedEventEnabled) Valid() bool

Valid indicates whether the value is a known member of the FieldCreatedEventEnabled enum.

type FieldDeletedEvent added in v1.2.0

type FieldDeletedEvent struct {
	// Enabled If always, the integration will monitor for deleted fields by default.
	Enabled FieldDeletedEventEnabled `json:"enabled"`
}

FieldDeletedEvent Configuration for detecting when fields are deleted.

type FieldDeletedEventEnabled added in v1.2.0

type FieldDeletedEventEnabled string

FieldDeletedEventEnabled If always, the integration will monitor for deleted fields by default.

const (
	FieldDeletedEventEnabledAlways FieldDeletedEventEnabled = "always"
)

Defines values for FieldDeletedEventEnabled.

func (FieldDeletedEventEnabled) Valid added in v1.2.0

func (e FieldDeletedEventEnabled) Valid() bool

Valid indicates whether the value is a known member of the FieldDeletedEventEnabled enum.

type FieldMetadata added in v1.0.8

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

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

	// IsCustom Whether the field is custom field.
	//
	// Example: false
	IsCustom *bool `json:"isCustom,omitempty"`

	// IsRequired Whether the field is required when creating a new record.
	//
	// Example: false
	IsRequired *bool `json:"isRequired,omitempty"`

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

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

	// ReferenceTo The list of object types this field references. Only applicable if the providerType is a lookup/reference field.
	ReferenceTo []string `json:"referenceTo,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 added in v1.0.8

type FieldMetadataValueType string

FieldMetadataValueType A normalized field type

const (
	FieldMetadataValueTypeBoolean      FieldMetadataValueType = "boolean"
	FieldMetadataValueTypeDate         FieldMetadataValueType = "date"
	FieldMetadataValueTypeDatetime     FieldMetadataValueType = "datetime"
	FieldMetadataValueTypeFloat        FieldMetadataValueType = "float"
	FieldMetadataValueTypeInt          FieldMetadataValueType = "int"
	FieldMetadataValueTypeMultiSelect  FieldMetadataValueType = "multiSelect"
	FieldMetadataValueTypeOther        FieldMetadataValueType = "other"
	FieldMetadataValueTypeReference    FieldMetadataValueType = "reference"
	FieldMetadataValueTypeSingleSelect FieldMetadataValueType = "singleSelect"
	FieldMetadataValueTypeString       FieldMetadataValueType = "string"
)

Defines values for FieldMetadataValueType.

func (FieldMetadataValueType) Valid added in v1.2.0

func (e FieldMetadataValueType) Valid() bool

Valid indicates whether the value is a known member of the FieldMetadataValueType enum.

type FieldValue added in v1.0.8

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

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

FieldValue Represents a field value

type HydratedIntegration

type HydratedIntegration struct {
	// DisplayName Example: Salesforce Accounts
	DisplayName string `json:"displayName,omitempty"`

	// Module Example: crm
	Module string `json:"module,omitempty"`

	// Name Example: readSalesforceAccounts
	Name string `json:"name"`

	// Provider Example: salesforce
	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 Example: Billing City
	DisplayName string `json:"displayName"`

	// FieldName Example: billingcity
	FieldName string `json:"fieldName"`

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

	// MapToName The field name to map to in the destination.
	//
	// Example: billing_city
	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.
	//
	// Example: {"name":{"displayName":"Account Name","fieldName":"name","isCustom":false,"isRequired":true,"providerType":"string","readOnly":false,"valueType":"string"},"type":{"displayName":"Account Type","fieldName":"type","isCustom":false,"isRequired":false,"providerType":"picklist","readOnly":false,"valueType":"singleSelect","values":[{"displayValue":"Prospect","value":"prospect"},{"displayValue":"Customer - Direct","value":"customer"}]}}
	AllFieldsMetadata *map[string]FieldMetadata `json:"allFieldsMetadata,omitempty"`
	Backfill          *Backfill                 `json:"backfill,omitempty"`

	// Destination Example: accountWebhook
	Destination string `json:"destination"`

	// DisplayName Example: Account
	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.
	//
	// Example: Accounts
	MapToDisplayName string `json:"mapToDisplayName,omitempty"`

	// MapToName An object name to map to.
	//
	// Example: accounts
	MapToName string `json:"mapToName,omitempty"`

	// ObjectName Example: account
	ObjectName         string                      `json:"objectName"`
	OptionalFields     *[]HydratedIntegrationField `json:"optionalFields,omitempty"`
	OptionalFieldsAuto *OptionalFieldsAutoOption   `json:"optionalFieldsAuto,omitempty"`
	RequiredFields     *[]HydratedIntegrationField `json:"requiredFields,omitempty"`

	// Schedule Example: */10 * * * *
	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 Example: Account
	DisplayName string `json:"displayName"`

	// ObjectName Example: account
	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 InputValidationIssue

type InputValidationIssue struct {
	// Detail A human-readable explanation specific to this occurrence of the problem
	Detail *string `json:"detail,omitempty"`

	// Href An absolute URI that, when dereferenced, provides human-readable documentation for the problem type (e.g. using HTML).
	Href *string `json:"href,omitempty"`

	// In The location of the invalid input
	In *InputValidationIssueIn `json:"in,omitempty"`

	// Instance An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
	Instance *string `json:"instance,omitempty"`

	// Name The name of the invalid input
	Name *string `json:"name,omitempty"`

	// Status The HTTP status code generated by the origin server for this occurrence of the problem.
	//
	// Example: 503
	Status *int32 `json:"status,omitempty"`

	// Title A short summary of the problem type. Written in English and readable for engineers (usually not suited for non technical stakeholders and not localized).
	//
	// Example: Service Unavailable
	Title *string `json:"title,omitempty"`

	// Type An absolute URI that identifies the problem type
	Type *string `json:"type,omitempty"`

	// Value The value of the erroneous input
	Value interface{} `json:"value,omitempty"`
}

InputValidationIssue An issue detected during input validation.

type InputValidationIssueIn added in v1.2.0

type InputValidationIssueIn string

InputValidationIssueIn The location of the invalid input

const (
	InputValidationIssueInBody   InputValidationIssueIn = "body"
	InputValidationIssueInHeader InputValidationIssueIn = "header"
	InputValidationIssueInPath   InputValidationIssueIn = "path"
	InputValidationIssueInQuery  InputValidationIssueIn = "query"
)

Defines values for InputValidationIssueIn.

func (InputValidationIssueIn) Valid added in v1.2.0

func (e InputValidationIssueIn) Valid() bool

Valid indicates whether the value is a known member of the InputValidationIssueIn enum.

type InputValidationProblem

type InputValidationProblem struct {
	// Detail A human-readable explanation specific to this occurrence of the problem
	Detail *string `json:"detail,omitempty"`

	// Href An absolute URI that, when dereferenced, provides human-readable documentation for the problem type (e.g. using HTML).
	Href *string `json:"href,omitempty"`

	// Instance An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
	Instance *string                 `json:"instance,omitempty"`
	Issues   *[]InputValidationIssue `json:"issues,omitempty"`

	// Status The HTTP status code generated by the origin server for this occurrence of the problem.
	//
	// Example: 503
	Status *int32 `json:"status,omitempty"`

	// Title A short summary of the problem type. Written in English and readable for engineers (usually not suited for non technical stakeholders and not localized).
	//
	// Example: Service Unavailable
	Title *string `json:"title,omitempty"`

	// Type An absolute URI that identifies the problem type
	Type *string `json:"type,omitempty"`
}

InputValidationProblem defines model for InputValidationProblem.

type InputValidationProblemResponse

type InputValidationProblemResponse = InputValidationProblem

InputValidationProblemResponse Example: {"detail":"The input message is incorrect","instance":"123456-1234-1235-4567489798","issues":[{"detail":"exampleNumericProperty should be numeric","in":"path","name":"exampleNumericProperty","type":"about:blank","value":"abc"},{"detail":"examplePropertyWithPattern a2345678901 doesn't match pattern '^\\d{11}$'","in":"body","name":"items[0].examplePropertyWithPattern","title":"Input isn't valid with respect to schema","type":"about:blank","value":"a2345678901"}],"status":400,"title":"Bad Request","type":"about:blank"}

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"`

	// WatchSchema Configuration for monitoring provider schema changes.
	WatchSchema *WatchSchema      `json:"watchSchema,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.
	//
	// Example: Account ID
	MapToDisplayName string `json:"mapToDisplayName,omitempty"`

	// MapToName The field name to map to.
	//
	// Example: account_id
	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`, Ampersand reads this object for every installation even if the customer never selects it (or it isn't present) in the installation config.
	Enabled IntegrationObjectEnabled `json:"enabled,omitempty"`

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

	// MapToName An object name to map to.
	//
	// Example: people
	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 added in v1.1.0

type IntegrationObjectEnabled string

IntegrationObjectEnabled If set to `always`, Ampersand reads this object for every installation even if the customer never selects it (or it isn't present) in the installation config.

const (
	IntegrationObjectEnabledAlways IntegrationObjectEnabled = "always"
)

Defines values for IntegrationObjectEnabled.

func (IntegrationObjectEnabled) Valid added in v1.2.0

func (e IntegrationObjectEnabled) Valid() bool

Valid indicates whether the value is a known member of the IntegrationObjectEnabled enum.

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 added in v1.0.8

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

IntegrationSubscribe defines model for IntegrationSubscribe.

type IntegrationSubscribeObject added in v1.0.8

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.
	//
	// Example: true
	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.
	//
	// Example: true
	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 Labels added in v1.0.5

type Labels map[string]string

Labels defines model for Labels.

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 Media added in v1.0.4

type Media struct {
	// DarkMode Media to be used in dark mode.
	DarkMode *MediaTypeDarkMode `json:"darkMode,omitempty"`

	// Regular Media for light/regular mode.
	Regular *MediaTypeRegular `json:"regular,omitempty"`
}

Media defines model for Media.

type MediaTypeDarkMode added in v1.0.4

type MediaTypeDarkMode struct {
	// IconURL URL to the icon for the provider that is to be used in dark mode.
	//
	// Example: https://example.com/icon.png
	IconURL string `json:"iconURL,omitempty"`

	// LogoURL URL to the logo for the provider that is to be used in dark mode.
	//
	// Example: https://example.com/logo.png
	LogoURL string `json:"logoURL,omitempty"`
}

MediaTypeDarkMode Media to be used in dark mode.

type MediaTypeRegular added in v1.0.4

type MediaTypeRegular struct {
	// IconURL URL to the icon for the provider.
	//
	// Example: https://example.com/icon.png
	IconURL string `json:"iconURL,omitempty"`

	// LogoURL URL to the logo for the provider.
	//
	// Example: https://example.com/logo.png
	LogoURL string `json:"logoURL,omitempty"`
}

MediaTypeRegular Media for light/regular mode.

type MetadataItemInput added in v1.0.9

type MetadataItemInput struct {
	// DefaultValue Default value for this metadata item
	DefaultValue string `json:"defaultValue,omitempty"`

	// DisplayName The human-readable name for the field
	DisplayName string `json:"displayName,omitempty"`

	// DocsURL URL with more information about how to locate this value
	//
	// Example: https://example.com/how-to-find-subdomain
	DocsURL string `json:"docsURL,omitempty"`

	// ModuleDependencies Specifies which modules REQUIRE (depend on) this metadata item. This field lists the modules that depend on/require the metadata item. Example: If "workspace" metadata has moduleDependencies: {crm: {}}, it means the CRM module requires the workspace metadata to function. Each module that needs this metadata item MUST be specified in this field. Even if it is all modules. The empty ModuleDependency {} is for future-proofing in case we need to add additional configuration options.
	ModuleDependencies *ModuleDependencies `json:"moduleDependencies,omitempty"`

	// Name The internal identifier for the metadata field
	Name string `json:"name"`

	// Prompt Human-readable description that can contain instructions on how to collect metadata
	Prompt string `json:"prompt,omitempty"`
}

MetadataItemInput defines model for MetadataItemInput.

type MetadataItemPostAuthentication added in v1.0.9

type MetadataItemPostAuthentication struct {
	// ModuleDependencies Specifies which modules REQUIRE (depend on) this metadata item. This field lists the modules that depend on/require the metadata item. Example: If "workspace" metadata has moduleDependencies: {crm: {}}, it means the CRM module requires the workspace metadata to function. Each module that needs this metadata item MUST be specified in this field. Even if it is all modules. The empty ModuleDependency {} is for future-proofing in case we need to add additional configuration options.
	ModuleDependencies *ModuleDependencies `json:"moduleDependencies,omitempty"`

	// Name The internal identifier for the metadata field
	Name string `json:"name"`
}

MetadataItemPostAuthentication defines model for MetadataItemPostAuthentication.

type ModuleDependencies added in v1.0.9

type ModuleDependencies map[string]ModuleDependency

ModuleDependencies Specifies which modules REQUIRE (depend on) this metadata item. This field lists the modules that depend on/require the metadata item. Example: If "workspace" metadata has moduleDependencies: {crm: {}}, it means the CRM module requires the workspace metadata to function. Each module that needs this metadata item MUST be specified in this field. Even if it is all modules. The empty ModuleDependency {} is for future-proofing in case we need to add additional configuration options.

type ModuleDependency added in v1.0.9

type ModuleDependency = map[string]interface{}

ModuleDependency Dependency for a single module.

type ModuleInfo added in v1.0.9

type ModuleInfo struct {
	BaseURL     string `json:"baseURL"`
	DisplayName string `json:"displayName"`

	// SubscribeRequirements Declares which auxiliary steps a provider requires to support subscriptions, beyond the per-object subscribe call itself.
	SubscribeRequirements *SubscribeRequirements `json:"subscribeRequirements,omitempty"`

	// Support The supported features for the provider.
	Support Support `json:"support" validate:"required"`
}

ModuleInfo defines model for ModuleInfo.

type Modules added in v1.0.9

type Modules map[string]ModuleInfo

Modules The registry of provider modules.

type Oauth2Opts added in v1.0.4

type Oauth2Opts struct {
	// AccessTokenOpts Configuration that defines how an OAuth 2.0 access token is attached to
	// outbound API requests. When provided, this configuration overrides the
	// default access-token handling behavior for the connector.
	AccessTokenOpts *AccessTokenOpts `json:"accessTokenOpts,omitempty"`

	// Audience A list of URLs that represent the audience for the token, which is needed for some client credential grant flows.
	//
	// Example: ["https://api.mparticle.com"]
	Audience []string `json:"audience,omitempty"`

	// AuthURL The authorization URL.
	//
	// Example: https://login.salesforce.com/services/oauth2/authorize
	AuthURL string `json:"authURL,omitempty"`

	// AuthURLParams Example: {"access_type":"offline","duration":"permanent"}
	AuthURLParams map[string]string `json:"authURLParams,omitempty"`

	// DocsURL URL with more information about where to retrieve Client ID and Client Secret, etc.
	//
	// Example: https://docs.example.com/client-credentials
	DocsURL string `json:"docsURL,omitempty"`

	// ExplicitScopesRequired Whether scopes are required to be known ahead of the OAuth flow.
	//
	// Example: true
	ExplicitScopesRequired bool `json:"explicitScopesRequired"`

	// ExplicitWorkspaceRequired Whether the workspace is required to be known ahead of the OAuth flow.
	//
	// Example: true
	ExplicitWorkspaceRequired bool                `json:"explicitWorkspaceRequired"`
	GrantType                 Oauth2OptsGrantType `json:"grantType"`

	// KeepAliveIntervalHours How many hours between proactive token keep-alive refreshes for this provider.
	// Token-manager adds a random stagger offset on top. If absent, defaults to 24.
	//
	//
	// Example: 120
	KeepAliveIntervalHours int `json:"keepAliveIntervalHours,omitempty"`

	// ScopeMappings Maps input scopes to their full OAuth scope values with template variable support. Scopes not in this map are passed through unchanged. Needed for some providers.
	//
	// Example: {"default":"https://{{.workspace}}.api.com/default"}
	ScopeMappings map[string]string `json:"scopeMappings,omitempty"`

	// ScopeQueryParam The query parameter name used to pass OAuth scopes in the authorization URL.
	// Defaults to "scope" when not specified. Some providers use a different
	// parameter name, such as "user_scope" for Slack user scopes.
	//
	//
	// Example: user_scope
	ScopeQueryParam string `json:"scopeQueryParam,omitempty"`

	// TokenMetadataFields Fields to be used to extract token metadata from the token response.
	TokenMetadataFields TokenMetadataFields `json:"tokenMetadataFields"`

	// TokenURL The token URL.
	//
	// Example: https://login.salesforce.com/services/oauth2/token
	TokenURL string `json:"tokenURL" validate:"required"`
}

Oauth2Opts Configuration for OAuth2.0. Must be provided if authType is oauth2.

type Oauth2OptsGrantType added in v1.0.4

type Oauth2OptsGrantType string

Oauth2OptsGrantType defines model for Oauth2Opts.GrantType.

const (
	Oauth2OptsGrantTypeAuthorizationCode     Oauth2OptsGrantType = "authorizationCode"
	Oauth2OptsGrantTypeAuthorizationCodePKCE Oauth2OptsGrantType = "authorizationCodePKCE"
	Oauth2OptsGrantTypeClientCredentials     Oauth2OptsGrantType = "clientCredentials"
	Oauth2OptsGrantTypePassword              Oauth2OptsGrantType = "password"
)

Defines values for Oauth2OptsGrantType.

func (Oauth2OptsGrantType) Valid added in v1.2.0

func (e Oauth2OptsGrantType) Valid() bool

Valid indicates whether the value is a known member of the Oauth2OptsGrantType enum.

type OptionalFieldsAutoOption

type OptionalFieldsAutoOption string

OptionalFieldsAutoOption defines model for OptionalFieldsAutoOption.

const (
	OptionalFieldsAutoOptionAll OptionalFieldsAutoOption = "all"
)

Defines values for OptionalFieldsAutoOption.

func (OptionalFieldsAutoOption) Valid added in v1.2.0

func (e OptionalFieldsAutoOption) Valid() bool

Valid indicates whether the value is a known member of the OptionalFieldsAutoOption enum.

type OtherEvents added in v1.0.8

type OtherEvents = []string

OtherEvents defines model for OtherEvents.

type Problem

type Problem struct {
	// Detail A human-readable explanation specific to this occurrence of the problem
	Detail *string `json:"detail,omitempty"`

	// Href An absolute URI that, when dereferenced, provides human-readable documentation for the problem type (e.g. using HTML).
	Href *string `json:"href,omitempty"`

	// Instance An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
	Instance *string `json:"instance,omitempty"`

	// Status The HTTP status code generated by the origin server for this occurrence of the problem.
	//
	// Example: 503
	Status *int32 `json:"status,omitempty"`

	// Title A short summary of the problem type. Written in English and readable for engineers (usually not suited for non technical stakeholders and not localized).
	//
	// Example: Service Unavailable
	Title *string `json:"title,omitempty"`

	// Type An absolute URI that identifies the problem type
	Type *string `json:"type,omitempty"`
}

Problem A Problem Details object (RFC 9457).

Additional properties specific to the problem type may be present.

Example: {"detail":"Description of specific occurrence of the problem","href":"https://www.belgif.be/specification/rest/api-guide/#standardized-problem-types","instance":"urn:uuid:123e4567-e89b-12d3-a456-426614174000","status":400,"title":"Description of the type of problem that occurred","type":"urn:problem-type:exampleOrganization:exampleProblem"}

type ProblemResponse

type ProblemResponse = Problem

ProblemResponse A Problem Details object (RFC 9457).

Additional properties specific to the problem type may be present.

Example: {"detail":"Description of specific occurrence of the problem","href":"https://www.belgif.be/specification/rest/api-guide/#standardized-problem-types","instance":"urn:uuid:123e4567-e89b-12d3-a456-426614174000","status":400,"title":"Description of the type of problem that occurred","type":"urn:problem-type:exampleOrganization:exampleProblem"}

type Provider added in v1.0.4

type Provider = string

Provider Example: salesforce

type ProviderAppMetadata added in v1.2.0

type ProviderAppMetadata struct {
	// AuthQueryParams Descriptors for fields stored in ProviderApp.metadata.authQueryParams (e.g., optional_scope for HubSpot).
	AuthQueryParams []MetadataItemInput `json:"authQueryParams,omitempty"`

	// ProviderParams Descriptors for fields stored in ProviderApp.metadata.providerParams (e.g., packageInstallURL for Salesforce, gcpProjectId for Gmail).
	ProviderParams []MetadataItemInput `json:"providerParams,omitempty"`
}

ProviderAppMetadata Describes the provider-app-level fields that the Ampersand dashboard should collect from the builder when creating a ProviderApp for this provider. These descriptors tell the dashboard which form fields to render; the submitted values are stored in ProviderApp.metadata.

type ProviderInfo added in v1.0.4

type ProviderInfo struct {
	// ApiKeyOpts Configuration for API key. Must be provided if authType is apiKey.
	ApiKeyOpts *ApiKeyOpts `json:"apiKeyOpts,omitempty"`

	// AuthHealthCheck A URL to check the health of a provider's credentials. It's used to see if the credentials are valid and if the provider is reachable.
	AuthHealthCheck *AuthHealthCheck `json:"authHealthCheck,omitempty"`

	// AuthType The type of authentication required by the provider.
	AuthType AuthType `json:"authType" validate:"required"`

	// BaseURL The base URL for making API requests.
	BaseURL string `json:"baseURL" validate:"required"`

	// BasicOpts Configuration for Basic Auth. Optional.
	BasicOpts *BasicAuthOpts `json:"basicOpts,omitempty"`

	// CustomOpts Configuration for custom auth. Optional.
	CustomOpts    *CustomAuthOpts `json:"customOpts,omitempty"`
	DefaultModule string          `json:"defaultModule"`

	// DisplayName The display name of the provider, if omitted, defaults to provider name.
	//
	// Example: Zendesk Chat
	DisplayName string  `json:"displayName,omitempty"`
	Labels      *Labels `json:"labels,omitempty"`
	Media       *Media  `json:"media,omitempty"`

	// Metadata Provider metadata that needs to be given by the user or fetched by the connector post authentication for the connector to work.
	Metadata *ProviderMetadata `json:"metadata,omitempty"`

	// Modules The registry of provider modules.
	Modules *Modules `json:"modules,omitempty"`
	Name    string   `json:"name"`

	// Oauth2Opts Configuration for OAuth2.0. Must be provided if authType is oauth2.
	Oauth2Opts *Oauth2Opts `json:"oauth2Opts,omitempty"`

	// PostAuthInfoNeeded If true, we require additional information after auth to start making requests.
	//
	// Example: true
	PostAuthInfoNeeded bool `json:"postAuthInfoNeeded,omitempty"`

	// ProviderAppMetadata Describes the provider-app-level fields that the Ampersand dashboard should collect from the builder when creating a ProviderApp for this provider. These descriptors tell the dashboard which form fields to render; the submitted values are stored in ProviderApp.metadata.
	ProviderAppMetadata *ProviderAppMetadata `json:"providerAppMetadata,omitempty"`

	// SubscribeRequirements Declares which auxiliary steps a provider requires to support subscriptions, beyond the per-object subscribe call itself.
	SubscribeRequirements *SubscribeRequirements `json:"subscribeRequirements,omitempty"`

	// Support The supported features for the provider.
	Support Support `json:"support" validate:"required"`
}

ProviderInfo defines model for ProviderInfo.

type ProviderMetadata added in v1.0.9

type ProviderMetadata struct {
	// Input Metadata provided as manual input
	Input []MetadataItemInput `json:"input,omitempty"`

	// PostAuthentication Metadata fetched by the connector post authentication
	PostAuthentication []MetadataItemPostAuthentication `json:"postAuthentication,omitempty"`
}

ProviderMetadata Provider metadata that needs to be given by the user or fetched by the connector post authentication for the connector to work.

type SearchOperators added in v1.2.0

type SearchOperators struct {
	Equals bool `json:"equals"`
}

SearchOperators defines model for SearchOperators.

type SearchSupport added in v1.2.0

type SearchSupport struct {
	Operators SearchOperators `json:"operators"`
}

SearchSupport defines model for SearchSupport.

type SubscribeRequirements added in v1.2.0

type SubscribeRequirements struct {
	// Maintenance Whether the subscription requires periodic maintenance. Some providers expire subscriptions/watches after a fixed TTL, so the subscription must be renewed on a schedule to remain active.
	Maintenance *bool `json:"maintenance,omitempty"`

	// PostProcess Whether subscribing requires a third-party setup step that the connector instance itself cannot perform. Examples: Salesforce requires AWS EventBridge configuration; Gmail requires a Google Pub/Sub topic to be configured. Any configuration that must happen outside the connector falls into post-process.
	PostProcess *bool `json:"postProcess,omitempty"`

	// Registration Whether the provider requires a one-time registration step that is shared across all subscribed objects. The subscribe method is object-scoped, so if a separate API call is needed beyond per-object configuration (e.g., registering a single webhook/endpoint that all object subscriptions hang off of), registration is required.
	Registration *bool `json:"registration,omitempty"`

	// SubscribeByAPI Whether the provider supports programmatic subscription via API. If false, provider may still support webhooks via manual configuration in UI.
	SubscribeByAPI *bool `json:"subscribeByAPI,omitempty"`
}

SubscribeRequirements Declares which auxiliary steps a provider requires to support subscriptions, beyond the per-object subscribe call itself.

type SubscribeSupport added in v1.0.8

type SubscribeSupport struct {
	Create      *bool `json:"create,omitempty"`
	Delete      *bool `json:"delete,omitempty"`
	PassThrough *bool `json:"passThrough,omitempty"`
	Update      *bool `json:"update,omitempty"`
}

SubscribeSupport defines model for SubscribeSupport.

type Support added in v1.0.4

type Support struct {
	BatchWrite       *BatchWriteSupport `json:"batchWrite,omitempty"`
	BulkWrite        BulkWriteSupport   `json:"bulkWrite" validate:"required"`
	Delete           bool               `json:"delete"`
	Proxy            bool               `json:"proxy"`
	Read             bool               `json:"read"`
	Search           SearchSupport      `json:"search"`
	Subscribe        bool               `json:"subscribe"`
	SubscribeSupport *SubscribeSupport  `json:"subscribeSupport,omitempty"`
	Write            bool               `json:"write"`
}

Support The supported features for the provider.

type TokenMetadataFields added in v1.0.4

type TokenMetadataFields struct {
	// ConsumerRefField Example: user-id
	ConsumerRefField string `json:"consumerRefField,omitempty"`

	// OtherFields Additional fields to extract and transform from the token response
	OtherFields *TokenMetadataFieldsOtherFields `json:"otherFields,omitempty"`

	// ScopesField Example: scopes
	ScopesField string `json:"scopesField,omitempty"`

	// WorkspaceRefField Example: account-id
	WorkspaceRefField string `json:"workspaceRefField,omitempty"`
}

TokenMetadataFields Fields to be used to extract token metadata from the token response.

type TokenMetadataFieldsOtherFields added in v1.0.9

type TokenMetadataFieldsOtherFields = []struct {
	// Capture A regex expression to capture the value that we need from the path. There must be only one capture group named 'result' in the expression. If not provided, will cause an error.
	//
	// Example: https:\/\/(?<result>[^.]+)\.docusign\.net
	Capture string `json:"capture,omitempty"`

	// DisplayName The human-readable name of the field
	DisplayName string `json:"displayName"`

	// Name The internal name of the field
	Name string `json:"name"`

	// Path The path to the field in the token response (accepts dot notation for nested fields)
	//
	// Example: owner.siteId
	Path string `json:"path"`
}

TokenMetadataFieldsOtherFields Additional fields to extract and transform from the token response

type UpdateEvent added in v1.0.8

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.
	//
	// Example: all
	WatchFieldsAuto *UpdateEventWatchFieldsAuto `json:"watchFieldsAuto,omitempty"`
}

UpdateEvent defines model for UpdateEvent.

type UpdateEventEnabled added in v1.0.8

type UpdateEventEnabled string

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

const (
	UpdateEventEnabledAlways UpdateEventEnabled = "always"
)

Defines values for UpdateEventEnabled.

func (UpdateEventEnabled) Valid added in v1.2.0

func (e UpdateEventEnabled) Valid() bool

Valid indicates whether the value is a known member of the UpdateEventEnabled enum.

type UpdateEventWatchFieldsAuto added in v1.0.9

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.

Example: all

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

Defines values for UpdateEventWatchFieldsAuto.

func (UpdateEventWatchFieldsAuto) Valid added in v1.2.0

func (e UpdateEventWatchFieldsAuto) Valid() bool

Valid indicates whether the value is a known member of the UpdateEventWatchFieldsAuto enum.

type ValueDefaults added in v1.0.8

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

ValueDefaults Configuration to set default write values for object fields.

type WatchSchema added in v1.2.0

type WatchSchema struct {
	// AllObjects Schema change event configuration for all objects in the integration.
	AllObjects WatchSchemaAllObjects `json:"allObjects"`

	// Destination The destination to send schema change notifications to.
	//
	// Example: fieldWatchStream
	Destination string `json:"destination"`

	// Schedule Cron schedule for checking schema changes. Minimum frequency is once per hour. Defaults to once a day.
	//
	// Example: 0 */6 * * *
	Schedule string `json:"schedule,omitempty"`
}

WatchSchema Configuration for monitoring provider schema changes.

type WatchSchemaAllObjects added in v1.2.0

type WatchSchemaAllObjects struct {
	// FieldChanged Configuration for detecting when fields are changed.
	FieldChanged *FieldChangedEvent `json:"fieldChanged,omitempty"`

	// FieldCreated Configuration for detecting when new fields are created.
	FieldCreated *FieldCreatedEvent `json:"fieldCreated,omitempty"`

	// FieldDeleted Configuration for detecting when fields are deleted.
	FieldDeleted *FieldDeletedEvent `json:"fieldDeleted,omitempty"`
}

WatchSchemaAllObjects Schema change event configuration for all objects in the integration.

Jump to

Keyboard shortcuts

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