Remove assets from the snapshot system and replace with a publish-based document workflow that generates versioned ProseMirror documents. - Remove snapshot_id/source_id from asset and asset_vendor models - Delete AssetFilter (no longer needed without snapshot filtering) - Add PublishAssetList service, GraphQL mutation, MCP tool, CLI command, and n8n operation - Add asset_list_document_id column to generated_documents table - Generate ProseMirror documents with asset inventory tables (name, type, amount, data types stored, owner, vendors) - Add AssetListDocument resolver on Organization type - Update frontend to remove snapshot routes/params and add publish dialog - Add e2e tests for asset publish (immediate, with approvers, reuse, RBAC) - Add migration script for converting legacy asset snapshots to documents - Exclude ASSETS from snapshot type lists and e2e snapshot tests - Move generated_documents SQL to coredata methods on Datum and Asset - Clear generated document and SOA references on soft delete and archive Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
102 lines
2.6 KiB
GraphQL
102 lines
2.6 KiB
GraphQL
enum SnapshotsType
|
|
@goModel(model: "go.probo.inc/probo/pkg/coredata.SnapshotsType") {
|
|
RISKS @goEnum(value: "go.probo.inc/probo/pkg/coredata.SnapshotsTypeRisks")
|
|
VENDORS
|
|
@goEnum(value: "go.probo.inc/probo/pkg/coredata.SnapshotsTypeVendors")
|
|
FINDINGS
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.SnapshotsTypeFindings"
|
|
)
|
|
OBLIGATIONS
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.SnapshotsTypeObligations"
|
|
)
|
|
PROCESSING_ACTIVITIES
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.SnapshotsTypeProcessingActivities"
|
|
)
|
|
STATEMENTS_OF_APPLICABILITY
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.SnapshotsTypeStatementsOfApplicability"
|
|
)
|
|
}
|
|
|
|
enum SnapshotOrderField
|
|
@goModel(model: "go.probo.inc/probo/pkg/coredata.SnapshotOrderField") {
|
|
CREATED_AT
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.SnapshotOrderFieldCreatedAt"
|
|
)
|
|
NAME
|
|
@goEnum(value: "go.probo.inc/probo/pkg/coredata.SnapshotOrderFieldName")
|
|
TYPE
|
|
@goEnum(value: "go.probo.inc/probo/pkg/coredata.SnapshotOrderFieldType")
|
|
}
|
|
|
|
input SnapshotOrder
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.SnapshotOrderBy"
|
|
) {
|
|
direction: OrderDirection!
|
|
field: SnapshotOrderField!
|
|
}
|
|
|
|
type Snapshot implements Node {
|
|
id: ID!
|
|
organization: Organization! @goField(forceResolver: true)
|
|
name: String!
|
|
description: String
|
|
type: SnapshotsType!
|
|
|
|
controls(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
orderBy: ControlOrder
|
|
filter: ControlFilter
|
|
): ControlConnection! @goField(forceResolver: true)
|
|
|
|
createdAt: Datetime!
|
|
|
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
|
}
|
|
|
|
type SnapshotConnection
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.SnapshotConnection"
|
|
) {
|
|
totalCount: Int! @goField(forceResolver: true)
|
|
edges: [SnapshotEdge!]!
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
type SnapshotEdge {
|
|
cursor: CursorKey!
|
|
node: Snapshot!
|
|
}
|
|
|
|
extend type Mutation {
|
|
createSnapshot(input: CreateSnapshotInput!): CreateSnapshotPayload!
|
|
deleteSnapshot(input: DeleteSnapshotInput!): DeleteSnapshotPayload!
|
|
}
|
|
|
|
input CreateSnapshotInput {
|
|
organizationId: ID!
|
|
name: String!
|
|
description: String
|
|
type: SnapshotsType!
|
|
}
|
|
|
|
input DeleteSnapshotInput {
|
|
snapshotId: ID!
|
|
}
|
|
|
|
type CreateSnapshotPayload {
|
|
snapshotEdge: SnapshotEdge!
|
|
}
|
|
|
|
type DeleteSnapshotPayload {
|
|
deletedSnapshotId: ID!
|
|
}
|