~emersion/hut

81a71770821e87513083e383ac60297b57aca6a8 — Simon Ser 5 months ago b6b9dc0
Update GraphQL schema
M srht/buildssrht/gql.go => srht/buildssrht/gql.go +1 -1
@@ 1,4 1,4 @@
// Code generated by gqlclientgen - DO NOT EDIT
// Code generated by gqlclientgen - DO NOT EDIT.

package buildssrht


M srht/buildssrht/schema.graphqls => srht/buildssrht/schema.graphqls +1 -1
@@ 40,7 40,7 @@ directive @access(scope: AccessScope!, kind: AccessKind!) on FIELD_DEFINITION

"""
This used to decorate private resolvers which are only accessible to build
workers, and are used to faciliate the build process.
workers, and are used to facilitate the build process.
"""
directive @worker on FIELD_DEFINITION


M srht/gitsrht/gql.go => srht/gitsrht/gql.go +1 -1
@@ 1,4 1,4 @@
// Code generated by gqlclientgen - DO NOT EDIT
// Code generated by gqlclientgen - DO NOT EDIT.

package gitsrht


M srht/gitsrht/schema.graphqls => srht/gitsrht/schema.graphqls +3 -3
@@ 172,9 172,9 @@ type OAuthClient {
}

enum WebhookEvent {
  REPO_CREATED @access(scope: REPOSITORIES, kind: RO)
  REPO_UPDATE  @access(scope: REPOSITORIES, kind: RO)
  REPO_DELETED @access(scope: REPOSITORIES, kind: RO)
  REPO_CREATED
  REPO_UPDATE
  REPO_DELETED
}

interface WebhookSubscription {

M srht/listssrht/gql.go => srht/listssrht/gql.go +5 -5
@@ 1,4 1,4 @@
// Code generated by gqlclientgen - DO NOT EDIT
// Code generated by gqlclientgen - DO NOT EDIT.

package listssrht



@@ 532,10 532,10 @@ type User struct {
	Location      *string            `json:"location,omitempty"`
	Bio           *string            `json:"bio,omitempty"`
	List          *MailingList       `json:"list,omitempty"`
	Lists         *MailingListCursor `json:"lists,omitempty"`
	Emails        *EmailCursor       `json:"emails,omitempty"`
	Threads       *ThreadCursor      `json:"threads,omitempty"`
	Patches       *PatchsetCursor    `json:"patches,omitempty"`
	Lists         *MailingListCursor `json:"lists"`
	Emails        *EmailCursor       `json:"emails"`
	Threads       *ThreadCursor      `json:"threads"`
	Patches       *PatchsetCursor    `json:"patches"`
}

func (*User) isEntity() {}

M srht/listssrht/schema.graphqls => srht/listssrht/schema.graphqls +16 -10
@@ 81,10 81,10 @@ type User implements Entity {
  bio: String

  list(name: String!): MailingList @access(scope: LISTS, kind: RO)
  lists(cursor: Cursor): MailingListCursor @access(scope: LISTS, kind: RO)
  emails(cursor: Cursor): EmailCursor @access(scope: EMAILS, kind: RO)
  threads(cursor: Cursor): ThreadCursor @access(scope: EMAILS, kind: RO)
  patches(cursor: Cursor): PatchsetCursor @access(scope: PATCHES, kind: RO)
  lists(cursor: Cursor): MailingListCursor! @access(scope: LISTS, kind: RO)
  emails(cursor: Cursor): EmailCursor! @access(scope: EMAILS, kind: RO)
  threads(cursor: Cursor): ThreadCursor! @access(scope: EMAILS, kind: RO)
  patches(cursor: Cursor): PatchsetCursor! @access(scope: PATCHES, kind: RO)
}

"A mailbox not associated with a registered user"


@@ 164,11 164,11 @@ type OAuthClient {
}

enum WebhookEvent {
  LIST_CREATED      @access(scope: LISTS, kind: RO)
  LIST_UPDATED      @access(scope: LISTS, kind: RO)
  LIST_DELETED      @access(scope: LISTS, kind: RO)
  EMAIL_RECEIVED    @access(scope: EMAILS, kind: RO)
  PATCHSET_RECEIVED @access(scope: PATCHES, kind: RO)
  LIST_CREATED
  LIST_UPDATED
  LIST_DELETED
  EMAIL_RECEIVED
  PATCHSET_RECEIVED
}

interface WebhookSubscription {


@@ 758,7 758,13 @@ type Mutation {
  "Deletes a mailing list webhook."
  deleteMailingListWebhook(id: Int!): WebhookSubscription!

  triggerUserEmailWebhooks(emailId: Int!): Email! @internal
  """
  Triggers user webhooks for an email.

  The result can be null if the user does not have browse access to the
  archived email. In this case, no webhook will be triggered.
  """
  triggerUserEmailWebhooks(emailId: Int!): Email @internal
  triggerListEmailWebhooks(listId: Int!, emailId: Int!): Email! @internal

  """

M srht/metasrht/gql.go => srht/metasrht/gql.go +3 -1
@@ 1,4 1,4 @@
// Code generated by gqlclientgen - DO NOT EDIT
// Code generated by gqlclientgen - DO NOT EDIT.

package metasrht



@@ 124,6 124,7 @@ type OAuthGrant struct {
	Issued    gqlclient.Time `json:"issued"`
	Expires   gqlclient.Time `json:"expires"`
	TokenHash string         `json:"tokenHash"`
	Grants    *string        `json:"grants,omitempty"`
}

type OAuthGrantRegistration struct {


@@ 137,6 138,7 @@ type OAuthPersonalToken struct {
	Issued  gqlclient.Time `json:"issued"`
	Expires gqlclient.Time `json:"expires"`
	Comment *string        `json:"comment,omitempty"`
	Grants  *string        `json:"grants,omitempty"`
}

type OAuthPersonalTokenRegistration struct {

M srht/metasrht/schema.graphqls => srht/metasrht/schema.graphqls +9 -26
@@ 42,7 42,7 @@ read or write access. For the meta.sr.ht API, you have access to all public
information without any special permissions - user profile information,
public keys, and so on.
"""
directive @access(scope: AccessScope!, kind: AccessKind!) on FIELD_DEFINITION | ENUM_VALUE
directive @access(scope: AccessScope!, kind: AccessKind!) on FIELD_DEFINITION

# https://semver.org
type Version {


@@ 136,6 136,7 @@ type OAuthGrant {
  issued: Time!
  expires: Time!
  tokenHash: String! @internal
  grants: String
}

type OAuthGrantRegistration {


@@ 166,6 167,7 @@ type OAuthPersonalToken {
  issued: Time!
  expires: Time!
  comment: String
  grants: String
}

type OAuthPersonalTokenRegistration {


@@ 175,11 177,11 @@ type OAuthPersonalTokenRegistration {

enum WebhookEvent {
  "Used for user profile webhooks"
  PROFILE_UPDATE  @access(scope: PROFILE, kind: RO)
  PGP_KEY_ADDED   @access(scope: PGP_KEYS, kind: RO)
  PGP_KEY_REMOVED @access(scope: PGP_KEYS, kind: RO)
  SSH_KEY_ADDED   @access(scope: SSH_KEYS, kind: RO)
  SSH_KEY_REMOVED @access(scope: SSH_KEYS, kind: RO)
  PROFILE_UPDATE
  PGP_KEY_ADDED
  PGP_KEY_REMOVED
  SSH_KEY_ADDED
  SSH_KEY_REMOVED
}

interface WebhookSubscription {


@@ 514,7 516,7 @@ type Mutation {
  Completes the OAuth 2.0 grant process and issues an OAuth token for a
  specific OAuth client.
  """
  issueOAuthGrant(authorization: String!,
  issueOAuthGrant(authorization: String!, clientUUID: String,
    clientSecret: String!, redirectUri: String): OAuthGrantRegistration @internal

  """


@@ 532,25 534,6 @@ type Mutation {
  sendEmail(address: String!, message: String!): Boolean! @anoninternal

  """
  Sends a notification email to the given user.

  The 'message' parameter must be a RFC 5322 compliant Internet message with
  the special requirement that it must not contain any recipients (i.e. no
  'To', 'Cc', or 'Bcc' header). It will be encrypted according to the user's
  privacy settings and signed with the site key.
  """
  sendEmailNotification(username: String!, message: String!): Boolean! @anoninternal

  """
  Sends a notification email to an external address.

  The 'message' parameter must be a RFC 5322 compliant Internet message with
  the special requirement that it must not contain any recipients (i.e. no
  'To', 'Cc', or 'Bcc' header). It will be signed with the site key.
  """
  sendEmailExternal(address: String!, message: String!): Boolean! @anoninternal

  """
  Deletes the authenticated user's account.
  """
  deleteUser(reserve: Boolean!): Int! @internal

M srht/pagessrht/gql.go => srht/pagessrht/gql.go +1 -1
@@ 1,4 1,4 @@
// Code generated by gqlclientgen - DO NOT EDIT
// Code generated by gqlclientgen - DO NOT EDIT.

package pagessrht


M srht/pagessrht/schema.graphqls => srht/pagessrht/schema.graphqls +13 -2
@@ 11,6 11,12 @@ access token, and are not available to clients using OAuth 2.0 access tokens.
"""
directive @private on FIELD_DEFINITION

"""
This is used to decorate fields which are for internal use, and are not
available to normal API users.
"""
directive @internal on FIELD_DEFINITION

enum AccessScope {
  PROFILE @scopehelp(details: "profile information")
  SITES   @scopehelp(details: "registered sites")


@@ 124,8 130,8 @@ type OAuthClient {
}

enum WebhookEvent {
  SITE_PUBLISHED @access(scope: SITES, kind: RO)
  SITE_UNPUBLISHED @access(scope: SITES, kind: RO)
  SITE_PUBLISHED
  SITE_UNPUBLISHED
}

interface WebhookSubscription {


@@ 303,4 309,9 @@ type Mutation {
  unexpected behavior with the third-party integration.
  """
  deleteUserWebhook(id: Int!): WebhookSubscription!

  """
  Deletes the authenticated user's account. Internal use only.
  """
  deleteUser: Int! @internal
}

M srht/pastesrht/gql.go => srht/pastesrht/gql.go +1 -1
@@ 1,4 1,4 @@
// Code generated by gqlclientgen - DO NOT EDIT
// Code generated by gqlclientgen - DO NOT EDIT.

package pastesrht


M srht/pastesrht/schema.graphqls => srht/pastesrht/schema.graphqls +15 -4
@@ 21,6 21,12 @@ directive @private on FIELD_DEFINITION
"Used to provide a human-friendly description of an access scope."
directive @scopehelp(details: String!) on ENUM_VALUE

"""
This used to decorate fields which are for internal use, and are not
available to normal API users.
"""
directive @internal on FIELD_DEFINITION

enum AccessScope {
  PROFILE @scopehelp(details: "profile information")
  PASTES  @scopehelp(details: "pastes")


@@ 37,7 43,7 @@ read or write access. For the meta.sr.ht API, you have access to all public
information without any special permissions - user profile information,
public keys, and so on.
"""
directive @access(scope: AccessScope!, kind: AccessKind!) on FIELD_DEFINITION | ENUM_VALUE
directive @access(scope: AccessScope!, kind: AccessKind!) on FIELD_DEFINITION

enum Visibility {
  "Visible to everyone, listed on your profile"


@@ 115,9 121,9 @@ type OAuthClient {
}

enum WebhookEvent {
  PASTE_CREATED @access(scope: PASTES, kind: RO)
  PASTE_UPDATED @access(scope: PASTES, kind: RO)
  PASTE_DELETED @access(scope: PASTES, kind: RO)
  PASTE_CREATED
  PASTE_UPDATED
  PASTE_DELETED
}

interface WebhookSubscription {


@@ 288,4 294,9 @@ type Mutation {
  unexpected behavior with the third-party integration.
  """
  deleteUserWebhook(id: Int!): WebhookSubscription!

  """
  Deletes the authenticated user's account. Internal use only.
  """
  deleteUser: Int! @internal
}

M srht/todosrht/schema.graphqls => srht/todosrht/schema.graphqls +11 -11
@@ 160,16 160,16 @@ type OAuthClient {
}

enum WebhookEvent {
  TRACKER_CREATED @access(scope: TRACKERS, kind: RO)
  TRACKER_UPDATE  @access(scope: TRACKERS, kind: RO)
  TRACKER_DELETED @access(scope: TRACKERS, kind: RO)
  TICKET_CREATED  @access(scope: TICKETS, kind: RO)
  TICKET_UPDATE   @access(scope: TICKETS, kind: RO)
  TICKET_DELETED  @access(scope: TICKETS, kind: RO)
  LABEL_CREATED   @access(scope: TRACKERS, kind: RO)
  LABEL_UPDATE    @access(scope: TRACKERS, kind: RO)
  LABEL_DELETED   @access(scope: TRACKERS, kind: RO)
  EVENT_CREATED   @access(scope: EVENTS, kind: RO)
  TRACKER_CREATED
  TRACKER_UPDATE
  TRACKER_DELETED
  TICKET_CREATED
  TICKET_UPDATE
  TICKET_DELETED
  LABEL_CREATED
  LABEL_UPDATE
  LABEL_DELETED
  EVENT_CREATED
}

interface WebhookSubscription {


@@ 836,7 836,7 @@ type Mutation {
    name: String!,
    description: String,
    visibility: Visibility!,
    import: Upload): Tracker! @access(scope: TRACKERS, kind: RW)
    importUpload: Upload): Tracker! @access(scope: TRACKERS, kind: RW)

  "Updates an existing bug tracker"
  updateTracker(