Add processing activity registries
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -0,0 +1,143 @@
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Option } from "@probo/ui";
|
||||
import type {
|
||||
ProcessingActivityRegistrySpecialOrCriminalData,
|
||||
ProcessingActivityRegistryLawfulBasis,
|
||||
ProcessingActivityRegistryDataProtectionImpactAssessment,
|
||||
ProcessingActivityRegistryTransferImpactAssessment,
|
||||
} from "../../hooks/graph/__generated__/ProcessingActivityRegistryGraphCreateMutation.graphql";
|
||||
|
||||
export function SpecialOrCriminalDataOptions() {
|
||||
const { __ } = useTranslate();
|
||||
|
||||
const options: Array<{
|
||||
value: ProcessingActivityRegistrySpecialOrCriminalData;
|
||||
label: string;
|
||||
}> = [
|
||||
{ value: "YES", label: __("Yes") },
|
||||
{ value: "NO", label: __("No") },
|
||||
{ value: "POSSIBLE", label: __("Possible") },
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
{options.map((option) => (
|
||||
<Option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</Option>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export function LawfulBasisOptions() {
|
||||
const { __ } = useTranslate();
|
||||
|
||||
const options: Array<{
|
||||
value: ProcessingActivityRegistryLawfulBasis;
|
||||
label: string;
|
||||
}> = [
|
||||
{ value: "CONSENT", label: __("Consent") },
|
||||
{ value: "CONTRACTUAL_NECESSITY", label: __("Contractual Necessity") },
|
||||
{ value: "LEGAL_OBLIGATION", label: __("Legal Obligation") },
|
||||
{ value: "LEGITIMATE_INTEREST", label: __("Legitimate Interest") },
|
||||
{ value: "PUBLIC_TASK", label: __("Public Task") },
|
||||
{ value: "VITAL_INTERESTS", label: __("Vital Interests") },
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
{options.map((option) => (
|
||||
<Option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</Option>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export function getLawfulBasisLabel(value: ProcessingActivityRegistryLawfulBasis | null | undefined, __: (key: string) => string): string {
|
||||
if (!value) return "-";
|
||||
|
||||
const labels = {
|
||||
"CONSENT": __("Consent"),
|
||||
"CONTRACTUAL_NECESSITY": __("Contractual Necessity"),
|
||||
"LEGAL_OBLIGATION": __("Legal Obligation"),
|
||||
"LEGITIMATE_INTEREST": __("Legitimate Interest"),
|
||||
"PUBLIC_TASK": __("Public Task"),
|
||||
"VITAL_INTERESTS": __("Vital Interests"),
|
||||
};
|
||||
|
||||
return labels[value] || value;
|
||||
}
|
||||
|
||||
export function TransferSafeguardsOptions() {
|
||||
const { __ } = useTranslate();
|
||||
|
||||
const options: Array<{
|
||||
value: string;
|
||||
label: string;
|
||||
}> = [
|
||||
{ value: "__NONE__", label: __("None") },
|
||||
{ value: "STANDARD_CONTRACTUAL_CLAUSES", label: __("Standard Contractual Clauses") },
|
||||
{ value: "BINDING_CORPORATE_RULES", label: __("Binding Corporate Rules") },
|
||||
{ value: "ADEQUACY_DECISION", label: __("Adequacy Decision") },
|
||||
{ value: "DEROGATIONS", label: __("Derogations") },
|
||||
{ value: "CODES_OF_CONDUCT", label: __("Codes of Conduct") },
|
||||
{ value: "CERTIFICATION_MECHANISMS", label: __("Certification Mechanisms") },
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
{options.map((option) => (
|
||||
<Option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</Option>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export function DataProtectionImpactAssessmentOptions() {
|
||||
const { __ } = useTranslate();
|
||||
|
||||
const options: Array<{
|
||||
value: ProcessingActivityRegistryDataProtectionImpactAssessment;
|
||||
label: string;
|
||||
}> = [
|
||||
{ value: "NEEDED", label: __("Needed") },
|
||||
{ value: "NOT_NEEDED", label: __("Not Needed") },
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
{options.map((option) => (
|
||||
<Option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</Option>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export function TransferImpactAssessmentOptions() {
|
||||
const { __ } = useTranslate();
|
||||
|
||||
const options: Array<{
|
||||
value: ProcessingActivityRegistryTransferImpactAssessment;
|
||||
label: string;
|
||||
}> = [
|
||||
{ value: "NEEDED", label: __("Needed") },
|
||||
{ value: "NOT_NEEDED", label: __("Not Needed") },
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
{options.map((option) => (
|
||||
<Option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</Option>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
269
apps/console/src/hooks/graph/ProcessingActivityRegistryGraph.ts
Normal file
269
apps/console/src/hooks/graph/ProcessingActivityRegistryGraph.ts
Normal file
@@ -0,0 +1,269 @@
|
||||
import { graphql } from "relay-runtime";
|
||||
import { useMutation } from "react-relay";
|
||||
import { useConfirm } from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { promisifyMutation, sprintf } from "@probo/helpers";
|
||||
import { useMutationWithToasts } from "../useMutationWithToasts";
|
||||
|
||||
export const ProcessingActivityRegistriesConnectionKey = "ProcessingActivityRegistriesPage_processingActivityRegistries";
|
||||
|
||||
export const processingActivityRegistriesQuery = graphql`
|
||||
query ProcessingActivityRegistryGraphListQuery($organizationId: ID!) {
|
||||
node(id: $organizationId) {
|
||||
... on Organization {
|
||||
...ProcessingActivityRegistriesPageFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const processingActivityRegistryNodeQuery = graphql`
|
||||
query ProcessingActivityRegistryGraphNodeQuery($processingActivityRegistryId: ID!) {
|
||||
node(id: $processingActivityRegistryId) {
|
||||
... on ProcessingActivityRegistry {
|
||||
id
|
||||
name
|
||||
purpose
|
||||
dataSubjectCategory
|
||||
personalDataCategory
|
||||
specialOrCriminalData
|
||||
consentEvidenceLink
|
||||
lawfulBasis
|
||||
recipients
|
||||
location
|
||||
internationalTransfers
|
||||
transferSafeguards
|
||||
retentionPeriod
|
||||
securityMeasures
|
||||
dataProtectionImpactAssessment
|
||||
transferImpactAssessment
|
||||
audit {
|
||||
id
|
||||
name
|
||||
framework {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
organization {
|
||||
id
|
||||
name
|
||||
}
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const createProcessingActivityRegistryMutation = graphql`
|
||||
mutation ProcessingActivityRegistryGraphCreateMutation(
|
||||
$input: CreateProcessingActivityRegistryInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createProcessingActivityRegistry(input: $input) {
|
||||
processingActivityRegistryEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
name
|
||||
purpose
|
||||
dataSubjectCategory
|
||||
personalDataCategory
|
||||
specialOrCriminalData
|
||||
consentEvidenceLink
|
||||
lawfulBasis
|
||||
recipients
|
||||
location
|
||||
internationalTransfers
|
||||
transferSafeguards
|
||||
retentionPeriod
|
||||
securityMeasures
|
||||
dataProtectionImpactAssessment
|
||||
transferImpactAssessment
|
||||
audit {
|
||||
id
|
||||
name
|
||||
framework {
|
||||
name
|
||||
}
|
||||
}
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const updateProcessingActivityRegistryMutation = graphql`
|
||||
mutation ProcessingActivityRegistryGraphUpdateMutation($input: UpdateProcessingActivityRegistryInput!) {
|
||||
updateProcessingActivityRegistry(input: $input) {
|
||||
processingActivityRegistry {
|
||||
id
|
||||
name
|
||||
purpose
|
||||
dataSubjectCategory
|
||||
personalDataCategory
|
||||
specialOrCriminalData
|
||||
consentEvidenceLink
|
||||
lawfulBasis
|
||||
recipients
|
||||
location
|
||||
internationalTransfers
|
||||
transferSafeguards
|
||||
retentionPeriod
|
||||
securityMeasures
|
||||
dataProtectionImpactAssessment
|
||||
transferImpactAssessment
|
||||
audit {
|
||||
id
|
||||
name
|
||||
framework {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const deleteProcessingActivityRegistryMutation = graphql`
|
||||
mutation ProcessingActivityRegistryGraphDeleteMutation(
|
||||
$input: DeleteProcessingActivityRegistryInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteProcessingActivityRegistry(input: $input) {
|
||||
deletedProcessingActivityRegistryId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const useDeleteProcessingActivityRegistry = (
|
||||
registry: { id: string; name: string },
|
||||
connectionId: string
|
||||
) => {
|
||||
const { __ } = useTranslate();
|
||||
const [mutate] = useMutationWithToasts(deleteProcessingActivityRegistryMutation, {
|
||||
successMessage: __("Processing activity registry entry deleted successfully"),
|
||||
errorMessage: __("Failed to delete processing activity registry entry"),
|
||||
});
|
||||
const confirm = useConfirm();
|
||||
|
||||
return () => {
|
||||
confirm(
|
||||
() =>
|
||||
mutate({
|
||||
variables: {
|
||||
input: {
|
||||
processingActivityRegistryId: registry.id,
|
||||
},
|
||||
connections: [connectionId],
|
||||
},
|
||||
}),
|
||||
{
|
||||
message: sprintf(
|
||||
__(
|
||||
"This will permanently delete the processing activity registry entry %s. This action cannot be undone."
|
||||
),
|
||||
registry.name
|
||||
),
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
export const useCreateProcessingActivityRegistry = (connectionId?: string) => {
|
||||
const [mutate] = useMutation(createProcessingActivityRegistryMutation);
|
||||
const { __ } = useTranslate();
|
||||
|
||||
return (input: {
|
||||
organizationId: string;
|
||||
auditId: string;
|
||||
name: string;
|
||||
purpose?: string;
|
||||
dataSubjectCategory?: string;
|
||||
personalDataCategory?: string;
|
||||
specialOrCriminalData?: string;
|
||||
consentEvidenceLink?: string;
|
||||
lawfulBasis?: string;
|
||||
recipients?: string;
|
||||
location?: string;
|
||||
internationalTransfers: boolean;
|
||||
transferSafeguards?: string;
|
||||
retentionPeriod?: string;
|
||||
securityMeasures?: string;
|
||||
dataProtectionImpactAssessment?: string;
|
||||
transferImpactAssessment?: string;
|
||||
}) => {
|
||||
if (!input.organizationId) {
|
||||
return alert(__("Failed to create processing activity registry entry: organization is required"));
|
||||
}
|
||||
if (!input.name) {
|
||||
return alert(__("Failed to create processing activity registry entry: name is required"));
|
||||
}
|
||||
if (!input.auditId) {
|
||||
return alert(__("Failed to create processing activity registry entry: audit is required"));
|
||||
}
|
||||
|
||||
return promisifyMutation(mutate)({
|
||||
variables: {
|
||||
input: {
|
||||
organizationId: input.organizationId,
|
||||
auditId: input.auditId,
|
||||
name: input.name,
|
||||
purpose: input.purpose,
|
||||
dataSubjectCategory: input.dataSubjectCategory,
|
||||
personalDataCategory: input.personalDataCategory,
|
||||
specialOrCriminalData: input.specialOrCriminalData,
|
||||
consentEvidenceLink: input.consentEvidenceLink,
|
||||
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,
|
||||
},
|
||||
connections: connectionId ? [connectionId] : [],
|
||||
},
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
export const useUpdateProcessingActivityRegistry = () => {
|
||||
const [mutate] = useMutation(updateProcessingActivityRegistryMutation);
|
||||
const { __ } = useTranslate();
|
||||
|
||||
return (input: {
|
||||
id: string;
|
||||
auditId?: string;
|
||||
name?: string;
|
||||
purpose?: string;
|
||||
dataSubjectCategory?: string;
|
||||
personalDataCategory?: string;
|
||||
specialOrCriminalData?: string;
|
||||
consentEvidenceLink?: string;
|
||||
lawfulBasis?: string;
|
||||
recipients?: string;
|
||||
location?: string;
|
||||
internationalTransfers?: boolean;
|
||||
transferSafeguards?: string;
|
||||
retentionPeriod?: string;
|
||||
securityMeasures?: string;
|
||||
dataProtectionImpactAssessment?: string;
|
||||
transferImpactAssessment?: string;
|
||||
}) => {
|
||||
if (!input.id) {
|
||||
return alert(__("Failed to update processing activity registry entry: registry ID is required"));
|
||||
}
|
||||
|
||||
return promisifyMutation(mutate)({
|
||||
variables: {
|
||||
input,
|
||||
},
|
||||
});
|
||||
};
|
||||
};
|
||||
419
apps/console/src/hooks/graph/__generated__/ProcessingActivityRegistryGraphCreateMutation.graphql.ts
generated
Normal file
419
apps/console/src/hooks/graph/__generated__/ProcessingActivityRegistryGraphCreateMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,419 @@
|
||||
/**
|
||||
* @generated SignedSource<<8372cc0960f7642aa8619dbc091dc4de>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ProcessingActivityRegistryDataProtectionImpactAssessment = "NEEDED" | "NOT_NEEDED";
|
||||
export type ProcessingActivityRegistryLawfulBasis = "CONSENT" | "CONTRACTUAL_NECESSITY" | "LEGAL_OBLIGATION" | "LEGITIMATE_INTEREST" | "PUBLIC_TASK" | "VITAL_INTERESTS";
|
||||
export type ProcessingActivityRegistrySpecialOrCriminalData = "NO" | "POSSIBLE" | "YES";
|
||||
export type ProcessingActivityRegistryTransferImpactAssessment = "NEEDED" | "NOT_NEEDED";
|
||||
export type ProcessingActivityRegistryTransferSafeguards = "ADEQUACY_DECISION" | "BINDING_CORPORATE_RULES" | "CERTIFICATION_MECHANISMS" | "CODES_OF_CONDUCT" | "DEROGATIONS" | "STANDARD_CONTRACTUAL_CLAUSES";
|
||||
export type CreateProcessingActivityRegistryInput = {
|
||||
auditId: string;
|
||||
consentEvidenceLink?: string | null | undefined;
|
||||
dataProtectionImpactAssessment: ProcessingActivityRegistryDataProtectionImpactAssessment;
|
||||
dataSubjectCategory?: string | null | undefined;
|
||||
internationalTransfers: boolean;
|
||||
lawfulBasis: ProcessingActivityRegistryLawfulBasis;
|
||||
location?: string | null | undefined;
|
||||
name: string;
|
||||
organizationId: string;
|
||||
personalDataCategory?: string | null | undefined;
|
||||
purpose?: string | null | undefined;
|
||||
recipients?: string | null | undefined;
|
||||
retentionPeriod?: string | null | undefined;
|
||||
securityMeasures?: string | null | undefined;
|
||||
specialOrCriminalData: ProcessingActivityRegistrySpecialOrCriminalData;
|
||||
transferImpactAssessment: ProcessingActivityRegistryTransferImpactAssessment;
|
||||
transferSafeguards: ProcessingActivityRegistryTransferSafeguards;
|
||||
};
|
||||
export type ProcessingActivityRegistryGraphCreateMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateProcessingActivityRegistryInput;
|
||||
};
|
||||
export type ProcessingActivityRegistryGraphCreateMutation$data = {
|
||||
readonly createProcessingActivityRegistry: {
|
||||
readonly processingActivityRegistryEdge: {
|
||||
readonly node: {
|
||||
readonly audit: {
|
||||
readonly framework: {
|
||||
readonly name: string;
|
||||
};
|
||||
readonly id: string;
|
||||
readonly name: string | null | undefined;
|
||||
};
|
||||
readonly consentEvidenceLink: string | null | undefined;
|
||||
readonly createdAt: any;
|
||||
readonly dataProtectionImpactAssessment: ProcessingActivityRegistryDataProtectionImpactAssessment;
|
||||
readonly dataSubjectCategory: string | null | undefined;
|
||||
readonly id: string;
|
||||
readonly internationalTransfers: boolean;
|
||||
readonly lawfulBasis: ProcessingActivityRegistryLawfulBasis;
|
||||
readonly location: string | null | undefined;
|
||||
readonly name: string;
|
||||
readonly personalDataCategory: string | null | undefined;
|
||||
readonly purpose: string | null | undefined;
|
||||
readonly recipients: string | null | undefined;
|
||||
readonly retentionPeriod: string | null | undefined;
|
||||
readonly securityMeasures: string | null | undefined;
|
||||
readonly specialOrCriminalData: ProcessingActivityRegistrySpecialOrCriminalData;
|
||||
readonly transferImpactAssessment: ProcessingActivityRegistryTransferImpactAssessment;
|
||||
readonly transferSafeguards: ProcessingActivityRegistryTransferSafeguards;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
export type ProcessingActivityRegistryGraphCreateMutation = {
|
||||
response: ProcessingActivityRegistryGraphCreateMutation$data;
|
||||
variables: ProcessingActivityRegistryGraphCreateMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "purpose",
|
||||
"storageKey": null
|
||||
},
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "dataSubjectCategory",
|
||||
"storageKey": null
|
||||
},
|
||||
v7 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "personalDataCategory",
|
||||
"storageKey": null
|
||||
},
|
||||
v8 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "specialOrCriminalData",
|
||||
"storageKey": null
|
||||
},
|
||||
v9 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "consentEvidenceLink",
|
||||
"storageKey": null
|
||||
},
|
||||
v10 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "lawfulBasis",
|
||||
"storageKey": null
|
||||
},
|
||||
v11 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "recipients",
|
||||
"storageKey": null
|
||||
},
|
||||
v12 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "location",
|
||||
"storageKey": null
|
||||
},
|
||||
v13 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "internationalTransfers",
|
||||
"storageKey": null
|
||||
},
|
||||
v14 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "transferSafeguards",
|
||||
"storageKey": null
|
||||
},
|
||||
v15 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "retentionPeriod",
|
||||
"storageKey": null
|
||||
},
|
||||
v16 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "securityMeasures",
|
||||
"storageKey": null
|
||||
},
|
||||
v17 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "dataProtectionImpactAssessment",
|
||||
"storageKey": null
|
||||
},
|
||||
v18 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "transferImpactAssessment",
|
||||
"storageKey": null
|
||||
},
|
||||
v19 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ProcessingActivityRegistryGraphCreateMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateProcessingActivityRegistryPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createProcessingActivityRegistry",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ProcessingActivityRegistryEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "processingActivityRegistryEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ProcessingActivityRegistry",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/),
|
||||
(v13/*: any*/),
|
||||
(v14/*: any*/),
|
||||
(v15/*: any*/),
|
||||
(v16/*: any*/),
|
||||
(v17/*: any*/),
|
||||
(v18/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Audit",
|
||||
"kind": "LinkedField",
|
||||
"name": "audit",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "framework",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v19/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "ProcessingActivityRegistryGraphCreateMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateProcessingActivityRegistryPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createProcessingActivityRegistry",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ProcessingActivityRegistryEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "processingActivityRegistryEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ProcessingActivityRegistry",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/),
|
||||
(v13/*: any*/),
|
||||
(v14/*: any*/),
|
||||
(v15/*: any*/),
|
||||
(v16/*: any*/),
|
||||
(v17/*: any*/),
|
||||
(v18/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Audit",
|
||||
"kind": "LinkedField",
|
||||
"name": "audit",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "framework",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/),
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v19/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "prependEdge",
|
||||
"key": "",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "processingActivityRegistryEdge",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "9942999c0282d64a6250774f8a26f1f9",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ProcessingActivityRegistryGraphCreateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ProcessingActivityRegistryGraphCreateMutation(\n $input: CreateProcessingActivityRegistryInput!\n) {\n createProcessingActivityRegistry(input: $input) {\n processingActivityRegistryEdge {\n node {\n id\n name\n purpose\n dataSubjectCategory\n personalDataCategory\n specialOrCriminalData\n consentEvidenceLink\n lawfulBasis\n recipients\n location\n internationalTransfers\n transferSafeguards\n retentionPeriod\n securityMeasures\n dataProtectionImpactAssessment\n transferImpactAssessment\n audit {\n id\n name\n framework {\n name\n id\n }\n }\n createdAt\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "7563c6519bb6f538e3c211322a5a638f";
|
||||
|
||||
export default node;
|
||||
132
apps/console/src/hooks/graph/__generated__/ProcessingActivityRegistryGraphDeleteMutation.graphql.ts
generated
Normal file
132
apps/console/src/hooks/graph/__generated__/ProcessingActivityRegistryGraphDeleteMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* @generated SignedSource<<11633889a4d61df894b88dd483687cf9>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteProcessingActivityRegistryInput = {
|
||||
processingActivityRegistryId: string;
|
||||
};
|
||||
export type ProcessingActivityRegistryGraphDeleteMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteProcessingActivityRegistryInput;
|
||||
};
|
||||
export type ProcessingActivityRegistryGraphDeleteMutation$data = {
|
||||
readonly deleteProcessingActivityRegistry: {
|
||||
readonly deletedProcessingActivityRegistryId: string;
|
||||
};
|
||||
};
|
||||
export type ProcessingActivityRegistryGraphDeleteMutation = {
|
||||
response: ProcessingActivityRegistryGraphDeleteMutation$data;
|
||||
variables: ProcessingActivityRegistryGraphDeleteMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedProcessingActivityRegistryId",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ProcessingActivityRegistryGraphDeleteMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteProcessingActivityRegistryPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteProcessingActivityRegistry",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "ProcessingActivityRegistryGraphDeleteMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteProcessingActivityRegistryPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteProcessingActivityRegistry",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "deleteEdge",
|
||||
"key": "",
|
||||
"kind": "ScalarHandle",
|
||||
"name": "deletedProcessingActivityRegistryId",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "7550d138c9636bbe930a5cdad260156b",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ProcessingActivityRegistryGraphDeleteMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ProcessingActivityRegistryGraphDeleteMutation(\n $input: DeleteProcessingActivityRegistryInput!\n) {\n deleteProcessingActivityRegistry(input: $input) {\n deletedProcessingActivityRegistryId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "8492e778e152e5910ee4c09c34ea4e68";
|
||||
|
||||
export default node;
|
||||
322
apps/console/src/hooks/graph/__generated__/ProcessingActivityRegistryGraphListQuery.graphql.ts
generated
Normal file
322
apps/console/src/hooks/graph/__generated__/ProcessingActivityRegistryGraphListQuery.graphql.ts
generated
Normal file
@@ -0,0 +1,322 @@
|
||||
/**
|
||||
* @generated SignedSource<<44f708dc14c5476a3b7c8cf751aca32f>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type ProcessingActivityRegistryGraphListQuery$variables = {
|
||||
organizationId: string;
|
||||
};
|
||||
export type ProcessingActivityRegistryGraphListQuery$data = {
|
||||
readonly node: {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"ProcessingActivityRegistriesPageFragment">;
|
||||
};
|
||||
};
|
||||
export type ProcessingActivityRegistryGraphListQuery = {
|
||||
response: ProcessingActivityRegistryGraphListQuery$data;
|
||||
variables: ProcessingActivityRegistryGraphListQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "organizationId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "organizationId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 10
|
||||
}
|
||||
],
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ProcessingActivityRegistryGraphListQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"args": null,
|
||||
"kind": "FragmentSpread",
|
||||
"name": "ProcessingActivityRegistriesPageFragment"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ProcessingActivityRegistryGraphListQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v4/*: any*/),
|
||||
"concreteType": "ProcessingActivityRegistryConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "processingActivityRegistries",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "totalCount",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ProcessingActivityRegistryEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ProcessingActivityRegistry",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v5/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "purpose",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "dataSubjectCategory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "personalDataCategory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "lawfulBasis",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "location",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "internationalTransfers",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Audit",
|
||||
"kind": "LinkedField",
|
||||
"name": "audit",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v5/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "framework",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"kind": "ClientExtension",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__id",
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": "processingActivityRegistries(first:10)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v4/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "ProcessingActivityRegistriesPage_processingActivityRegistries",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "processingActivityRegistries"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "b5b5c645e407c2bfb68aaa717b7d2ae7",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ProcessingActivityRegistryGraphListQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ProcessingActivityRegistryGraphListQuery(\n $organizationId: ID!\n) {\n node(id: $organizationId) {\n __typename\n ... on Organization {\n ...ProcessingActivityRegistriesPageFragment\n }\n id\n }\n}\n\nfragment ProcessingActivityRegistriesPageFragment on Organization {\n id\n processingActivityRegistries(first: 10) {\n totalCount\n edges {\n node {\n id\n name\n purpose\n dataSubjectCategory\n personalDataCategory\n lawfulBasis\n location\n internationalTransfers\n audit {\n id\n name\n framework {\n id\n name\n }\n }\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "c4a1ee426fd64c8605134d80ee873b62";
|
||||
|
||||
export default node;
|
||||
352
apps/console/src/hooks/graph/__generated__/ProcessingActivityRegistryGraphNodeQuery.graphql.ts
generated
Normal file
352
apps/console/src/hooks/graph/__generated__/ProcessingActivityRegistryGraphNodeQuery.graphql.ts
generated
Normal file
@@ -0,0 +1,352 @@
|
||||
/**
|
||||
* @generated SignedSource<<681e1d8f8073e0efd781bdf322b893ab>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ProcessingActivityRegistryDataProtectionImpactAssessment = "NEEDED" | "NOT_NEEDED";
|
||||
export type ProcessingActivityRegistryLawfulBasis = "CONSENT" | "CONTRACTUAL_NECESSITY" | "LEGAL_OBLIGATION" | "LEGITIMATE_INTEREST" | "PUBLIC_TASK" | "VITAL_INTERESTS";
|
||||
export type ProcessingActivityRegistrySpecialOrCriminalData = "NO" | "POSSIBLE" | "YES";
|
||||
export type ProcessingActivityRegistryTransferImpactAssessment = "NEEDED" | "NOT_NEEDED";
|
||||
export type ProcessingActivityRegistryTransferSafeguards = "ADEQUACY_DECISION" | "BINDING_CORPORATE_RULES" | "CERTIFICATION_MECHANISMS" | "CODES_OF_CONDUCT" | "DEROGATIONS" | "STANDARD_CONTRACTUAL_CLAUSES";
|
||||
export type ProcessingActivityRegistryGraphNodeQuery$variables = {
|
||||
processingActivityRegistryId: string;
|
||||
};
|
||||
export type ProcessingActivityRegistryGraphNodeQuery$data = {
|
||||
readonly node: {
|
||||
readonly audit?: {
|
||||
readonly framework: {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
};
|
||||
readonly id: string;
|
||||
readonly name: string | null | undefined;
|
||||
};
|
||||
readonly consentEvidenceLink?: string | null | undefined;
|
||||
readonly createdAt?: any;
|
||||
readonly dataProtectionImpactAssessment?: ProcessingActivityRegistryDataProtectionImpactAssessment;
|
||||
readonly dataSubjectCategory?: string | null | undefined;
|
||||
readonly id?: string;
|
||||
readonly internationalTransfers?: boolean;
|
||||
readonly lawfulBasis?: ProcessingActivityRegistryLawfulBasis;
|
||||
readonly location?: string | null | undefined;
|
||||
readonly name?: string;
|
||||
readonly organization?: {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
};
|
||||
readonly personalDataCategory?: string | null | undefined;
|
||||
readonly purpose?: string | null | undefined;
|
||||
readonly recipients?: string | null | undefined;
|
||||
readonly retentionPeriod?: string | null | undefined;
|
||||
readonly securityMeasures?: string | null | undefined;
|
||||
readonly specialOrCriminalData?: ProcessingActivityRegistrySpecialOrCriminalData;
|
||||
readonly transferImpactAssessment?: ProcessingActivityRegistryTransferImpactAssessment;
|
||||
readonly transferSafeguards?: ProcessingActivityRegistryTransferSafeguards;
|
||||
readonly updatedAt?: any;
|
||||
};
|
||||
};
|
||||
export type ProcessingActivityRegistryGraphNodeQuery = {
|
||||
response: ProcessingActivityRegistryGraphNodeQuery$data;
|
||||
variables: ProcessingActivityRegistryGraphNodeQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "processingActivityRegistryId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "processingActivityRegistryId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "purpose",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "dataSubjectCategory",
|
||||
"storageKey": null
|
||||
},
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "personalDataCategory",
|
||||
"storageKey": null
|
||||
},
|
||||
v7 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "specialOrCriminalData",
|
||||
"storageKey": null
|
||||
},
|
||||
v8 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "consentEvidenceLink",
|
||||
"storageKey": null
|
||||
},
|
||||
v9 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "lawfulBasis",
|
||||
"storageKey": null
|
||||
},
|
||||
v10 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "recipients",
|
||||
"storageKey": null
|
||||
},
|
||||
v11 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "location",
|
||||
"storageKey": null
|
||||
},
|
||||
v12 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "internationalTransfers",
|
||||
"storageKey": null
|
||||
},
|
||||
v13 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "transferSafeguards",
|
||||
"storageKey": null
|
||||
},
|
||||
v14 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "retentionPeriod",
|
||||
"storageKey": null
|
||||
},
|
||||
v15 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "securityMeasures",
|
||||
"storageKey": null
|
||||
},
|
||||
v16 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "dataProtectionImpactAssessment",
|
||||
"storageKey": null
|
||||
},
|
||||
v17 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "transferImpactAssessment",
|
||||
"storageKey": null
|
||||
},
|
||||
v18 = [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/)
|
||||
],
|
||||
v19 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Audit",
|
||||
"kind": "LinkedField",
|
||||
"name": "audit",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "framework",
|
||||
"plural": false,
|
||||
"selections": (v18/*: any*/),
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v20 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": (v18/*: any*/),
|
||||
"storageKey": null
|
||||
},
|
||||
v21 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
v22 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ProcessingActivityRegistryGraphNodeQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/),
|
||||
(v13/*: any*/),
|
||||
(v14/*: any*/),
|
||||
(v15/*: any*/),
|
||||
(v16/*: any*/),
|
||||
(v17/*: any*/),
|
||||
(v19/*: any*/),
|
||||
(v20/*: any*/),
|
||||
(v21/*: any*/),
|
||||
(v22/*: any*/)
|
||||
],
|
||||
"type": "ProcessingActivityRegistry",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ProcessingActivityRegistryGraphNodeQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/),
|
||||
(v13/*: any*/),
|
||||
(v14/*: any*/),
|
||||
(v15/*: any*/),
|
||||
(v16/*: any*/),
|
||||
(v17/*: any*/),
|
||||
(v19/*: any*/),
|
||||
(v20/*: any*/),
|
||||
(v21/*: any*/),
|
||||
(v22/*: any*/)
|
||||
],
|
||||
"type": "ProcessingActivityRegistry",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "74eed9b882f3bf3b11af0c15f65ef870",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ProcessingActivityRegistryGraphNodeQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ProcessingActivityRegistryGraphNodeQuery(\n $processingActivityRegistryId: ID!\n) {\n node(id: $processingActivityRegistryId) {\n __typename\n ... on ProcessingActivityRegistry {\n id\n name\n purpose\n dataSubjectCategory\n personalDataCategory\n specialOrCriminalData\n consentEvidenceLink\n lawfulBasis\n recipients\n location\n internationalTransfers\n transferSafeguards\n retentionPeriod\n securityMeasures\n dataProtectionImpactAssessment\n transferImpactAssessment\n audit {\n id\n name\n framework {\n id\n name\n }\n }\n organization {\n id\n name\n }\n createdAt\n updatedAt\n }\n id\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "979f4b05c845c90dd6359d24821e44fd";
|
||||
|
||||
export default node;
|
||||
290
apps/console/src/hooks/graph/__generated__/ProcessingActivityRegistryGraphUpdateMutation.graphql.ts
generated
Normal file
290
apps/console/src/hooks/graph/__generated__/ProcessingActivityRegistryGraphUpdateMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,290 @@
|
||||
/**
|
||||
* @generated SignedSource<<945fa4ed1c5bab25f39047b601307e03>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ProcessingActivityRegistryDataProtectionImpactAssessment = "NEEDED" | "NOT_NEEDED";
|
||||
export type ProcessingActivityRegistryLawfulBasis = "CONSENT" | "CONTRACTUAL_NECESSITY" | "LEGAL_OBLIGATION" | "LEGITIMATE_INTEREST" | "PUBLIC_TASK" | "VITAL_INTERESTS";
|
||||
export type ProcessingActivityRegistrySpecialOrCriminalData = "NO" | "POSSIBLE" | "YES";
|
||||
export type ProcessingActivityRegistryTransferImpactAssessment = "NEEDED" | "NOT_NEEDED";
|
||||
export type ProcessingActivityRegistryTransferSafeguards = "ADEQUACY_DECISION" | "BINDING_CORPORATE_RULES" | "CERTIFICATION_MECHANISMS" | "CODES_OF_CONDUCT" | "DEROGATIONS" | "STANDARD_CONTRACTUAL_CLAUSES";
|
||||
export type UpdateProcessingActivityRegistryInput = {
|
||||
auditId?: string | null | undefined;
|
||||
consentEvidenceLink?: string | null | undefined;
|
||||
dataProtectionImpactAssessment?: ProcessingActivityRegistryDataProtectionImpactAssessment | null | undefined;
|
||||
dataSubjectCategory?: string | null | undefined;
|
||||
id: string;
|
||||
internationalTransfers?: boolean | null | undefined;
|
||||
lawfulBasis?: ProcessingActivityRegistryLawfulBasis | null | undefined;
|
||||
location?: string | null | undefined;
|
||||
name?: string | null | undefined;
|
||||
personalDataCategory?: string | null | undefined;
|
||||
purpose?: string | null | undefined;
|
||||
recipients?: string | null | undefined;
|
||||
retentionPeriod?: string | null | undefined;
|
||||
securityMeasures?: string | null | undefined;
|
||||
specialOrCriminalData?: ProcessingActivityRegistrySpecialOrCriminalData | null | undefined;
|
||||
transferImpactAssessment?: ProcessingActivityRegistryTransferImpactAssessment | null | undefined;
|
||||
transferSafeguards?: ProcessingActivityRegistryTransferSafeguards | null | undefined;
|
||||
};
|
||||
export type ProcessingActivityRegistryGraphUpdateMutation$variables = {
|
||||
input: UpdateProcessingActivityRegistryInput;
|
||||
};
|
||||
export type ProcessingActivityRegistryGraphUpdateMutation$data = {
|
||||
readonly updateProcessingActivityRegistry: {
|
||||
readonly processingActivityRegistry: {
|
||||
readonly audit: {
|
||||
readonly framework: {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
};
|
||||
readonly id: string;
|
||||
readonly name: string | null | undefined;
|
||||
};
|
||||
readonly consentEvidenceLink: string | null | undefined;
|
||||
readonly dataProtectionImpactAssessment: ProcessingActivityRegistryDataProtectionImpactAssessment;
|
||||
readonly dataSubjectCategory: string | null | undefined;
|
||||
readonly id: string;
|
||||
readonly internationalTransfers: boolean;
|
||||
readonly lawfulBasis: ProcessingActivityRegistryLawfulBasis;
|
||||
readonly location: string | null | undefined;
|
||||
readonly name: string;
|
||||
readonly personalDataCategory: string | null | undefined;
|
||||
readonly purpose: string | null | undefined;
|
||||
readonly recipients: string | null | undefined;
|
||||
readonly retentionPeriod: string | null | undefined;
|
||||
readonly securityMeasures: string | null | undefined;
|
||||
readonly specialOrCriminalData: ProcessingActivityRegistrySpecialOrCriminalData;
|
||||
readonly transferImpactAssessment: ProcessingActivityRegistryTransferImpactAssessment;
|
||||
readonly transferSafeguards: ProcessingActivityRegistryTransferSafeguards;
|
||||
readonly updatedAt: any;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type ProcessingActivityRegistryGraphUpdateMutation = {
|
||||
response: ProcessingActivityRegistryGraphUpdateMutation$data;
|
||||
variables: ProcessingActivityRegistryGraphUpdateMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "UpdateProcessingActivityRegistryPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "updateProcessingActivityRegistry",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ProcessingActivityRegistry",
|
||||
"kind": "LinkedField",
|
||||
"name": "processingActivityRegistry",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "purpose",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "dataSubjectCategory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "personalDataCategory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "specialOrCriminalData",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "consentEvidenceLink",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "lawfulBasis",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "recipients",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "location",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "internationalTransfers",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "transferSafeguards",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "retentionPeriod",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "securityMeasures",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "dataProtectionImpactAssessment",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "transferImpactAssessment",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Audit",
|
||||
"kind": "LinkedField",
|
||||
"name": "audit",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "framework",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ProcessingActivityRegistryGraphUpdateMutation",
|
||||
"selections": (v3/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ProcessingActivityRegistryGraphUpdateMutation",
|
||||
"selections": (v3/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "40f01e772e5377add784e6c455b173a9",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ProcessingActivityRegistryGraphUpdateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ProcessingActivityRegistryGraphUpdateMutation(\n $input: UpdateProcessingActivityRegistryInput!\n) {\n updateProcessingActivityRegistry(input: $input) {\n processingActivityRegistry {\n id\n name\n purpose\n dataSubjectCategory\n personalDataCategory\n specialOrCriminalData\n consentEvidenceLink\n lawfulBasis\n recipients\n location\n internationalTransfers\n transferSafeguards\n retentionPeriod\n securityMeasures\n dataProtectionImpactAssessment\n transferImpactAssessment\n audit {\n id\n name\n framework {\n id\n name\n }\n }\n updatedAt\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "0833d096c755275a5255d98276922c04";
|
||||
|
||||
export default node;
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
IconBox,
|
||||
IconShield,
|
||||
IconRotateCw,
|
||||
IconCircleProgress,
|
||||
Layout,
|
||||
SidebarItem,
|
||||
UserDropdown as UserDropdownRoot,
|
||||
@@ -157,6 +158,11 @@ export function MainLayout() {
|
||||
icon={IconRotateCw}
|
||||
to={`${prefix}/continual-improvement-registries`}
|
||||
/>
|
||||
<SidebarItem
|
||||
label={__("Processing Activity Registries")}
|
||||
icon={IconCircleProgress}
|
||||
to={`${prefix}/processing-activity-registries`}
|
||||
/>
|
||||
<SidebarItem
|
||||
label={__("Snapshots")}
|
||||
icon={IconClock}
|
||||
|
||||
@@ -0,0 +1,262 @@
|
||||
import {
|
||||
Button,
|
||||
IconPlusLarge,
|
||||
PageHeader,
|
||||
Card,
|
||||
Thead,
|
||||
Tbody,
|
||||
Tr,
|
||||
Th,
|
||||
Td,
|
||||
Badge,
|
||||
ActionDropdown,
|
||||
DropdownItem,
|
||||
IconTrashCan,
|
||||
Table,
|
||||
useConfirm,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { usePageTitle } from "@probo/hooks";
|
||||
import { getLawfulBasisLabel } from "../../../components/form/ProcessingActivityRegistryEnumOptions";
|
||||
import {
|
||||
ConnectionHandler,
|
||||
graphql,
|
||||
usePaginationFragment,
|
||||
usePreloadedQuery,
|
||||
useMutation,
|
||||
type PreloadedQuery,
|
||||
} from "react-relay";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import { CreateProcessingActivityRegistryDialog } from "./dialogs/CreateProcessingActivityRegistryDialog";
|
||||
import { deleteProcessingActivityRegistryMutation, ProcessingActivityRegistriesConnectionKey } from "../../../hooks/graph/ProcessingActivityRegistryGraph";
|
||||
import { sprintf, promisifyMutation } from "@probo/helpers";
|
||||
import type { NodeOf } from "/types";
|
||||
import type { ProcessingActivityRegistriesPageQuery } from "./__generated__/ProcessingActivityRegistriesPageQuery.graphql";
|
||||
import type {
|
||||
ProcessingActivityRegistriesPageFragment$key,
|
||||
ProcessingActivityRegistriesPageFragment$data,
|
||||
} from "./__generated__/ProcessingActivityRegistriesPageFragment.graphql";
|
||||
|
||||
interface ProcessingActivityRegistriesPageProps {
|
||||
queryRef: PreloadedQuery<ProcessingActivityRegistriesPageQuery>;
|
||||
}
|
||||
|
||||
const processingActivityRegistriesPageFragment = graphql`
|
||||
fragment ProcessingActivityRegistriesPageFragment on Organization
|
||||
@refetchable(queryName: "ProcessingActivityRegistriesPageRefetchQuery")
|
||||
@argumentDefinitions(
|
||||
first: { type: "Int", defaultValue: 10 }
|
||||
after: { type: "CursorKey" }
|
||||
) {
|
||||
id
|
||||
processingActivityRegistries(first: $first, after: $after)
|
||||
@connection(key: "ProcessingActivityRegistriesPage_processingActivityRegistries") {
|
||||
__id
|
||||
totalCount
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
name
|
||||
purpose
|
||||
dataSubjectCategory
|
||||
personalDataCategory
|
||||
lawfulBasis
|
||||
location
|
||||
internationalTransfers
|
||||
audit {
|
||||
id
|
||||
name
|
||||
framework {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
endCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export default function ProcessingActivityRegistriesPage({ queryRef }: ProcessingActivityRegistriesPageProps) {
|
||||
const { __ } = useTranslate();
|
||||
const organizationId = useOrganizationId();
|
||||
|
||||
usePageTitle(__("Processing Activity Registries"));
|
||||
|
||||
const organization = usePreloadedQuery(
|
||||
graphql`
|
||||
query ProcessingActivityRegistriesPageQuery($organizationId: ID!) {
|
||||
node(id: $organizationId) {
|
||||
... on Organization {
|
||||
...ProcessingActivityRegistriesPageFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
queryRef
|
||||
);
|
||||
|
||||
const {
|
||||
data,
|
||||
loadNext,
|
||||
hasNext,
|
||||
isLoadingNext,
|
||||
} = usePaginationFragment<
|
||||
ProcessingActivityRegistriesPageQuery,
|
||||
ProcessingActivityRegistriesPageFragment$key
|
||||
>(processingActivityRegistriesPageFragment, organization.node);
|
||||
if (!data) {
|
||||
return <div>{__("Organization not found")}</div>;
|
||||
}
|
||||
|
||||
const connectionId = ConnectionHandler.getConnectionID(
|
||||
organizationId,
|
||||
ProcessingActivityRegistriesConnectionKey
|
||||
);
|
||||
const registries = data?.processingActivityRegistries?.edges?.map((edge) => edge.node) ?? [];
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<PageHeader title={__("Processing Activity Registries")} description={__("Manage your processing activity registry entries under GDPR")}>
|
||||
<CreateProcessingActivityRegistryDialog
|
||||
organizationId={organizationId}
|
||||
connectionId={connectionId}
|
||||
>
|
||||
<Button icon={IconPlusLarge}>
|
||||
{__("Add processing activity registry")}
|
||||
</Button>
|
||||
</CreateProcessingActivityRegistryDialog>
|
||||
</PageHeader>
|
||||
|
||||
{registries.length > 0 ? (
|
||||
<Card>
|
||||
<Table>
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th>{__("Name")}</Th>
|
||||
<Th>{__("Purpose")}</Th>
|
||||
<Th>{__("Data Subject")}</Th>
|
||||
<Th>{__("Lawful Basis")}</Th>
|
||||
<Th>{__("Location")}</Th>
|
||||
<Th>{__("International Transfers")}</Th>
|
||||
<Th>{__("Audit")}</Th>
|
||||
<Th>{__("Actions")}</Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody>
|
||||
{registries.map((registry) => (
|
||||
<RegistryRow
|
||||
key={registry.id}
|
||||
registry={registry}
|
||||
connectionId={connectionId}
|
||||
/>
|
||||
))}
|
||||
</Tbody>
|
||||
</Table>
|
||||
|
||||
{hasNext && (
|
||||
<div className="p-4 border-t">
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() => loadNext(10)}
|
||||
disabled={isLoadingNext}
|
||||
>
|
||||
{isLoadingNext ? __("Loading...") : __("Load more")}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</Card>
|
||||
) : (
|
||||
<Card padded>
|
||||
<div className="text-center py-12">
|
||||
<h3 className="text-lg font-semibold mb-2">
|
||||
{__("No processing activity registry entries yet")}
|
||||
</h3>
|
||||
<p className="text-txt-tertiary mb-4">
|
||||
{__("Create your first processing activity registry entry to get started with GDPR compliance.")}
|
||||
</p>
|
||||
</div>
|
||||
</Card>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function RegistryRow({
|
||||
registry,
|
||||
connectionId,
|
||||
}: {
|
||||
registry: NodeOf<NonNullable<ProcessingActivityRegistriesPageFragment$data['processingActivityRegistries']>>;
|
||||
connectionId: string;
|
||||
}) {
|
||||
const organizationId = useOrganizationId();
|
||||
const { __ } = useTranslate();
|
||||
const [deleteRegistry] = useMutation(deleteProcessingActivityRegistryMutation);
|
||||
const confirm = useConfirm();
|
||||
|
||||
const handleDelete = () => {
|
||||
confirm(
|
||||
() =>
|
||||
promisifyMutation(deleteRegistry)({
|
||||
variables: {
|
||||
input: {
|
||||
processingActivityRegistryId: registry.id,
|
||||
},
|
||||
connections: [connectionId],
|
||||
},
|
||||
}),
|
||||
{
|
||||
message: sprintf(
|
||||
__(
|
||||
"This will permanently delete the processing activity registry entry %s. This action cannot be undone."
|
||||
),
|
||||
registry.name
|
||||
),
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<Tr to={`/organizations/${organizationId}/processing-activity-registries/${registry.id}`}>
|
||||
<Td>
|
||||
<span className="font-semibold">{registry.name}</span>
|
||||
</Td>
|
||||
<Td>
|
||||
<span className="text-sm text-txt-secondary">
|
||||
{registry.purpose || "-"}
|
||||
</span>
|
||||
</Td>
|
||||
<Td>{registry.dataSubjectCategory || "-"}</Td>
|
||||
<Td>{getLawfulBasisLabel(registry.lawfulBasis, __)}</Td>
|
||||
<Td>{registry.location || "-"}</Td>
|
||||
<Td>
|
||||
<Badge variant={registry.internationalTransfers ? "warning" : "success"}>
|
||||
{registry.internationalTransfers ? __("Yes") : __("No")}
|
||||
</Badge>
|
||||
</Td>
|
||||
<Td>
|
||||
{registry.audit.name
|
||||
? `${registry.audit.framework.name} - ${registry.audit.name}`
|
||||
: registry.audit.framework.name
|
||||
}
|
||||
</Td>
|
||||
<Td noLink width={50} className="text-end">
|
||||
<ActionDropdown>
|
||||
<DropdownItem
|
||||
icon={IconTrashCan}
|
||||
variant="danger"
|
||||
onSelect={handleDelete}
|
||||
>
|
||||
{__("Delete")}
|
||||
</DropdownItem>
|
||||
</ActionDropdown>
|
||||
</Td>
|
||||
</Tr>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,386 @@
|
||||
import {
|
||||
ConnectionHandler,
|
||||
usePreloadedQuery,
|
||||
type PreloadedQuery,
|
||||
} from "react-relay";
|
||||
import {
|
||||
processingActivityRegistryNodeQuery,
|
||||
useDeleteProcessingActivityRegistry,
|
||||
useUpdateProcessingActivityRegistry,
|
||||
ProcessingActivityRegistriesConnectionKey,
|
||||
} from "../../../hooks/graph/ProcessingActivityRegistryGraph";
|
||||
import {
|
||||
ActionDropdown,
|
||||
Breadcrumb,
|
||||
Button,
|
||||
DropdownItem,
|
||||
Field,
|
||||
Card,
|
||||
Textarea,
|
||||
useToast,
|
||||
Label,
|
||||
Checkbox,
|
||||
Select,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||
import { AuditSelectField } from "/components/form/AuditSelectField";
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import { Controller } from "react-hook-form";
|
||||
import z from "zod";
|
||||
import {
|
||||
SpecialOrCriminalDataOptions,
|
||||
LawfulBasisOptions,
|
||||
TransferSafeguardsOptions,
|
||||
DataProtectionImpactAssessmentOptions,
|
||||
TransferImpactAssessmentOptions,
|
||||
} from "../../../components/form/ProcessingActivityRegistryEnumOptions";
|
||||
|
||||
import type { ProcessingActivityRegistryGraphNodeQuery } from "/hooks/graph/__generated__/ProcessingActivityRegistryGraphNodeQuery.graphql";
|
||||
|
||||
const updateRegistrySchema = z.object({
|
||||
name: z.string().min(1, "Name is required"),
|
||||
purpose: z.string().optional(),
|
||||
dataSubjectCategory: z.string().optional(),
|
||||
personalDataCategory: z.string().optional(),
|
||||
specialOrCriminalData: z.enum(["YES", "NO", "POSSIBLE"] as const),
|
||||
consentEvidenceLink: z.string().optional(),
|
||||
lawfulBasis: z.enum(["CONSENT", "CONTRACTUAL_NECESSITY", "LEGAL_OBLIGATION", "LEGITIMATE_INTEREST", "PUBLIC_TASK", "VITAL_INTERESTS"] as const),
|
||||
recipients: z.string().optional(),
|
||||
location: z.string().optional(),
|
||||
internationalTransfers: z.boolean(),
|
||||
transferSafeguards: z.string(),
|
||||
retentionPeriod: z.string().optional(),
|
||||
securityMeasures: z.string().optional(),
|
||||
dataProtectionImpactAssessment: z.enum(["NEEDED", "NOT_NEEDED"] as const),
|
||||
transferImpactAssessment: z.enum(["NEEDED", "NOT_NEEDED"] as const),
|
||||
auditId: z.string().min(1, "Audit is required"),
|
||||
});
|
||||
|
||||
type Props = {
|
||||
queryRef: PreloadedQuery<ProcessingActivityRegistryGraphNodeQuery>;
|
||||
};
|
||||
|
||||
export default function ProcessingActivityRegistryDetailsPage(props: Props) {
|
||||
const data = usePreloadedQuery<ProcessingActivityRegistryGraphNodeQuery>(processingActivityRegistryNodeQuery, props.queryRef);
|
||||
const registry = data.node;
|
||||
const { __ } = useTranslate();
|
||||
const { toast } = useToast();
|
||||
const organizationId = useOrganizationId();
|
||||
|
||||
if (!registry) {
|
||||
return <div>{__("Processing activity registry entry not found")}</div>;
|
||||
}
|
||||
|
||||
const updateRegistry = useUpdateProcessingActivityRegistry();
|
||||
|
||||
const connectionId = ConnectionHandler.getConnectionID(
|
||||
organizationId,
|
||||
ProcessingActivityRegistriesConnectionKey
|
||||
);
|
||||
|
||||
const deleteRegistry = useDeleteProcessingActivityRegistry({ id: registry.id!, name: registry.name! }, connectionId);
|
||||
|
||||
const { register, handleSubmit, formState, control } = useFormWithSchema(
|
||||
updateRegistrySchema,
|
||||
{
|
||||
defaultValues: {
|
||||
name: registry.name || "",
|
||||
purpose: registry.purpose || "",
|
||||
dataSubjectCategory: registry.dataSubjectCategory || "",
|
||||
personalDataCategory: registry.personalDataCategory || "",
|
||||
specialOrCriminalData: registry.specialOrCriminalData || "NO" as const,
|
||||
consentEvidenceLink: registry.consentEvidenceLink || "",
|
||||
lawfulBasis: registry.lawfulBasis || "LEGITIMATE_INTEREST" as const,
|
||||
recipients: registry.recipients || "",
|
||||
location: registry.location || "",
|
||||
internationalTransfers: registry.internationalTransfers || false,
|
||||
transferSafeguards: registry.transferSafeguards || "__NONE__",
|
||||
retentionPeriod: registry.retentionPeriod || "",
|
||||
securityMeasures: registry.securityMeasures || "",
|
||||
dataProtectionImpactAssessment: registry.dataProtectionImpactAssessment || "NOT_NEEDED" as const,
|
||||
transferImpactAssessment: registry.transferImpactAssessment || "NOT_NEEDED" as const,
|
||||
auditId: registry.audit?.id || "",
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
const onSubmit = handleSubmit(async (formData) => {
|
||||
try {
|
||||
await updateRegistry({
|
||||
id: registry.id!,
|
||||
auditId: formData.auditId || undefined,
|
||||
name: formData.name,
|
||||
purpose: formData.purpose || undefined,
|
||||
dataSubjectCategory: formData.dataSubjectCategory || undefined,
|
||||
personalDataCategory: formData.personalDataCategory || undefined,
|
||||
specialOrCriminalData: formData.specialOrCriminalData || undefined,
|
||||
consentEvidenceLink: formData.consentEvidenceLink || undefined,
|
||||
lawfulBasis: formData.lawfulBasis || undefined,
|
||||
recipients: formData.recipients || undefined,
|
||||
location: formData.location || undefined,
|
||||
internationalTransfers: formData.internationalTransfers,
|
||||
transferSafeguards: formData.transferSafeguards === "__NONE__" ? undefined : formData.transferSafeguards || undefined,
|
||||
retentionPeriod: formData.retentionPeriod || undefined,
|
||||
securityMeasures: formData.securityMeasures || undefined,
|
||||
dataProtectionImpactAssessment: formData.dataProtectionImpactAssessment || undefined,
|
||||
transferImpactAssessment: formData.transferImpactAssessment || undefined,
|
||||
});
|
||||
|
||||
toast({
|
||||
title: __("Success"),
|
||||
description: __("Processing activity registry entry updated successfully"),
|
||||
variant: "success",
|
||||
});
|
||||
} catch (error) {
|
||||
toast({
|
||||
title: __("Error"),
|
||||
description: __("Failed to update processing activity registry entry"),
|
||||
variant: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div className="flex items-center justify-between">
|
||||
<Breadcrumb
|
||||
items={[
|
||||
{ label: __("Processing Activity Registries"), to: "../processing-activity-registries" },
|
||||
{ label: registry.name! },
|
||||
]}
|
||||
/>
|
||||
<ActionDropdown>
|
||||
<DropdownItem onClick={deleteRegistry} variant="danger">
|
||||
{__("Delete")}
|
||||
</DropdownItem>
|
||||
</ActionDropdown>
|
||||
</div>
|
||||
|
||||
<Card>
|
||||
<div className="p-6">
|
||||
<div className="mb-6">
|
||||
<div className="flex items-center gap-4">
|
||||
<h1 className="text-2xl font-bold">{registry.name}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form onSubmit={onSubmit} className="space-y-6">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
||||
<div className="space-y-4">
|
||||
<Field
|
||||
label={__("Name")}
|
||||
{...register("name")}
|
||||
error={formState.errors.name?.message}
|
||||
required
|
||||
/>
|
||||
|
||||
<AuditSelectField
|
||||
organizationId={organizationId}
|
||||
control={control}
|
||||
name="auditId"
|
||||
label={__("Audit")}
|
||||
error={formState.errors.auditId?.message}
|
||||
required
|
||||
/>
|
||||
|
||||
<div>
|
||||
<Label>{__("Purpose")}</Label>
|
||||
<Textarea
|
||||
{...register("purpose")}
|
||||
placeholder={__("Describe the purpose of processing")}
|
||||
rows={3}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Field
|
||||
label={__("Data Subject Category")}
|
||||
{...register("dataSubjectCategory")}
|
||||
placeholder={__("e.g., employees, customers, prospects")}
|
||||
/>
|
||||
|
||||
<Field
|
||||
label={__("Personal Data Category")}
|
||||
{...register("personalDataCategory")}
|
||||
placeholder={__("e.g., contact details, financial data")}
|
||||
/>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="specialOrCriminalData">{__("Special or Criminal Data")} *</Label>
|
||||
<Controller
|
||||
control={control}
|
||||
name="specialOrCriminalData"
|
||||
render={({ field }) => (
|
||||
<Select
|
||||
id="specialOrCriminalData"
|
||||
placeholder={__("Select special or criminal data status")}
|
||||
onValueChange={field.onChange}
|
||||
value={field.value}
|
||||
className="w-full"
|
||||
>
|
||||
<SpecialOrCriminalDataOptions />
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
{formState.errors.specialOrCriminalData && (
|
||||
<p className="text-sm text-txt-danger mt-1">{formState.errors.specialOrCriminalData.message}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Field
|
||||
label={__("Consent Evidence Link")}
|
||||
{...register("consentEvidenceLink")}
|
||||
placeholder={__("Link to consent evidence if applicable")}
|
||||
/>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="lawfulBasis">{__("Lawful Basis")} *</Label>
|
||||
<Controller
|
||||
control={control}
|
||||
name="lawfulBasis"
|
||||
render={({ field }) => (
|
||||
<Select
|
||||
id="lawfulBasis"
|
||||
placeholder={__("Select lawful basis for processing")}
|
||||
onValueChange={field.onChange}
|
||||
value={field.value}
|
||||
className="w-full"
|
||||
>
|
||||
<LawfulBasisOptions />
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
{formState.errors.lawfulBasis && (
|
||||
<p className="text-sm text-txt-danger mt-1">{formState.errors.lawfulBasis.message}</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-4">
|
||||
<Field
|
||||
label={__("Recipients")}
|
||||
{...register("recipients")}
|
||||
placeholder={__("Who receives the data")}
|
||||
/>
|
||||
|
||||
<Field
|
||||
label={__("Location")}
|
||||
{...register("location")}
|
||||
placeholder={__("Where is the data processed")}
|
||||
/>
|
||||
|
||||
<Controller
|
||||
control={control}
|
||||
name="internationalTransfers"
|
||||
render={({ field }) => (
|
||||
<div>
|
||||
<Label>{__("International Transfers")}</Label>
|
||||
<div className="mt-2 flex items-center gap-2">
|
||||
<Checkbox
|
||||
checked={field.value}
|
||||
onChange={field.onChange}
|
||||
/>
|
||||
<span>{__("Data is transferred internationally")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
/>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="transferSafeguards">{__("Transfer Safeguards")}</Label>
|
||||
<Controller
|
||||
control={control}
|
||||
name="transferSafeguards"
|
||||
render={({ field }) => (
|
||||
<Select
|
||||
id="transferSafeguards"
|
||||
placeholder={__("Select transfer safeguards")}
|
||||
onValueChange={field.onChange}
|
||||
value={field.value}
|
||||
className="w-full"
|
||||
>
|
||||
<TransferSafeguardsOptions />
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
{formState.errors.transferSafeguards && (
|
||||
<p className="text-sm text-txt-danger mt-1">{formState.errors.transferSafeguards.message}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Field
|
||||
label={__("Retention Period")}
|
||||
{...register("retentionPeriod")}
|
||||
placeholder={__("How long is data retained")}
|
||||
/>
|
||||
|
||||
<div>
|
||||
<Label>{__("Security Measures")}</Label>
|
||||
<Textarea
|
||||
{...register("securityMeasures")}
|
||||
placeholder={__("Technical and organizational measures")}
|
||||
rows={3}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="dataProtectionImpactAssessment">{__("Data Protection Impact Assessment")} *</Label>
|
||||
<Controller
|
||||
control={control}
|
||||
name="dataProtectionImpactAssessment"
|
||||
render={({ field }) => (
|
||||
<Select
|
||||
id="dataProtectionImpactAssessment"
|
||||
placeholder={__("Is DPIA needed?")}
|
||||
onValueChange={field.onChange}
|
||||
value={field.value}
|
||||
className="w-full"
|
||||
>
|
||||
<DataProtectionImpactAssessmentOptions />
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
{formState.errors.dataProtectionImpactAssessment && (
|
||||
<p className="text-sm text-txt-danger mt-1">{formState.errors.dataProtectionImpactAssessment.message}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="transferImpactAssessment">{__("Transfer Impact Assessment")} *</Label>
|
||||
<Controller
|
||||
control={control}
|
||||
name="transferImpactAssessment"
|
||||
render={({ field }) => (
|
||||
<Select
|
||||
id="transferImpactAssessment"
|
||||
placeholder={__("Is TIA needed?")}
|
||||
onValueChange={field.onChange}
|
||||
value={field.value}
|
||||
className="w-full"
|
||||
>
|
||||
<TransferImpactAssessmentOptions />
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
{formState.errors.transferImpactAssessment && (
|
||||
<p className="text-sm text-txt-danger mt-1">{formState.errors.transferImpactAssessment.message}</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex justify-end pt-4">
|
||||
<Button
|
||||
type="submit"
|
||||
variant="primary"
|
||||
disabled={formState.isSubmitting}
|
||||
>
|
||||
{formState.isSubmitting ? __("Saving...") : __("Save Changes")}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,301 @@
|
||||
/**
|
||||
* @generated SignedSource<<a05ed8b664f858ac30c3bf5d71ba20ea>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ReaderFragment } from 'relay-runtime';
|
||||
export type ProcessingActivityRegistryLawfulBasis = "CONSENT" | "CONTRACTUAL_NECESSITY" | "LEGAL_OBLIGATION" | "LEGITIMATE_INTEREST" | "PUBLIC_TASK" | "VITAL_INTERESTS";
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type ProcessingActivityRegistriesPageFragment$data = {
|
||||
readonly id: string;
|
||||
readonly processingActivityRegistries: {
|
||||
readonly __id: string;
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly audit: {
|
||||
readonly framework: {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
};
|
||||
readonly id: string;
|
||||
readonly name: string | null | undefined;
|
||||
};
|
||||
readonly createdAt: any;
|
||||
readonly dataSubjectCategory: string | null | undefined;
|
||||
readonly id: string;
|
||||
readonly internationalTransfers: boolean;
|
||||
readonly lawfulBasis: ProcessingActivityRegistryLawfulBasis;
|
||||
readonly location: string | null | undefined;
|
||||
readonly name: string;
|
||||
readonly personalDataCategory: string | null | undefined;
|
||||
readonly purpose: string | null | undefined;
|
||||
readonly updatedAt: any;
|
||||
};
|
||||
}>;
|
||||
readonly pageInfo: {
|
||||
readonly endCursor: any | null | undefined;
|
||||
readonly hasNextPage: boolean;
|
||||
};
|
||||
readonly totalCount: number;
|
||||
};
|
||||
readonly " $fragmentType": "ProcessingActivityRegistriesPageFragment";
|
||||
};
|
||||
export type ProcessingActivityRegistriesPageFragment$key = {
|
||||
readonly " $data"?: ProcessingActivityRegistriesPageFragment$data;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"ProcessingActivityRegistriesPageFragment">;
|
||||
};
|
||||
|
||||
import ProcessingActivityRegistriesPageRefetchQuery_graphql from './ProcessingActivityRegistriesPageRefetchQuery.graphql';
|
||||
|
||||
const node: ReaderFragment = (function(){
|
||||
var v0 = [
|
||||
"processingActivityRegistries"
|
||||
],
|
||||
v1 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"argumentDefinitions": [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "after"
|
||||
},
|
||||
{
|
||||
"defaultValue": 10,
|
||||
"kind": "LocalArgument",
|
||||
"name": "first"
|
||||
}
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": {
|
||||
"connection": [
|
||||
{
|
||||
"count": "first",
|
||||
"cursor": "after",
|
||||
"direction": "forward",
|
||||
"path": (v0/*: any*/)
|
||||
}
|
||||
],
|
||||
"refetch": {
|
||||
"connection": {
|
||||
"forward": {
|
||||
"count": "first",
|
||||
"cursor": "after"
|
||||
},
|
||||
"backward": null,
|
||||
"path": (v0/*: any*/)
|
||||
},
|
||||
"fragmentPathInResult": [
|
||||
"node"
|
||||
],
|
||||
"operation": ProcessingActivityRegistriesPageRefetchQuery_graphql,
|
||||
"identifierInfo": {
|
||||
"identifierField": "id",
|
||||
"identifierQueryVariableName": "id"
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "ProcessingActivityRegistriesPageFragment",
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"alias": "processingActivityRegistries",
|
||||
"args": null,
|
||||
"concreteType": "ProcessingActivityRegistryConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__ProcessingActivityRegistriesPage_processingActivityRegistries_connection",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "totalCount",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ProcessingActivityRegistryEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ProcessingActivityRegistry",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "purpose",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "dataSubjectCategory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "personalDataCategory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "lawfulBasis",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "location",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "internationalTransfers",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Audit",
|
||||
"kind": "LinkedField",
|
||||
"name": "audit",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "framework",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"kind": "ClientExtension",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__id",
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "7e63a0911396373ab39811be65844b89";
|
||||
|
||||
export default node;
|
||||
@@ -0,0 +1,322 @@
|
||||
/**
|
||||
* @generated SignedSource<<4af375f7d8057aa29a6fcfe47854e707>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type ProcessingActivityRegistriesPageQuery$variables = {
|
||||
organizationId: string;
|
||||
};
|
||||
export type ProcessingActivityRegistriesPageQuery$data = {
|
||||
readonly node: {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"ProcessingActivityRegistriesPageFragment">;
|
||||
};
|
||||
};
|
||||
export type ProcessingActivityRegistriesPageQuery = {
|
||||
response: ProcessingActivityRegistriesPageQuery$data;
|
||||
variables: ProcessingActivityRegistriesPageQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "organizationId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "organizationId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 10
|
||||
}
|
||||
],
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ProcessingActivityRegistriesPageQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"args": null,
|
||||
"kind": "FragmentSpread",
|
||||
"name": "ProcessingActivityRegistriesPageFragment"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ProcessingActivityRegistriesPageQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v4/*: any*/),
|
||||
"concreteType": "ProcessingActivityRegistryConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "processingActivityRegistries",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "totalCount",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ProcessingActivityRegistryEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ProcessingActivityRegistry",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v5/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "purpose",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "dataSubjectCategory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "personalDataCategory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "lawfulBasis",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "location",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "internationalTransfers",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Audit",
|
||||
"kind": "LinkedField",
|
||||
"name": "audit",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v5/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "framework",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"kind": "ClientExtension",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__id",
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": "processingActivityRegistries(first:10)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v4/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "ProcessingActivityRegistriesPage_processingActivityRegistries",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "processingActivityRegistries"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "9fe4ad1f3cd0dbd50f63b9dd93a95df8",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ProcessingActivityRegistriesPageQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ProcessingActivityRegistriesPageQuery(\n $organizationId: ID!\n) {\n node(id: $organizationId) {\n __typename\n ... on Organization {\n ...ProcessingActivityRegistriesPageFragment\n }\n id\n }\n}\n\nfragment ProcessingActivityRegistriesPageFragment on Organization {\n id\n processingActivityRegistries(first: 10) {\n totalCount\n edges {\n node {\n id\n name\n purpose\n dataSubjectCategory\n personalDataCategory\n lawfulBasis\n location\n internationalTransfers\n audit {\n id\n name\n framework {\n id\n name\n }\n }\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "2d99b77d24e6583cb93580fdbf47ffb3";
|
||||
|
||||
export default node;
|
||||
@@ -0,0 +1,332 @@
|
||||
/**
|
||||
* @generated SignedSource<<eae0517caf3cfcc45963a0cc7bcd4dca>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type ProcessingActivityRegistriesPageRefetchQuery$variables = {
|
||||
after?: any | null | undefined;
|
||||
first?: number | null | undefined;
|
||||
id: string;
|
||||
};
|
||||
export type ProcessingActivityRegistriesPageRefetchQuery$data = {
|
||||
readonly node: {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"ProcessingActivityRegistriesPageFragment">;
|
||||
};
|
||||
};
|
||||
export type ProcessingActivityRegistriesPageRefetchQuery = {
|
||||
response: ProcessingActivityRegistriesPageRefetchQuery$data;
|
||||
variables: ProcessingActivityRegistriesPageRefetchQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "after"
|
||||
},
|
||||
{
|
||||
"defaultValue": 10,
|
||||
"kind": "LocalArgument",
|
||||
"name": "first"
|
||||
},
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "id"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "id"
|
||||
}
|
||||
],
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "after",
|
||||
"variableName": "after"
|
||||
},
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "first",
|
||||
"variableName": "first"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ProcessingActivityRegistriesPageRefetchQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"args": (v2/*: any*/),
|
||||
"kind": "FragmentSpread",
|
||||
"name": "ProcessingActivityRegistriesPageFragment"
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ProcessingActivityRegistriesPageRefetchQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "ProcessingActivityRegistryConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "processingActivityRegistries",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "totalCount",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ProcessingActivityRegistryEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ProcessingActivityRegistry",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "purpose",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "dataSubjectCategory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "personalDataCategory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "lawfulBasis",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "location",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "internationalTransfers",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Audit",
|
||||
"kind": "LinkedField",
|
||||
"name": "audit",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "framework",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"kind": "ClientExtension",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__id",
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "ProcessingActivityRegistriesPage_processingActivityRegistries",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "processingActivityRegistries"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "352606982d18141d1e790715a3554f8c",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ProcessingActivityRegistriesPageRefetchQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ProcessingActivityRegistriesPageRefetchQuery(\n $after: CursorKey\n $first: Int = 10\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...ProcessingActivityRegistriesPageFragment_2HEEH6\n id\n }\n}\n\nfragment ProcessingActivityRegistriesPageFragment_2HEEH6 on Organization {\n id\n processingActivityRegistries(first: $first, after: $after) {\n totalCount\n edges {\n node {\n id\n name\n purpose\n dataSubjectCategory\n personalDataCategory\n lawfulBasis\n location\n internationalTransfers\n audit {\n id\n name\n framework {\n id\n name\n }\n }\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "7e63a0911396373ab39811be65844b89";
|
||||
|
||||
export default node;
|
||||
@@ -0,0 +1,360 @@
|
||||
import { type ReactNode } from "react";
|
||||
import {
|
||||
Button,
|
||||
Field,
|
||||
useToast,
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogFooter,
|
||||
useDialogRef,
|
||||
Textarea,
|
||||
Breadcrumb,
|
||||
Label,
|
||||
Checkbox,
|
||||
Select,
|
||||
} from "@probo/ui";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { z } from "zod";
|
||||
import { useFormWithSchema } from "/hooks/useFormWithSchema";
|
||||
import { useCreateProcessingActivityRegistry } from "../../../../hooks/graph/ProcessingActivityRegistryGraph";
|
||||
import { AuditSelectField } from "/components/form/AuditSelectField";
|
||||
import { Controller } from "react-hook-form";
|
||||
import {
|
||||
SpecialOrCriminalDataOptions,
|
||||
LawfulBasisOptions,
|
||||
TransferSafeguardsOptions,
|
||||
DataProtectionImpactAssessmentOptions,
|
||||
TransferImpactAssessmentOptions,
|
||||
} from "../../../../components/form/ProcessingActivityRegistryEnumOptions";
|
||||
|
||||
const schema = z.object({
|
||||
name: z.string().min(1, "Name is required"),
|
||||
purpose: z.string().optional(),
|
||||
dataSubjectCategory: z.string().optional(),
|
||||
personalDataCategory: z.string().optional(),
|
||||
specialOrCriminalData: z.enum(["YES", "NO", "POSSIBLE"] as const),
|
||||
consentEvidenceLink: z.string().optional(),
|
||||
lawfulBasis: z.enum(["CONSENT", "CONTRACTUAL_NECESSITY", "LEGAL_OBLIGATION", "LEGITIMATE_INTEREST", "PUBLIC_TASK", "VITAL_INTERESTS"] as const),
|
||||
recipients: z.string().optional(),
|
||||
location: z.string().optional(),
|
||||
internationalTransfers: z.boolean(),
|
||||
transferSafeguards: z.string(),
|
||||
retentionPeriod: z.string().optional(),
|
||||
securityMeasures: z.string().optional(),
|
||||
dataProtectionImpactAssessment: z.enum(["NEEDED", "NOT_NEEDED"] as const),
|
||||
transferImpactAssessment: z.enum(["NEEDED", "NOT_NEEDED"] as const),
|
||||
auditId: z.string().min(1, "Audit is required"),
|
||||
});
|
||||
|
||||
type FormData = z.infer<typeof schema>;
|
||||
|
||||
interface CreateProcessingActivityRegistryDialogProps {
|
||||
children: ReactNode;
|
||||
organizationId: string;
|
||||
connectionId?: string;
|
||||
}
|
||||
|
||||
export function CreateProcessingActivityRegistryDialog({
|
||||
children,
|
||||
organizationId,
|
||||
connectionId,
|
||||
}: CreateProcessingActivityRegistryDialogProps) {
|
||||
const { __ } = useTranslate();
|
||||
const { toast } = useToast();
|
||||
const dialogRef = useDialogRef();
|
||||
|
||||
const createRegistry = useCreateProcessingActivityRegistry(connectionId);
|
||||
|
||||
const { register, handleSubmit, formState, reset, control } = useFormWithSchema(schema, {
|
||||
defaultValues: {
|
||||
name: "",
|
||||
purpose: "",
|
||||
dataSubjectCategory: "",
|
||||
personalDataCategory: "",
|
||||
specialOrCriminalData: "NO" as const,
|
||||
consentEvidenceLink: "",
|
||||
lawfulBasis: "LEGITIMATE_INTEREST" as const,
|
||||
recipients: "",
|
||||
location: "",
|
||||
internationalTransfers: false,
|
||||
transferSafeguards: "__NONE__",
|
||||
retentionPeriod: "",
|
||||
securityMeasures: "",
|
||||
dataProtectionImpactAssessment: "NOT_NEEDED" as const,
|
||||
transferImpactAssessment: "NOT_NEEDED" as const,
|
||||
auditId: "",
|
||||
},
|
||||
});
|
||||
|
||||
const onSubmit = handleSubmit(async (formData: FormData) => {
|
||||
try {
|
||||
await createRegistry({
|
||||
organizationId,
|
||||
name: formData.name,
|
||||
purpose: formData.purpose || undefined,
|
||||
dataSubjectCategory: formData.dataSubjectCategory || undefined,
|
||||
personalDataCategory: formData.personalDataCategory || undefined,
|
||||
specialOrCriminalData: formData.specialOrCriminalData || undefined,
|
||||
consentEvidenceLink: formData.consentEvidenceLink || undefined,
|
||||
lawfulBasis: formData.lawfulBasis || undefined,
|
||||
recipients: formData.recipients || undefined,
|
||||
location: formData.location || undefined,
|
||||
internationalTransfers: formData.internationalTransfers,
|
||||
transferSafeguards: formData.transferSafeguards === "__NONE__" ? undefined : formData.transferSafeguards || undefined,
|
||||
retentionPeriod: formData.retentionPeriod || undefined,
|
||||
securityMeasures: formData.securityMeasures || undefined,
|
||||
dataProtectionImpactAssessment: formData.dataProtectionImpactAssessment || undefined,
|
||||
transferImpactAssessment: formData.transferImpactAssessment || undefined,
|
||||
auditId: formData.auditId,
|
||||
});
|
||||
|
||||
toast({
|
||||
title: __("Success"),
|
||||
description: __("Processing activity registry entry created successfully"),
|
||||
variant: "success",
|
||||
});
|
||||
|
||||
reset();
|
||||
dialogRef.current?.close();
|
||||
} catch (error) {
|
||||
toast({
|
||||
title: __("Error"),
|
||||
description: __("Failed to create processing activity registry entry"),
|
||||
variant: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
ref={dialogRef}
|
||||
trigger={children}
|
||||
title={<Breadcrumb items={[__("Registries"), __("Create Processing Activity Entry")]} />}
|
||||
className="max-w-4xl"
|
||||
>
|
||||
<form onSubmit={onSubmit}>
|
||||
<DialogContent padded className="space-y-6">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
||||
<div className="space-y-4">
|
||||
<Field
|
||||
label={__("Name")}
|
||||
{...register("name")}
|
||||
placeholder={__("Processing activity name")}
|
||||
error={formState.errors.name?.message}
|
||||
required
|
||||
/>
|
||||
|
||||
<AuditSelectField
|
||||
organizationId={organizationId}
|
||||
control={control}
|
||||
name="auditId"
|
||||
label={__("Audit")}
|
||||
error={formState.errors.auditId?.message}
|
||||
required
|
||||
/>
|
||||
|
||||
<div>
|
||||
<Label>{__("Purpose")}</Label>
|
||||
<Textarea
|
||||
{...register("purpose")}
|
||||
placeholder={__("Describe the purpose of processing")}
|
||||
rows={3}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Field
|
||||
label={__("Data Subject Category")}
|
||||
{...register("dataSubjectCategory")}
|
||||
placeholder={__("e.g., employees, customers, prospects")}
|
||||
error={formState.errors.dataSubjectCategory?.message}
|
||||
/>
|
||||
|
||||
<Field
|
||||
label={__("Personal Data Category")}
|
||||
{...register("personalDataCategory")}
|
||||
placeholder={__("e.g., contact details, financial data")}
|
||||
error={formState.errors.personalDataCategory?.message}
|
||||
/>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="specialOrCriminalData">{__("Special or Criminal Data")} *</Label>
|
||||
<Controller
|
||||
control={control}
|
||||
name="specialOrCriminalData"
|
||||
render={({ field }) => (
|
||||
<Select
|
||||
id="specialOrCriminalData"
|
||||
placeholder={__("Select special or criminal data status")}
|
||||
onValueChange={field.onChange}
|
||||
value={field.value}
|
||||
className="w-full"
|
||||
>
|
||||
<SpecialOrCriminalDataOptions />
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
{formState.errors.specialOrCriminalData && (
|
||||
<p className="text-sm text-txt-danger mt-1">{formState.errors.specialOrCriminalData.message}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Field
|
||||
label={__("Consent Evidence Link")}
|
||||
{...register("consentEvidenceLink")}
|
||||
placeholder={__("Link to consent evidence if applicable")}
|
||||
error={formState.errors.consentEvidenceLink?.message}
|
||||
/>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="lawfulBasis">{__("Lawful Basis")} *</Label>
|
||||
<Controller
|
||||
control={control}
|
||||
name="lawfulBasis"
|
||||
render={({ field }) => (
|
||||
<Select
|
||||
id="lawfulBasis"
|
||||
placeholder={__("Select lawful basis for processing")}
|
||||
onValueChange={field.onChange}
|
||||
value={field.value}
|
||||
className="w-full"
|
||||
>
|
||||
<LawfulBasisOptions />
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
{formState.errors.lawfulBasis && (
|
||||
<p className="text-sm text-txt-danger mt-1">{formState.errors.lawfulBasis.message}</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-4">
|
||||
<Field
|
||||
label={__("Recipients")}
|
||||
{...register("recipients")}
|
||||
placeholder={__("Who receives the data")}
|
||||
error={formState.errors.recipients?.message}
|
||||
/>
|
||||
|
||||
<Field
|
||||
label={__("Location")}
|
||||
{...register("location")}
|
||||
placeholder={__("Where is the data processed")}
|
||||
error={formState.errors.location?.message}
|
||||
/>
|
||||
|
||||
<Controller
|
||||
control={control}
|
||||
name="internationalTransfers"
|
||||
render={({ field }) => (
|
||||
<div>
|
||||
<Label>{__("International Transfers")}</Label>
|
||||
<div className="mt-2 flex items-center gap-2">
|
||||
<Checkbox
|
||||
checked={field.value}
|
||||
onChange={field.onChange}
|
||||
/>
|
||||
<span>{__("Data is transferred internationally")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
/>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="transferSafeguards">{__("Transfer Safeguards")}</Label>
|
||||
<Controller
|
||||
control={control}
|
||||
name="transferSafeguards"
|
||||
render={({ field }) => (
|
||||
<Select
|
||||
id="transferSafeguards"
|
||||
placeholder={__("Select transfer safeguards")}
|
||||
onValueChange={field.onChange}
|
||||
value={field.value}
|
||||
className="w-full"
|
||||
>
|
||||
<TransferSafeguardsOptions />
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
{formState.errors.transferSafeguards && (
|
||||
<p className="text-sm text-txt-danger mt-1">{formState.errors.transferSafeguards.message}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Field
|
||||
label={__("Retention Period")}
|
||||
{...register("retentionPeriod")}
|
||||
placeholder={__("How long is data retained")}
|
||||
error={formState.errors.retentionPeriod?.message}
|
||||
/>
|
||||
|
||||
<div>
|
||||
<Label>{__("Security Measures")}</Label>
|
||||
<Textarea
|
||||
{...register("securityMeasures")}
|
||||
placeholder={__("Technical and organizational measures")}
|
||||
rows={2}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="dataProtectionImpactAssessment">{__("Data Protection Impact Assessment")} *</Label>
|
||||
<Controller
|
||||
control={control}
|
||||
name="dataProtectionImpactAssessment"
|
||||
render={({ field }) => (
|
||||
<Select
|
||||
id="dataProtectionImpactAssessment"
|
||||
placeholder={__("Is DPIA needed?")}
|
||||
onValueChange={field.onChange}
|
||||
value={field.value}
|
||||
className="w-full"
|
||||
>
|
||||
<DataProtectionImpactAssessmentOptions />
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
{formState.errors.dataProtectionImpactAssessment && (
|
||||
<p className="text-sm text-txt-danger mt-1">{formState.errors.dataProtectionImpactAssessment.message}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="transferImpactAssessment">{__("Transfer Impact Assessment")} *</Label>
|
||||
<Controller
|
||||
control={control}
|
||||
name="transferImpactAssessment"
|
||||
render={({ field }) => (
|
||||
<Select
|
||||
id="transferImpactAssessment"
|
||||
placeholder={__("Is TIA needed?")}
|
||||
onValueChange={field.onChange}
|
||||
value={field.value}
|
||||
className="w-full"
|
||||
>
|
||||
<TransferImpactAssessmentOptions />
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
{formState.errors.transferImpactAssessment && (
|
||||
<p className="text-sm text-txt-danger mt-1">{formState.errors.transferImpactAssessment.message}</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</DialogContent>
|
||||
|
||||
<DialogFooter>
|
||||
<Button
|
||||
type="submit"
|
||||
variant="primary"
|
||||
disabled={formState.isSubmitting}
|
||||
>
|
||||
{formState.isSubmitting ? __("Creating...") : __("Create Entry")}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</form>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
@@ -33,6 +33,7 @@ import { nonconformityRegistryRoutes } from "./routes/nonconformityRegistryRoute
|
||||
import { complianceRegistryRoutes } from "./routes/complianceRegistryRoutes.ts";
|
||||
import { snapshotsRoutes } from "./routes/snapshotsRoutes.ts";
|
||||
import { continualImprovementRegistryRoutes } from "./routes/continualImprovementRegistryRoutes.ts";
|
||||
import { processingActivityRegistryRoutes } from "./routes/processingActivityRegistryRoutes.ts";
|
||||
import { lazy } from "@probo/react-lazy";
|
||||
|
||||
export type AppRoute = Omit<RouteObject, "Component" | "children"> & {
|
||||
@@ -155,8 +156,9 @@ const routes = [
|
||||
...auditRoutes,
|
||||
...nonconformityRegistryRoutes,
|
||||
...complianceRegistryRoutes,
|
||||
...snapshotsRoutes,
|
||||
...continualImprovementRegistryRoutes,
|
||||
...processingActivityRegistryRoutes,
|
||||
...snapshotsRoutes,
|
||||
...trustCenterRoutes,
|
||||
{
|
||||
path: "*",
|
||||
|
||||
29
apps/console/src/routes/processingActivityRegistryRoutes.ts
Normal file
29
apps/console/src/routes/processingActivityRegistryRoutes.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { loadQuery } from "react-relay";
|
||||
import { relayEnvironment } from "/providers/RelayProviders";
|
||||
import { PageSkeleton } from "/components/skeletons/PageSkeleton";
|
||||
import { lazy } from "@probo/react-lazy";
|
||||
import { processingActivityRegistriesQuery, processingActivityRegistryNodeQuery } from "/hooks/graph/ProcessingActivityRegistryGraph";
|
||||
import type { AppRoute } from "/routes";
|
||||
|
||||
export const processingActivityRegistryRoutes = [
|
||||
{
|
||||
path: "processing-activity-registries",
|
||||
fallback: PageSkeleton,
|
||||
queryLoader: ({ organizationId }: { organizationId: string }) =>
|
||||
loadQuery(relayEnvironment, processingActivityRegistriesQuery, { organizationId }),
|
||||
Component: lazy(
|
||||
() => import("/pages/organizations/processingActivityRegistries/ProcessingActivityRegistriesPage")
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "processing-activity-registries/:registryId",
|
||||
fallback: PageSkeleton,
|
||||
queryLoader: (params: Record<string, string>) =>
|
||||
loadQuery(relayEnvironment, processingActivityRegistryNodeQuery, {
|
||||
processingActivityRegistryId: params.registryId
|
||||
}),
|
||||
Component: lazy(
|
||||
() => import("/pages/organizations/processingActivityRegistries/ProcessingActivityRegistryDetailsPage")
|
||||
),
|
||||
},
|
||||
] satisfies AppRoute[];
|
||||
@@ -48,4 +48,5 @@ const (
|
||||
VendorServiceEntityType
|
||||
SnapshotEntityType
|
||||
ContinualImprovementRegistryEntityType
|
||||
ProcessingActivityRegistryEntityType
|
||||
)
|
||||
|
||||
69
pkg/coredata/migrations/20250827T125533Z.sql
Normal file
69
pkg/coredata/migrations/20250827T125533Z.sql
Normal file
@@ -0,0 +1,69 @@
|
||||
CREATE TYPE processing_activity_registries_special_or_criminal_data AS ENUM (
|
||||
'YES',
|
||||
'NO',
|
||||
'POSSIBLE'
|
||||
);
|
||||
|
||||
CREATE TYPE processing_activity_registries_lawful_basis AS ENUM (
|
||||
'LEGITIMATE_INTEREST',
|
||||
'CONSENT',
|
||||
'CONTRACTUAL_NECESSITY',
|
||||
'LEGAL_OBLIGATION',
|
||||
'VITAL_INTERESTS',
|
||||
'PUBLIC_TASK'
|
||||
);
|
||||
|
||||
CREATE TYPE processing_activity_registries_transfer_safeguards AS ENUM (
|
||||
'STANDARD_CONTRACTUAL_CLAUSES',
|
||||
'BINDING_CORPORATE_RULES',
|
||||
'ADEQUACY_DECISION',
|
||||
'DEROGATIONS',
|
||||
'CODES_OF_CONDUCT',
|
||||
'CERTIFICATION_MECHANISMS'
|
||||
);
|
||||
|
||||
CREATE TYPE processing_activity_registries_data_protection_impact_assessment AS ENUM (
|
||||
'NEEDED',
|
||||
'NOT_NEEDED'
|
||||
);
|
||||
|
||||
CREATE TYPE processing_activity_registries_transfer_impact_assessment AS ENUM (
|
||||
'NEEDED',
|
||||
'NOT_NEEDED'
|
||||
);
|
||||
|
||||
CREATE TABLE processing_activity_registries (
|
||||
id TEXT PRIMARY KEY,
|
||||
tenant_id TEXT NOT NULL,
|
||||
organization_id TEXT NOT NULL,
|
||||
audit_id TEXT NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
purpose TEXT,
|
||||
data_subject_category TEXT,
|
||||
personal_data_category TEXT,
|
||||
special_or_criminal_data processing_activity_registries_special_or_criminal_data NOT NULL,
|
||||
consent_evidence_link TEXT,
|
||||
lawful_basis processing_activity_registries_lawful_basis NOT NULL,
|
||||
recipients TEXT,
|
||||
location TEXT,
|
||||
international_transfers BOOLEAN NOT NULL,
|
||||
transfer_safeguards processing_activity_registries_transfer_safeguards,
|
||||
retention_period TEXT,
|
||||
security_measures TEXT,
|
||||
data_protection_impact_assessment processing_activity_registries_data_protection_impact_assessment NOT NULL,
|
||||
transfer_impact_assessment processing_activity_registries_transfer_impact_assessment NOT NULL,
|
||||
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
updated_at TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
|
||||
CONSTRAINT processing_activity_registries_organization_id_fkey
|
||||
FOREIGN KEY (organization_id)
|
||||
REFERENCES organizations(id)
|
||||
ON UPDATE CASCADE
|
||||
ON DELETE CASCADE,
|
||||
|
||||
CONSTRAINT processing_activity_registries_audit_id_fkey
|
||||
FOREIGN KEY (audit_id)
|
||||
REFERENCES audits(id)
|
||||
ON UPDATE CASCADE
|
||||
ON DELETE CASCADE
|
||||
);
|
||||
473
pkg/coredata/processing_activity_registries.go
Normal file
473
pkg/coredata/processing_activity_registries.go
Normal file
@@ -0,0 +1,473 @@
|
||||
// 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 coredata
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"maps"
|
||||
"time"
|
||||
|
||||
"github.com/getprobo/probo/pkg/gid"
|
||||
"github.com/getprobo/probo/pkg/page"
|
||||
"github.com/jackc/pgx/v5"
|
||||
"go.gearno.de/kit/pg"
|
||||
)
|
||||
|
||||
type (
|
||||
ProcessingActivityRegistry struct {
|
||||
ID gid.GID `db:"id"`
|
||||
OrganizationID gid.GID `db:"organization_id"`
|
||||
AuditID gid.GID `db:"audit_id"`
|
||||
Name string `db:"name"`
|
||||
Purpose *string `db:"purpose"`
|
||||
DataSubjectCategory *string `db:"data_subject_category"`
|
||||
PersonalDataCategory *string `db:"personal_data_category"`
|
||||
SpecialOrCriminalData ProcessingActivityRegistrySpecialOrCriminalData `db:"special_or_criminal_data"`
|
||||
ConsentEvidenceLink *string `db:"consent_evidence_link"`
|
||||
LawfulBasis ProcessingActivityRegistryLawfulBasis `db:"lawful_basis"`
|
||||
Recipients *string `db:"recipients"`
|
||||
Location *string `db:"location"`
|
||||
InternationalTransfers bool `db:"international_transfers"`
|
||||
TransferSafeguards *ProcessingActivityRegistryTransferSafeguards `db:"transfer_safeguards"`
|
||||
RetentionPeriod *string `db:"retention_period"`
|
||||
SecurityMeasures *string `db:"security_measures"`
|
||||
DataProtectionImpactAssessment ProcessingActivityRegistryDataProtectionImpactAssessment `db:"data_protection_impact_assessment"`
|
||||
TransferImpactAssessment ProcessingActivityRegistryTransferImpactAssessment `db:"transfer_impact_assessment"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at"`
|
||||
}
|
||||
|
||||
ProcessingActivityRegistries []*ProcessingActivityRegistry
|
||||
)
|
||||
|
||||
func (p *ProcessingActivityRegistry) CursorKey(field ProcessingActivityRegistryOrderField) page.CursorKey {
|
||||
switch field {
|
||||
case ProcessingActivityRegistryOrderFieldCreatedAt:
|
||||
return page.NewCursorKey(p.ID, p.CreatedAt)
|
||||
case ProcessingActivityRegistryOrderFieldName:
|
||||
return page.NewCursorKey(p.ID, p.Name)
|
||||
}
|
||||
|
||||
panic(fmt.Sprintf("unsupported order by: %s", field))
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityRegistry) LoadByID(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
processingActivityRegistryID gid.GID,
|
||||
) error {
|
||||
q := `
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
audit_id,
|
||||
name,
|
||||
purpose,
|
||||
data_subject_category,
|
||||
personal_data_category,
|
||||
special_or_criminal_data,
|
||||
consent_evidence_link,
|
||||
lawful_basis,
|
||||
recipients,
|
||||
location,
|
||||
international_transfers,
|
||||
transfer_safeguards,
|
||||
retention_period,
|
||||
security_measures,
|
||||
data_protection_impact_assessment,
|
||||
transfer_impact_assessment,
|
||||
created_at,
|
||||
updated_at
|
||||
FROM
|
||||
processing_activity_registries
|
||||
WHERE
|
||||
%s
|
||||
AND id = @processing_activity_registry_id
|
||||
LIMIT 1;
|
||||
`
|
||||
|
||||
q = fmt.Sprintf(q, scope.SQLFragment())
|
||||
|
||||
args := pgx.StrictNamedArgs{"processing_activity_registry_id": processingActivityRegistryID}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
|
||||
rows, err := conn.Query(ctx, q, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot query processing activity registry: %w", err)
|
||||
}
|
||||
|
||||
processingActivityRegistry, err := pgx.CollectExactlyOneRow(rows, pgx.RowToStructByName[ProcessingActivityRegistry])
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot collect processing activity registry: %w", err)
|
||||
}
|
||||
|
||||
*p = processingActivityRegistry
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityRegistries) CountByOrganizationID(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
organizationID gid.GID,
|
||||
) (int, error) {
|
||||
q := `
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM
|
||||
processing_activity_registries
|
||||
WHERE
|
||||
%s
|
||||
AND organization_id = @organization_id
|
||||
`
|
||||
|
||||
q = fmt.Sprintf(q, scope.SQLFragment())
|
||||
|
||||
args := pgx.StrictNamedArgs{"organization_id": organizationID}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
|
||||
row := conn.QueryRow(ctx, q, args)
|
||||
|
||||
var count int
|
||||
err := row.Scan(&count)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("cannot count processing activity registries: %w", err)
|
||||
}
|
||||
|
||||
return count, nil
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityRegistries) LoadByOrganizationID(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
organizationID gid.GID,
|
||||
cursor *page.Cursor[ProcessingActivityRegistryOrderField],
|
||||
) error {
|
||||
q := `
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
audit_id,
|
||||
name,
|
||||
purpose,
|
||||
data_subject_category,
|
||||
personal_data_category,
|
||||
special_or_criminal_data,
|
||||
consent_evidence_link,
|
||||
lawful_basis,
|
||||
recipients,
|
||||
location,
|
||||
international_transfers,
|
||||
transfer_safeguards,
|
||||
retention_period,
|
||||
security_measures,
|
||||
data_protection_impact_assessment,
|
||||
transfer_impact_assessment,
|
||||
created_at,
|
||||
updated_at
|
||||
FROM
|
||||
processing_activity_registries
|
||||
WHERE
|
||||
%s
|
||||
AND organization_id = @organization_id
|
||||
AND %s
|
||||
`
|
||||
|
||||
q = fmt.Sprintf(q, scope.SQLFragment(), cursor.SQLFragment())
|
||||
|
||||
args := pgx.StrictNamedArgs{"organization_id": organizationID}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
maps.Copy(args, cursor.SQLArguments())
|
||||
|
||||
rows, err := conn.Query(ctx, q, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot query processing activity registries: %w", err)
|
||||
}
|
||||
|
||||
processingActivityRegistries, err := pgx.CollectRows(rows, pgx.RowToAddrOfStructByName[ProcessingActivityRegistry])
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot collect processing activity registries: %w", err)
|
||||
}
|
||||
|
||||
*p = processingActivityRegistries
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityRegistries) CountByAuditID(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
auditID gid.GID,
|
||||
) (int, error) {
|
||||
q := `
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM
|
||||
processing_activity_registries
|
||||
WHERE
|
||||
%s
|
||||
AND audit_id = @audit_id
|
||||
`
|
||||
|
||||
q = fmt.Sprintf(q, scope.SQLFragment())
|
||||
|
||||
args := pgx.StrictNamedArgs{"audit_id": auditID}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
|
||||
row := conn.QueryRow(ctx, q, args)
|
||||
|
||||
var count int
|
||||
err := row.Scan(&count)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("cannot count processing activity registries: %w", err)
|
||||
}
|
||||
|
||||
return count, nil
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityRegistries) LoadByAuditID(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
auditID gid.GID,
|
||||
cursor *page.Cursor[ProcessingActivityRegistryOrderField],
|
||||
) error {
|
||||
q := `
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
audit_id,
|
||||
name,
|
||||
purpose,
|
||||
data_subject_category,
|
||||
personal_data_category,
|
||||
special_or_criminal_data,
|
||||
consent_evidence_link,
|
||||
lawful_basis,
|
||||
recipients,
|
||||
location,
|
||||
international_transfers,
|
||||
transfer_safeguards,
|
||||
retention_period,
|
||||
security_measures,
|
||||
data_protection_impact_assessment,
|
||||
transfer_impact_assessment,
|
||||
created_at,
|
||||
updated_at
|
||||
FROM
|
||||
processing_activity_registries
|
||||
WHERE
|
||||
%s
|
||||
AND audit_id = @audit_id
|
||||
AND %s
|
||||
`
|
||||
|
||||
q = fmt.Sprintf(q, scope.SQLFragment(), cursor.SQLFragment())
|
||||
|
||||
args := pgx.StrictNamedArgs{"audit_id": auditID}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
maps.Copy(args, cursor.SQLArguments())
|
||||
|
||||
rows, err := conn.Query(ctx, q, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot query processing activity registries: %w", err)
|
||||
}
|
||||
|
||||
processingActivityRegistries, err := pgx.CollectRows(rows, pgx.RowToAddrOfStructByName[ProcessingActivityRegistry])
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot collect processing activity registries: %w", err)
|
||||
}
|
||||
|
||||
*p = processingActivityRegistries
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityRegistry) Insert(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
) error {
|
||||
q := `
|
||||
INSERT INTO processing_activity_registries (
|
||||
id,
|
||||
tenant_id,
|
||||
organization_id,
|
||||
audit_id,
|
||||
name,
|
||||
purpose,
|
||||
data_subject_category,
|
||||
personal_data_category,
|
||||
special_or_criminal_data,
|
||||
consent_evidence_link,
|
||||
lawful_basis,
|
||||
recipients,
|
||||
location,
|
||||
international_transfers,
|
||||
transfer_safeguards,
|
||||
retention_period,
|
||||
security_measures,
|
||||
data_protection_impact_assessment,
|
||||
transfer_impact_assessment,
|
||||
created_at,
|
||||
updated_at
|
||||
) VALUES (
|
||||
@id,
|
||||
@tenant_id,
|
||||
@organization_id,
|
||||
@audit_id,
|
||||
@name,
|
||||
@purpose,
|
||||
@data_subject_category,
|
||||
@personal_data_category,
|
||||
@special_or_criminal_data,
|
||||
@consent_evidence_link,
|
||||
@lawful_basis,
|
||||
@recipients,
|
||||
@location,
|
||||
@international_transfers,
|
||||
@transfer_safeguards,
|
||||
@retention_period,
|
||||
@security_measures,
|
||||
@data_protection_impact_assessment,
|
||||
@transfer_impact_assessment,
|
||||
@created_at,
|
||||
@updated_at
|
||||
)
|
||||
`
|
||||
|
||||
args := pgx.StrictNamedArgs{
|
||||
"id": p.ID,
|
||||
"tenant_id": scope.GetTenantID(),
|
||||
"organization_id": p.OrganizationID,
|
||||
"audit_id": p.AuditID,
|
||||
"name": p.Name,
|
||||
"purpose": p.Purpose,
|
||||
"data_subject_category": p.DataSubjectCategory,
|
||||
"personal_data_category": p.PersonalDataCategory,
|
||||
"special_or_criminal_data": p.SpecialOrCriminalData,
|
||||
"consent_evidence_link": p.ConsentEvidenceLink,
|
||||
"lawful_basis": p.LawfulBasis,
|
||||
"recipients": p.Recipients,
|
||||
"location": p.Location,
|
||||
"international_transfers": p.InternationalTransfers,
|
||||
"transfer_safeguards": p.TransferSafeguards,
|
||||
"retention_period": p.RetentionPeriod,
|
||||
"security_measures": p.SecurityMeasures,
|
||||
"data_protection_impact_assessment": p.DataProtectionImpactAssessment,
|
||||
"transfer_impact_assessment": p.TransferImpactAssessment,
|
||||
"created_at": p.CreatedAt,
|
||||
"updated_at": p.UpdatedAt,
|
||||
}
|
||||
|
||||
_, err := conn.Exec(ctx, q, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot insert processing activity registry: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityRegistry) Update(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
) error {
|
||||
q := `
|
||||
UPDATE processing_activity_registries
|
||||
SET
|
||||
name = @name,
|
||||
purpose = @purpose,
|
||||
audit_id = @audit_id,
|
||||
data_subject_category = @data_subject_category,
|
||||
personal_data_category = @personal_data_category,
|
||||
special_or_criminal_data = @special_or_criminal_data,
|
||||
consent_evidence_link = @consent_evidence_link,
|
||||
lawful_basis = @lawful_basis,
|
||||
recipients = @recipients,
|
||||
location = @location,
|
||||
international_transfers = @international_transfers,
|
||||
transfer_safeguards = @transfer_safeguards,
|
||||
retention_period = @retention_period,
|
||||
security_measures = @security_measures,
|
||||
data_protection_impact_assessment = @data_protection_impact_assessment,
|
||||
transfer_impact_assessment = @transfer_impact_assessment,
|
||||
updated_at = @updated_at
|
||||
WHERE
|
||||
%s
|
||||
AND id = @id
|
||||
`
|
||||
|
||||
q = fmt.Sprintf(q, scope.SQLFragment())
|
||||
|
||||
args := pgx.StrictNamedArgs{
|
||||
"id": p.ID,
|
||||
"name": p.Name,
|
||||
"purpose": p.Purpose,
|
||||
"audit_id": p.AuditID,
|
||||
"data_subject_category": p.DataSubjectCategory,
|
||||
"personal_data_category": p.PersonalDataCategory,
|
||||
"special_or_criminal_data": p.SpecialOrCriminalData,
|
||||
"consent_evidence_link": p.ConsentEvidenceLink,
|
||||
"lawful_basis": p.LawfulBasis,
|
||||
"recipients": p.Recipients,
|
||||
"location": p.Location,
|
||||
"international_transfers": p.InternationalTransfers,
|
||||
"transfer_safeguards": p.TransferSafeguards,
|
||||
"retention_period": p.RetentionPeriod,
|
||||
"security_measures": p.SecurityMeasures,
|
||||
"data_protection_impact_assessment": p.DataProtectionImpactAssessment,
|
||||
"transfer_impact_assessment": p.TransferImpactAssessment,
|
||||
"updated_at": p.UpdatedAt,
|
||||
}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
|
||||
_, err := conn.Exec(ctx, q, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot update processing activity registry: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityRegistry) Delete(
|
||||
ctx context.Context,
|
||||
conn pg.Conn,
|
||||
scope Scoper,
|
||||
) error {
|
||||
q := `
|
||||
DELETE FROM processing_activity_registries
|
||||
WHERE
|
||||
%s
|
||||
AND id = @id
|
||||
`
|
||||
|
||||
q = fmt.Sprintf(q, scope.SQLFragment())
|
||||
|
||||
args := pgx.StrictNamedArgs{"id": p.ID}
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
|
||||
_, err := conn.Exec(ctx, q, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot delete processing activity registry: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// 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 coredata
|
||||
|
||||
import (
|
||||
"database/sql/driver"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type ProcessingActivityRegistryDataProtectionImpactAssessment string
|
||||
|
||||
const (
|
||||
ProcessingActivityRegistryDataProtectionImpactAssessmentNeeded ProcessingActivityRegistryDataProtectionImpactAssessment = "NEEDED"
|
||||
ProcessingActivityRegistryDataProtectionImpactAssessmentNotNeeded ProcessingActivityRegistryDataProtectionImpactAssessment = "NOT_NEEDED"
|
||||
)
|
||||
|
||||
func (p ProcessingActivityRegistryDataProtectionImpactAssessment) String() string {
|
||||
return string(p)
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityRegistryDataProtectionImpactAssessment) Scan(value any) error {
|
||||
var s string
|
||||
switch v := value.(type) {
|
||||
case string:
|
||||
s = v
|
||||
case []byte:
|
||||
s = string(v)
|
||||
default:
|
||||
return fmt.Errorf("unsupported type for ProcessingActivityRegistryDataProtectionImpactAssessment: %T", value)
|
||||
}
|
||||
|
||||
switch s {
|
||||
case "NEEDED":
|
||||
*p = ProcessingActivityRegistryDataProtectionImpactAssessmentNeeded
|
||||
case "NOT_NEEDED":
|
||||
*p = ProcessingActivityRegistryDataProtectionImpactAssessmentNotNeeded
|
||||
default:
|
||||
return fmt.Errorf("invalid ProcessingActivityRegistryDataProtectionImpactAssessment value: %q", s)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p ProcessingActivityRegistryDataProtectionImpactAssessment) Value() (driver.Value, error) {
|
||||
return p.String(), nil
|
||||
}
|
||||
69
pkg/coredata/processing_activity_registry_lawful_basis.go
Normal file
69
pkg/coredata/processing_activity_registry_lawful_basis.go
Normal file
@@ -0,0 +1,69 @@
|
||||
// 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 coredata
|
||||
|
||||
import (
|
||||
"database/sql/driver"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type ProcessingActivityRegistryLawfulBasis string
|
||||
|
||||
const (
|
||||
ProcessingActivityRegistryLawfulBasisLegitimateInterest ProcessingActivityRegistryLawfulBasis = "LEGITIMATE_INTEREST"
|
||||
ProcessingActivityRegistryLawfulBasisConsent ProcessingActivityRegistryLawfulBasis = "CONSENT"
|
||||
ProcessingActivityRegistryLawfulBasisContractualNecessity ProcessingActivityRegistryLawfulBasis = "CONTRACTUAL_NECESSITY"
|
||||
ProcessingActivityRegistryLawfulBasisLegalObligation ProcessingActivityRegistryLawfulBasis = "LEGAL_OBLIGATION"
|
||||
ProcessingActivityRegistryLawfulBasisVitalInterests ProcessingActivityRegistryLawfulBasis = "VITAL_INTERESTS"
|
||||
ProcessingActivityRegistryLawfulBasisPublicTask ProcessingActivityRegistryLawfulBasis = "PUBLIC_TASK"
|
||||
)
|
||||
|
||||
func (p ProcessingActivityRegistryLawfulBasis) String() string {
|
||||
return string(p)
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityRegistryLawfulBasis) Scan(value any) error {
|
||||
var s string
|
||||
switch v := value.(type) {
|
||||
case string:
|
||||
s = v
|
||||
case []byte:
|
||||
s = string(v)
|
||||
default:
|
||||
return fmt.Errorf("unsupported type for ProcessingActivityRegistryLawfulBasis: %T", value)
|
||||
}
|
||||
|
||||
switch s {
|
||||
case "LEGITIMATE_INTEREST":
|
||||
*p = ProcessingActivityRegistryLawfulBasisLegitimateInterest
|
||||
case "CONSENT":
|
||||
*p = ProcessingActivityRegistryLawfulBasisConsent
|
||||
case "CONTRACTUAL_NECESSITY":
|
||||
*p = ProcessingActivityRegistryLawfulBasisContractualNecessity
|
||||
case "LEGAL_OBLIGATION":
|
||||
*p = ProcessingActivityRegistryLawfulBasisLegalObligation
|
||||
case "VITAL_INTERESTS":
|
||||
*p = ProcessingActivityRegistryLawfulBasisVitalInterests
|
||||
case "PUBLIC_TASK":
|
||||
*p = ProcessingActivityRegistryLawfulBasisPublicTask
|
||||
default:
|
||||
return fmt.Errorf("invalid ProcessingActivityRegistryLawfulBasis value: %q", s)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p ProcessingActivityRegistryLawfulBasis) Value() (driver.Value, error) {
|
||||
return p.String(), nil
|
||||
}
|
||||
49
pkg/coredata/processing_activity_registry_order_field.go
Normal file
49
pkg/coredata/processing_activity_registry_order_field.go
Normal file
@@ -0,0 +1,49 @@
|
||||
// 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 coredata
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type ProcessingActivityRegistryOrderField string
|
||||
|
||||
const (
|
||||
ProcessingActivityRegistryOrderFieldCreatedAt ProcessingActivityRegistryOrderField = "CREATED_AT"
|
||||
ProcessingActivityRegistryOrderFieldName ProcessingActivityRegistryOrderField = "NAME"
|
||||
)
|
||||
|
||||
func (p ProcessingActivityRegistryOrderField) Column() string {
|
||||
return string(p)
|
||||
}
|
||||
|
||||
func (p ProcessingActivityRegistryOrderField) String() string {
|
||||
return string(p)
|
||||
}
|
||||
|
||||
func (p ProcessingActivityRegistryOrderField) MarshalText() ([]byte, error) {
|
||||
return []byte(p.String()), nil
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityRegistryOrderField) UnmarshalText(text []byte) error {
|
||||
val := string(text)
|
||||
switch val {
|
||||
case string(ProcessingActivityRegistryOrderFieldCreatedAt),
|
||||
string(ProcessingActivityRegistryOrderFieldName):
|
||||
*p = ProcessingActivityRegistryOrderField(val)
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("invalid ProcessingActivityRegistryOrderField value: %q", val)
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// 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 coredata
|
||||
|
||||
import (
|
||||
"database/sql/driver"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type ProcessingActivityRegistrySpecialOrCriminalData string
|
||||
|
||||
const (
|
||||
ProcessingActivityRegistrySpecialOrCriminalDataYes ProcessingActivityRegistrySpecialOrCriminalData = "YES"
|
||||
ProcessingActivityRegistrySpecialOrCriminalDataNo ProcessingActivityRegistrySpecialOrCriminalData = "NO"
|
||||
ProcessingActivityRegistrySpecialOrCriminalDataPossible ProcessingActivityRegistrySpecialOrCriminalData = "POSSIBLE"
|
||||
)
|
||||
|
||||
func (p ProcessingActivityRegistrySpecialOrCriminalData) String() string {
|
||||
return string(p)
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityRegistrySpecialOrCriminalData) Scan(value any) error {
|
||||
var s string
|
||||
switch v := value.(type) {
|
||||
case string:
|
||||
s = v
|
||||
case []byte:
|
||||
s = string(v)
|
||||
default:
|
||||
return fmt.Errorf("unsupported type for ProcessingActivityRegistrySpecialOrCriminalData: %T", value)
|
||||
}
|
||||
|
||||
switch s {
|
||||
case "YES":
|
||||
*p = ProcessingActivityRegistrySpecialOrCriminalDataYes
|
||||
case "NO":
|
||||
*p = ProcessingActivityRegistrySpecialOrCriminalDataNo
|
||||
case "POSSIBLE":
|
||||
*p = ProcessingActivityRegistrySpecialOrCriminalDataPossible
|
||||
default:
|
||||
return fmt.Errorf("invalid ProcessingActivityRegistrySpecialOrCriminalData value: %q", s)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p ProcessingActivityRegistrySpecialOrCriminalData) Value() (driver.Value, error) {
|
||||
return p.String(), nil
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// 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 coredata
|
||||
|
||||
import (
|
||||
"database/sql/driver"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type ProcessingActivityRegistryTransferImpactAssessment string
|
||||
|
||||
const (
|
||||
ProcessingActivityRegistryTransferImpactAssessmentNeeded ProcessingActivityRegistryTransferImpactAssessment = "NEEDED"
|
||||
ProcessingActivityRegistryTransferImpactAssessmentNotNeeded ProcessingActivityRegistryTransferImpactAssessment = "NOT_NEEDED"
|
||||
)
|
||||
|
||||
func (p ProcessingActivityRegistryTransferImpactAssessment) String() string {
|
||||
return string(p)
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityRegistryTransferImpactAssessment) Scan(value any) error {
|
||||
var s string
|
||||
switch v := value.(type) {
|
||||
case string:
|
||||
s = v
|
||||
case []byte:
|
||||
s = string(v)
|
||||
default:
|
||||
return fmt.Errorf("unsupported type for ProcessingActivityRegistryTransferImpactAssessment: %T", value)
|
||||
}
|
||||
|
||||
switch s {
|
||||
case "NEEDED":
|
||||
*p = ProcessingActivityRegistryTransferImpactAssessmentNeeded
|
||||
case "NOT_NEEDED":
|
||||
*p = ProcessingActivityRegistryTransferImpactAssessmentNotNeeded
|
||||
default:
|
||||
return fmt.Errorf("invalid ProcessingActivityRegistryTransferImpactAssessment value: %q", s)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p ProcessingActivityRegistryTransferImpactAssessment) Value() (driver.Value, error) {
|
||||
return p.String(), nil
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
// 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 coredata
|
||||
|
||||
import (
|
||||
"database/sql/driver"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type ProcessingActivityRegistryTransferSafeguards string
|
||||
|
||||
const (
|
||||
ProcessingActivityRegistryTransferSafeguardsStandardContractualClauses ProcessingActivityRegistryTransferSafeguards = "STANDARD_CONTRACTUAL_CLAUSES"
|
||||
ProcessingActivityRegistryTransferSafeguardsBindingCorporateRules ProcessingActivityRegistryTransferSafeguards = "BINDING_CORPORATE_RULES"
|
||||
ProcessingActivityRegistryTransferSafeguardsAdequacyDecision ProcessingActivityRegistryTransferSafeguards = "ADEQUACY_DECISION"
|
||||
ProcessingActivityRegistryTransferSafeguardsDerogations ProcessingActivityRegistryTransferSafeguards = "DEROGATIONS"
|
||||
ProcessingActivityRegistryTransferSafeguardsCodesOfConduct ProcessingActivityRegistryTransferSafeguards = "CODES_OF_CONDUCT"
|
||||
ProcessingActivityRegistryTransferSafeguardsCertificationMechanisms ProcessingActivityRegistryTransferSafeguards = "CERTIFICATION_MECHANISMS"
|
||||
)
|
||||
|
||||
func (p ProcessingActivityRegistryTransferSafeguards) String() string {
|
||||
return string(p)
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityRegistryTransferSafeguards) Scan(value any) error {
|
||||
var s string
|
||||
switch v := value.(type) {
|
||||
case string:
|
||||
s = v
|
||||
case []byte:
|
||||
s = string(v)
|
||||
default:
|
||||
return fmt.Errorf("unsupported type for ProcessingActivityRegistryTransferSafeguards: %T", value)
|
||||
}
|
||||
|
||||
switch s {
|
||||
case "STANDARD_CONTRACTUAL_CLAUSES":
|
||||
*p = ProcessingActivityRegistryTransferSafeguardsStandardContractualClauses
|
||||
case "BINDING_CORPORATE_RULES":
|
||||
*p = ProcessingActivityRegistryTransferSafeguardsBindingCorporateRules
|
||||
case "ADEQUACY_DECISION":
|
||||
*p = ProcessingActivityRegistryTransferSafeguardsAdequacyDecision
|
||||
case "DEROGATIONS":
|
||||
*p = ProcessingActivityRegistryTransferSafeguardsDerogations
|
||||
case "CODES_OF_CONDUCT":
|
||||
*p = ProcessingActivityRegistryTransferSafeguardsCodesOfConduct
|
||||
case "CERTIFICATION_MECHANISMS":
|
||||
*p = ProcessingActivityRegistryTransferSafeguardsCertificationMechanisms
|
||||
default:
|
||||
return fmt.Errorf("invalid ProcessingActivityRegistryTransferSafeguards value: %q", s)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p ProcessingActivityRegistryTransferSafeguards) Value() (driver.Value, error) {
|
||||
return p.String(), nil
|
||||
}
|
||||
359
pkg/probo/processing_activity_registry_service.go
Normal file
359
pkg/probo/processing_activity_registry_service.go
Normal file
@@ -0,0 +1,359 @@
|
||||
// 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 probo
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/getprobo/probo/pkg/coredata"
|
||||
"github.com/getprobo/probo/pkg/gid"
|
||||
"github.com/getprobo/probo/pkg/page"
|
||||
"go.gearno.de/kit/pg"
|
||||
)
|
||||
|
||||
type ProcessingActivityRegistryService struct {
|
||||
svc *TenantService
|
||||
}
|
||||
|
||||
type (
|
||||
CreateProcessingActivityRegistryRequest struct {
|
||||
OrganizationID gid.GID
|
||||
AuditID gid.GID
|
||||
Name string
|
||||
Purpose *string
|
||||
DataSubjectCategory *string
|
||||
PersonalDataCategory *string
|
||||
SpecialOrCriminalData coredata.ProcessingActivityRegistrySpecialOrCriminalData
|
||||
ConsentEvidenceLink *string
|
||||
LawfulBasis coredata.ProcessingActivityRegistryLawfulBasis
|
||||
Recipients *string
|
||||
Location *string
|
||||
InternationalTransfers bool
|
||||
TransferSafeguards *coredata.ProcessingActivityRegistryTransferSafeguards
|
||||
RetentionPeriod *string
|
||||
SecurityMeasures *string
|
||||
DataProtectionImpactAssessment coredata.ProcessingActivityRegistryDataProtectionImpactAssessment
|
||||
TransferImpactAssessment coredata.ProcessingActivityRegistryTransferImpactAssessment
|
||||
}
|
||||
|
||||
UpdateProcessingActivityRegistryRequest struct {
|
||||
ID gid.GID
|
||||
AuditID *gid.GID
|
||||
Name *string
|
||||
Purpose **string
|
||||
DataSubjectCategory **string
|
||||
PersonalDataCategory **string
|
||||
SpecialOrCriminalData *coredata.ProcessingActivityRegistrySpecialOrCriminalData
|
||||
ConsentEvidenceLink **string
|
||||
LawfulBasis *coredata.ProcessingActivityRegistryLawfulBasis
|
||||
Recipients **string
|
||||
Location **string
|
||||
InternationalTransfers *bool
|
||||
TransferSafeguards **coredata.ProcessingActivityRegistryTransferSafeguards
|
||||
RetentionPeriod **string
|
||||
SecurityMeasures **string
|
||||
DataProtectionImpactAssessment *coredata.ProcessingActivityRegistryDataProtectionImpactAssessment
|
||||
TransferImpactAssessment *coredata.ProcessingActivityRegistryTransferImpactAssessment
|
||||
}
|
||||
)
|
||||
|
||||
func (s ProcessingActivityRegistryService) Get(
|
||||
ctx context.Context,
|
||||
processingActivityRegistryID gid.GID,
|
||||
) (*coredata.ProcessingActivityRegistry, error) {
|
||||
processingActivityRegistry := &coredata.ProcessingActivityRegistry{}
|
||||
|
||||
err := s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
return processingActivityRegistry.LoadByID(ctx, conn, s.svc.scope, processingActivityRegistryID)
|
||||
},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return processingActivityRegistry, nil
|
||||
}
|
||||
|
||||
func (s *ProcessingActivityRegistryService) Create(
|
||||
ctx context.Context,
|
||||
req *CreateProcessingActivityRegistryRequest,
|
||||
) (*coredata.ProcessingActivityRegistry, error) {
|
||||
now := time.Now()
|
||||
|
||||
processingActivityRegistry := &coredata.ProcessingActivityRegistry{
|
||||
ID: gid.New(s.svc.scope.GetTenantID(), coredata.ProcessingActivityRegistryEntityType),
|
||||
OrganizationID: req.OrganizationID,
|
||||
AuditID: req.AuditID,
|
||||
Name: req.Name,
|
||||
Purpose: req.Purpose,
|
||||
DataSubjectCategory: req.DataSubjectCategory,
|
||||
PersonalDataCategory: req.PersonalDataCategory,
|
||||
SpecialOrCriminalData: req.SpecialOrCriminalData,
|
||||
ConsentEvidenceLink: req.ConsentEvidenceLink,
|
||||
LawfulBasis: req.LawfulBasis,
|
||||
Recipients: req.Recipients,
|
||||
Location: req.Location,
|
||||
InternationalTransfers: req.InternationalTransfers,
|
||||
TransferSafeguards: req.TransferSafeguards,
|
||||
RetentionPeriod: req.RetentionPeriod,
|
||||
SecurityMeasures: req.SecurityMeasures,
|
||||
DataProtectionImpactAssessment: req.DataProtectionImpactAssessment,
|
||||
TransferImpactAssessment: req.TransferImpactAssessment,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
}
|
||||
|
||||
err := s.svc.pg.WithTx(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
organization := &coredata.Organization{}
|
||||
if err := organization.LoadByID(ctx, conn, s.svc.scope, req.OrganizationID); err != nil {
|
||||
return fmt.Errorf("cannot load organization: %w", err)
|
||||
}
|
||||
|
||||
audit := &coredata.Audit{}
|
||||
if err := audit.LoadByID(ctx, conn, s.svc.scope, req.AuditID); err != nil {
|
||||
return fmt.Errorf("cannot load audit: %w", err)
|
||||
}
|
||||
|
||||
if err := processingActivityRegistry.Insert(ctx, conn, s.svc.scope); err != nil {
|
||||
return fmt.Errorf("cannot insert processing activity registry: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return processingActivityRegistry, nil
|
||||
}
|
||||
|
||||
func (s *ProcessingActivityRegistryService) Update(
|
||||
ctx context.Context,
|
||||
req *UpdateProcessingActivityRegistryRequest,
|
||||
) (*coredata.ProcessingActivityRegistry, error) {
|
||||
processingActivityRegistry := &coredata.ProcessingActivityRegistry{}
|
||||
|
||||
err := s.svc.pg.WithTx(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
if err := processingActivityRegistry.LoadByID(ctx, conn, s.svc.scope, req.ID); err != nil {
|
||||
return fmt.Errorf("cannot load processing activity registry: %w", err)
|
||||
}
|
||||
|
||||
if req.AuditID != nil {
|
||||
audit := &coredata.Audit{}
|
||||
if err := audit.LoadByID(ctx, conn, s.svc.scope, *req.AuditID); err != nil {
|
||||
return fmt.Errorf("cannot load audit: %w", err)
|
||||
}
|
||||
processingActivityRegistry.AuditID = audit.ID
|
||||
}
|
||||
|
||||
if req.Name != nil {
|
||||
processingActivityRegistry.Name = *req.Name
|
||||
}
|
||||
if req.Purpose != nil {
|
||||
processingActivityRegistry.Purpose = *req.Purpose
|
||||
}
|
||||
if req.DataSubjectCategory != nil {
|
||||
processingActivityRegistry.DataSubjectCategory = *req.DataSubjectCategory
|
||||
}
|
||||
if req.PersonalDataCategory != nil {
|
||||
processingActivityRegistry.PersonalDataCategory = *req.PersonalDataCategory
|
||||
}
|
||||
if req.SpecialOrCriminalData != nil {
|
||||
processingActivityRegistry.SpecialOrCriminalData = *req.SpecialOrCriminalData
|
||||
}
|
||||
if req.ConsentEvidenceLink != nil {
|
||||
processingActivityRegistry.ConsentEvidenceLink = *req.ConsentEvidenceLink
|
||||
}
|
||||
if req.LawfulBasis != nil {
|
||||
processingActivityRegistry.LawfulBasis = *req.LawfulBasis
|
||||
}
|
||||
if req.Recipients != nil {
|
||||
processingActivityRegistry.Recipients = *req.Recipients
|
||||
}
|
||||
if req.Location != nil {
|
||||
processingActivityRegistry.Location = *req.Location
|
||||
}
|
||||
if req.InternationalTransfers != nil {
|
||||
processingActivityRegistry.InternationalTransfers = *req.InternationalTransfers
|
||||
}
|
||||
if req.TransferSafeguards != nil {
|
||||
processingActivityRegistry.TransferSafeguards = *req.TransferSafeguards
|
||||
}
|
||||
if req.RetentionPeriod != nil {
|
||||
processingActivityRegistry.RetentionPeriod = *req.RetentionPeriod
|
||||
}
|
||||
if req.SecurityMeasures != nil {
|
||||
processingActivityRegistry.SecurityMeasures = *req.SecurityMeasures
|
||||
}
|
||||
if req.DataProtectionImpactAssessment != nil {
|
||||
processingActivityRegistry.DataProtectionImpactAssessment = *req.DataProtectionImpactAssessment
|
||||
}
|
||||
if req.TransferImpactAssessment != nil {
|
||||
processingActivityRegistry.TransferImpactAssessment = *req.TransferImpactAssessment
|
||||
}
|
||||
|
||||
processingActivityRegistry.UpdatedAt = time.Now()
|
||||
|
||||
if err := processingActivityRegistry.Update(ctx, conn, s.svc.scope); err != nil {
|
||||
return fmt.Errorf("cannot update processing activity registry: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return processingActivityRegistry, nil
|
||||
}
|
||||
|
||||
func (s ProcessingActivityRegistryService) Delete(
|
||||
ctx context.Context,
|
||||
processingActivityRegistryID gid.GID,
|
||||
) error {
|
||||
processingActivityRegistry := coredata.ProcessingActivityRegistry{ID: processingActivityRegistryID}
|
||||
return s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
err := processingActivityRegistry.Delete(ctx, conn, s.svc.scope)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot delete processing activity registry: %w", err)
|
||||
}
|
||||
return nil
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
func (s ProcessingActivityRegistryService) ListForOrganizationID(
|
||||
ctx context.Context,
|
||||
organizationID gid.GID,
|
||||
cursor *page.Cursor[coredata.ProcessingActivityRegistryOrderField],
|
||||
) (*page.Page[*coredata.ProcessingActivityRegistry, coredata.ProcessingActivityRegistryOrderField], error) {
|
||||
var processingActivityRegistries coredata.ProcessingActivityRegistries
|
||||
|
||||
err := s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
err := processingActivityRegistries.LoadByOrganizationID(ctx, conn, s.svc.scope, organizationID, cursor)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot load processing activity registries: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return page.NewPage(processingActivityRegistries, cursor), nil
|
||||
}
|
||||
|
||||
func (s ProcessingActivityRegistryService) CountForOrganizationID(
|
||||
ctx context.Context,
|
||||
organizationID gid.GID,
|
||||
) (int, error) {
|
||||
var count int
|
||||
|
||||
err := s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) (err error) {
|
||||
processingActivityRegistries := coredata.ProcessingActivityRegistries{}
|
||||
count, err = processingActivityRegistries.CountByOrganizationID(ctx, conn, s.svc.scope, organizationID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot count processing activity registries: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return count, nil
|
||||
}
|
||||
|
||||
func (s ProcessingActivityRegistryService) ListForAuditID(
|
||||
ctx context.Context,
|
||||
auditID gid.GID,
|
||||
cursor *page.Cursor[coredata.ProcessingActivityRegistryOrderField],
|
||||
) (*page.Page[*coredata.ProcessingActivityRegistry, coredata.ProcessingActivityRegistryOrderField], error) {
|
||||
var processingActivityRegistries coredata.ProcessingActivityRegistries
|
||||
|
||||
err := s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) error {
|
||||
audit := &coredata.Audit{}
|
||||
if err := audit.LoadByID(ctx, conn, s.svc.scope, auditID); err != nil {
|
||||
return fmt.Errorf("cannot load audit: %w", err)
|
||||
}
|
||||
|
||||
err := processingActivityRegistries.LoadByAuditID(ctx, conn, s.svc.scope, audit.ID, cursor)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot load processing activity registries: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return page.NewPage(processingActivityRegistries, cursor), nil
|
||||
}
|
||||
|
||||
func (s ProcessingActivityRegistryService) CountForAuditID(
|
||||
ctx context.Context,
|
||||
auditID gid.GID,
|
||||
) (int, error) {
|
||||
var count int
|
||||
|
||||
err := s.svc.pg.WithConn(
|
||||
ctx,
|
||||
func(conn pg.Conn) (err error) {
|
||||
processingActivityRegistries := coredata.ProcessingActivityRegistries{}
|
||||
count, err = processingActivityRegistries.CountByAuditID(ctx, conn, s.svc.scope, auditID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot count processing activity registries: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return count, nil
|
||||
}
|
||||
@@ -86,6 +86,7 @@ type (
|
||||
ComplianceRegistries *ComplianceRegistryService
|
||||
Snapshots *SnapshotService
|
||||
ContinualImprovementRegistries *ContinualImprovementRegistriesService
|
||||
ProcessingActivityRegistries *ProcessingActivityRegistryService
|
||||
}
|
||||
)
|
||||
|
||||
@@ -180,5 +181,6 @@ func (s *Service) WithTenant(tenantID gid.TenantID) *TenantService {
|
||||
tenantService.ComplianceRegistries = &ComplianceRegistryService{svc: tenantService}
|
||||
tenantService.Snapshots = &SnapshotService{svc: tenantService}
|
||||
tenantService.ContinualImprovementRegistries = &ContinualImprovementRegistriesService{svc: tenantService}
|
||||
tenantService.ProcessingActivityRegistries = &ProcessingActivityRegistryService{svc: tenantService}
|
||||
return tenantService
|
||||
}
|
||||
|
||||
@@ -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