diff --git a/openapi/catalog.gen.go b/openapi/catalog.gen.go index 62627c4..5503daa 100644 --- a/openapi/catalog.gen.go +++ b/openapi/catalog.gen.go @@ -1,6 +1,6 @@ // Package openapi provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT. package openapi // Defines values for AccessTokenOptsAttachmentType. @@ -108,45 +108,6 @@ func (e Oauth2OptsGrantType) Valid() bool { } } -// Defines values for SubscribeOptsRegistrationTiming. -const ( - SubscribeOptsRegistrationTimingInstallation SubscribeOptsRegistrationTiming = "installation" - SubscribeOptsRegistrationTimingIntegration SubscribeOptsRegistrationTiming = "integration" - SubscribeOptsRegistrationTimingProviderApp SubscribeOptsRegistrationTiming = "providerApp" -) - -// Valid indicates whether the value is a known member of the SubscribeOptsRegistrationTiming enum. -func (e SubscribeOptsRegistrationTiming) Valid() bool { - switch e { - case SubscribeOptsRegistrationTimingInstallation: - return true - case SubscribeOptsRegistrationTimingIntegration: - return true - case SubscribeOptsRegistrationTimingProviderApp: - return true - default: - return false - } -} - -// Defines values for SubscribeOptsSubscriptionScope. -const ( - SubscribeOptsSubscriptionScopeInstallation SubscribeOptsSubscriptionScope = "installation" - SubscribeOptsSubscriptionScopeIntegration SubscribeOptsSubscriptionScope = "integration" -) - -// Valid indicates whether the value is a known member of the SubscribeOptsSubscriptionScope enum. -func (e SubscribeOptsSubscriptionScope) Valid() bool { - switch e { - case SubscribeOptsSubscriptionScopeInstallation: - return true - case SubscribeOptsSubscriptionScopeIntegration: - return true - default: - return false - } -} - // 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. @@ -400,6 +361,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"` } @@ -447,6 +411,15 @@ type Oauth2OptsGrantType string // Provider defines model for Provider. type Provider = string +// 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 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"` +} + // ProviderInfo defines model for ProviderInfo. type ProviderInfo struct { // ApiKeyOpts Configuration for API key. Must be provided if authType is apiKey. @@ -486,9 +459,11 @@ type ProviderInfo struct { // 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"` + // 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"` @@ -503,9 +478,6 @@ type ProviderMetadata struct { PostAuthentication []MetadataItemPostAuthentication `json:"postAuthentication,omitempty"` } -// ProviderOpts Additional provider-specific metadata. -type ProviderOpts map[string]string - // SearchOperators defines model for SearchOperators. type SearchOperators struct { Equals bool `json:"equals"` @@ -516,23 +488,20 @@ type SearchSupport struct { Operators SearchOperators `json:"operators"` } -// SubscribeOpts defines model for SubscribeOpts. -type SubscribeOpts struct { - // RegistrationTiming The timing of the registration. - RegistrationTiming SubscribeOptsRegistrationTiming `json:"registrationTiming"` - - // SubscriptionScope The scope of the subscription. - SubscriptionScope SubscribeOptsSubscriptionScope `json:"subscriptionScope"` +// SubscribeRequirements Declares which auxiliary steps a provider requires to support subscriptions, beyond the per-object subscribe call itself. +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"` - // TargetURLScope The scope of the target URL. - TargetURLScope interface{} `json:"targetURLScope"` -} + // 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"` -// SubscribeOptsRegistrationTiming The timing of the registration. -type SubscribeOptsRegistrationTiming string + // 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"` -// SubscribeOptsSubscriptionScope The scope of the subscription. -type SubscribeOptsSubscriptionScope string + // 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"` +} // SubscribeSupport defines model for SubscribeSupport. type SubscribeSupport struct { diff --git a/openapi/manifest.gen.go b/openapi/manifest.gen.go index 0a3cb37..ae4d00b 100644 --- a/openapi/manifest.gen.go +++ b/openapi/manifest.gen.go @@ -1,6 +1,6 @@ // Package openapi provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT. package openapi import ( @@ -126,6 +126,7 @@ const ( Int FieldMetadataValueType = "int" MultiSelect FieldMetadataValueType = "multiSelect" Other FieldMetadataValueType = "other" + Reference FieldMetadataValueType = "reference" SingleSelect FieldMetadataValueType = "singleSelect" String FieldMetadataValueType = "string" ) @@ -147,6 +148,8 @@ func (e FieldMetadataValueType) Valid() bool { return true case Other: return true + case Reference: + return true case SingleSelect: return true case String: @@ -322,6 +325,9 @@ type FieldMetadata struct { // ReadOnly Whether the field is read-only. 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"` diff --git a/openapi/problem.gen.go b/openapi/problem.gen.go index ab5ce01..30ef3b2 100644 --- a/openapi/problem.gen.go +++ b/openapi/problem.gen.go @@ -1,6 +1,6 @@ // Package openapi provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT. package openapi // ApiProblem A Problem Details object (RFC 9457).