feat: analytics modules backend + admin panel

This commit is contained in:
Nick
2019-06-23 18:35:14 -04:00
parent b34aa5bab4
commit 537551874b
25 changed files with 752 additions and 60 deletions

View File

@@ -0,0 +1,53 @@
# ===============================================
# ANALYTICS
# ===============================================
extend type Query {
analytics: AnalyticsQuery
}
extend type Mutation {
analytics: AnalyticsMutation
}
# -----------------------------------------------
# QUERIES
# -----------------------------------------------
type AnalyticsQuery {
providers(
isEnabled: Boolean
): [AnalyticsProvider]
}
# -----------------------------------------------
# MUTATIONS
# -----------------------------------------------
type AnalyticsMutation {
updateProviders(
providers: [AnalyticsProviderInput]!
): DefaultResponse @auth(requires: ["manage:system"])
}
# -----------------------------------------------
# TYPES
# -----------------------------------------------
type AnalyticsProvider {
isEnabled: Boolean!
key: String!
props: [String]
title: String!
description: String
isAvailable: Boolean
logo: String
website: String
icon: String
config: [KeyValuePair] @auth(requires: ["manage:system"])
}
input AnalyticsProviderInput {
isEnabled: Boolean!
key: String!
config: [KeyValuePairInput]
}