2020-01-26 19:34:25 +00:00
|
|
|
defmodule Mobilizon.GraphQL.Schema.ConfigType do
|
2019-03-22 09:53:38 +00:00
|
|
|
@moduledoc """
|
|
|
|
Schema representation for User
|
|
|
|
"""
|
|
|
|
use Absinthe.Schema.Notation
|
|
|
|
|
2020-01-26 19:34:25 +00:00
|
|
|
alias Mobilizon.GraphQL.Resolvers.Config
|
2019-03-22 09:53:38 +00:00
|
|
|
|
|
|
|
@desc "A config object"
|
|
|
|
object :config do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2019-03-22 09:53:38 +00:00
|
|
|
# Instance name
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:name, :string, description: "The instance's name")
|
|
|
|
field(:description, :string, description: "The instance's short description")
|
|
|
|
field(:long_description, :string, description: "The instance's long description")
|
|
|
|
field(:slogan, :string, description: "The instance's slogan")
|
|
|
|
field(:contact, :string, description: "The instance's contact details")
|
|
|
|
|
|
|
|
field(:languages, list_of(:string), description: "The instance's admins languages")
|
2022-03-28 18:02:43 +00:00
|
|
|
|
|
|
|
field(:event_categories, list_of(:event_category_option),
|
|
|
|
description: "The instance list of event categories possibilities"
|
|
|
|
) do
|
|
|
|
resolve(&Config.event_categories/3)
|
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:registrations_open, :boolean, description: "Whether the registrations are opened")
|
|
|
|
|
|
|
|
field(:registrations_allowlist, :boolean,
|
|
|
|
description: "Whether the registration are on an allowlist"
|
|
|
|
)
|
|
|
|
|
|
|
|
field(:demo_mode, :boolean, description: "Whether the demo mode is enabled")
|
|
|
|
field(:country_code, :string, description: "The country code from the IP")
|
|
|
|
field(:location, :lonlat, description: "The IP's location")
|
|
|
|
field(:geocoding, :geocoding, description: "The instance's geocoding settings")
|
|
|
|
field(:maps, :maps, description: "The instance's maps settings")
|
|
|
|
field(:anonymous, :anonymous, description: "The instance's anonymous action settings")
|
|
|
|
|
|
|
|
field(:resource_providers, list_of(:resource_provider),
|
|
|
|
description: "The instance's enabled resource providers"
|
|
|
|
)
|
|
|
|
|
2021-04-12 08:13:11 +00:00
|
|
|
field(:upload_limits, :upload_limits, description: "The configuration for upload limits")
|
|
|
|
|
2023-06-05 07:12:02 +00:00
|
|
|
field(:timezones, list_of(:timezone), description: "The instance's available timezones")
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:features, :features, description: "The instance's features")
|
2021-10-06 16:00:50 +00:00
|
|
|
field(:restrictions, :restrictions, description: "The instance's restrictions")
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:version, :string, description: "The instance's version")
|
|
|
|
field(:federating, :boolean, description: "Whether this instance is federation")
|
2019-12-20 12:04:34 +00:00
|
|
|
|
|
|
|
field(:terms, :terms, description: "The instance's terms") do
|
2020-11-19 16:06:28 +00:00
|
|
|
arg(:locale, :string,
|
|
|
|
default_value: "en",
|
|
|
|
description:
|
|
|
|
"The user's locale. The terms will be translated in their language, if available."
|
|
|
|
)
|
|
|
|
|
2019-12-20 12:04:34 +00:00
|
|
|
resolve(&Config.terms/3)
|
|
|
|
end
|
2020-06-15 09:01:49 +00:00
|
|
|
|
2020-06-19 17:27:10 +00:00
|
|
|
field(:privacy, :privacy, description: "The instance's privacy policy") do
|
2020-11-19 16:06:28 +00:00
|
|
|
arg(:locale, :string,
|
|
|
|
default_value: "en",
|
|
|
|
description:
|
|
|
|
"The user's locale. The privacy policy will be translated in their language, if available."
|
|
|
|
)
|
|
|
|
|
2020-06-19 17:27:10 +00:00
|
|
|
resolve(&Config.privacy/3)
|
|
|
|
end
|
|
|
|
|
2020-06-15 09:01:49 +00:00
|
|
|
field(:rules, :string, description: "The instance's rules")
|
2020-11-19 16:06:28 +00:00
|
|
|
|
2020-06-27 17:12:45 +00:00
|
|
|
field(:auth, :auth, description: "The instance auth methods")
|
2021-04-19 10:40:51 +00:00
|
|
|
field(:instance_feeds, :instance_feeds, description: "The instance's feed settings")
|
2021-05-06 16:39:59 +00:00
|
|
|
field(:web_push, :web_push, description: "Web Push settings for the instance")
|
2021-10-04 16:59:41 +00:00
|
|
|
|
|
|
|
field(:export_formats, :export_formats, description: "The instance list of export formats")
|
2021-12-16 15:48:50 +00:00
|
|
|
|
|
|
|
field(:analytics, list_of(:analytics),
|
|
|
|
description: "Configuration for diverse analytics services"
|
|
|
|
)
|
2022-08-26 14:08:58 +00:00
|
|
|
|
|
|
|
field(:search, :search_settings, description: "The instance's search settings")
|
2019-12-20 12:04:34 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
The instance's terms configuration
|
|
|
|
"""
|
2019-12-20 12:04:34 +00:00
|
|
|
object :terms do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:url, :string, description: "The instance's terms URL.")
|
|
|
|
field(:type, :instance_terms_type, description: "The instance's terms type")
|
|
|
|
field(:body_html, :string, description: "The instance's terms body text")
|
2019-11-08 18:37:14 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
The instance's privacy policy configuration
|
|
|
|
"""
|
2020-06-19 17:27:10 +00:00
|
|
|
object :privacy do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:url, :string, description: "The instance's privacy policy URL")
|
|
|
|
field(:type, :instance_privacy_type, description: "The instance's privacy policy type")
|
|
|
|
field(:body_html, :string, description: "The instance's privacy policy body text")
|
2020-06-19 17:27:10 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
Geographic coordinates
|
|
|
|
"""
|
2019-11-08 18:37:14 +00:00
|
|
|
object :lonlat do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:longitude, :float, description: "The coordinates longitude")
|
|
|
|
field(:latitude, :float, description: "The coordinates latitude")
|
2020-06-09 13:20:07 +00:00
|
|
|
# field(:accuracy_radius, :integer)
|
2019-03-22 09:53:38 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
Instance geocoding configuration
|
|
|
|
"""
|
2019-11-20 12:49:57 +00:00
|
|
|
object :geocoding do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:autocomplete, :boolean,
|
|
|
|
description: "Whether autocomplete in address fields can be enabled"
|
|
|
|
)
|
|
|
|
|
|
|
|
field(:provider, :string, description: "The geocoding provider")
|
2019-11-20 12:49:57 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
Instance maps configuration
|
|
|
|
"""
|
2019-11-20 12:49:57 +00:00
|
|
|
object :maps do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:tiles, :tiles, description: "The instance's maps tiles configuration")
|
2020-12-17 10:26:25 +00:00
|
|
|
field(:routing, :routing, description: "The instance's maps routing configuration")
|
2019-11-20 12:49:57 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
2020-12-17 10:26:25 +00:00
|
|
|
Instance map tiles configuration
|
2020-11-19 16:06:28 +00:00
|
|
|
"""
|
2019-11-20 12:49:57 +00:00
|
|
|
object :tiles do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:endpoint, :string, description: "The instance's tiles endpoint")
|
|
|
|
field(:attribution, :string, description: "The instance's tiles attribution text")
|
2019-11-20 12:49:57 +00:00
|
|
|
end
|
|
|
|
|
2020-12-17 10:26:25 +00:00
|
|
|
@desc """
|
|
|
|
Instance map routing configuration
|
|
|
|
"""
|
|
|
|
object :routing do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2020-12-17 10:26:25 +00:00
|
|
|
field(:type, :routing_type, description: "The instance's routing type")
|
|
|
|
end
|
|
|
|
|
|
|
|
enum :routing_type do
|
|
|
|
value(:openstreetmap, description: "Redirect to openstreetmap.org's direction endpoint")
|
|
|
|
value(:google_maps, description: "Redirect to Google Maps's direction endpoint")
|
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
Instance anonymous configuration
|
|
|
|
"""
|
2019-12-20 12:04:34 +00:00
|
|
|
object :anonymous do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:participation, :anonymous_participation,
|
|
|
|
description: "The instance's anonymous participation settings"
|
|
|
|
)
|
|
|
|
|
|
|
|
field(:event_creation, :anonymous_event_creation,
|
|
|
|
description: "The instance's anonymous event creation settings"
|
|
|
|
)
|
|
|
|
|
|
|
|
field(:reports, :anonymous_reports, description: "The instance's anonymous reports setting")
|
|
|
|
|
|
|
|
field(:actor_id, :id,
|
|
|
|
description: "The actor ID that should be used to perform anonymous actions"
|
|
|
|
)
|
2019-12-20 12:04:34 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
Instance anonymous participation configuration
|
|
|
|
"""
|
2019-12-20 12:04:34 +00:00
|
|
|
object :anonymous_participation do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:allowed, :boolean, description: "Whether anonymous participations are allowed")
|
|
|
|
|
|
|
|
field(:validation, :anonymous_participation_validation,
|
|
|
|
description: "The ways to validate anonymous participations"
|
|
|
|
)
|
2019-12-20 12:04:34 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
Instance anonymous participation validation configuration
|
|
|
|
"""
|
2019-12-20 12:04:34 +00:00
|
|
|
object :anonymous_participation_validation do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:email, :anonymous_participation_validation_email,
|
|
|
|
description: "The policy to validate anonymous participations by email"
|
|
|
|
)
|
|
|
|
|
|
|
|
field(:captcha, :anonymous_participation_validation_captcha,
|
|
|
|
description: "The policy to validate anonymous participations by captcha"
|
|
|
|
)
|
2019-12-20 12:04:34 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
Instance anonymous participation with validation by email configuration
|
|
|
|
"""
|
2019-12-20 12:04:34 +00:00
|
|
|
object :anonymous_participation_validation_email do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:enabled, :boolean,
|
|
|
|
description: "Whether anonymous participation validation by email is enabled"
|
|
|
|
)
|
|
|
|
|
|
|
|
field(:confirmation_required, :boolean,
|
|
|
|
description: "Whether anonymous participation validation by email is required"
|
|
|
|
)
|
2019-12-20 12:04:34 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
Instance anonymous participation with validation by captcha configuration
|
|
|
|
"""
|
2019-12-20 12:04:34 +00:00
|
|
|
object :anonymous_participation_validation_captcha do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:enabled, :boolean,
|
|
|
|
description: "Whether anonymous participation validation by captcha is enabled"
|
|
|
|
)
|
2019-12-20 12:04:34 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
Instance anonymous event creation configuration
|
|
|
|
"""
|
2019-12-20 12:04:34 +00:00
|
|
|
object :anonymous_event_creation do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:allowed, :boolean, description: "Whether anonymous event creation is enabled")
|
|
|
|
|
|
|
|
field(:validation, :anonymous_event_creation_validation,
|
|
|
|
description: "The methods to validate events created anonymously"
|
|
|
|
)
|
2019-12-20 12:04:34 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
Instance anonymous event creation validation configuration
|
|
|
|
"""
|
2019-12-20 12:04:34 +00:00
|
|
|
object :anonymous_event_creation_validation do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:email, :anonymous_event_creation_validation_email,
|
|
|
|
description: "The policy to validate anonymous event creations by email"
|
|
|
|
)
|
|
|
|
|
|
|
|
field(:captcha, :anonymous_event_creation_validation_captcha,
|
|
|
|
description: "The policy to validate anonymous event creations by captcha"
|
|
|
|
)
|
2019-12-20 12:04:34 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
Instance anonymous event creation email validation configuration
|
|
|
|
"""
|
2019-12-20 12:04:34 +00:00
|
|
|
object :anonymous_event_creation_validation_email do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:enabled, :boolean,
|
|
|
|
description: "Whether anonymous event creation with email validation is enabled"
|
|
|
|
)
|
|
|
|
|
|
|
|
field(:confirmation_required, :boolean,
|
|
|
|
description: "Whether anonymous event creation with email validation is required"
|
|
|
|
)
|
2019-12-20 12:04:34 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
Instance anonymous event creation captcha validation configuration
|
|
|
|
"""
|
2019-12-20 12:04:34 +00:00
|
|
|
object :anonymous_event_creation_validation_captcha do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:enabled, :boolean,
|
|
|
|
description: "Whether anonymous event creation with validation by captcha is enabled"
|
|
|
|
)
|
2019-12-20 12:04:34 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
Instance anonymous reports
|
|
|
|
"""
|
2020-06-09 12:07:49 +00:00
|
|
|
object :anonymous_reports do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:allowed, :boolean, description: "Whether anonymous reports are allowed")
|
2020-06-09 12:07:49 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
A resource provider details
|
|
|
|
"""
|
2020-02-18 07:57:00 +00:00
|
|
|
object :resource_provider do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:type, :string, description: "The resource provider's type")
|
|
|
|
field(:endpoint, :string, description: "The resource provider's endpoint")
|
|
|
|
field(:software, :string, description: "The resource provider's software")
|
2020-02-18 07:57:00 +00:00
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
The instance's features
|
|
|
|
"""
|
2020-06-08 14:47:57 +00:00
|
|
|
object :features do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2020-11-19 16:06:28 +00:00
|
|
|
field(:groups, :boolean, description: "Whether groups are activated on this instance")
|
|
|
|
|
|
|
|
field(:event_creation, :boolean,
|
|
|
|
description: "Whether event creation is allowed on this instance"
|
|
|
|
)
|
2023-03-17 17:10:59 +00:00
|
|
|
|
2023-09-01 16:16:06 +00:00
|
|
|
field(:event_external, :boolean,
|
|
|
|
description: "Whether redirecting to external providers is authorized in event edition"
|
|
|
|
)
|
|
|
|
|
2023-03-17 17:10:59 +00:00
|
|
|
field(:antispam, :boolean, description: "Whether anti-spam is activated on this instance")
|
2020-06-08 14:47:57 +00:00
|
|
|
end
|
|
|
|
|
2021-10-06 16:00:50 +00:00
|
|
|
@desc """
|
|
|
|
The instance's restrictions
|
|
|
|
"""
|
|
|
|
object :restrictions do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
|
|
|
|
2021-10-06 16:00:50 +00:00
|
|
|
field(:only_admin_can_create_groups, :boolean,
|
|
|
|
description: "Whether groups creation is allowed only for admin, not for all users"
|
|
|
|
)
|
|
|
|
|
|
|
|
field(:only_groups_can_create_events, :boolean,
|
|
|
|
description: "Whether events creation is allowed only for groups, not for persons"
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
The instance's auth configuration
|
|
|
|
"""
|
2020-06-27 17:12:45 +00:00
|
|
|
object :auth do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2020-06-27 17:12:45 +00:00
|
|
|
field(:ldap, :boolean, description: "Whether or not LDAP auth is enabled")
|
2022-10-28 14:05:55 +00:00
|
|
|
field(:database_login, :boolean, description: "Whether or not database login is enabled")
|
2020-06-27 17:12:45 +00:00
|
|
|
field(:oauth_providers, list_of(:oauth_provider), description: "List of oauth providers")
|
|
|
|
end
|
|
|
|
|
2020-11-19 16:06:28 +00:00
|
|
|
@desc """
|
|
|
|
An oAuth Provider
|
|
|
|
"""
|
2020-06-27 17:12:45 +00:00
|
|
|
object :oauth_provider do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2020-06-27 17:12:45 +00:00
|
|
|
field(:id, :string, description: "The provider ID")
|
|
|
|
field(:label, :string, description: "The label for the auth provider")
|
|
|
|
end
|
|
|
|
|
2021-04-12 08:13:11 +00:00
|
|
|
@desc """
|
|
|
|
An upload limits configuration
|
|
|
|
"""
|
|
|
|
object :upload_limits do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2021-04-12 08:13:11 +00:00
|
|
|
field(:default, :integer, description: "The default limitation, in bytes")
|
|
|
|
field(:avatar, :integer, description: "The avatar limitation, in bytes")
|
|
|
|
field(:banner, :integer, description: "The banner limitation, in bytes")
|
|
|
|
end
|
|
|
|
|
2021-04-19 10:40:51 +00:00
|
|
|
object :instance_feeds do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2021-04-19 10:40:51 +00:00
|
|
|
field(:enabled, :boolean, description: "Whether the instance-wide feeds are enabled")
|
|
|
|
end
|
|
|
|
|
2021-05-06 16:39:59 +00:00
|
|
|
object :web_push do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2021-05-06 16:39:59 +00:00
|
|
|
field(:enabled, :boolean, description: "Whether the WebPush feature is enabled")
|
|
|
|
field(:public_key, :string, description: "The server's public WebPush VAPID key")
|
|
|
|
end
|
|
|
|
|
2021-12-16 15:48:50 +00:00
|
|
|
object :analytics do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2021-12-16 15:48:50 +00:00
|
|
|
field(:id, :string, description: "ID of the analytics service")
|
|
|
|
field(:enabled, :boolean, description: "Whether the service is activated or not")
|
|
|
|
|
|
|
|
field(:configuration, list_of(:analytics_configuration),
|
|
|
|
description: "A list of key-values configuration"
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
enum :analytics_configuration_type do
|
|
|
|
value(:string, description: "A string")
|
|
|
|
value(:integer, description: "An integer")
|
|
|
|
value(:boolean, description: "A boolean")
|
|
|
|
value(:float, description: "A float")
|
|
|
|
end
|
|
|
|
|
|
|
|
object :analytics_configuration do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2021-12-16 15:48:50 +00:00
|
|
|
field(:key, :string, description: "The key for the analytics configuration element")
|
|
|
|
field(:value, :string, description: "The value for the analytics configuration element")
|
|
|
|
field(:type, :analytics_configuration_type, description: "The analytics configuration type")
|
|
|
|
end
|
|
|
|
|
2022-08-26 14:08:58 +00:00
|
|
|
object :search_settings do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2022-08-26 14:08:58 +00:00
|
|
|
field(:global, :global_search_settings, description: "The instance's global search settings")
|
|
|
|
end
|
|
|
|
|
|
|
|
object :global_search_settings do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2022-08-26 14:08:58 +00:00
|
|
|
field(:is_enabled, :boolean, description: "Whether global search is enabled")
|
|
|
|
field(:is_default, :boolean, description: "Whether global search is the default")
|
|
|
|
end
|
|
|
|
|
2021-10-04 16:59:41 +00:00
|
|
|
@desc """
|
|
|
|
Export formats configuration
|
|
|
|
"""
|
|
|
|
object :export_formats do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
|
|
|
|
2021-10-04 16:59:41 +00:00
|
|
|
field(:event_participants, list_of(:string),
|
|
|
|
description: "The list of formats the event participants can be exported to"
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
2022-03-28 18:02:43 +00:00
|
|
|
@desc """
|
|
|
|
Event categories list configuration
|
|
|
|
"""
|
|
|
|
object :event_category_option do
|
2023-03-17 17:10:59 +00:00
|
|
|
meta(:authorize, :all)
|
2022-03-28 18:02:43 +00:00
|
|
|
field(:id, :string, description: "The ID of the event category")
|
|
|
|
field(:label, :string, description: "The translated name of the event category")
|
|
|
|
end
|
|
|
|
|
2019-03-22 09:53:38 +00:00
|
|
|
object :config_queries do
|
|
|
|
@desc "Get the instance config"
|
|
|
|
field :config, :config do
|
2023-03-17 17:10:59 +00:00
|
|
|
middleware(Rajska.QueryAuthorization, permit: :all)
|
2019-03-22 09:53:38 +00:00
|
|
|
resolve(&Config.get_config/3)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|