Add processing activity registries
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -215,6 +215,102 @@ enum ContinualImprovementRegistriesPriority
|
||||
)
|
||||
}
|
||||
|
||||
enum ProcessingActivityRegistrySpecialOrCriminalData
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistrySpecialOrCriminalData") {
|
||||
YES
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistrySpecialOrCriminalDataYes"
|
||||
)
|
||||
NO
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistrySpecialOrCriminalDataNo"
|
||||
)
|
||||
POSSIBLE
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistrySpecialOrCriminalDataPossible"
|
||||
)
|
||||
}
|
||||
|
||||
enum ProcessingActivityRegistryLawfulBasis
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryLawfulBasis") {
|
||||
LEGITIMATE_INTEREST
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryLawfulBasisLegitimateInterest"
|
||||
)
|
||||
CONSENT
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryLawfulBasisConsent"
|
||||
)
|
||||
CONTRACTUAL_NECESSITY
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryLawfulBasisContractualNecessity"
|
||||
)
|
||||
LEGAL_OBLIGATION
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryLawfulBasisLegalObligation"
|
||||
)
|
||||
VITAL_INTERESTS
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryLawfulBasisVitalInterests"
|
||||
)
|
||||
PUBLIC_TASK
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryLawfulBasisPublicTask"
|
||||
)
|
||||
}
|
||||
|
||||
enum ProcessingActivityRegistryTransferSafeguards
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryTransferSafeguards") {
|
||||
STANDARD_CONTRACTUAL_CLAUSES
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryTransferSafeguardsStandardContractualClauses"
|
||||
)
|
||||
BINDING_CORPORATE_RULES
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryTransferSafeguardsBindingCorporateRules"
|
||||
)
|
||||
ADEQUACY_DECISION
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryTransferSafeguardsAdequacyDecision"
|
||||
)
|
||||
DEROGATIONS
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryTransferSafeguardsDerogations"
|
||||
)
|
||||
CODES_OF_CONDUCT
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryTransferSafeguardsCodesOfConduct"
|
||||
)
|
||||
CERTIFICATION_MECHANISMS
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryTransferSafeguardsCertificationMechanisms"
|
||||
)
|
||||
}
|
||||
|
||||
enum ProcessingActivityRegistryDataProtectionImpactAssessment
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryDataProtectionImpactAssessment") {
|
||||
NEEDED
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryDataProtectionImpactAssessmentNeeded"
|
||||
)
|
||||
NOT_NEEDED
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryDataProtectionImpactAssessmentNotNeeded"
|
||||
)
|
||||
}
|
||||
|
||||
enum ProcessingActivityRegistryTransferImpactAssessment
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryTransferImpactAssessment") {
|
||||
NEEDED
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryTransferImpactAssessmentNeeded"
|
||||
)
|
||||
NOT_NEEDED
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryTransferImpactAssessmentNotNeeded"
|
||||
)
|
||||
}
|
||||
|
||||
# Order Field Enums
|
||||
enum UserOrderField
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.UserOrderField") {
|
||||
@@ -734,6 +830,18 @@ enum ContinualImprovementRegistriesOrderField
|
||||
)
|
||||
}
|
||||
|
||||
enum ProcessingActivityRegistryOrderField
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryOrderField") {
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryOrderFieldCreatedAt"
|
||||
)
|
||||
NAME
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityRegistryOrderFieldName"
|
||||
)
|
||||
}
|
||||
|
||||
enum TrustCenterAccessOrderField
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.TrustCenterAccessOrderField") {
|
||||
CREATED_AT
|
||||
@@ -891,6 +999,14 @@ input ContinualImprovementRegistriesOrder
|
||||
field: ContinualImprovementRegistriesOrderField!
|
||||
}
|
||||
|
||||
input ProcessingActivityRegistryOrder
|
||||
@goModel(
|
||||
model: "github.com/getprobo/probo/pkg/server/api/console/v1/types.ProcessingActivityRegistryOrderBy"
|
||||
) {
|
||||
direction: OrderDirection!
|
||||
field: ProcessingActivityRegistryOrderField!
|
||||
}
|
||||
|
||||
input TrustCenterAccessOrder
|
||||
@goModel(
|
||||
model: "github.com/getprobo/probo/pkg/server/api/console/v1/types.TrustCenterAccessOrderBy"
|
||||
@@ -986,10 +1102,6 @@ input OrganizationFilter {
|
||||
trustCenterSlug: String
|
||||
}
|
||||
|
||||
input TrustCenterFilter {
|
||||
slug: String
|
||||
}
|
||||
|
||||
input DatumFilter {
|
||||
snapshotId: ID
|
||||
}
|
||||
@@ -1151,6 +1263,14 @@ type Organization implements Node {
|
||||
orderBy: ContinualImprovementRegistriesOrder
|
||||
): ContinualImprovementRegistryConnection! @goField(forceResolver: true)
|
||||
|
||||
processingActivityRegistries(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: ProcessingActivityRegistryOrder
|
||||
): ProcessingActivityRegistryConnection! @goField(forceResolver: true)
|
||||
|
||||
snapshots(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
@@ -1571,6 +1691,14 @@ type Audit implements Node {
|
||||
filter: ControlFilter
|
||||
): ControlConnection! @goField(forceResolver: true)
|
||||
|
||||
processingActivityRegistries(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: ProcessingActivityRegistryOrder
|
||||
): ProcessingActivityRegistryConnection! @goField(forceResolver: true)
|
||||
|
||||
showOnTrustCenter: Boolean!
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
@@ -1626,6 +1754,29 @@ type ContinualImprovementRegistry implements Node {
|
||||
updatedAt: Datetime!
|
||||
}
|
||||
|
||||
type ProcessingActivityRegistry implements Node {
|
||||
id: ID!
|
||||
organization: Organization! @goField(forceResolver: true)
|
||||
audit: Audit! @goField(forceResolver: true)
|
||||
name: String!
|
||||
purpose: String
|
||||
dataSubjectCategory: String
|
||||
personalDataCategory: String
|
||||
specialOrCriminalData: ProcessingActivityRegistrySpecialOrCriminalData!
|
||||
consentEvidenceLink: String
|
||||
lawfulBasis: ProcessingActivityRegistryLawfulBasis!
|
||||
recipients: String
|
||||
location: String
|
||||
internationalTransfers: Boolean!
|
||||
transferSafeguards: ProcessingActivityRegistryTransferSafeguards
|
||||
retentionPeriod: String
|
||||
securityMeasures: String
|
||||
dataProtectionImpactAssessment: ProcessingActivityRegistryDataProtectionImpactAssessment!
|
||||
transferImpactAssessment: ProcessingActivityRegistryTransferImpactAssessment!
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
}
|
||||
|
||||
type Snapshot implements Node {
|
||||
id: ID!
|
||||
organization: Organization! @goField(forceResolver: true)
|
||||
@@ -1981,6 +2132,20 @@ type ContinualImprovementRegistryEdge {
|
||||
node: ContinualImprovementRegistry!
|
||||
}
|
||||
|
||||
type ProcessingActivityRegistryConnection
|
||||
@goModel(
|
||||
model: "github.com/getprobo/probo/pkg/server/api/console/v1/types.ProcessingActivityRegistryConnection"
|
||||
) {
|
||||
totalCount: Int! @goField(forceResolver: true)
|
||||
edges: [ProcessingActivityRegistryEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type ProcessingActivityRegistryEdge {
|
||||
cursor: CursorKey!
|
||||
node: ProcessingActivityRegistry!
|
||||
}
|
||||
|
||||
type SnapshotConnection
|
||||
@goModel(
|
||||
model: "github.com/getprobo/probo/pkg/server/api/console/v1/types.SnapshotConnection"
|
||||
@@ -1999,13 +2164,6 @@ type SnapshotEdge {
|
||||
type Query {
|
||||
node(id: ID!): Node!
|
||||
viewer: Viewer!
|
||||
trustCenters(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
filter: TrustCenterFilter
|
||||
): TrustCenterConnection! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
@@ -2263,6 +2421,17 @@ type Mutation {
|
||||
input: DeleteContinualImprovementRegistryInput!
|
||||
): DeleteContinualImprovementRegistryPayload!
|
||||
|
||||
# Processing Activity Registry mutations
|
||||
createProcessingActivityRegistry(
|
||||
input: CreateProcessingActivityRegistryInput!
|
||||
): CreateProcessingActivityRegistryPayload!
|
||||
updateProcessingActivityRegistry(
|
||||
input: UpdateProcessingActivityRegistryInput!
|
||||
): UpdateProcessingActivityRegistryPayload!
|
||||
deleteProcessingActivityRegistry(
|
||||
input: DeleteProcessingActivityRegistryInput!
|
||||
): DeleteProcessingActivityRegistryPayload!
|
||||
|
||||
# Snapshot mutations
|
||||
createSnapshot(input: CreateSnapshotInput!): CreateSnapshotPayload!
|
||||
deleteSnapshot(input: DeleteSnapshotInput!): DeleteSnapshotPayload!
|
||||
@@ -2859,6 +3028,50 @@ input DeleteContinualImprovementRegistryInput {
|
||||
continualImprovementRegistryId: ID!
|
||||
}
|
||||
|
||||
input CreateProcessingActivityRegistryInput {
|
||||
organizationId: ID!
|
||||
auditId: ID!
|
||||
name: String!
|
||||
purpose: String
|
||||
dataSubjectCategory: String
|
||||
personalDataCategory: String
|
||||
specialOrCriminalData: ProcessingActivityRegistrySpecialOrCriminalData!
|
||||
consentEvidenceLink: String
|
||||
lawfulBasis: ProcessingActivityRegistryLawfulBasis!
|
||||
recipients: String
|
||||
location: String
|
||||
internationalTransfers: Boolean!
|
||||
transferSafeguards: ProcessingActivityRegistryTransferSafeguards
|
||||
retentionPeriod: String
|
||||
securityMeasures: String
|
||||
dataProtectionImpactAssessment: ProcessingActivityRegistryDataProtectionImpactAssessment!
|
||||
transferImpactAssessment: ProcessingActivityRegistryTransferImpactAssessment!
|
||||
}
|
||||
|
||||
input UpdateProcessingActivityRegistryInput {
|
||||
id: ID!
|
||||
auditId: ID
|
||||
name: String
|
||||
purpose: String
|
||||
dataSubjectCategory: String
|
||||
personalDataCategory: String
|
||||
specialOrCriminalData: ProcessingActivityRegistrySpecialOrCriminalData
|
||||
consentEvidenceLink: String
|
||||
lawfulBasis: ProcessingActivityRegistryLawfulBasis
|
||||
recipients: String
|
||||
location: String
|
||||
internationalTransfers: Boolean
|
||||
transferSafeguards: ProcessingActivityRegistryTransferSafeguards
|
||||
retentionPeriod: String
|
||||
securityMeasures: String
|
||||
dataProtectionImpactAssessment: ProcessingActivityRegistryDataProtectionImpactAssessment
|
||||
transferImpactAssessment: ProcessingActivityRegistryTransferImpactAssessment
|
||||
}
|
||||
|
||||
input DeleteProcessingActivityRegistryInput {
|
||||
processingActivityRegistryId: ID!
|
||||
}
|
||||
|
||||
input CreateSnapshotInput {
|
||||
organizationId: ID!
|
||||
name: String!
|
||||
@@ -2887,8 +3100,6 @@ type UpdateTrustCenterPayload {
|
||||
trustCenter: TrustCenter!
|
||||
}
|
||||
|
||||
|
||||
|
||||
type CreateTrustCenterAccessPayload {
|
||||
trustCenterAccessEdge: TrustCenterAccessEdge!
|
||||
}
|
||||
@@ -3602,6 +3813,18 @@ type DeleteContinualImprovementRegistryPayload {
|
||||
deletedContinualImprovementRegistryId: ID!
|
||||
}
|
||||
|
||||
type CreateProcessingActivityRegistryPayload {
|
||||
processingActivityRegistryEdge: ProcessingActivityRegistryEdge!
|
||||
}
|
||||
|
||||
type UpdateProcessingActivityRegistryPayload {
|
||||
processingActivityRegistry: ProcessingActivityRegistry!
|
||||
}
|
||||
|
||||
type DeleteProcessingActivityRegistryPayload {
|
||||
deletedProcessingActivityRegistryId: ID!
|
||||
}
|
||||
|
||||
type CreateSnapshotPayload {
|
||||
snapshotEdge: SnapshotEdge!
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,83 @@
|
||||
// Copyright (c) 2025 Probo Inc <hello@getprobo.com>.
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
"github.com/getprobo/probo/pkg/coredata"
|
||||
"github.com/getprobo/probo/pkg/gid"
|
||||
"github.com/getprobo/probo/pkg/page"
|
||||
)
|
||||
|
||||
type (
|
||||
ProcessingActivityRegistryOrderBy OrderBy[coredata.ProcessingActivityRegistryOrderField]
|
||||
|
||||
ProcessingActivityRegistryConnection struct {
|
||||
TotalCount int
|
||||
Edges []*ProcessingActivityRegistryEdge
|
||||
PageInfo PageInfo
|
||||
|
||||
Resolver any
|
||||
ParentID gid.GID
|
||||
}
|
||||
)
|
||||
|
||||
func NewProcessingActivityRegistryConnection(
|
||||
p *page.Page[*coredata.ProcessingActivityRegistry, coredata.ProcessingActivityRegistryOrderField],
|
||||
parentType any,
|
||||
parentID gid.GID,
|
||||
) *ProcessingActivityRegistryConnection {
|
||||
edges := make([]*ProcessingActivityRegistryEdge, len(p.Data))
|
||||
for i, registry := range p.Data {
|
||||
edges[i] = NewProcessingActivityRegistryEdge(registry, p.Cursor.OrderBy.Field)
|
||||
}
|
||||
|
||||
return &ProcessingActivityRegistryConnection{
|
||||
Edges: edges,
|
||||
PageInfo: *NewPageInfo(p),
|
||||
|
||||
Resolver: parentType,
|
||||
ParentID: parentID,
|
||||
}
|
||||
}
|
||||
|
||||
func NewProcessingActivityRegistry(par *coredata.ProcessingActivityRegistry) *ProcessingActivityRegistry {
|
||||
return &ProcessingActivityRegistry{
|
||||
ID: par.ID,
|
||||
Name: par.Name,
|
||||
Purpose: par.Purpose,
|
||||
DataSubjectCategory: par.DataSubjectCategory,
|
||||
PersonalDataCategory: par.PersonalDataCategory,
|
||||
SpecialOrCriminalData: par.SpecialOrCriminalData,
|
||||
ConsentEvidenceLink: par.ConsentEvidenceLink,
|
||||
LawfulBasis: par.LawfulBasis,
|
||||
Recipients: par.Recipients,
|
||||
Location: par.Location,
|
||||
InternationalTransfers: par.InternationalTransfers,
|
||||
TransferSafeguards: par.TransferSafeguards,
|
||||
RetentionPeriod: par.RetentionPeriod,
|
||||
SecurityMeasures: par.SecurityMeasures,
|
||||
DataProtectionImpactAssessment: par.DataProtectionImpactAssessment,
|
||||
TransferImpactAssessment: par.TransferImpactAssessment,
|
||||
CreatedAt: par.CreatedAt,
|
||||
UpdatedAt: par.UpdatedAt,
|
||||
}
|
||||
}
|
||||
|
||||
func NewProcessingActivityRegistryEdge(par *coredata.ProcessingActivityRegistry, orderField coredata.ProcessingActivityRegistryOrderField) *ProcessingActivityRegistryEdge {
|
||||
return &ProcessingActivityRegistryEdge{
|
||||
Node: NewProcessingActivityRegistry(par),
|
||||
Cursor: par.CursorKey(orderField),
|
||||
}
|
||||
}
|
||||
@@ -57,19 +57,20 @@ type AssignTaskPayload struct {
|
||||
}
|
||||
|
||||
type Audit struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Organization *Organization `json:"organization"`
|
||||
Framework *Framework `json:"framework"`
|
||||
ValidFrom *time.Time `json:"validFrom,omitempty"`
|
||||
ValidUntil *time.Time `json:"validUntil,omitempty"`
|
||||
Report *Report `json:"report,omitempty"`
|
||||
ReportURL *string `json:"reportUrl,omitempty"`
|
||||
State coredata.AuditState `json:"state"`
|
||||
Controls *ControlConnection `json:"controls"`
|
||||
ShowOnTrustCenter bool `json:"showOnTrustCenter"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
ID gid.GID `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Organization *Organization `json:"organization"`
|
||||
Framework *Framework `json:"framework"`
|
||||
ValidFrom *time.Time `json:"validFrom,omitempty"`
|
||||
ValidUntil *time.Time `json:"validUntil,omitempty"`
|
||||
Report *Report `json:"report,omitempty"`
|
||||
ReportURL *string `json:"reportUrl,omitempty"`
|
||||
State coredata.AuditState `json:"state"`
|
||||
Controls *ControlConnection `json:"controls"`
|
||||
ProcessingActivityRegistries *ProcessingActivityRegistryConnection `json:"processingActivityRegistries"`
|
||||
ShowOnTrustCenter bool `json:"showOnTrustCenter"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (Audit) IsNode() {}
|
||||
@@ -442,6 +443,30 @@ type CreatePeoplePayload struct {
|
||||
PeopleEdge *PeopleEdge `json:"peopleEdge"`
|
||||
}
|
||||
|
||||
type CreateProcessingActivityRegistryInput struct {
|
||||
OrganizationID gid.GID `json:"organizationId"`
|
||||
AuditID gid.GID `json:"auditId"`
|
||||
Name string `json:"name"`
|
||||
Purpose *string `json:"purpose,omitempty"`
|
||||
DataSubjectCategory *string `json:"dataSubjectCategory,omitempty"`
|
||||
PersonalDataCategory *string `json:"personalDataCategory,omitempty"`
|
||||
SpecialOrCriminalData coredata.ProcessingActivityRegistrySpecialOrCriminalData `json:"specialOrCriminalData"`
|
||||
ConsentEvidenceLink *string `json:"consentEvidenceLink,omitempty"`
|
||||
LawfulBasis coredata.ProcessingActivityRegistryLawfulBasis `json:"lawfulBasis"`
|
||||
Recipients *string `json:"recipients,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
InternationalTransfers bool `json:"internationalTransfers"`
|
||||
TransferSafeguards *coredata.ProcessingActivityRegistryTransferSafeguards `json:"transferSafeguards,omitempty"`
|
||||
RetentionPeriod *string `json:"retentionPeriod,omitempty"`
|
||||
SecurityMeasures *string `json:"securityMeasures,omitempty"`
|
||||
DataProtectionImpactAssessment coredata.ProcessingActivityRegistryDataProtectionImpactAssessment `json:"dataProtectionImpactAssessment"`
|
||||
TransferImpactAssessment coredata.ProcessingActivityRegistryTransferImpactAssessment `json:"transferImpactAssessment"`
|
||||
}
|
||||
|
||||
type CreateProcessingActivityRegistryPayload struct {
|
||||
ProcessingActivityRegistryEdge *ProcessingActivityRegistryEdge `json:"processingActivityRegistryEdge"`
|
||||
}
|
||||
|
||||
type CreateRiskDocumentMappingInput struct {
|
||||
RiskID gid.GID `json:"riskId"`
|
||||
DocumentID gid.GID `json:"documentId"`
|
||||
@@ -762,6 +787,14 @@ type DeletePeoplePayload struct {
|
||||
DeletedPeopleID gid.GID `json:"deletedPeopleId"`
|
||||
}
|
||||
|
||||
type DeleteProcessingActivityRegistryInput struct {
|
||||
ProcessingActivityRegistryID gid.GID `json:"processingActivityRegistryId"`
|
||||
}
|
||||
|
||||
type DeleteProcessingActivityRegistryPayload struct {
|
||||
DeletedProcessingActivityRegistryID gid.GID `json:"deletedProcessingActivityRegistryId"`
|
||||
}
|
||||
|
||||
type DeleteRiskDocumentMappingInput struct {
|
||||
RiskID gid.GID `json:"riskId"`
|
||||
DocumentID gid.GID `json:"documentId"`
|
||||
@@ -1131,6 +1164,7 @@ type Organization struct {
|
||||
NonconformityRegistries *NonconformityRegistryConnection `json:"nonconformityRegistries"`
|
||||
ComplianceRegistries *ComplianceRegistryConnection `json:"complianceRegistries"`
|
||||
ContinualImprovementRegistries *ContinualImprovementRegistryConnection `json:"continualImprovementRegistries"`
|
||||
ProcessingActivityRegistries *ProcessingActivityRegistryConnection `json:"processingActivityRegistries"`
|
||||
Snapshots *SnapshotConnection `json:"snapshots"`
|
||||
TrustCenter *TrustCenter `json:"trustCenter,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
@@ -1191,6 +1225,37 @@ type PeopleFilter struct {
|
||||
ExcludeContractEnded *bool `json:"excludeContractEnded,omitempty"`
|
||||
}
|
||||
|
||||
type ProcessingActivityRegistry struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Organization *Organization `json:"organization"`
|
||||
Audit *Audit `json:"audit"`
|
||||
Name string `json:"name"`
|
||||
Purpose *string `json:"purpose,omitempty"`
|
||||
DataSubjectCategory *string `json:"dataSubjectCategory,omitempty"`
|
||||
PersonalDataCategory *string `json:"personalDataCategory,omitempty"`
|
||||
SpecialOrCriminalData coredata.ProcessingActivityRegistrySpecialOrCriminalData `json:"specialOrCriminalData"`
|
||||
ConsentEvidenceLink *string `json:"consentEvidenceLink,omitempty"`
|
||||
LawfulBasis coredata.ProcessingActivityRegistryLawfulBasis `json:"lawfulBasis"`
|
||||
Recipients *string `json:"recipients,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
InternationalTransfers bool `json:"internationalTransfers"`
|
||||
TransferSafeguards *coredata.ProcessingActivityRegistryTransferSafeguards `json:"transferSafeguards,omitempty"`
|
||||
RetentionPeriod *string `json:"retentionPeriod,omitempty"`
|
||||
SecurityMeasures *string `json:"securityMeasures,omitempty"`
|
||||
DataProtectionImpactAssessment coredata.ProcessingActivityRegistryDataProtectionImpactAssessment `json:"dataProtectionImpactAssessment"`
|
||||
TransferImpactAssessment coredata.ProcessingActivityRegistryTransferImpactAssessment `json:"transferImpactAssessment"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (ProcessingActivityRegistry) IsNode() {}
|
||||
func (this ProcessingActivityRegistry) GetID() gid.GID { return this.ID }
|
||||
|
||||
type ProcessingActivityRegistryEdge struct {
|
||||
Cursor page.CursorKey `json:"cursor"`
|
||||
Node *ProcessingActivityRegistry `json:"node"`
|
||||
}
|
||||
|
||||
type PublishDocumentVersionInput struct {
|
||||
DocumentID gid.GID `json:"documentId"`
|
||||
Changelog *string `json:"changelog,omitempty"`
|
||||
@@ -1380,10 +1445,6 @@ type TrustCenterEdge struct {
|
||||
Node *TrustCenter `json:"node"`
|
||||
}
|
||||
|
||||
type TrustCenterFilter struct {
|
||||
Slug *string `json:"slug,omitempty"`
|
||||
}
|
||||
|
||||
type UnassignTaskInput struct {
|
||||
TaskID gid.GID `json:"taskId"`
|
||||
}
|
||||
@@ -1568,6 +1629,30 @@ type UpdatePeoplePayload struct {
|
||||
People *People `json:"people"`
|
||||
}
|
||||
|
||||
type UpdateProcessingActivityRegistryInput struct {
|
||||
ID gid.GID `json:"id"`
|
||||
AuditID *gid.GID `json:"auditId,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Purpose *string `json:"purpose,omitempty"`
|
||||
DataSubjectCategory *string `json:"dataSubjectCategory,omitempty"`
|
||||
PersonalDataCategory *string `json:"personalDataCategory,omitempty"`
|
||||
SpecialOrCriminalData *coredata.ProcessingActivityRegistrySpecialOrCriminalData `json:"specialOrCriminalData,omitempty"`
|
||||
ConsentEvidenceLink *string `json:"consentEvidenceLink,omitempty"`
|
||||
LawfulBasis *coredata.ProcessingActivityRegistryLawfulBasis `json:"lawfulBasis,omitempty"`
|
||||
Recipients *string `json:"recipients,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
InternationalTransfers *bool `json:"internationalTransfers,omitempty"`
|
||||
TransferSafeguards *coredata.ProcessingActivityRegistryTransferSafeguards `json:"transferSafeguards,omitempty"`
|
||||
RetentionPeriod *string `json:"retentionPeriod,omitempty"`
|
||||
SecurityMeasures *string `json:"securityMeasures,omitempty"`
|
||||
DataProtectionImpactAssessment *coredata.ProcessingActivityRegistryDataProtectionImpactAssessment `json:"dataProtectionImpactAssessment,omitempty"`
|
||||
TransferImpactAssessment *coredata.ProcessingActivityRegistryTransferImpactAssessment `json:"transferImpactAssessment,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateProcessingActivityRegistryPayload struct {
|
||||
ProcessingActivityRegistry *ProcessingActivityRegistry `json:"processingActivityRegistry"`
|
||||
}
|
||||
|
||||
type UpdateRiskInput struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
|
||||
@@ -209,6 +209,31 @@ func (r *auditResolver) Controls(ctx context.Context, obj *types.Audit, first *i
|
||||
return types.NewControlConnection(page, r, obj.ID, controlFilter), nil
|
||||
}
|
||||
|
||||
// ProcessingActivityRegistries is the resolver for the processingActivityRegistries field.
|
||||
func (r *auditResolver) ProcessingActivityRegistries(ctx context.Context, obj *types.Audit, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ProcessingActivityRegistryOrderBy) (*types.ProcessingActivityRegistryConnection, error) {
|
||||
prb := r.ProboService(ctx, obj.ID.TenantID())
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.ProcessingActivityRegistryOrderField]{
|
||||
Field: coredata.ProcessingActivityRegistryOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionDesc,
|
||||
}
|
||||
if orderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.ProcessingActivityRegistryOrderField]{
|
||||
Field: orderBy.Field,
|
||||
Direction: orderBy.Direction,
|
||||
}
|
||||
}
|
||||
|
||||
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
||||
|
||||
page, err := prb.ProcessingActivityRegistries.ListForAuditID(ctx, obj.ID, cursor)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot list processing activity registries: %w", err)
|
||||
}
|
||||
|
||||
return types.NewProcessingActivityRegistryConnection(page, r, obj.ID), nil
|
||||
}
|
||||
|
||||
// TotalCount is the resolver for the totalCount field.
|
||||
func (r *auditConnectionResolver) TotalCount(ctx context.Context, obj *types.AuditConnection) (int, error) {
|
||||
prb := r.ProboService(ctx, obj.ParentID.TenantID())
|
||||
@@ -3184,6 +3209,86 @@ func (r *mutationResolver) DeleteContinualImprovementRegistry(ctx context.Contex
|
||||
}, nil
|
||||
}
|
||||
|
||||
// CreateProcessingActivityRegistry is the resolver for the createProcessingActivityRegistry field.
|
||||
func (r *mutationResolver) CreateProcessingActivityRegistry(ctx context.Context, input types.CreateProcessingActivityRegistryInput) (*types.CreateProcessingActivityRegistryPayload, error) {
|
||||
prb := r.ProboService(ctx, input.OrganizationID.TenantID())
|
||||
|
||||
req := probo.CreateProcessingActivityRegistryRequest{
|
||||
OrganizationID: input.OrganizationID,
|
||||
Name: input.Name,
|
||||
Purpose: input.Purpose,
|
||||
DataSubjectCategory: input.DataSubjectCategory,
|
||||
PersonalDataCategory: input.PersonalDataCategory,
|
||||
SpecialOrCriminalData: input.SpecialOrCriminalData,
|
||||
LawfulBasis: input.LawfulBasis,
|
||||
Recipients: input.Recipients,
|
||||
Location: input.Location,
|
||||
InternationalTransfers: input.InternationalTransfers,
|
||||
TransferSafeguards: input.TransferSafeguards,
|
||||
RetentionPeriod: input.RetentionPeriod,
|
||||
SecurityMeasures: input.SecurityMeasures,
|
||||
DataProtectionImpactAssessment: input.DataProtectionImpactAssessment,
|
||||
TransferImpactAssessment: input.TransferImpactAssessment,
|
||||
AuditID: input.AuditID,
|
||||
}
|
||||
|
||||
registry, err := prb.ProcessingActivityRegistries.Create(ctx, &req)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot create processing activity registry: %w", err))
|
||||
}
|
||||
|
||||
return &types.CreateProcessingActivityRegistryPayload{
|
||||
ProcessingActivityRegistryEdge: types.NewProcessingActivityRegistryEdge(registry, coredata.ProcessingActivityRegistryOrderFieldCreatedAt),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// UpdateProcessingActivityRegistry is the resolver for the updateProcessingActivityRegistry field.
|
||||
func (r *mutationResolver) UpdateProcessingActivityRegistry(ctx context.Context, input types.UpdateProcessingActivityRegistryInput) (*types.UpdateProcessingActivityRegistryPayload, error) {
|
||||
prb := r.ProboService(ctx, input.ID.TenantID())
|
||||
|
||||
req := probo.UpdateProcessingActivityRegistryRequest{
|
||||
ID: input.ID,
|
||||
Name: input.Name,
|
||||
Purpose: &input.Purpose,
|
||||
DataSubjectCategory: &input.DataSubjectCategory,
|
||||
PersonalDataCategory: &input.PersonalDataCategory,
|
||||
SpecialOrCriminalData: input.SpecialOrCriminalData,
|
||||
LawfulBasis: input.LawfulBasis,
|
||||
Recipients: &input.Recipients,
|
||||
Location: &input.Location,
|
||||
InternationalTransfers: input.InternationalTransfers,
|
||||
TransferSafeguards: &input.TransferSafeguards,
|
||||
RetentionPeriod: &input.RetentionPeriod,
|
||||
SecurityMeasures: &input.SecurityMeasures,
|
||||
DataProtectionImpactAssessment: input.DataProtectionImpactAssessment,
|
||||
TransferImpactAssessment: input.TransferImpactAssessment,
|
||||
AuditID: input.AuditID,
|
||||
}
|
||||
|
||||
registry, err := prb.ProcessingActivityRegistries.Update(ctx, &req)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot update processing activity registry: %w", err))
|
||||
}
|
||||
|
||||
return &types.UpdateProcessingActivityRegistryPayload{
|
||||
ProcessingActivityRegistry: types.NewProcessingActivityRegistry(registry),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// DeleteProcessingActivityRegistry is the resolver for the deleteProcessingActivityRegistry field.
|
||||
func (r *mutationResolver) DeleteProcessingActivityRegistry(ctx context.Context, input types.DeleteProcessingActivityRegistryInput) (*types.DeleteProcessingActivityRegistryPayload, error) {
|
||||
prb := r.ProboService(ctx, input.ProcessingActivityRegistryID.TenantID())
|
||||
|
||||
err := prb.ProcessingActivityRegistries.Delete(ctx, input.ProcessingActivityRegistryID)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot delete processing activity registry: %w", err))
|
||||
}
|
||||
|
||||
return &types.DeleteProcessingActivityRegistryPayload{
|
||||
DeletedProcessingActivityRegistryID: input.ProcessingActivityRegistryID,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// CreateSnapshot is the resolver for the createSnapshot field.
|
||||
func (r *mutationResolver) CreateSnapshot(ctx context.Context, input types.CreateSnapshotInput) (*types.CreateSnapshotPayload, error) {
|
||||
prb := r.ProboService(ctx, input.OrganizationID.TenantID())
|
||||
@@ -3721,6 +3826,32 @@ func (r *organizationResolver) ContinualImprovementRegistries(ctx context.Contex
|
||||
return types.NewContinualImprovementRegistryConnection(page, r, obj.ID), nil
|
||||
}
|
||||
|
||||
// ProcessingActivityRegistries is the resolver for the processingActivityRegistries field.
|
||||
func (r *organizationResolver) ProcessingActivityRegistries(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ProcessingActivityRegistryOrderBy) (*types.ProcessingActivityRegistryConnection, error) {
|
||||
prb := r.ProboService(ctx, obj.ID.TenantID())
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.ProcessingActivityRegistryOrderField]{
|
||||
Field: coredata.ProcessingActivityRegistryOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionDesc,
|
||||
}
|
||||
|
||||
if orderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.ProcessingActivityRegistryOrderField]{
|
||||
Field: orderBy.Field,
|
||||
Direction: orderBy.Direction,
|
||||
}
|
||||
}
|
||||
|
||||
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
||||
|
||||
page, err := prb.ProcessingActivityRegistries.ListForOrganizationID(ctx, obj.ID, cursor)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot list organization processing activity registries: %w", err))
|
||||
}
|
||||
|
||||
return types.NewProcessingActivityRegistryConnection(page, r, obj.ID), nil
|
||||
}
|
||||
|
||||
// Snapshots is the resolver for the snapshots field.
|
||||
func (r *organizationResolver) Snapshots(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.SnapshotOrderBy) (*types.SnapshotConnection, error) {
|
||||
prb := r.ProboService(ctx, obj.ID.TenantID())
|
||||
@@ -3774,6 +3905,62 @@ func (r *peopleConnectionResolver) TotalCount(ctx context.Context, obj *types.Pe
|
||||
panic(fmt.Errorf("unsupported resolver: %T", obj.Resolver))
|
||||
}
|
||||
|
||||
// Organization is the resolver for the organization field.
|
||||
func (r *processingActivityRegistryResolver) Organization(ctx context.Context, obj *types.ProcessingActivityRegistry) (*types.Organization, error) {
|
||||
prb := r.ProboService(ctx, obj.ID.TenantID())
|
||||
|
||||
processingActivityRegistry, err := prb.ProcessingActivityRegistries.Get(ctx, obj.ID)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot get processing activity registry: %w", err))
|
||||
}
|
||||
|
||||
organization, err := prb.Organizations.Get(ctx, processingActivityRegistry.OrganizationID)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot get organization: %w", err))
|
||||
}
|
||||
|
||||
return types.NewOrganization(organization), nil
|
||||
}
|
||||
|
||||
// Audit is the resolver for the audit field.
|
||||
func (r *processingActivityRegistryResolver) Audit(ctx context.Context, obj *types.ProcessingActivityRegistry) (*types.Audit, error) {
|
||||
prb := r.ProboService(ctx, obj.ID.TenantID())
|
||||
|
||||
processingActivityRegistry, err := prb.ProcessingActivityRegistries.Get(ctx, obj.ID)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot get processing activity registry: %w", err))
|
||||
}
|
||||
|
||||
audit, err := prb.Audits.Get(ctx, processingActivityRegistry.AuditID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot get audit: %w", err)
|
||||
}
|
||||
|
||||
return types.NewAudit(audit), nil
|
||||
}
|
||||
|
||||
// TotalCount is the resolver for the totalCount field.
|
||||
func (r *processingActivityRegistryConnectionResolver) TotalCount(ctx context.Context, obj *types.ProcessingActivityRegistryConnection) (int, error) {
|
||||
prb := r.ProboService(ctx, obj.ParentID.TenantID())
|
||||
|
||||
switch obj.Resolver.(type) {
|
||||
case *organizationResolver:
|
||||
count, err := prb.ProcessingActivityRegistries.CountForOrganizationID(ctx, obj.ParentID)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot count organization processing activity registries: %w", err))
|
||||
}
|
||||
return count, nil
|
||||
case *auditResolver:
|
||||
count, err := prb.ProcessingActivityRegistries.CountForAuditID(ctx, obj.ParentID)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot count audit processing activity registries: %w", err))
|
||||
}
|
||||
return count, nil
|
||||
}
|
||||
|
||||
panic(fmt.Errorf("unsupported resolver: %T", obj.Resolver))
|
||||
}
|
||||
|
||||
// Node is the resolver for the node field.
|
||||
func (r *queryResolver) Node(ctx context.Context, id gid.GID) (types.Node, error) {
|
||||
prb := r.ProboService(ctx, id.TenantID())
|
||||
@@ -3919,6 +4106,12 @@ func (r *queryResolver) Node(ctx context.Context, id gid.GID) (types.Node, error
|
||||
panic(fmt.Errorf("cannot get report: %w", err))
|
||||
}
|
||||
return types.NewReport(report), nil
|
||||
case coredata.ProcessingActivityRegistryEntityType:
|
||||
processingActivityRegistry, err := prb.ProcessingActivityRegistries.Get(ctx, id)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot get processing activity registry: %w", err))
|
||||
}
|
||||
return types.NewProcessingActivityRegistry(processingActivityRegistry), nil
|
||||
case coredata.SnapshotEntityType:
|
||||
snapshot, err := prb.Snapshots.Get(ctx, id)
|
||||
if err != nil {
|
||||
@@ -3948,11 +4141,6 @@ func (r *queryResolver) Viewer(ctx context.Context) (*types.Viewer, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
// TrustCenters is the resolver for the trustCenters field.
|
||||
func (r *queryResolver) TrustCenters(ctx context.Context, first *int, after *page.CursorKey, last *int, before *page.CursorKey, filter *types.TrustCenterFilter) (*types.TrustCenterConnection, error) {
|
||||
return nil, fmt.Errorf("not implemented: TrustCenters - trustCenters")
|
||||
}
|
||||
|
||||
// DownloadURL is the resolver for the downloadUrl field.
|
||||
func (r *reportResolver) DownloadURL(ctx context.Context, obj *types.Report) (*string, error) {
|
||||
prb := r.ProboService(ctx, obj.ID.TenantID())
|
||||
@@ -4822,6 +5010,16 @@ func (r *Resolver) PeopleConnection() schema.PeopleConnectionResolver {
|
||||
return &peopleConnectionResolver{r}
|
||||
}
|
||||
|
||||
// ProcessingActivityRegistry returns schema.ProcessingActivityRegistryResolver implementation.
|
||||
func (r *Resolver) ProcessingActivityRegistry() schema.ProcessingActivityRegistryResolver {
|
||||
return &processingActivityRegistryResolver{r}
|
||||
}
|
||||
|
||||
// ProcessingActivityRegistryConnection returns schema.ProcessingActivityRegistryConnectionResolver implementation.
|
||||
func (r *Resolver) ProcessingActivityRegistryConnection() schema.ProcessingActivityRegistryConnectionResolver {
|
||||
return &processingActivityRegistryConnectionResolver{r}
|
||||
}
|
||||
|
||||
// Query returns schema.QueryResolver implementation.
|
||||
func (r *Resolver) Query() schema.QueryResolver { return &queryResolver{r} }
|
||||
|
||||
@@ -4918,6 +5116,8 @@ type nonconformityRegistryResolver struct{ *Resolver }
|
||||
type nonconformityRegistryConnectionResolver struct{ *Resolver }
|
||||
type organizationResolver struct{ *Resolver }
|
||||
type peopleConnectionResolver struct{ *Resolver }
|
||||
type processingActivityRegistryResolver struct{ *Resolver }
|
||||
type processingActivityRegistryConnectionResolver struct{ *Resolver }
|
||||
type queryResolver struct{ *Resolver }
|
||||
type reportResolver struct{ *Resolver }
|
||||
type riskResolver struct{ *Resolver }
|
||||
|
||||
Reference in New Issue
Block a user