Statements of Applicability are no longer exported as one-off PDFs. Instead, each SOA owns a persistent document that accumulates versions over time, following the same publish/approve lifecycle as authored documents. Publishing without approvers publishes immediately; publishing with approvers creates a draft pending approval via the existing quorum system. SOAs can also store default approvers that are pre-populated in the publish dialog. The SOA is removed from the snapshot system — applicability statements are now queried directly (snapshot_id IS NULL) rather than through snapshot copies. A standalone migration script (cmd/migrate-soa-snapshots-to-documents) converts existing SOA snapshots into documents with proper ProseMirror content, preserving version history and approval decisions. Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
148 lines
4.5 KiB
GraphQL
148 lines
4.5 KiB
GraphQL
enum ElectronicSignatureStatus
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureStatus"
|
|
) {
|
|
PENDING
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureStatusPending"
|
|
)
|
|
ACCEPTED
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureStatusAccepted"
|
|
)
|
|
PROCESSING
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureStatusProcessing"
|
|
)
|
|
COMPLETED
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureStatusCompleted"
|
|
)
|
|
FAILED
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureStatusFailed"
|
|
)
|
|
}
|
|
|
|
enum ElectronicSignatureDocumentType
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureDocumentType"
|
|
) {
|
|
NDA
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureDocumentTypeNDA"
|
|
)
|
|
DPA
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureDocumentTypeDPA"
|
|
)
|
|
MSA
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureDocumentTypeMSA"
|
|
)
|
|
SOW
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureDocumentTypeSOW"
|
|
)
|
|
SLA
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureDocumentTypeSLA"
|
|
)
|
|
TOS
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureDocumentTypeTOS"
|
|
)
|
|
PRIVACY_POLICY
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureDocumentTypePrivacyPolicy"
|
|
)
|
|
OTHER
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureDocumentTypeOther"
|
|
)
|
|
STATEMENT_OF_APPLICABILITY
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureDocumentTypeStatementOfApplicability"
|
|
)
|
|
}
|
|
|
|
enum ElectronicSignatureEventType
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureEventType"
|
|
) {
|
|
DOCUMENT_VIEWED
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureEventTypeDocumentViewed"
|
|
)
|
|
CONSENT_GIVEN
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureEventTypeConsentGiven"
|
|
)
|
|
FULL_NAME_TYPED
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureEventTypeFullNameTyped"
|
|
)
|
|
SIGNATURE_ACCEPTED
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureEventTypeSignatureAccepted"
|
|
)
|
|
SIGNATURE_COMPLETED
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureEventTypeSignatureCompleted"
|
|
)
|
|
SEAL_COMPUTED
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureEventTypeSealComputed"
|
|
)
|
|
TIMESTAMP_REQUESTED
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureEventTypeTimestampRequested"
|
|
)
|
|
CERTIFICATE_GENERATED
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureEventTypeCertificateGenerated"
|
|
)
|
|
PROCESSING_ERROR
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureEventTypeProcessingError"
|
|
)
|
|
}
|
|
|
|
enum ElectronicSignatureEventSource
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureEventSource"
|
|
) {
|
|
CLIENT
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureEventSourceClient"
|
|
)
|
|
SERVER
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.ElectronicSignatureEventSourceServer"
|
|
)
|
|
}
|
|
|
|
type ElectronicSignature implements Node {
|
|
id: ID!
|
|
status: ElectronicSignatureStatus!
|
|
documentType: ElectronicSignatureDocumentType!
|
|
consentText: String!
|
|
lastError: String
|
|
signedAt: Datetime
|
|
certificateFileUrl: String @goField(forceResolver: true)
|
|
events: [ElectronicSignatureEvent!]! @goField(forceResolver: true)
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
}
|
|
|
|
type ElectronicSignatureEvent {
|
|
id: ID!
|
|
eventType: ElectronicSignatureEventType!
|
|
eventSource: ElectronicSignatureEventSource!
|
|
actorEmail: String!
|
|
actorIpAddress: String!
|
|
actorUserAgent: String!
|
|
occurredAt: Datetime!
|
|
createdAt: Datetime!
|
|
}
|