type ApiKeyResult {
    totalCount: Int
    count: Int
    nodes: [ApiKey]
}

type ApiKey implements DbModel {
    id: ID
    identifier: String
    key: String
    permissions: [Permission]

    deleted: Boolean
    editor: User
    createdUtc: String
    updatedUtc: String
}

input ApiKeySort {
    id: SortOrder
    identifier: SortOrder

    deleted: SortOrder
    editorId: SortOrder
    createdUtc: SortOrder
    updatedUtc: SortOrder
}

input ApiKeyFilter {
    id: IntFilter
    identifier: StringFilter

    deleted: BooleanFilter
    editorId: IntFilter
    createdUtc: DateFilter
    updatedUtc: DateFilter
}

type ApiKeyMutation {
    create(input: ApiKeyCreateInput!): ApiKey
    update(input: ApiKeyUpdateInput!): ApiKey
    delete(identifier: String!): Boolean
    restore(identifier: String!): Boolean
}

input ApiKeyCreateInput {
    identifier: String
    permissions: [ID]
}

input ApiKeyUpdateInput {
    id: ID!
    identifier: String
    permissions: [ID]
}