module Hasura.Server.API.Metadata.Types
( RQLMetadataV1 (..),
RQLMetadataV2 (..),
RQLMetadataRequest (..),
)
where
import GHC.Generics
import Hasura.Function.API qualified as Functions
import Hasura.LogicalModel.API qualified as LogicalModel
import Hasura.NativeQuery.API qualified as NativeQueries
import Hasura.RQL.DDL.Action
import Hasura.RQL.DDL.ComputedField
import Hasura.RQL.DDL.ConnectionTemplate
import Hasura.RQL.DDL.DataConnector
import Hasura.RQL.DDL.EventTrigger
import Hasura.RQL.DDL.Metadata
import Hasura.RQL.DDL.Permission
import Hasura.RQL.DDL.QueryTags
import Hasura.RQL.DDL.Relationship
import Hasura.RQL.DDL.Relationship.Rename
import Hasura.RQL.DDL.Relationship.Suggest
import Hasura.RQL.DDL.RemoteRelationship
import Hasura.RQL.DDL.Schema
import Hasura.RQL.DDL.Schema.Source
import Hasura.RQL.DDL.SourceKinds
import Hasura.RQL.DDL.Webhook.Transform.Validation
import Hasura.RQL.Types.Allowlist
import Hasura.RQL.Types.ApiLimit
import Hasura.RQL.Types.Common
import Hasura.RQL.Types.CustomTypes
import Hasura.RQL.Types.Endpoint
import Hasura.RQL.Types.EventTrigger
import Hasura.RQL.Types.GraphqlSchemaIntrospection
import Hasura.RQL.Types.Metadata (GetCatalogState, SetCatalogState)
import Hasura.RQL.Types.OpenTelemetry
import Hasura.RQL.Types.QueryCollection
import Hasura.RQL.Types.Roles
import Hasura.RQL.Types.ScheduledTrigger
import Hasura.RemoteSchema.MetadataAPI
import Hasura.SQL.AnyBackend
import Hasura.StoredProcedure.API qualified as StoredProcedures
import Network.Types.Extended
data RQLMetadataV1
=
RMAddSource !(AnyBackend AddSource)
| RMDropSource DropSource
| RMRenameSource !RenameSource
| RMUpdateSource !(AnyBackend UpdateSource)
| RMListSourceKinds !ListSourceKinds
| RMGetSourceKindCapabilities !GetSourceKindCapabilities
| RMGetSourceTables !(AnyBackend GetSourceTables)
| RMGetSourceTrackables !(AnyBackend GetSourceTrackables)
| RMGetTableInfo !(AnyBackend GetTableInfo)
| RMGetTableInfo_ !GetTableInfo_
|
RMTrackTable !(AnyBackend TrackTableV2)
| RMTrackTables !(AnyBackend TrackTables)
| RMUntrackTable !(AnyBackend UntrackTable)
| RMUntrackTables !(AnyBackend UntrackTables)
| RMSetTableCustomization !(AnyBackend SetTableCustomization)
| RMSetApolloFederationConfig (AnyBackend SetApolloFederationConfig)
| RMPgSetTableIsEnum !(AnyBackend SetTableIsEnum)
|
RMCreateInsertPermission !(AnyBackend (CreatePerm InsPerm))
| RMCreateSelectPermission !(AnyBackend (CreatePerm SelPerm))
| RMCreateUpdatePermission !(AnyBackend (CreatePerm UpdPerm))
| RMCreateDeletePermission !(AnyBackend (CreatePerm DelPerm))
| RMDropInsertPermission !(AnyBackend DropPerm)
| RMDropSelectPermission !(AnyBackend DropPerm)
| RMDropUpdatePermission !(AnyBackend DropPerm)
| RMDropDeletePermission !(AnyBackend DropPerm)
| !(AnyBackend SetPermComment)
|
RMCreateObjectRelationship !(AnyBackend CreateObjRel)
| RMCreateArrayRelationship !(AnyBackend CreateArrRel)
| RMDropRelationship !(AnyBackend DropRel)
| !(AnyBackend SetRelComment)
| RMRenameRelationship !(AnyBackend RenameRel)
| RMSuggestRelationships !(AnyBackend SuggestRels)
|
RMCreateRemoteRelationship !(AnyBackend CreateFromSourceRelationship)
| RMUpdateRemoteRelationship !(AnyBackend CreateFromSourceRelationship)
| RMDeleteRemoteRelationship !(AnyBackend DeleteFromSourceRelationship)
|
RMTrackFunction !(AnyBackend Functions.TrackFunctionV2)
| RMUntrackFunction !(AnyBackend Functions.UnTrackFunction)
| RMSetFunctionCustomization (AnyBackend Functions.SetFunctionCustomization)
|
RMCreateFunctionPermission !(AnyBackend Functions.FunctionPermissionArgument)
| RMDropFunctionPermission !(AnyBackend Functions.FunctionPermissionArgument)
|
RMAddComputedField !(AnyBackend AddComputedField)
| RMDropComputedField !(AnyBackend DropComputedField)
|
RMTestConnectionTemplate !(AnyBackend TestConnectionTemplate)
|
RMGetNativeQuery !(AnyBackend NativeQueries.GetNativeQuery)
| RMTrackNativeQuery !(AnyBackend NativeQueries.TrackNativeQuery)
| RMUntrackNativeQuery !(AnyBackend NativeQueries.UntrackNativeQuery)
|
RMGetStoredProcedure !(AnyBackend StoredProcedures.GetStoredProcedure)
| RMTrackStoredProcedure !(AnyBackend StoredProcedures.TrackStoredProcedure)
| RMUntrackStoredProcedure !(AnyBackend StoredProcedures.UntrackStoredProcedure)
|
RMGetLogicalModel !(AnyBackend LogicalModel.GetLogicalModel)
| RMTrackLogicalModel !(AnyBackend LogicalModel.TrackLogicalModel)
| RMUntrackLogicalModel !(AnyBackend LogicalModel.UntrackLogicalModel)
| RMCreateSelectLogicalModelPermission !(AnyBackend (LogicalModel.CreateLogicalModelPermission SelPerm))
| RMDropSelectLogicalModelPermission !(AnyBackend LogicalModel.DropLogicalModelPermission)
|
RMCreateEventTrigger !(AnyBackend (Unvalidated1 CreateEventTriggerQuery))
| RMDeleteEventTrigger !(AnyBackend DeleteEventTriggerQuery)
| RMRedeliverEvent !(AnyBackend RedeliverEventQuery)
| RMInvokeEventTrigger !(AnyBackend InvokeEventTriggerQuery)
| RMCleanupEventTriggerLog !TriggerLogCleanupConfig
| RMResumeEventTriggerCleanup !TriggerLogCleanupToggleConfig
| RMPauseEventTriggerCleanup !TriggerLogCleanupToggleConfig
| RMGetEventLogs !(AnyBackend GetEventLogs)
| RMGetEventInvocationLogs !(AnyBackend GetEventInvocations)
| RMGetEventById !(AnyBackend GetEventById)
|
RMAddRemoteSchema !AddRemoteSchemaQuery
| RMUpdateRemoteSchema !AddRemoteSchemaQuery
| RMRemoveRemoteSchema !RemoteSchemaNameQuery
| RMReloadRemoteSchema !RemoteSchemaNameQuery
| RMIntrospectRemoteSchema !RemoteSchemaNameQuery
|
RMAddRemoteSchemaPermissions !AddRemoteSchemaPermission
| RMDropRemoteSchemaPermissions !DropRemoteSchemaPermissions
|
RMCreateRemoteSchemaRemoteRelationship CreateRemoteSchemaRemoteRelationship
| RMUpdateRemoteSchemaRemoteRelationship CreateRemoteSchemaRemoteRelationship
| RMDeleteRemoteSchemaRemoteRelationship DeleteRemoteSchemaRemoteRelationship
|
RMCreateCronTrigger !(Unvalidated CreateCronTrigger)
| RMDeleteCronTrigger !ScheduledTriggerName
| RMCreateScheduledEvent !CreateScheduledEvent
| RMDeleteScheduledEvent !DeleteScheduledEvent
| RMGetScheduledEvents !GetScheduledEvents
| RMGetScheduledEventInvocations !GetScheduledEventInvocations
| RMGetCronTriggers
|
RMCreateAction !(Unvalidated CreateAction)
| RMDropAction !DropAction
| RMUpdateAction !(Unvalidated UpdateAction)
| RMCreateActionPermission !CreateActionPermission
| RMDropActionPermission !DropActionPermission
|
RMCreateQueryCollection !CreateCollection
| RMRenameQueryCollection !RenameCollection
| RMDropQueryCollection !DropCollection
| RMAddQueryToCollection !AddQueryToCollection
| RMDropQueryFromCollection !DropQueryFromCollection
| RMAddCollectionToAllowlist !AllowlistEntry
| RMDropCollectionFromAllowlist !DropCollectionFromAllowlist
| RMUpdateScopeOfCollectionInAllowlist !UpdateScopeOfCollectionInAllowlist
|
RMCreateRestEndpoint !CreateEndpoint
| RMDropRestEndpoint !DropEndpoint
|
RMDCAddAgent !DCAddAgent
| RMDCDeleteAgent !DCDeleteAgent
|
RMSetCustomTypes !CustomTypes
|
RMSetApiLimits !ApiLimit
| RMRemoveApiLimits
|
RMSetMetricsConfig !MetricsConfig
| RMRemoveMetricsConfig
|
RMAddInheritedRole !InheritedRole
| RMDropInheritedRole !DropInheritedRole
|
RMReplaceMetadata !ReplaceMetadata
| RMExportMetadata !ExportMetadata
| RMClearMetadata !ClearMetadata
| RMReloadMetadata !ReloadMetadata
| RMGetInconsistentMetadata !GetInconsistentMetadata
| RMDropInconsistentMetadata !DropInconsistentMetadata
|
RMSetGraphqlSchemaIntrospectionOptions !SetGraphqlIntrospectionOptions
|
RMAddHostToTLSAllowlist !AddHostToTLSAllowlist
| RMDropHostFromTLSAllowlist !DropHostFromTLSAllowlist
|
RMSetQueryTagsConfig !SetQueryTagsConfig
|
RMSetOpenTelemetryConfig !OpenTelemetryConfig
| RMSetOpenTelemetryStatus !OtelStatus
|
RMDumpInternalState !DumpInternalState
| RMGetCatalogState !GetCatalogState
| RMSetCatalogState !SetCatalogState
| RMTestWebhookTransform !(Unvalidated TestWebhookTransform)
|
RMBulk [RQLMetadataRequest]
|
RMBulkKeepGoing [RQLMetadataRequest]
|
RMBulkAtomic [RQLMetadataRequest]
deriving ((forall x. RQLMetadataV1 -> Rep RQLMetadataV1 x)
-> (forall x. Rep RQLMetadataV1 x -> RQLMetadataV1)
-> Generic RQLMetadataV1
forall x. Rep RQLMetadataV1 x -> RQLMetadataV1
forall x. RQLMetadataV1 -> Rep RQLMetadataV1 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. RQLMetadataV1 -> Rep RQLMetadataV1 x
from :: forall x. RQLMetadataV1 -> Rep RQLMetadataV1 x
$cto :: forall x. Rep RQLMetadataV1 x -> RQLMetadataV1
to :: forall x. Rep RQLMetadataV1 x -> RQLMetadataV1
Generic)
data RQLMetadataV2
= RMV2ReplaceMetadata !ReplaceMetadataV2
| RMV2ExportMetadata !ExportMetadata
deriving ((forall x. RQLMetadataV2 -> Rep RQLMetadataV2 x)
-> (forall x. Rep RQLMetadataV2 x -> RQLMetadataV2)
-> Generic RQLMetadataV2
forall x. Rep RQLMetadataV2 x -> RQLMetadataV2
forall x. RQLMetadataV2 -> Rep RQLMetadataV2 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. RQLMetadataV2 -> Rep RQLMetadataV2 x
from :: forall x. RQLMetadataV2 -> Rep RQLMetadataV2 x
$cto :: forall x. Rep RQLMetadataV2 x -> RQLMetadataV2
to :: forall x. Rep RQLMetadataV2 x -> RQLMetadataV2
Generic)
data RQLMetadataRequest
= RMV1 !RQLMetadataV1
| RMV2 !RQLMetadataV2