619 lines
12 KiB
GraphQL
619 lines
12 KiB
GraphQL
directive @goField(
|
|
forceResolver: Boolean
|
|
name: String
|
|
omittable: Boolean
|
|
) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
|
|
|
|
directive @goModel(
|
|
model: String
|
|
models: [String!]
|
|
) on OBJECT | INPUT_OBJECT | SCALAR | ENUM | INTERFACE | UNION
|
|
|
|
directive @goEnum(value: String) on ENUM_VALUE
|
|
|
|
scalar CursorKey
|
|
scalar Void
|
|
scalar Datetime
|
|
scalar Upload
|
|
|
|
interface Node {
|
|
id: ID!
|
|
}
|
|
|
|
enum ControlState
|
|
@goModel(model: "github.com/getprobo/probo/pkg/coredata.ControlState") {
|
|
NOT_STARTED
|
|
@goEnum(
|
|
value: "github.com/getprobo/probo/pkg/coredata.ControlStateNotStarted"
|
|
)
|
|
IN_PROGRESS
|
|
@goEnum(
|
|
value: "github.com/getprobo/probo/pkg/coredata.ControlStateInProgress"
|
|
)
|
|
NOT_APPLICABLE
|
|
@goEnum(
|
|
value: "github.com/getprobo/probo/pkg/coredata.ControlStateNotApplicable"
|
|
)
|
|
IMPLEMENTED
|
|
@goEnum(
|
|
value: "github.com/getprobo/probo/pkg/coredata.ControlStateImplemented"
|
|
)
|
|
}
|
|
|
|
enum TaskState
|
|
@goModel(model: "github.com/getprobo/probo/pkg/coredata.TaskState") {
|
|
TODO @goEnum(value: "github.com/getprobo/probo/pkg/coredata.TaskStateTodo")
|
|
DONE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.TaskStateDone")
|
|
}
|
|
|
|
enum EvidenceState
|
|
@goModel(model: "github.com/getprobo/probo/pkg/coredata.EvidenceState") {
|
|
VALID
|
|
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.EvidenceStateValid")
|
|
INVALID
|
|
@goEnum(
|
|
value: "github.com/getprobo/probo/pkg/coredata.EvidenceStateInvalid"
|
|
)
|
|
EXPIRED
|
|
@goEnum(
|
|
value: "github.com/getprobo/probo/pkg/coredata.EvidenceStateExpired"
|
|
)
|
|
}
|
|
|
|
enum PeopleKind
|
|
@goModel(model: "github.com/getprobo/probo/pkg/coredata.PeopleKind") {
|
|
EMPLOYEE
|
|
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.PeopleKindEmployee")
|
|
CONTRACTOR
|
|
@goEnum(
|
|
value: "github.com/getprobo/probo/pkg/coredata.PeopleKindContractor"
|
|
)
|
|
}
|
|
|
|
type PageInfo {
|
|
hasNextPage: Boolean!
|
|
hasPreviousPage: Boolean!
|
|
startCursor: CursorKey
|
|
endCursor: CursorKey
|
|
}
|
|
|
|
type OrganizationConnection {
|
|
edges: [OrganizationEdge!]!
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
type OrganizationEdge {
|
|
cursor: CursorKey!
|
|
node: Organization!
|
|
}
|
|
|
|
type Organization implements Node {
|
|
id: ID!
|
|
name: String!
|
|
logoUrl: String!
|
|
|
|
frameworks(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
): FrameworkConnection! @goField(forceResolver: true)
|
|
|
|
vendors(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
): VendorConnection! @goField(forceResolver: true)
|
|
|
|
peoples(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
): PeopleConnection! @goField(forceResolver: true)
|
|
|
|
policies(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
): PolicyConnection! @goField(forceResolver: true)
|
|
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
}
|
|
|
|
type PeopleConnection {
|
|
edges: [PeopleEdge!]!
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
type PeopleEdge {
|
|
cursor: CursorKey!
|
|
node: People!
|
|
}
|
|
|
|
type People implements Node {
|
|
id: ID!
|
|
fullName: String!
|
|
primaryEmailAddress: String!
|
|
additionalEmailAddresses: [String!]!
|
|
kind: PeopleKind!
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
version: Int!
|
|
}
|
|
|
|
type VendorConnection {
|
|
edges: [VendorEdge!]!
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
type VendorEdge {
|
|
cursor: CursorKey!
|
|
node: Vendor!
|
|
}
|
|
|
|
type Vendor implements Node {
|
|
id: ID!
|
|
name: String!
|
|
description: String!
|
|
serviceStartAt: Datetime!
|
|
serviceTerminationAt: Datetime
|
|
serviceCriticality: ServiceCriticality!
|
|
riskTier: RiskTier!
|
|
statusPageUrl: String
|
|
termsOfServiceUrl: String
|
|
privacyPolicyUrl: String
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
version: Int!
|
|
}
|
|
|
|
type FrameworkConnection {
|
|
edges: [FrameworkEdge!]!
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
type FrameworkEdge {
|
|
cursor: CursorKey!
|
|
node: Framework!
|
|
}
|
|
|
|
type Framework implements Node {
|
|
id: ID!
|
|
version: Int!
|
|
|
|
name: String!
|
|
description: String!
|
|
|
|
controls(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
): ControlConnection! @goField(forceResolver: true)
|
|
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
}
|
|
|
|
type ControlConnection {
|
|
edges: [ControlEdge!]!
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
type ControlEdge {
|
|
cursor: CursorKey!
|
|
node: Control!
|
|
}
|
|
|
|
type Control implements Node {
|
|
id: ID!
|
|
version: Int!
|
|
category: String!
|
|
name: String!
|
|
description: String!
|
|
state: ControlState!
|
|
|
|
tasks(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
): TaskConnection! @goField(forceResolver: true)
|
|
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
}
|
|
|
|
type TaskConnection {
|
|
edges: [TaskEdge!]!
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
type TaskEdge {
|
|
cursor: CursorKey!
|
|
node: Task!
|
|
}
|
|
|
|
type Task implements Node {
|
|
id: ID!
|
|
version: Int!
|
|
name: String!
|
|
description: String!
|
|
state: TaskState!
|
|
|
|
evidences(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
): EvidenceConnection! @goField(forceResolver: true)
|
|
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
}
|
|
|
|
type EvidenceConnection {
|
|
edges: [EvidenceEdge!]!
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
type EvidenceEdge {
|
|
cursor: CursorKey!
|
|
node: Evidence!
|
|
}
|
|
|
|
type Evidence implements Node {
|
|
id: ID!
|
|
fileUrl: String! @goField(forceResolver: true)
|
|
mimeType: String!
|
|
size: Int!
|
|
state: EvidenceState!
|
|
filename: String!
|
|
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
}
|
|
|
|
type User implements Node {
|
|
id: ID!
|
|
fullName: String!
|
|
email: String!
|
|
|
|
organizations(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
): OrganizationConnection! @goField(forceResolver: true)
|
|
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
}
|
|
|
|
type Session {
|
|
id: ID!
|
|
expiresAt: Datetime!
|
|
}
|
|
|
|
type Query {
|
|
node(id: ID!): Node!
|
|
viewer: User!
|
|
}
|
|
|
|
type Mutation {
|
|
createVendor(input: CreateVendorInput!): CreateVendorPayload!
|
|
updateVendor(input: UpdateVendorInput!): UpdateVendorPayload!
|
|
deleteVendor(input: DeleteVendorInput!): DeleteVendorPayload!
|
|
createPeople(input: CreatePeopleInput!): CreatePeoplePayload!
|
|
updatePeople(input: UpdatePeopleInput!): UpdatePeoplePayload!
|
|
deletePeople(input: DeletePeopleInput!): DeletePeoplePayload!
|
|
createOrganization(
|
|
input: CreateOrganizationInput!
|
|
): CreateOrganizationPayload!
|
|
deleteOrganization(
|
|
input: DeleteOrganizationInput!
|
|
): DeleteOrganizationPayload!
|
|
createTask(input: CreateTaskInput!): CreateTaskPayload!
|
|
updateTask(input: UpdateTaskInput!): UpdateTaskPayload!
|
|
deleteTask(input: DeleteTaskInput!): DeleteTaskPayload!
|
|
createFramework(input: CreateFrameworkInput!): CreateFrameworkPayload!
|
|
createControl(input: CreateControlInput!): CreateControlPayload!
|
|
updateFramework(input: UpdateFrameworkInput!): UpdateFrameworkPayload!
|
|
updateControl(input: UpdateControlInput!): UpdateControlPayload!
|
|
uploadEvidence(input: UploadEvidenceInput!): UploadEvidencePayload!
|
|
deleteEvidence(input: DeleteEvidenceInput!): DeleteEvidencePayload!
|
|
createPolicy(input: CreatePolicyInput!): CreatePolicyPayload!
|
|
updatePolicy(input: UpdatePolicyInput!): UpdatePolicyPayload!
|
|
deletePolicy(input: DeletePolicyInput!): DeletePolicyPayload!
|
|
|
|
confirmEmail(input: ConfirmEmailInput!): ConfirmEmailPayload!
|
|
}
|
|
|
|
input CreateVendorInput {
|
|
organizationId: ID!
|
|
name: String!
|
|
description: String!
|
|
serviceStartAt: Datetime!
|
|
serviceTerminationAt: Datetime
|
|
serviceCriticality: ServiceCriticality!
|
|
riskTier: RiskTier!
|
|
statusPageUrl: String
|
|
termsOfServiceUrl: String
|
|
privacyPolicyUrl: String
|
|
}
|
|
|
|
input DeleteVendorInput {
|
|
vendorId: ID!
|
|
}
|
|
|
|
input DeletePeopleInput {
|
|
peopleId: ID!
|
|
}
|
|
|
|
input CreatePeopleInput {
|
|
organizationId: ID!
|
|
fullName: String!
|
|
primaryEmailAddress: String!
|
|
additionalEmailAddresses: [String!]
|
|
kind: PeopleKind!
|
|
}
|
|
|
|
input UpdatePeopleInput {
|
|
id: ID!
|
|
expectedVersion: Int!
|
|
fullName: String
|
|
primaryEmailAddress: String
|
|
additionalEmailAddresses: [String!]
|
|
kind: PeopleKind
|
|
}
|
|
|
|
enum ServiceCriticality
|
|
@goModel(model: "github.com/getprobo/probo/pkg/coredata.ServiceCriticality") {
|
|
LOW
|
|
@goEnum(
|
|
value: "github.com/getprobo/probo/pkg/coredata.ServiceCriticalityLow"
|
|
)
|
|
MEDIUM
|
|
@goEnum(
|
|
value: "github.com/getprobo/probo/pkg/coredata.ServiceCriticalityMedium"
|
|
)
|
|
HIGH
|
|
@goEnum(
|
|
value: "github.com/getprobo/probo/pkg/coredata.ServiceCriticalityHigh"
|
|
)
|
|
}
|
|
|
|
enum RiskTier
|
|
@goModel(model: "github.com/getprobo/probo/pkg/coredata.RiskTier") {
|
|
CRITICAL
|
|
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.RiskTierCritical")
|
|
SIGNIFICANT
|
|
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.RiskTierSignificant")
|
|
GENERAL
|
|
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.RiskTierGeneral")
|
|
}
|
|
|
|
input UpdateVendorInput {
|
|
id: ID!
|
|
expectedVersion: Int!
|
|
name: String
|
|
description: String
|
|
serviceStartAt: Datetime
|
|
serviceTerminationAt: Datetime
|
|
serviceCriticality: ServiceCriticality
|
|
riskTier: RiskTier
|
|
statusPageUrl: String
|
|
termsOfServiceUrl: String
|
|
privacyPolicyUrl: String
|
|
}
|
|
|
|
type CreatePeoplePayload {
|
|
peopleEdge: PeopleEdge!
|
|
}
|
|
|
|
type CreateVendorPayload {
|
|
vendorEdge: VendorEdge!
|
|
}
|
|
|
|
type DeleteVendorPayload {
|
|
deletedVendorId: ID!
|
|
}
|
|
|
|
type DeletePeoplePayload {
|
|
deletedPeopleId: ID!
|
|
}
|
|
|
|
input CreateOrganizationInput {
|
|
name: String!
|
|
}
|
|
|
|
input DeleteOrganizationInput {
|
|
organizationId: ID!
|
|
}
|
|
|
|
type CreateOrganizationPayload {
|
|
organizationEdge: OrganizationEdge!
|
|
}
|
|
|
|
type DeleteOrganizationPayload {
|
|
deletedOrganizationId: ID!
|
|
}
|
|
|
|
input CreateTaskInput {
|
|
controlId: ID!
|
|
name: String!
|
|
description: String!
|
|
}
|
|
|
|
type CreateTaskPayload {
|
|
taskEdge: TaskEdge!
|
|
}
|
|
|
|
input DeleteTaskInput {
|
|
taskId: ID!
|
|
}
|
|
|
|
type DeleteTaskPayload {
|
|
deletedTaskId: ID!
|
|
}
|
|
|
|
input CreateFrameworkInput {
|
|
organizationId: ID!
|
|
name: String!
|
|
description: String!
|
|
}
|
|
|
|
input UpdateFrameworkInput {
|
|
id: ID!
|
|
expectedVersion: Int!
|
|
name: String
|
|
description: String
|
|
}
|
|
|
|
type CreateFrameworkPayload {
|
|
frameworkEdge: FrameworkEdge!
|
|
}
|
|
|
|
input CreateControlInput {
|
|
frameworkId: ID!
|
|
name: String!
|
|
description: String!
|
|
category: String!
|
|
}
|
|
|
|
type CreateControlPayload {
|
|
controlEdge: ControlEdge!
|
|
}
|
|
|
|
type UpdateFrameworkPayload {
|
|
framework: Framework!
|
|
}
|
|
|
|
type UpdateVendorPayload {
|
|
vendor: Vendor!
|
|
}
|
|
|
|
type UpdatePeoplePayload {
|
|
people: People!
|
|
}
|
|
|
|
input UpdateControlInput {
|
|
id: ID!
|
|
expectedVersion: Int!
|
|
name: String
|
|
description: String
|
|
category: String
|
|
state: ControlState
|
|
}
|
|
|
|
type UpdateControlPayload {
|
|
control: Control!
|
|
}
|
|
|
|
input UploadEvidenceInput {
|
|
taskId: ID!
|
|
name: String!
|
|
file: Upload!
|
|
}
|
|
|
|
type UploadEvidencePayload {
|
|
evidenceEdge: EvidenceEdge!
|
|
}
|
|
|
|
input DeleteEvidenceInput {
|
|
evidenceId: ID!
|
|
}
|
|
|
|
type DeleteEvidencePayload {
|
|
deletedEvidenceId: ID!
|
|
}
|
|
|
|
enum PolicyStatus
|
|
@goModel(model: "github.com/getprobo/probo/pkg/coredata.PolicyStatus") {
|
|
DRAFT
|
|
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.PolicyStatusDraft")
|
|
ACTIVE
|
|
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.PolicyStatusActive")
|
|
}
|
|
|
|
input CreatePolicyInput {
|
|
organizationId: ID!
|
|
name: String!
|
|
content: String!
|
|
status: PolicyStatus!
|
|
reviewDate: Datetime
|
|
ownerId: ID!
|
|
}
|
|
|
|
input UpdatePolicyInput {
|
|
id: ID!
|
|
expectedVersion: Int!
|
|
name: String
|
|
content: String
|
|
status: PolicyStatus
|
|
reviewDate: Datetime
|
|
ownerId: ID
|
|
}
|
|
|
|
input DeletePolicyInput {
|
|
policyId: ID!
|
|
}
|
|
|
|
type CreatePolicyPayload {
|
|
policyEdge: PolicyEdge!
|
|
}
|
|
|
|
type UpdatePolicyPayload {
|
|
policy: Policy!
|
|
}
|
|
|
|
type DeletePolicyPayload {
|
|
deletedPolicyId: ID!
|
|
}
|
|
|
|
type Policy implements Node {
|
|
id: ID!
|
|
version: Int!
|
|
name: String!
|
|
status: PolicyStatus!
|
|
content: String!
|
|
reviewDate: Datetime
|
|
owner: People! @goField(forceResolver: true)
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
}
|
|
|
|
type PolicyConnection {
|
|
edges: [PolicyEdge!]!
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
type PolicyEdge {
|
|
cursor: CursorKey!
|
|
node: Policy!
|
|
}
|
|
|
|
input UpdateTaskInput {
|
|
taskId: ID!
|
|
expectedVersion: Int!
|
|
name: String
|
|
description: String
|
|
state: TaskState
|
|
}
|
|
|
|
type UpdateTaskPayload {
|
|
task: Task!
|
|
}
|
|
|
|
input ConfirmEmailInput {
|
|
token: String!
|
|
}
|
|
|
|
type ConfirmEmailPayload {
|
|
success: Boolean!
|
|
}
|