"""
Maps a StagedUploadTarget enum value to an entity field upload destination (server-only metadata).
"""
directive @stagedFileUploadEntityFieldDestination(entityTypeId: String!, bundle: String!, fieldName: String!) on ENUM_VALUE

"""
Maps a StagedUploadTarget enum value to a text editor upload destination (server-only metadata).
"""
directive @stagedFileUploadEditorDestination(textFormatId: String!, editorId: String!) on ENUM_VALUE

"""
Allow access for bots (client credentials grant type) on fields or types
by required scopes.
"""
directive @allowBot(requiredScopes: [String!]!) on OBJECT | FIELD_DEFINITION

"""
Allow access for user (authorization code grant type) on fields or types
by required scopes.
"""
directive @allowUser(requiredScopes: [String!]!) on OBJECT | FIELD_DEFINITION

"""Allow access for any grant type on fields or types by required scopes."""
directive @allowAll(requiredScopes: [String!]!) on OBJECT | FIELD_DEFINITION

"""
The schema's entry-point for queries. This acts as the public, top-level API
from which all queries must start.
"""
type Query {
  """
  Get information about the currently authenticated user.
  
  NULL if you're not authenticated.
  """
  viewer: Actor

  """
  List of all comments on the platform.
  
  Results are limited to what the current viewer has access to.
  If no limits are specified will limit to 10 results.
  """
  comments(
    """Returns the elements that come after the specified cursor."""
    after: Cursor

    """Returns the elements that come before the specified cursor."""
    before: Cursor

    """Returns up to the first `n` elements from the list."""
    first: Int

    """Returns up to the last `n` elements from the list."""
    last: Int

    """Reverse the order of the underlying list."""
    reverse: Boolean = false

    """Sort the underlying list by the given key."""
    sortKey: CommentSortKeys = CREATED_AT
  ): CommentConnection!

  """Fetch data for a specific comment."""
  comment(
    """The id of the comment to load."""
    id: ID!
  ): Comment

  """
  List of all events on the platform.
  
  Results are limited to what the current viewer has access to.
  """
  events(
    """Returns the elements that come after the specified cursor."""
    after: Cursor

    """Returns the elements that come before the specified cursor."""
    before: Cursor

    """Returns up to the first `n` elements from the list."""
    first: Int

    """Returns up to the last `n` elements from the list."""
    last: Int

    """Reverse the order of the underlying list."""
    reverse: Boolean = false

    """Sort the underlying list by the given key."""
    sortKey: EventSortKeys = CREATED_AT
  ): EventConnection!

  """Fetch data for a specific event."""
  event(
    """The id of the event to load."""
    id: ID!
  ): Event

  """List of all event types on the platform."""
  eventTypes: [EventType!]!

  """List of all content tag categories that are applicable to events."""
  eventTagCategories: [ContentTagCategory!]!

  """
  Retrieve the constraints for a specific staged upload target.
  
  Allows the client side to determine the constraints for the usage of their upload. This enables providing information
  to the user before uploading such as limiting a file picker to certain file types and sizes; or enabling client side
  crop to fit an image within allowed dimensions.
  """
  stagedUploadTargetDetails(target: StagedUploadTarget!): StagedUploadConstraints

  """Get information about a content tag category."""
  contentTagCategory(id: ID!): ContentTagCategory

  """Get information about a specific content tag."""
  contentTag(id: ID!): ContentTag

  """
  List of all topics on the platform.
  
  Results are limited to what the current viewer has access to.
  """
  topics(
    """Returns the elements that come after the specified cursor."""
    after: Cursor

    """Returns the elements that come before the specified cursor."""
    before: Cursor

    """Returns up to the first `n` elements from the list."""
    first: Int

    """Returns up to the last `n` elements from the list."""
    last: Int

    """Reverse the order of the underlying list."""
    reverse: Boolean = false

    """Sort the underlying list by the given key."""
    sortKey: TopicSortKeys = CREATED_AT
  ): TopicConnection!

  """
  List of all topics on the platform filtered by topic type.
  
  Results are limited to what the current viewer has access to.
  """
  topicsByType(
    """The id of the topic type to load."""
    type: ID!

    """Returns the elements that come after the specified cursor."""
    after: Cursor

    """Returns the elements that come before the specified cursor."""
    before: Cursor

    """Returns up to the first `n` elements from the list."""
    first: Int

    """Returns up to the last `n` elements from the list."""
    last: Int

    """Reverse the order of the underlying list."""
    reverse: Boolean = false

    """Sort the underlying list by the given key."""
    sortKey: TopicSortKeys = CREATED_AT
  ): TopicConnection!

  """Fetch data for a specific topic."""
  topic(
    """The id of the topic to load."""
    id: ID!
  ): Topic

  """List of all topic types on the platform."""
  topicTypes: [TopicType!]!

  """List of all content tag categories that are applicable to topics."""
  topicTagCategories: [ContentTagCategory!]!

  """
  List of users.
  
  If no limits are specified will limit to 10 results.
  """
  users(
    """Returns the elements that come after the specified cursor."""
    after: Cursor

    """Returns the elements that come before the specified cursor."""
    before: Cursor

    """Returns up to the first `n` elements from the list."""
    first: Int

    """Returns up to the last `n` elements from the list."""
    last: Int

    """Reverse the order of the underlying list."""
    reverse: Boolean = false

    """Sort the underlying list by the given key."""
    sortKey: UserSortKeys = CREATED_AT
  ): UserConnection!

  """Fetch data for a specific user."""
  user(
    """The id of the user to load."""
    id: ID!
  ): User
}

"""
An actor is an entity that can perform actions and own content within Open Social.
"""
interface Actor implements Node {
  """The uuid of the Actor"""
  id: ID!

  """The display name of the actor."""
  displayName: String!
}

"""A concrete fetchable type that is addressable by an id."""
interface Node {
  id: ID!
}

"""A cursor for use in pagination."""
scalar Cursor

"""The set of valid sort keys for the comment query."""
enum CommentSortKeys {
  """Sort by the `created_at` value"""
  CREATED_AT
}

type CommentConnection implements Connection {
  edges: [CommentEdge!]!
  nodes: [Comment!]!
  pageInfo: PageInfo!
}

"""A paginated set of results."""
interface Connection {
  """The edges of this connection."""
  edges: [Edge!]!

  """
  The nodes of the edges of this connection.
  
  Provides direct access to the nodes in case other edge information
  isn't needed.
  """
  nodes: [Node!]!

  """Information to aid in pagination"""
  pageInfo: PageInfo!
}

"""
An edge in a connection.

Provides the cursor to fetch data based on the position of the associated node.
Specific edge implementations may provide more information about the
relationship they represent.
"""
interface Edge {
  cursor: Cursor!
  node: Node!
}

"""Information about the page in a connection."""
type PageInfo {
  """Whether there are more pages in this connection."""
  hasNextPage: Boolean!

  """Whether there  are previous pages in this connection."""
  hasPreviousPage: Boolean!

  """The cursor for the first element in this page"""
  startCursor: Cursor

  """The cursor for the last element in this page"""
  endCursor: Cursor
}

type CommentEdge implements Edge {
  cursor: Cursor!
  node: Comment!
}

"""A comment to a piece of content that supports commenting."""
type Comment implements Node {
  """The unique identifier for the comment."""
  id: ID!

  """The author of the comment or NULL if it was placed anonymously."""
  author: Actor

  """The message of the comment as rendered HTML."""
  bodyHtml: Html!

  """When the comment was created."""
  created: DateTime!
}

"""
An HTML string

Content of this type is deemed safe by the server for raw output given the
origin and the context of its usage. The HTML can still contain scripts or style
tags where the creating user had permission to input these.
"""
scalar Html

"""A date and time."""
type DateTime {
  """The date and time as UNIX timestamp."""
  timestamp: Timestamp!
}

"""
A UNIX timestamp.

The number of seconds since the Unix Epoch on January 1st, 1970 at UTC.
"""
scalar Timestamp

"""The set of valid sort keys for the event query."""
enum EventSortKeys {
  """Sort by event creation date"""
  CREATED_AT
}

type EventConnection implements Connection {
  edges: [EventEdge!]!
  nodes: [Event!]!
  pageInfo: PageInfo!
}

type EventEdge implements Edge {
  cursor: Cursor!
  node: Event!
}

"""
A type of content on Open Social which allows users to organize, discuss topics, and join activities.
"""
type Event implements Node & Commentable & ContentTaggable {
  """The unique identifier for the event."""
  id: ID!

  """The display title of the event."""
  title: String!

  """The author of the event."""
  author: Actor

  """A hero image for the event."""
  heroImage: Image

  """The message of the event as rendered HTML."""
  bodyHtml: Html!

  """The formatted start date of the event."""
  startDate: DateTime!

  """
  The formatted end date of the event.
  
  When a event is not limited to a specific time period the end date may be NULL.
  """
  endDate: DateTime

  """The location of the event as plain text."""
  location: String

  """The address of the event."""
  address: Address

  """The type of the event."""
  eventType: EventType

  """
  List of event managers.
  
  Managers are people who have the rights to edit the event itself.
  """
  managers(
    """Returns the elements that come after the specified cursor."""
    after: Cursor

    """Returns the elements that come before the specified cursor."""
    before: Cursor

    """Returns up to the first `n` elements from the list."""
    first: Int

    """Returns up to the last `n` elements from the list."""
    last: Int

    """Reverse the order of the underlying list."""
    reverse: Boolean = false
  ): EventManagerConnection!

  """List of event comments."""
  comments(
    """Returns the elements that come after the specified cursor."""
    after: Cursor

    """Returns the elements that come before the specified cursor."""
    before: Cursor

    """Returns up to the first `n` elements from the list."""
    first: Int

    """Returns up to the last `n` elements from the list."""
    last: Int

    """Reverse the order of the underlying list."""
    reverse: Boolean = false

    """Sort the underlying list by the given key."""
    sortKey: CommentSortKeys = CREATED_AT
  ): CommentConnection!

  """The url to the event."""
  url: Url!

  """When the event was created."""
  created: DateTime!

  """
  The content tags this event is tagged with grouped by the categories they belong in.
  Each event is classified with content tags to make it clear what this event is about.
  """
  contentTagCategories: [ContentTaggableSelectedTagCategories!]!
}

"""Things that can be commented on."""
interface Commentable {
  comments(
    """Returns the elements that come after the specified cursor."""
    after: Cursor

    """Returns the elements that come before the specified cursor."""
    before: Cursor

    """Returns up to the first `n` elements from the list."""
    first: Int

    """Returns up to the last `n` elements from the list."""
    last: Int

    """Reverse the order of the underlying list."""
    reverse: Boolean = false

    """Sort the underlying list by the given key."""
    sortKey: CommentSortKeys = CREATED_AT
  ): CommentConnection!
}

"""Things that can be tagged with content tags."""
interface ContentTaggable implements Node {
  """The unique identifier for the taggable content."""
  id: ID!

  """The list of tag categories this content has tags in."""
  contentTagCategories: [ContentTaggableSelectedTagCategories!]!
}

"""
Provides information about the tags selected for a piece of content.
Categories for content tags are configurable. This type groups the category together with the selected tags.
"""
type ContentTaggableSelectedTagCategories {
  """The category information in which the selected tags live."""
  category: ContentTagCategory!

  """The tags that are selected for the content within the category."""
  contentTags(
    """Returns the elements that come after the specified cursor."""
    after: Cursor

    """Returns the elements that come before the specified cursor."""
    before: Cursor

    """Returns up to the first `n` elements from the list."""
    first: Int

    """Returns up to the last `n` elements from the list."""
    last: Int

    """Reverse the order of the underlying list."""
    reverse: Boolean = false
  ): ContentTaggableSelectedTagConnection!
}

type ContentTagCategory implements Node {
  """The unique identifier for the content tag category."""
  id: ID!

  """The human readable name of the content tag category."""
  label: String!

  """The types of content that this category can be placed in."""
  placement: [ContentTagPlacement!]!

  """The content tags contained in this category."""
  contentTags(
    """Returns the elements that come after the specified cursor."""
    after: Cursor

    """Returns the elements that come before the specified cursor."""
    before: Cursor

    """Returns up to the first `n` elements from the list."""
    first: Int

    """Returns up to the last `n` elements from the list."""
    last: Int

    """Reverse the order of the underlying list."""
    reverse: Boolean = false
  ): ContentTagCategoryContentTagConnection!
}

"""
The objects that content tags can be applied to.
This is a list of all types that implement the ContentTaggable interface.
"""
enum ContentTagPlacement {
  """This content type can be placed on an Event object."""
  EVENT

  """This content type can be placed on a Topic object."""
  TOPIC
}

type ContentTagCategoryContentTagConnection implements Connection {
  edges: [ContentTagCategoryContentTagEdge!]!
  nodes: [ContentTag!]!
  pageInfo: PageInfo!
}

type ContentTagCategoryContentTagEdge implements Edge {
  cursor: Cursor!
  node: ContentTag!
}

"""
Tags are used to classify and describe content.
Each item is associated with one or more tags to clearly indicate its subject or purpose.
A tag can reference any type of content defined by platform administrators, not being limited to a single content type.
"""
type ContentTag implements Node {
  """The unique identifier for the content tag."""
  id: ID!

  """The human readable name of the content tag."""
  label: String!

  """The parent category to which this tag belongs."""
  parent: ContentTagCategory
}

type ContentTaggableSelectedTagConnection implements Connection {
  edges: [ContentTaggableSelectedTagEdge!]!
  nodes: [ContentTag!]!
  pageInfo: PageInfo!
}

type ContentTaggableSelectedTagEdge implements Edge {
  cursor: Cursor!
  node: ContentTag!
}

type Image implements Media & Node {
  id: ID!

  """
  The url at which the original image can be downloaded.
  
  Applications requesting the image for display to users should use one of the
  dedicated selectors to select a suitable image format instead.
  """
  url: Url!

  """Image Title"""
  title: String!

  """
  Alt-text
  
  A description of the image that can be displayed as alternative when the image
  can't be loaded or to users who are unable to see the image itself.
  """
  alt: String!
}

"""Media managed by the Open Social platform."""
interface Media implements Node {
  id: ID!

  """The url at which the original media can be downloaded."""
  url: Url!
}

"""A valid URL"""
scalar Url

"""
Output type for address data returned from the API.
Matches the structure of AddressInput for consistency.
"""
type Address {
  """The two-letter ISO 3166-1 alpha-2 country code."""
  countryCode: String!

  """The main sub-division of a country (e.g. state, province, region)."""
  administrativeArea: String

  """The city, town or post-town of the address."""
  locality: String

  """A smaller division within the locality (e.g. suburb, neighbourhood)."""
  dependentLocality: String

  """The postal (ZIP / postcode) code of the address."""
  postalCode: String

  """The primary street address line."""
  addressLine1: String

  """A secondary address line for additional street-level details."""
  addressLine2: String
}

"""
The type of an event.
Each event is tagged with an event type to make it clear what this event is about.
An event is assigned an event type defined by site managers.
"""
type EventType implements Node {
  """The unique identifier for the event type."""
  id: ID!

  """The human-readable name of the event type."""
  label: String
}

"""Pagination info for moderators of a discussion."""
type EventManagerConnection implements Connection {
  edges: [EventManagerEdge!]!
  nodes: [User!]!
  pageInfo: PageInfo!
}

type EventManagerEdge implements Edge {
  cursor: Cursor!
  node: User!
}

"""An Open Social user."""
type User implements Node & Actor {
  """The Universally Unique Identifier for the user."""
  id: ID!

  """
  The display name of the user.
  
  The specific format of the display name could depend on permissions of the
  requesting user or application.
  """
  displayName: String!

  """
  The e-mail of the user.
  
  Can be null if the user has not filled in an e-mail or if the user/application
  making the request is not allowed to view this user's e-mail.
  """
  mail: Email

  """The timestamp indicating when the user was created."""
  created: Int!

  """The timestamp indicating when the user was last updated."""
  updated: Int!

  """The status of the user account."""
  status: UserStatus!

  """The roles that the user has."""
  roles: [UserRole!]!

  """
  The number of comments that the user has created on the platform.
  This only counts comments that still exist on the platform and where the user is set as author.
  """
  commentsCreated: Int!

  """
  The number of events that the user has created on the platform.
  This only counts events that still exist on the platform and where the user is set as author.
  """
  eventsCreated: Int!

  """
  The number of likes that the user has created on the platform.
  This only counts likes that still exist on the platform and where the user is set as author.
  """
  likes: Int!

  """
  The number of posts that the user has created on the platform.
  This only counts posts that still exist on the platform and where the user is set as author.
  """
  postsCreated: Int!

  """Profile data for the user."""
  profile: Profile!

  """
  The number of topics that the user has created on the platform.
  This only counts topics that still exist on the platform and where the user is set as author.
  """
  topicsCreated: Int!

  """
  The number of flexibleGroupMembership that the user has created on the platform.
  This only counts flexibleGroupMembership that still exist on the platform and where the user is set as author.
  """
  flexibleGroupMembership: Int!

  """
  The number of organizationMemberships that the user has created on the platform.
  This only counts organizationMemberships that still exist on the platform and where the user is set as member.
  """
  organizationMembership: Int!
}

"""A valid email address."""
scalar Email

"""The status of a user on a platform."""
enum UserStatus {
  """An active user is able to login on the platform and view content"""
  ACTIVE

  """
  A blocked user is unable to access the platform, although their content will
  still be visible until it's deleted.
  """
  BLOCKED
}

"""
An access role for a user

Roles are used to assign groups of permissions to users on the platform.
"""
scalar UserRole

"""
Profile information for an Open Social user.

Unless noted otherwise profile information can be filled out by a user.
"""
type Profile {
  """
  The first name of the user
  
  Can be null if the user has not filled in the field or if the user/application
  making the request is not allowed to view this field.
  """
  firstName: String

  """
  The last name of the user
  
  Can be null if the user has not filled in the field or if the user/application
  making the request is not allowed to view this field.
  """
  lastName: String

  """
  Avatar
  
  A profile image for the user.
  """
  avatar: Image

  """An introduction for the user"""
  introduction: FormattedText

  """A phone number for the user"""
  phone: PhoneNumber

  """The function the user has at their organization."""
  function: String

  """The name of the organization a user belongs to."""
  organization: String
}

"""A longer string of text that may contain markup."""
type FormattedText {
  """
  The text format used by Open Social to process the input text.
  
  A text format provides information about what markup is allowed in the text.
  """
  format: TextFormat!

  """The raw string as used by an editor."""
  raw: String!

  """
  The string processed according to the text format.
  
  For a properly configured text format this string should be save to display
  to users.
  """
  processed: String!
}

"""An Open Social text format."""
type TextFormat {
  """The machine name of the text format."""
  name: String!
}

"""A phone number."""
scalar PhoneNumber

"""
The targeted usage for which the file is being uploaded.

The target of a staged upload determines where the upload can be finalized and the file used. This also determines the
constraints for the file upload such as maximum size and dimensions.
"""
enum StagedUploadTarget {
  """Uploads to the heroImage field for createEvent and updateEvent."""
  EVENT_HERO_IMAGE

  """Uploads to the heroImage field for createTopic and updateTopic."""
  TOPIC_HERO_IMAGE
}

type StagedUploadConstraints {
  """
  The maximum file size that the server supports for this target, if any.
  """
  maxBytes: Int

  """
  A list of allowed file extensions.
  
  Each extension is a string without dot. NULL in case there are no target specific file type restrictions.
  """
  allowedExtensions: [String!]

  """
  The maximum dimensions of the file.
  
  Only applicable if the file type supports dimensions.
  """
  dimensionsMaximum: StagedUploadConstraintsDimensions

  """
  The minimum dimensions of the file.
  
  Only applicable if the file type supports dimensions.
  """
  dimensionsMinimum: StagedUploadConstraintsDimensions
}

type StagedUploadConstraintsDimensions {
  """The media width."""
  width: Int!

  """The media height."""
  height: Int!
}

"""The set of valid sort keys for the topic query."""
enum TopicSortKeys {
  """Sort by topic creation date"""
  CREATED_AT
}

type TopicConnection implements Connection {
  edges: [TopicEdge!]!
  nodes: [Topic!]!
  pageInfo: PageInfo!
}

type TopicEdge implements Edge {
  cursor: Cursor!
  node: Topic!
}

"""
A type of content on Open Social which allows users to share information
or organise discussions.

A topic can be a piece of news, blog, a document, or another type depending
on the platform.
"""
type Topic implements Node & Commentable & ContentTaggable {
  """The unique identifier for the topic."""
  id: ID!

  """The display title of the topic."""
  title: String!

  """The author of the topic."""
  author: Actor

  """A hero image for the topic."""
  heroImage: Image

  """
  The type of the topic.
  
  Each topic is tagged with a topic type to make it clear what this topic is about.
  A topic can be a piece of news, a blogpost, a document, or another type depending on the platform.
  To get a list of the available topic types for a platform see `Query.topicTypes`.
  """
  type: TopicType!

  """The message of the topic as rendered HTML."""
  bodyHtml: Html!

  """The visibility of the topic content."""
  visibility: ContentVisibility!

  """
  List of topic comments.
  
  If no limits are specified will limit to 10 results.
  """
  comments(
    """Returns the elements that come after the specified cursor."""
    after: Cursor

    """Returns the elements that come before the specified cursor."""
    before: Cursor

    """Returns up to the first `n` elements from the list."""
    first: Int

    """Returns up to the last `n` elements from the list."""
    last: Int

    """Reverse the order of the underlying list."""
    reverse: Boolean = false

    """Sort the underlying list by the given key."""
    sortKey: CommentSortKeys = CREATED_AT
  ): CommentConnection!

  """The url to the topic."""
  url: Url!

  """When the topic was created."""
  created: DateTime!

  """
  The content tags this topic is tagged with grouped by the categories they belong in.
  Each topic is classified with content tags to make it clear what this topic is about.
  """
  contentTagCategories: [ContentTaggableSelectedTagCategories!]!
}

"""
The type of a topic.

Each topic is tagged with a topic type to make it clear what this topic is about.
A topic can be a piece of news, a blogpost, a document, or another type depending on the platform.
"""
type TopicType {
  """The unique identifier for the topic type."""
  id: ID!

  """The human readable name of the topic type."""
  label: String
}

"""The visibility level of content on the platform."""
enum ContentVisibility {
  """Content is visible to all users, including anonymous visitors."""
  PUBLIC

  """Content is visible only to authenticated community members."""
  COMMUNITY

  """Content is visible only to members of the specific group."""
  GROUP_MEMBER
}

"""The set of valid sort keys for the user query."""
enum UserSortKeys {
  """Sort by the `first_name` value"""
  FIRST_NAME

  """Sort by the `last_name` value"""
  LAST_NAME

  """Sort by the `created_at` value"""
  CREATED_AT
}

type UserConnection implements Connection {
  edges: [UserEdge!]!
  nodes: [User!]!
  pageInfo: PageInfo!
}

type UserEdge implements Edge {
  cursor: Cursor!
  node: User!
}

"""The base mutation type."""
type Mutation {
  """Type Mutation can not be empty, so we add an empty field."""
  _empty: String

  """Create a new event."""
  createEvent(
    """Input data for creating the event."""
    input: CreateEventInput!
  ): CreateEventPayload!

  """Update an existing event."""
  updateEvent(
    """Input data for updating the event."""
    input: UpdateEventInput!
  ): UpdateEventPayload!

  """Delete an existing event."""
  deleteEvent(
    """Input data for deleting the event."""
    input: DeleteEventInput!
  ): DeleteEventPayload!

  """
  Creates staged upload targets for file uploads such as images, videos, and documents.
  
  The `stagedUploadsCreate` mutation is the first step in Open Social's secure two-step upload process:
  
  **Step 1: Create staged upload targets (this mutation)**
  
  - Generate secure, temporary upload URLs for your files.
  
  Step 2: Upload files and create assets
  
  - Upload your files directly to the provided URLs using
  [the tus specification](https://tus.io/protocols/resumable-upload).
  - Use the returned finalizationToken as the originalSource in subsequent mutations like topicCreate.
  
  This approach provides support for large files, handles network interruptions gracefully, and ensures
  secure file transfers to Open Social's storage infrastructure.
  """
  stagedUploadsCreate(input: StagedUploadsCreateInput!): StagedUploadsCreatePayload!

  """Create a new topic on the platform."""
  createTopic(
    """Input data for creating the topic."""
    input: CreateTopicInput!
  ): CreateTopicPayload!

  """Update an existing topic."""
  updateTopic(
    """Input data for updating an existing topic."""
    input: UpdateTopicInput!
  ): UpdateTopicPayload!

  """Delete an existing topic."""
  deleteTopic(
    """Input data for deleting the topic."""
    input: DeleteTopicInput!
  ): DeleteTopicPayload!
}

"""Input for creating a new event."""
input CreateEventInput {
  """A unique identifier for the client performing the mutation."""
  clientMutationId: UUIDv4

  """
  The type of the event.
  The ID of the event type as provided by Query.eventTypes.
  If omitted, the event has no event type.
  """
  type: ID

  """The display title of the event."""
  title: String!

  """The visibility of the event determines what users can view this event."""
  visibility: ContentVisibility!

  """The body of the event in Open Social Rich Text JSON Exchange format."""
  body: RichTextJSON!

  """The unix timestamp start date of the event."""
  startDate: Timestamp!

  """The unix timestamp end date of the event."""
  endDate: Timestamp!

  """The location of the event as plain text."""
  location: String

  """The address of the event."""
  address: AddressInput

  """The image to use in teasers and the hero of the event."""
  heroImage: FileInput

  """The groups this event should belong to, if any."""
  groups: ContentInGroupInput

  """
  The organization this event should belong to if any.
  May optionally be posted to additional organizations.
  """
  organizations: ContentInOrganizationInput

  """
  Content tags associated with the event (optional).
  If provided, each tag ID must be valid.
  """
  contentTags: [ID!]
}

"""A valid version 4 UUID"""
scalar UUIDv4

"""
Open Social Rich Text JSON Exchange format.

Accepts a document object with a `root` key containing the document tree.
Used as input for formatted body content in mutations.
"""
scalar RichTextJSON

"""
Provides the input structure for addresses within the Open Social Community Management System.
The required format of the address depends on the country the address is in.
"""
input AddressInput {
  """
  The two-letter code identifying the country of the address.
  Represents the country (or dependent territory) using the standard ISO 3166-1 alpha-2 code (for example "NL" for the
  Netherlands, "US" for the United States, "JP" for Japan).
  """
  countryCode: String!

  """
  The main sub-division of a country (e.g. a state, province, region, etc.).
  Used to specify the top-level region within a country that helps to identify the address (for example "CA" for
  California in the US, "ON" for Ontario in Canada).
  """
  administrativeArea: String

  """
  The city, town or post-town of the address.
  Used to capture the primary populated place (city/district) within the administrative area where the address is
  located.
  """
  locality: String

  """
  A smaller division within the locality — e.g. suburb, neighbourhood, district or other sub-area.
  Used when finer-grained locality information is needed (for instance a neighborhood, borough or suburb within a city),
  where supported by the country's address format.
  """
  dependentLocality: String

  """
  The postal (ZIP / postcode) code of the address.
  Used to specify the code assigned by the national postal system for the delivery area — helps ensure mail and packages
  are routed correctly.
  """
  postalCode: String

  """
  The primary street address line — e.g. street name, house number.
  Used to capture the main part of the street-level address (street name, number, building name or other primary
  delivery location descriptor).
  """
  addressLine1: String

  """
  A secondary address line for additional street-level details.
  Used for optional extra information that complements addressLine1 (e.g. apartment, unit, floor, suite, building name,
  care-of, or other delivery instructions), where needed.
  """
  addressLine2: String
}

input FileInput {
  """Provide a finalization token to attach a staged file to this object."""
  stagedUpload: StagedUploadFinalizationToken!
}

"""
The finalization token

The finalization token is used to finalize a staged upload. This value should be treated as an application secret.
"""
scalar StagedUploadFinalizationToken

"""Input to set the groups of a piece of content."""
input ContentInGroupInput {
  """The group that owns the content."""
  group: ID!

  """
  That field only be used if the crossposted feature is enable at flexible_group configuration.
  The other groups that may view the content. Must not include the group that owns the content. Only applicable when the crossposted feature is enabled for HUBs.
  Should not list the group that owns the content.
  """
  crosspostedGroups: [ID!]
}

"""Input to set the organization of a piece of content."""
input ContentInOrganizationInput {
  """
  The organization this content should belong to if any.
  It is required that given content type is allowed in organization settings.
  """
  organization: ID!

  """
  The other organizations this content should be cross-posted to if any.
  It is required that given content type is allowed in organization settings.
  """
  crosspostedOrganizations: [ID!]
}

"""Payload returned after creating an event."""
type CreateEventPayload {
  """A unique identifier for the client performing the mutation."""
  clientMutationId: UUIDv4

  """
  Errors that were encountered while performing the mutation.
  NULL or an array of violations.
  """
  errors: [Violation!]

  """The created event."""
  event: Event
}

"""
A violation indicates an error in the GraphQL query or other incorrect
circumstances such as missing permissions.
"""
scalar Violation

input UpdateEventInput {
  """A unique identifier for the client performing the mutation."""
  clientMutationId: UUIDv4

  """The event being edited."""
  id: ID!

  """
  The type of the event.
  The ID of the event type as provided by Query.eventTypes.
  If omitted, the type remains unchanged. If null, the event type is cleared.
  """
  type: ID

  """
  The display title of the event.
  If omitted, the title remains unchanged.
  """
  title: String

  """
  The visibility of the event determines what users can view this event.
  If omitted, visibility remains unchanged.
  """
  visibility: ContentVisibility

  """
  The body of the event in Open Social Rich Text JSON Exchange format.
  If omitted, the body remains unchanged.
  """
  body: RichTextJSON

  """
  The unix timestamp start date of the event.
  If omitted, start date remains unchanged.
  """
  startDate: Timestamp

  """
  The unix timestamp end date of the event.
  If omitted, end date remains unchanged.
  """
  endDate: Timestamp

  """
  The location of the event as plain text, this is not the address field, see "address".
  If omitted, event location remains unchanged. If null, the location is cleared.
  """
  location: String

  """
  The address of the event.
  If omitted, event address remains unchanged. If null, the address is cleared.
  """
  address: AddressInput

  """
  The image to use in teasers and the hero of the event.
  If omitted, the image remains unchanged. Pass null to remove the hero image.
  """
  heroImage: FileInput

  """
  The groups this event should belong to. Omit = unchanged; null = remove from all; ContentInGroupInput = set groups.
  """
  groups: ContentInGroupInput

  """
  The organizations this event should belong to.
  Omit = unchanged; null = remove from all; ContentInOrganizationInput = set organizations.
  """
  organizations: ContentInOrganizationInput

  """
  The tag(s) of the event.
  The ID of the event tag(s) as provided by contentTagCategories.
  If omitted, the content tag remains unchanged.
  """
  contentTags: [ID!]
}

type UpdateEventPayload {
  """A unique identifier for the client performing the mutation."""
  clientMutationId: UUIDv4

  """
  Errors that were encountered while performing the mutation.
  NULL or an array of violations.
  """
  errors: [Violation!]

  """The updated event."""
  event: Event
}

"""Input for deleting an existing event."""
input DeleteEventInput {
  """A unique identifier for the client performing the mutation."""
  clientMutationId: UUIDv4

  """The event being deleted."""
  id: ID!
}

"""Payload returned after deleting an event."""
type DeleteEventPayload {
  """A unique identifier for the client performing the mutation."""
  clientMutationId: UUIDv4

  """
  Errors that were encountered while performing the mutation.
  NULL or an array of violations.
  """
  errors: [Violation!]
}

"""The input structure to request a staged file upload."""
input StagedUploadsCreateInput {
  """
  A unique identifier for the client performing the mutation.
  Must be a valid UUIDv4 format.
  """
  clientMutationId: UUIDv4

  """One or more requests to upload a file."""
  requests: [StagedUploadCreateRequest!]!
}

"""The input structure to request a staged file upload."""
input StagedUploadCreateRequest {
  """
  Where the file will be used after upload.
  
  The value of this determines constraints around the file properties (e.g. size, type, and dimensions). To retrieve
  information about the constraints for a target see Query.stagedUploadTargetDetails.
  """
  target: StagedUploadTarget!

  """
  The name of the file.
  
  Must always end in a file extension that's valid for the target.
  """
  filename: String!

  """
  The filesize if known at this time.
  
  Leave NULL to defer setting a during upload, useful if the file size can not yet be determined.
  """
  fileSize: Int
}

"""The payload structure for a request for a staged file upload."""
type StagedUploadsCreatePayload {
  """A unique identifier for the client performing the mutation."""
  clientMutationId: UUIDv4

  """List of validation errors, if any."""
  errors: [Violation!]

  """
  The created upload grants.
  
  Grants are only resolved if all requested uploads are approved.
  """
  stagedUploadGrants: [StagedUploadGrant!]
}

"""Describes a grant to upload a file."""
type StagedUploadGrant {
  """
  The target in which the file can later be used, matching the client's request.
  """
  target: StagedUploadTarget!

  """
  The filename of the file once the upload is finalized, as provided by the client.
  """
  filename: String!

  """The final file size of the upload if already known by the client."""
  fileSize: Int

  """
  Whether the upload fileSize has been deferred to a later PATCH request.
  """
  sizeDeferred: Boolean!

  """
  The URL at which the file can be uploaded.
  
  Uploads should follow [the tus resumable upload specification](https://tus.io/protocols/resumable-upload). Open Social
  supports the core protocol as well as the expiration and termination extension.
  
  This URL should be kept secret.
  """
  uploadUrl: StagedUploadUrl!

  """
  The token to finalize the staged upload.
  
  This value should be kept secret.
  """
  finalizationToken: StagedUploadFinalizationToken!

  """
  The constraints for the file upload.
  
  Provides information for the maximum file size, allowed file types, and any type specific limitations, depending on
  the chosen upload target.
  """
  constraints: StagedUploadConstraints!
}

"""
The secret upload URL for staged file uploads.

Note that any application that has this URL can upload a file as requested. This URL should be treated as an application
secret.
"""
scalar StagedUploadUrl

"""Input for creating a new topic."""
input CreateTopicInput {
  """
  A unique identifier for the client performing the mutation.
  Must be a valid UUIDv4 format.
  """
  clientMutationId: UUIDv4

  """The type of the topic. Must be a valid topic type ID."""
  type: ID!

  """The title of the topic (max 255 characters)."""
  title: String!

  """The visibility of the topic."""
  visibility: ContentVisibility!

  """The body of the topic in Open Social Rich Text JSON Exchange format."""
  body: RichTextJSON!

  """The image to use in teasers and the hero of the topic."""
  heroImage: FileInput

  """
  The groups this topic should belong to, if any.
  A topic may be posted to one or more groups.
  """
  groups: ContentInGroupInput

  """
  The organization this topic should belong to if any.
  May optionally be posted to additional organizations.
  """
  organizations: ContentInOrganizationInput

  """
  Content tags associated with the topic (optional).
  If provided, each tag ID must be valid.
  """
  contentTags: [ID!]
}

"""Payload returned after creating a topic."""
type CreateTopicPayload {
  """The client mutation ID from the input."""
  clientMutationId: UUIDv4

  """List of validation errors, if any."""
  errors: [Violation!]

  """The created topic, if successful."""
  topic: Topic
}

"""Input for updating an existing topic."""
input UpdateTopicInput {
  """
  A unique identifier for the client performing the mutation.
  Must be a valid UUIDv4 format.
  """
  clientMutationId: UUIDv4

  """The ID of the topic to update."""
  id: ID!

  """The type of the topic. Must be a valid topic type ID."""
  type: ID

  """The title of the topic (max 255 characters)."""
  title: String

  """The visibility of the topic."""
  visibility: ContentVisibility

  """
  The body of the topic in Open Social Rich Text JSON Exchange format.
  If omitted, the body remains unchanged.
  """
  body: RichTextJSON

  """
  The image to use in teasers and the hero of the topic.
  
  If omitted, the image remains unchanged. Pass null to remove the hero image.
  """
  heroImage: FileInput

  """
  The groups this topic should belong to. Omit = unchanged; null = remove from all; ContentInGroupInput = set groups.
  """
  groups: ContentInGroupInput

  """
  The organization this topic should belong to if any.
  May optionally be posted to additional organizations.
  If omitted, organizations remain unchanged.
  To remove the topic from all organizations, set: organizations: null.
  """
  organizations: ContentInOrganizationInput

  """
  The tag(s) of the topic.
  The ID of the topic tag(s) as provided by contentTagCategories.
  If omitted, the content tag remains unchanged.
  """
  contentTags: [ID!]
}

"""Payload returned after updating a topic."""
type UpdateTopicPayload {
  """The client mutation ID from the input."""
  clientMutationId: UUIDv4

  """List of validation errors, if any."""
  errors: [Violation!]

  """The updated topic, if successful."""
  topic: Topic
}

"""Input for deleting an existing topic."""
input DeleteTopicInput {
  """A unique identifier for the client performing the mutation."""
  clientMutationId: UUIDv4

  """The topic being deleted."""
  id: ID!
}

"""Payload returned after deleting a topic."""
type DeleteTopicPayload {
  """A unique identifier for the client performing the mutation."""
  clientMutationId: UUIDv4

  """
  Errors that were encountered while performing the mutation.
  NULL or an array of violations.
  """
  errors: [Violation!]
}

"""
The schema's entry-point for subscriptions. This acts as the public, top-level
API from which all subscriptions must start.

A real-time process must be implemented and deployed to support subscriptions.
"""
type Subscription {
  """Type Subscription can not be empty, so we add an empty field."""
  _empty: String
}

scalar TimeZone

scalar Language

"""
The file, can be used in attachments (txt, pdf, doc, docx, xls, xlsx, ppt, pptx, csv and etc.).
"""
type File implements Media & Node {
  id: ID!

  """The url at which the original file can be downloaded."""
  url: Url!

  """The name of the file."""
  filename: String!

  """The filemime type of the file."""
  filemime: String

  """The file size in bytes."""
  filesize: String

  """The timestamp indicating when the file was created."""
  created: DateTime!
}

"""The base GraphQL Response class"""
interface Response {
  errors: [Violation]
}

"""
An optional string.

Used on input fields that require discerning between not-updating the field value and setting the field to NULL.
"""
input OptionalString {
  value: String
}

"""
An optional phone number.

Must be a valid phone number in the format `[+country-prefix]<number>`.

Used on input fields that require discerning between not-updating the field value and setting the field to NULL.
"""
input OptionalPhoneNumber {
  value: PhoneNumber
}