You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
1.9 KiB

  1. # ===============================================
  2. # ANALYTICS
  3. # ===============================================
  4. extend type Query {
  5. analytics: AnalyticsQuery
  6. }
  7. extend type Mutation {
  8. analytics: AnalyticsMutation
  9. }
  10. # -----------------------------------------------
  11. # QUERIES
  12. # -----------------------------------------------
  13. """
  14. Queries for Analytics
  15. """
  16. type AnalyticsQuery {
  17. """
  18. Fetch list of Analytics providers and their configuration
  19. """
  20. providers(
  21. "Return only active providers"
  22. isEnabled: Boolean
  23. ): [AnalyticsProvider] @auth(requires: ["manage:system"])
  24. }
  25. # -----------------------------------------------
  26. # MUTATIONS
  27. # -----------------------------------------------
  28. """
  29. Mutations for Analytics
  30. """
  31. type AnalyticsMutation {
  32. """
  33. Update a list of Analytics providers and their configuration
  34. """
  35. updateProviders(
  36. "List of providers"
  37. providers: [AnalyticsProviderInput]!
  38. ): DefaultResponse @auth(requires: ["manage:system"])
  39. }
  40. # -----------------------------------------------
  41. # TYPES
  42. # -----------------------------------------------
  43. """
  44. Analytics Provider
  45. """
  46. type AnalyticsProvider {
  47. "Is the provider active"
  48. isEnabled: Boolean!
  49. "Unique identifier for this provider"
  50. key: String!
  51. "List of configuration properties, formatted as stringified JSON objects"
  52. props: [String]
  53. "Name of the provider"
  54. title: String!
  55. "Short description of the provider"
  56. description: String
  57. "Is the provider available for use"
  58. isAvailable: Boolean
  59. "Path to the provider logo"
  60. logo: String
  61. "Website of the provider"
  62. website: String
  63. "Configuration values for this provider"
  64. config: [KeyValuePair]
  65. }
  66. """
  67. Analytics Configuration Input
  68. """
  69. input AnalyticsProviderInput {
  70. "Is the provider active"
  71. isEnabled: Boolean!
  72. "Unique identifier of the provider"
  73. key: String!
  74. "Configuration values for this provider"
  75. config: [KeyValuePairInput]
  76. }