providers

package
v0.0.0-...-4876c14 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

nolint:lll,godoclint

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

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

Index

Constants

View Source
const (
	// ModuleGoogleCalendar is the module used for listing user calendars.
	// https://developers.google.com/workspace/calendar/api/v3/reference
	ModuleGoogleCalendar common.ModuleID = "calendar"
	// ModuleGoogleContacts is the module used for listing contacts from People API.
	// https://developers.google.com/people
	ModuleGoogleContacts common.ModuleID = "contacts"
	// ModuleGoogleGmail is the module used for listing emails from Gmail API.
	// https://developers.google.com/workspace/gmail/api/reference/rest
	ModuleGoogleGmail common.ModuleID = "gmail"
)
View Source
const (
	LabelExperimental = "experimental"
	LabelValueTrue    = "true"
)
View Source
const (
	// ModuleLinkedInPlatform is the module used for platform linkedIn objects.
	ModuleLinkedInPlatform common.ModuleID = "platform"
	// ModuleLinkedInAds is the module used for ads related objects.
	ModuleLinkedInAds common.ModuleID = "ads"
)
View Source
const (
	Netsuite Provider = "netsuite"

	// ModuleNetsuiteSuiteQL is a read-only module that uses SuiteQL to read data.
	ModuleNetsuiteSuiteQL = "suiteql"

	// ModuleNetsuiteRESTAPI is a read-write module that uses the REST API to read and write data.
	ModuleNetsuiteRESTAPI = "restapi"
)
View Source
const (
	Pipedrive             Provider        = "pipedrive"
	ModulePipedriveLegacy common.ModuleID = "legacy"
	ModulePipedriveCRM    common.ModuleID = "crm"
)
View Source
const (
	// ModuleSalesforceCRM
	// https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_what_is_rest_api.htm
	ModuleSalesforceCRM common.ModuleID = "crm"
	// ModuleSalesforceAccountEngagement
	// https://developer.salesforce.com/docs/marketing/pardot/guide/use-cases.html
	ModuleSalesforceAccountEngagement common.ModuleID = "account-engagement"
	// ModuleSalesforceAccountEngagementDemo
	// It is similar to ModuleSalesforceAccountEngagement but targets non-production URL.
	ModuleSalesforceAccountEngagementDemo common.ModuleID = "account-engagement-demo"
)
View Source
const (
	Seismic Provider = "seismic"

	// ModuleSeismicReporting is the module used for accessing and managing reporting API.
	ModuleSeismicReporting common.ModuleID = "reporting"

	// ModuleSeismicIntegration is the module used for accessing and managing integration API.
	ModuleSeismicIntegration common.ModuleID = "integration"
)
View Source
const (
	Zoho                      Provider        = "zoho"
	ModuleZohoCRM             common.ModuleID = "crm"
	ModuleZohoDesk            common.ModuleID = "desk"
	ModuleZohoProjects        common.ModuleID = "projects"
	ModuleZohoBugTracker      common.ModuleID = "bugtracker"
	ModuleZohoServiceDeskPlus common.ModuleID = "servicedeskplus"
)
View Source
const Apollo = "apollo"
View Source
const Insightly = "insightly"
View Source
const ModuleAWSIdentityCenter common.ModuleID = "aws-identity-center"
View Source
const (
	// ModuleAtlassianJira is the module used for listing Jira issues.
	ModuleAtlassianJira common.ModuleID = "jira"
)
View Source
const (
	// ModuleHubspotCRM is the module used for accessing standard CRM objects.
	ModuleHubspotCRM common.ModuleID = "crm"
)

Variables

View Source
var (
	ErrCatalogNotFound                = errors.New("catalog not found")
	ErrProviderNotFound               = errors.New("provider not found")
	ErrClient                         = errors.New("client creation failed")
	ErrRetrievingHeaderApiKeyName     = errors.New("provider information missing header name for API Key")
	ErrRetrievingQueryParamApiKeyName = errors.New("provider information missing query parameter name for API Key")
)

Functions

func SetInfo

func SetInfo(provider Provider, info ProviderInfo)

SetInfo sets the information for a specific provider in the catalog. This is useful to enable experimental providers or to override the default provider information. This is primarily used to initialize the provider catalog. Generally speaking, once the provider catalog is initialized, it should not be modified. That having been said, there are some use cases where it is useful to override the provider information, such as when testing new configurations. This function is not thread-safe and should be called before the provider catalog is read.

func SetupMemStoreProvider

func SetupMemStoreProvider()

SetupMemStoreProvider initializes the MemStore provider configuration. You need to call this explicitly if you want to use the MemStore provider in your tests.

func SetupMockProvider

func SetupMockProvider()

SetupMockProvider sets up the mock provider. You need to call this explicitly if you want to use the mock provider in your tests.

Types

type AccessTokenOpts

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

type AccessTokenOptsAttachmentType string

AccessTokenOptsAttachmentType How the access token should be attached to requests.

const (
	AccessTokenHeaderAttachment AccessTokenOptsAttachmentType = "accessTokenHeaderAttachment"
)

Defines values for AccessTokenOptsAttachmentType.

type AccessTokenOptsHeader

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

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

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

type ApiKeyAsBasicOpts

type ApiKeyAsBasicOpts struct {
	// FieldUsed whether the API key should be used as the username or password.
	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.
	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

type ApiKeyAsBasicOptsFieldUsed string

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

const (
	PasswordField ApiKeyAsBasicOptsFieldUsed = "password"
	UsernameField ApiKeyAsBasicOptsFieldUsed = "username"
)

Defines values for ApiKeyAsBasicOptsFieldUsed.

type ApiKeyOpts

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

type ApiKeyOptsAttachmentType string

ApiKeyOptsAttachmentType How the API key should be attached to requests.

const (
	Header ApiKeyOptsAttachmentType = "header"
	Query  ApiKeyOptsAttachmentType = "query"
)

Defines values for ApiKeyOptsAttachmentType.

type ApiKeyOptsHeader

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

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

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

type ApiKeyOptsQuery

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

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

type ApiKeyParams

type ApiKeyParams struct {
	Key           string
	HeaderOptions []common.HeaderAuthClientOption
	QueryOptions  []common.QueryParamAuthClientOption
}

ApiKeyParams is the parameters to create an api key client.

type AuthHealthCheck

type AuthHealthCheck struct {
	// Method The HTTP method to use for the health check. If not set, defaults to 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.
	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.
	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

type AuthType string

AuthType The type of authentication required by the provider.

const (
	ApiKey AuthType = "apiKey"
	Basic  AuthType = "basic"
	Custom AuthType = "custom"
	Jwt    AuthType = "jwt"
	None   AuthType = "none"
	Oauth2 AuthType = "oauth2"
)

Defines values for AuthType.

type BasicAuthOpts

type BasicAuthOpts struct {
	// ApiKeyAsBasic If true, the provider uses an API key which then gets encoded as a basic auth user:pass string.
	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.
	DocsURL string `json:"docsURL,omitempty"`
}

BasicAuthOpts Configuration for Basic Auth. Optional.

type BasicParams

type BasicParams struct {
	User    string
	Pass    string
	Options []common.HeaderAuthClientOption
}

BasicParams is the parameters to create a basic auth client.

type BatchWriteSupport

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

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

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 CatalogOption

type CatalogOption func(params *catalogParams)

func WithCatalog

func WithCatalog(c *CatalogWrapper) CatalogOption

WithCatalog is an option that can be used to override the default catalog.

type CatalogType

type CatalogType map[string]ProviderInfo

CatalogType defines model for CatalogType.

type CatalogWrapper

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

	// Timestamp An RFC3339 formatted timestamp of when the catalog was generated.
	Timestamp string `json:"timestamp" validate:"required"`
}

CatalogWrapper defines model for CatalogWrapper.

func ReadCatalog

func ReadCatalog(opts ...CatalogOption) (*CatalogWrapper, error)

ReadCatalog is used to get the catalog.

type CustomAuthHeader

type CustomAuthHeader struct {
	// Name The name of the header.
	Name string `json:"name"`

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

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

type CustomAuthInput

type CustomAuthInput struct {
	// DisplayName The human-readable name for the custom auth input field.
	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.
	DocsURL string `json:"docsURL,omitempty"`

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

	// Prompt Some helpful text or context to be displayed to the user when asking for this input.
	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 CustomAuthOpts

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

	// 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 CustomAuthParams

type CustomAuthParams struct {
	Values  map[string]string
	Options []common.CustomAuthClientOption
}

type CustomAuthQueryParam

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

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

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

type CustomCatalog

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

func NewCustomCatalog

func NewCustomCatalog(opts ...CatalogOption) CustomCatalog

NewCustomCatalog allows to apply modifiers on the base catalog, to tweak its content. Just like the default catalog it supports reading data, resolves variable substitutions.

func (CustomCatalog) ReadCatalog

func (c CustomCatalog) ReadCatalog() (*CatalogWrapper, error)

func (CustomCatalog) ReadInfo

func (c CustomCatalog) ReadInfo(provider Provider, vars ...catalogreplacer.CatalogVariable) (*ProviderInfo, error)

type IsUnauthorizedDecider

type IsUnauthorizedDecider func(rsp *http.Response) (bool, error)

IsUnauthorizedDecider is a function called to determine if a response is unauthorized.

type Labels

type Labels map[string]string

Labels defines model for Labels.

type Media

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

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

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

MediaTypeDarkMode Media to be used in dark mode.

type MediaTypeRegular

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

	// LogoURL URL to the logo for the provider.
	LogoURL string `json:"logoURL,omitempty"`
}

MediaTypeRegular Media for light/regular mode.

type MetadataItemInput

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
	DocsURL string `json:"docsURL,omitempty"`

	// ModuleDependencies Does this metadata item only apply to a specific module?
	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

type MetadataItemPostAuthentication struct {
	// ModuleDependencies Does this metadata item only apply to a specific module?
	ModuleDependencies *ModuleDependencies `json:"moduleDependencies,omitempty"`

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

MetadataItemPostAuthentication defines model for MetadataItemPostAuthentication.

type ModuleDependencies

type ModuleDependencies map[string]ModuleDependency

ModuleDependencies Does this metadata item only apply to a specific module?

type ModuleDependency

type ModuleDependency = map[string]interface{}

ModuleDependency Dependency for a single module.

type ModuleInfo

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

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

ModuleInfo defines model for ModuleInfo.

type Modules

type Modules map[string]ModuleInfo

Modules The registry of provider modules.

type NewClientParams

type NewClientParams struct {
	// Debug will enable debug mode for the client.
	Debug bool

	// Client is the http client to use for the client. If
	// the value is nil, the default http client will be used.
	Client *http.Client

	// OnUnauthorized is the handler to call when the client receives an
	// unauthorized response.
	OnUnauthorized UnauthorizedHandler

	// IsUnauthorized is the function to call to determine if the response is unauthorized.
	// If not set, it will default to the dumb logic of checking for 401 status codes.
	IsUnauthorized IsUnauthorizedDecider

	// BasicCreds is the basic auth credentials to use for the client.
	// If the provider uses basic auth, this field must be set.
	BasicCreds *BasicParams

	// OAuth2ClientCreds is the client credentials to use for the client.
	// If the provider uses client credentials, this field must be set.
	OAuth2ClientCreds *OAuth2ClientCredentialsParams

	// OAuth2AuthCodeCreds is the auth code credentials to use for the client.
	// If the provider uses auth code, this field must be set.
	OAuth2AuthCodeCreds *OAuth2AuthCodeParams

	// ApiKeyCreds is the api key to use for the client. If the provider uses
	// api-key auth, this field must be set.
	ApiKeyCreds *ApiKeyParams

	// CustomCreds is the custom auth credentials to use for the client. If the provider uses
	// custom auth, this field must be set.
	CustomCreds *CustomAuthParams
}

NewClientParams is the parameters to create a new HTTP client.

type OAuth2AuthCodeParams

type OAuth2AuthCodeParams struct {
	Config  *oauth2.Config
	Token   *oauth2.Token
	Options []common.OAuthOption
}

OAuth2AuthCodeParams is the parameters to create an OAuth2 auth code client.

type OAuth2ClientCredentialsParams

type OAuth2ClientCredentialsParams struct {
	Config  *clientcredentials.Config
	Options []common.OAuthOption
}

OAuth2ClientCredentialsParams is the parameters to create an OAuth2 client credentials client.

type Oauth2Opts

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.
	Audience []string `json:"audience,omitempty"`

	// AuthURL The authorization URL.
	AuthURL       string            `json:"authURL,omitempty"`
	AuthURLParams map[string]string `json:"authURLParams,omitempty"`

	// DocsURL URL with more information about where to retrieve Client ID and Client Secret, etc.
	DocsURL string `json:"docsURL,omitempty"`

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

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

	// 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.
	ScopeMappings map[string]string `json:"scopeMappings,omitempty"`

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

	// TokenURL The token URL.
	TokenURL string `json:"tokenURL" validate:"required"`
}

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

type Oauth2OptsGrantType

type Oauth2OptsGrantType string

Oauth2OptsGrantType defines model for Oauth2Opts.GrantType.

const (
	AuthorizationCode     Oauth2OptsGrantType = "authorizationCode"
	AuthorizationCodePKCE Oauth2OptsGrantType = "authorizationCodePKCE"
	ClientCredentials     Oauth2OptsGrantType = "clientCredentials"
	Password              Oauth2OptsGrantType = "password"
)

Defines values for Oauth2OptsGrantType.

type Provider

type Provider = string

Provider defines model for Provider.

const (
	Adyen     Provider = "adyen"
	AdyenTest Provider = "adyenTest"
)
const (
	BlueshiftEU Provider = "blueshiftEU"
	Blueshift   Provider = "blueshift"
)
const (
	CustomerDataPipelines Provider = "customerDataPipelines"
	CustomerJourneysApp   Provider = "customerJourneysApp"
	CustomerJourneysTrack Provider = "customerJourneysTrack"
)
const (
	Docusign          Provider = "docusign"
	DocusignDeveloper Provider = "docusignDeveloper"
)
const (
	Dropbox     Provider = "dropbox"
	DropboxSign Provider = "dropboxSign"
)
const (
	DynamicsBusinessCentral Provider = "dynamicsBusinessCentral"
	DynamicsCRM             Provider = "dynamicsCRM"
)
const (
	Gladly   Provider = "gladly"
	GladlyQA Provider = "gladlyQA"
)
const (
	HighLevelStandard   Provider = "highLevelStandard"
	HighLevelWhiteLabel Provider = "highLevelWhiteLabel"
)
const (
	Instantly   Provider = "instantly"
	InstantlyAI Provider = "instantlyAI"
)
const (
	Ironclad     Provider = "ironclad"
	IroncladDemo Provider = "ironcladDemo"
	IroncladEU   Provider = "ironcladEU"
)
const (
	Lever        Provider = "lever"
	LeverSandbox Provider = "leverSandbox"
)
const (
	PaddleSandbox Provider = "paddleSandbox"
	Paddle        Provider = "paddle"
)
const (
	PayPal        Provider = "payPal"
	PayPalSandBox Provider = "payPalSandBox"
)
const (
	Ramp     Provider = "ramp"
	RampDemo Provider = "rampDemo"
)
const (
	RingOverEU Provider = "ringOverEU"
	RingOverUS Provider = "ringOverUS"
)
const (
	ZendeskChat    Provider = "zendeskChat"
	ZendeskSupport Provider = "zendeskSupport"
)
const AWS Provider = "aws"
const AWeber Provider = "aWeber"
const ActiveCampaign Provider = "activeCampaign"
const AcuityScheduling Provider = "acuityScheduling"
const Adobe Provider = "adobe"
const Aha Provider = "aha"
const Aircall Provider = "aircall"
const Airtable Provider = "airtable"
const Amplemarket Provider = "amplemarket"
const Amplitude Provider = "amplitude"
const Anthropic Provider = "anthropic"
const Asana Provider = "asana"
const Ashby Provider = "ashby"
const Atlassian Provider = "atlassian"
const Attio Provider = "attio"
const Avoma Provider = "avoma"

Avoma is the identifier for the Avoma provider.

const Basecamp Provider = "basecamp"
const Bird Provider = "bird"
const Bitbucket Provider = "bitbucket"
const Blackbaud Provider = "blackbaud"
const Box Provider = "box"
const Braintree Provider = "braintree"
const Braze Provider = "braze"
const Breakcold Provider = "breakcold"
const Brevo Provider = "brevo"
const Bynder Provider = "bynder"
const Calendly Provider = "calendly"
const CallRail Provider = "callRail"
const CampaignMonitor Provider = "campaignMonitor"
const Capsule Provider = "capsule"
const ChargeOver Provider = "chargeOver"
const Chargebee Provider = "chargebee"
const ChartMogul Provider = "chartMogul"
const ChiliPiper Provider = "chilipiper"
const Chorus Provider = "chorus"
const Clari Provider = "clari"
const ClariCopilot Provider = "clariCopilot"
const ClickUp Provider = "clickup"
const Close Provider = "close"
const CloudTalk Provider = "cloudTalk"
const Coda Provider = "coda"
const ConstantContact Provider = "constantContact"
const Copper Provider = "copper"
const Crunchbase Provider = "crunchbase"
const Delighted Provider = "delighted"
const Discord Provider = "discord"
const Discourse Provider = "discourse"
const Dixa Provider = "dixa"
const Domo Provider = "domo"
const Dovetail Provider = "dovetail"
const Drift Provider = "drift"
const Drip Provider = "drip"
const EmailBison Provider = "emailBison"
const Fathom Provider = "fathom"
const Figma Provider = "figma"
const Fireflies Provider = "fireflies"
const Flatfile Provider = "flatfile"
const Formstack Provider = "formstack"
const Freshchat Provider = "freshchat"
const Freshdesk Provider = "freshdesk"
const Freshsales Provider = "freshsales"
const Freshservice Provider = "freshservice"
const Front Provider = "front"
const G2 Provider = "g2"
const Gainsight Provider = "gainsight"
const Geckoboard Provider = "geckoboard"
const GetResponse Provider = "getResponse"
const GitLab Provider = "gitlab"
const Github Provider = "github"
const GoTo Provider = "goTo"
const Gong Provider = "gong"
const (
	Google Provider = "google"
)
const (
	Gorgias Provider = "gorgias"
)
const Greenhouse Provider = "greenhouse"
const GreenhouseJobBoard Provider = "greenhouseJobBoard"
const Groove Provider = "groove"
const Guru Provider = "guru"
const HappyFox Provider = "happyfox"
const HelpScoutMailbox Provider = "helpScoutMailbox"
const HeyReach Provider = "heyreach"
const Hightouch Provider = "hightouch"
const Hive Provider = "hive"
const Hubspot Provider = "hubspot"
const Hunter Provider = "hunter"
const Instagram Provider = "instagram"
const Intercom Provider = "intercom"
const Iterable Provider = "iterable"
const Jobber Provider = "jobber"
const JoinMe Provider = "joinMe"
const Jotform Provider = "jotform"
const JustCall Provider = "justCall"
const KaseyaVSAX Provider = "kaseyaVSAX"
const Keap Provider = "keap"
const Kit Provider = "kit"
const Klaviyo Provider = "klaviyo"
const Lemlist Provider = "lemlist"
const Linear Provider = "linear"
const LinkedIn Provider = "linkedIn"
const (
	Livestorm Provider = "livestorm"
)
const Loxo Provider = "loxo"
const Mailgun Provider = "mailgun"
const Marketo Provider = "marketo"
const Maxio Provider = "maxio"
const MemStore Provider = "memstore"

MemStore is a mock provider with JSON schema validation for testing. This provider is intentionally not registered in init() and must be set up manually by calling SetupMemStoreProvider(), mirroring the pattern used for the Mock provider.

const (
	Meta Provider = "meta"
)
const Microsoft Provider = "microsoft"

Microsoft supports products including OneDrive Outlook Excel Edge Extensions Sharepoint OneNote Notifications Todos Teams Insights Planner and Personal Contacts.

const Miro Provider = "miro"
const Mixmax Provider = "mixmax"
const Mixpanel Provider = "mixpanel"
const Mock Provider = "mock"

Mock is a mock provider that can be used for testing. When the mock connector is used, it's added to the catalog manually. That is why there's no init() function in this file.

const Monday Provider = "monday"
const Mural Provider = "mural"
const Notion Provider = "notion"
const Nutshell Provider = "nutshell"
const Okta Provider = "okta"
const OpenAI Provider = "openAI"
const Outplay Provider = "outplay"
const Outreach Provider = "outreach"
const Pinterest Provider = "pinterest"
const Pipeliner Provider = "pipeliner"
const Podium Provider = "podium"
const ProductBoard Provider = "productBoard"
const Pylon Provider = "pylon"
const QuickBooks Provider = "quickbooks"
const Rebilly Provider = "rebilly"
const Recurly Provider = "recurly"
const RedditAds Provider = "redditAds"
const RevenueCat Provider = "revenueCat"
const RingCentral Provider = "ringCentral"
const SageIntacct Provider = "sageIntacct"
const Salesflare Provider = "salesflare"
const Salesforce Provider = "salesforce"
const SalesforceMarketing Provider = "salesforceMarketing"
const Salesloft Provider = "salesloft"
const Segment Provider = "segment"
const Sellsy Provider = "sellsy"
const SendGrid Provider = "sendGrid"
const ServiceNow Provider = "serviceNow"
const Shopify Provider = "shopify"
const Slack Provider = "slack"
const Smartlead Provider = "smartlead"
const Smartsheet Provider = "smartsheet"
const SnapchatAds Provider = "snapchatAds"
const Snowflake Provider = "snowflake"
const (
	SolarWindsServiceDesk Provider = "solarWindsServiceDesk"
)
const StackExchange Provider = "stackExchange"
const Stripe Provider = "stripe"
const SugarCRM Provider = "sugarCRM"
const SuperSend Provider = "superSend"
const SurveyMonkey Provider = "surveyMonkey"
const Talkdesk Provider = "talkdesk"
const Teamleader Provider = "teamleader"
const Teamwork Provider = "teamwork"
const Timely Provider = "timely"
const Typeform Provider = "typeform"
const Vtiger Provider = "vtiger"
const Webex Provider = "webex"
const Webflow Provider = "webflow"
const Whereby Provider = "whereby"
const WordPress Provider = "wordPress"
const Wrike Provider = "wrike"
const Xero Provider = "xero"
const Zoom Provider = "zoom"
const Zuora Provider = "zuora"

func AllNames

func AllNames() []Provider

AllNames returns a list of all provider names in the catalog.

type ProviderInfo

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.
	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.
	PostAuthInfoNeeded bool `json:"postAuthInfoNeeded,omitempty"`

	// ProviderOpts Additional provider-specific metadata.
	ProviderOpts  ProviderOpts   `json:"providerOpts"`
	SubscribeOpts *SubscribeOpts `json:"subscribeOpts,omitempty"`

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

ProviderInfo defines model for ProviderInfo.

func ReadInfo

func ReadInfo(provider Provider, vars ...catalogreplacer.CatalogVariable) (*ProviderInfo, error)

ReadInfo reads the information from the catalog for specific provider. It also performs string substitution on the values in the config that are surrounded by {{}}, if vars are provided. The catalog variable will be applied such that `{{.VAR_NAME}}` string will be replaced with `VAR_VALUE`.

func (*ProviderInfo) GetApiKeyHeader

func (i *ProviderInfo) GetApiKeyHeader(apiKey string) (string, string, error)

func (*ProviderInfo) GetApiKeyQueryParamName

func (i *ProviderInfo) GetApiKeyQueryParamName() (string, error)

func (*ProviderInfo) GetOption

func (i *ProviderInfo) GetOption(key string) (string, bool)

func (*ProviderInfo) NewClient

NewClient will create a new authenticated client based on the provider's auth type.

func (*ProviderInfo) Override

func (i *ProviderInfo) Override(override *ProviderInfo) *ProviderInfo

Override can be used to override the base URL of the provider, and could be used for other fields in the future.

func (*ProviderInfo) ReadModuleInfo

func (i *ProviderInfo) ReadModuleInfo(moduleID common.ModuleID) *ModuleInfo

ReadModuleInfo finds information about the module. If module is not found fallbacks to the default.

func (*ProviderInfo) RequiresWorkspace

func (i *ProviderInfo) RequiresWorkspace() bool

func (*ProviderInfo) SubstituteWith

func (i *ProviderInfo) SubstituteWith(vars catalogreplacer.CatalogVariables) error

type ProviderMetadata

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 ProviderOpts

type ProviderOpts map[string]string

ProviderOpts Additional provider-specific metadata.

type SubscribeOpts

type SubscribeOpts struct {
	// RegistrationTiming The timing of the registration.
	RegistrationTiming SubscribeOptsRegistrationTiming `json:"registrationTiming"`

	// SubscriptionScope The scope of the subscription.
	SubscriptionScope SubscribeOptsSubscriptionScope `json:"subscriptionScope"`

	// TargetURLScope The scope of the target URL.
	TargetURLScope interface{} `json:"targetURLScope"`
}

SubscribeOpts defines model for SubscribeOpts.

type SubscribeOptsRegistrationTiming

type SubscribeOptsRegistrationTiming string

SubscribeOptsRegistrationTiming The timing of the registration.

const (
	SubscribeOptsRegistrationTimingInstallation SubscribeOptsRegistrationTiming = "installation"
	SubscribeOptsRegistrationTimingIntegration  SubscribeOptsRegistrationTiming = "integration"
	SubscribeOptsRegistrationTimingProviderApp  SubscribeOptsRegistrationTiming = "providerApp"
)

Defines values for SubscribeOptsRegistrationTiming.

type SubscribeOptsSubscriptionScope

type SubscribeOptsSubscriptionScope string

SubscribeOptsSubscriptionScope The scope of the subscription.

const (
	SubscribeOptsSubscriptionScopeInstallation SubscribeOptsSubscriptionScope = "installation"
	SubscribeOptsSubscriptionScopeIntegration  SubscribeOptsSubscriptionScope = "integration"
)

Defines values for SubscribeOptsSubscriptionScope.

type SubscribeSupport

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

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

Support The supported features for the provider.

type TokenMetadataFields

type TokenMetadataFields struct {
	ConsumerRefField string `json:"consumerRefField,omitempty"`

	// OtherFields Additional fields to extract and transform from the token response
	OtherFields       *TokenMetadataFieldsOtherFields `json:"otherFields,omitempty"`
	ScopesField       string                          `json:"scopesField,omitempty"`
	WorkspaceRefField string                          `json:"workspaceRefField,omitempty"`
}

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

type TokenMetadataFieldsOtherFields

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.
	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)
	Path string `json:"path"`
}

TokenMetadataFieldsOtherFields Additional fields to extract and transform from the token response

type UnauthorizedEvent

type UnauthorizedEvent struct {
	Provider    *ProviderInfo
	Headers     []common.Header     // Only certain providers will set this, depending on the auth type
	QueryParams []common.QueryParam // Only certain providers will set this, depending on the auth type
	OAuthToken  *oauth2.Token       // Only certain providers will set this, depending on the auth type
	Request     *http.Request
	Response    *http.Response
}

UnauthorizedEvent is the event that is triggered when an unauthorized response (http 401) is received.

type UnauthorizedHandler

type UnauthorizedHandler func(client common.AuthenticatedHTTPClient, event *UnauthorizedEvent) (*http.Response, error)

UnauthorizedHandler is a function that is called when an unauthorized response is received. The handler can be used to refresh the token or to perform other actions. The client is included so you can make additional requests if needed, but be careful not to create an infinite loop (hint, use the request's context to attach a counter to avoid this possibility).

The proper semantics of this function can be read as: "I received an unauthorized response, and I want to do something about it, and then I want to return a modified response to the original caller."

The most common planned use case is to refresh the token and then retry the request and return the non-401 response to the original caller.

Source Files

Directories

Path Synopsis
aha
aws
nolint
nolint
nolint:tagliatelle,godoclint
nolint:tagliatelle,godoclint
nolint
nolint
Package justcall provides a connector for the JustCall API.
Package justcall provides a connector for the JustCall API.
Package keap nolint:gocritic,godot
Package keap nolint:gocritic,godot
kit
nolint
nolint
nolint:lll,tagliatelle,godoclint
nolint:lll,tagliatelle,godoclint

Jump to

Keyboard shortcuts

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