Files
speckle-server/packages/server/modules/webhooks/graph/schemas/webhooks.graphql
T
2021-07-09 15:09:49 +01:00

63 lines
1.1 KiB
GraphQL

extend type Stream {
webhooks(id: String): WebhookCollection
@hasRole(role: "stream:owner")
@hasScope(scope: "streams:write")
}
extend type Mutation {
"""
Creates a new webhook on a stream
"""
webhookCreate(webhook: WebhookCreateInput!): String!
@hasRole(role: "stream:owner")
@hasScope(scope: "streams:write")
"""
Updates an existing webhook
"""
webhookUpdate(webhook: WebhookUpdateInput!): String!
@hasRole(role: "stream:owner")
@hasScope(scope: "streams:write")
"""
Deletes an existing webhook
"""
webhookDelete(id: String!): String!
@hasRole(role: "stream:owner")
@hasScope(scope: "streams:write")
}
type WebhookCollection {
totalCount: Int
cursor: String
items: [Webhook]
}
type Webhook {
id: String!
streamId: String!
url: String!
description: String
events: JSONObject!
secret: String
enabled: Boolean
}
input WebhookCreateInput {
streamId: String!
url: String!
description: String
events: JSONObject!
secret: String
enabled: Boolean
}
input WebhookUpdateInput {
id: String!
url: String
description: String
secret: String
enabled: Boolean
events: JSONObject
}