Skip to content

Commit

Permalink
access counts schema draft
Browse files Browse the repository at this point in the history
  • Loading branch information
nl0 committed Oct 24, 2024
1 parent dc68d84 commit d32fd6f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions shared/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,24 @@ type User {
type AccessCountForDate {
date: Datetime!
value: Int!
sum: Int! # running sum
}

type AccessCounts {
total: Int!
counts: [AccessCountForDate!]!
}

type AccessCountsGroup {
ext: String!
counts: AccessCounts!
}

type BucketAccessCounts {
byExt(groups: Int): AccessCountsGroup[]
combined: AccessCounts
}

type PackageDir {
path: String!
metadata: JsonRecord
Expand Down Expand Up @@ -556,6 +567,9 @@ type Query {
searchMorePackages(after: String!, size: Int = 30): PackagesSearchMoreResult!
subscription: SubscriptionState!

bucketAccessCounts(bucket: String!, window: Int!): BucketAccessCounts
objectAccessCounts(bucket: String!, key: String!, window: Int!): AccessCounts

admin: AdminQueries! @admin

policies: [Policy!]! @admin
Expand Down

0 comments on commit d32fd6f

Please sign in to comment.