@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<bc0fdc02fb8b596386e290ae0cf0b8b8>>
|
* @generated SignedSource<<e7dfc0de7524eaa22ca235ac0b6e3011>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
import { ConcreteRequest } from 'relay-runtime';
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
import { FragmentRefs } from "relay-runtime";
|
import { FragmentRefs } from "relay-runtime";
|
||||||
export type OrderDirection = "ASC" | "DESC";
|
export type OrderDirection = "ASC" | "DESC";
|
||||||
export type PeopleOrderField = "CREATED_AT" | "FULL_NAME";
|
export type PeopleOrderField = "CREATED_AT" | "FULL_NAME" | "KIND";
|
||||||
export type PeopleOrder = {
|
export type PeopleOrder = {
|
||||||
direction: OrderDirection;
|
direction: OrderDirection;
|
||||||
field: PeopleOrderField;
|
field: PeopleOrderField;
|
||||||
|
|||||||
@@ -26,8 +26,13 @@ import { Navigate, Outlet, useNavigate, useParams } from "react-router";
|
|||||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||||
import type { FrameworkGraphNodeQuery } from "/hooks/graph/__generated__/FrameworkGraphNodeQuery.graphql";
|
import type { FrameworkGraphNodeQuery } from "/hooks/graph/__generated__/FrameworkGraphNodeQuery.graphql";
|
||||||
import type { FrameworkDetailPageFragment$key } from "./__generated__/FrameworkDetailPageFragment.graphql";
|
import type { FrameworkDetailPageFragment$key } from "./__generated__/FrameworkDetailPageFragment.graphql";
|
||||||
|
import type {
|
||||||
|
FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation,
|
||||||
|
FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation$data,
|
||||||
|
} from "./__generated__/FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation.graphql";
|
||||||
import { FrameworkFormDialog } from "./dialogs/FrameworkFormDialog";
|
import { FrameworkFormDialog } from "./dialogs/FrameworkFormDialog";
|
||||||
import { FrameworkControlDialog } from "./dialogs/FrameworkControlDialog";
|
import { FrameworkControlDialog } from "./dialogs/FrameworkControlDialog";
|
||||||
|
import { useMutationWithToasts } from "/hooks/useMutationWithToasts";
|
||||||
|
|
||||||
const frameworkDetailFragment = graphql`
|
const frameworkDetailFragment = graphql`
|
||||||
fragment FrameworkDetailPageFragment on Framework {
|
fragment FrameworkDetailPageFragment on Framework {
|
||||||
@@ -47,6 +52,18 @@ const frameworkDetailFragment = graphql`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const generateFrameworkStateOfApplicabilityMutation = graphql`
|
||||||
|
mutation FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation(
|
||||||
|
$frameworkId: ID!
|
||||||
|
) {
|
||||||
|
generateFrameworkStateOfApplicability(
|
||||||
|
input: { frameworkId: $frameworkId }
|
||||||
|
) {
|
||||||
|
downloadUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
queryRef: PreloadedQuery<FrameworkGraphNodeQuery>;
|
queryRef: PreloadedQuery<FrameworkGraphNodeQuery>;
|
||||||
};
|
};
|
||||||
@@ -71,6 +88,16 @@ export default function FrameworkDetailPage(props: Props) {
|
|||||||
ConnectionHandler.getConnectionID(organizationId, connectionListKey)!
|
ConnectionHandler.getConnectionID(organizationId, connectionListKey)!
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const [generateFrameworkStateOfApplicability] =
|
||||||
|
useMutationWithToasts<FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation>(
|
||||||
|
generateFrameworkStateOfApplicabilityMutation,
|
||||||
|
{
|
||||||
|
errorMessage: "Failed to generate framework state of applicability",
|
||||||
|
successMessage:
|
||||||
|
"Framework state of applicability generated successfully",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
usePageTitle(`${framework.name} | ${selectedControl?.sectionTitle}`);
|
usePageTitle(`${framework.name} | ${selectedControl?.sectionTitle}`);
|
||||||
const onDelete = () => {
|
const onDelete = () => {
|
||||||
deleteFramework({
|
deleteFramework({
|
||||||
@@ -107,6 +134,29 @@ export default function FrameworkDetailPage(props: Props) {
|
|||||||
</Button>
|
</Button>
|
||||||
</FrameworkFormDialog>
|
</FrameworkFormDialog>
|
||||||
<ActionDropdown variant="secondary">
|
<ActionDropdown variant="secondary">
|
||||||
|
<DropdownItem
|
||||||
|
variant="primary"
|
||||||
|
onClick={() => {
|
||||||
|
generateFrameworkStateOfApplicability({
|
||||||
|
variables: { frameworkId: framework.id },
|
||||||
|
onCompleted: (
|
||||||
|
data: FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation$data
|
||||||
|
) => {
|
||||||
|
if (data.generateFrameworkStateOfApplicability.downloadUrl) {
|
||||||
|
const link = document.createElement("a");
|
||||||
|
link.href =
|
||||||
|
data.generateFrameworkStateOfApplicability.downloadUrl;
|
||||||
|
link.download = `${framework.name}-SOA.pdf`; // You can adjust the filename as needed
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
document.body.removeChild(link);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{__("Download SOA")}
|
||||||
|
</DropdownItem>
|
||||||
<DropdownItem icon={IconTrashCan} variant="danger" onClick={onDelete}>
|
<DropdownItem icon={IconTrashCan} variant="danger" onClick={onDelete}>
|
||||||
{__("Delete")}
|
{__("Delete")}
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
/**
|
||||||
|
* @generated SignedSource<<bcdaed0c84805f387ee7d1de8ece0068>>
|
||||||
|
* @lightSyntaxTransform
|
||||||
|
* @nogrep
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
|
export type FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation$variables = {
|
||||||
|
frameworkId: string;
|
||||||
|
};
|
||||||
|
export type FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation$data = {
|
||||||
|
readonly generateFrameworkStateOfApplicability: {
|
||||||
|
readonly downloadUrl: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export type FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation = {
|
||||||
|
response: FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation$data;
|
||||||
|
variables: FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation$variables;
|
||||||
|
};
|
||||||
|
|
||||||
|
const node: ConcreteRequest = (function(){
|
||||||
|
var v0 = [
|
||||||
|
{
|
||||||
|
"defaultValue": null,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "frameworkId"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
v1 = [
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "frameworkId",
|
||||||
|
"variableName": "frameworkId"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"kind": "ObjectValue",
|
||||||
|
"name": "input"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"concreteType": "GenerateFrameworkStateOfApplicabilityPayload",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "generateFrameworkStateOfApplicability",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "downloadUrl",
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
];
|
||||||
|
return {
|
||||||
|
"fragment": {
|
||||||
|
"argumentDefinitions": (v0/*: any*/),
|
||||||
|
"kind": "Fragment",
|
||||||
|
"metadata": null,
|
||||||
|
"name": "FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation",
|
||||||
|
"selections": (v1/*: any*/),
|
||||||
|
"type": "Mutation",
|
||||||
|
"abstractKey": null
|
||||||
|
},
|
||||||
|
"kind": "Request",
|
||||||
|
"operation": {
|
||||||
|
"argumentDefinitions": (v0/*: any*/),
|
||||||
|
"kind": "Operation",
|
||||||
|
"name": "FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation",
|
||||||
|
"selections": (v1/*: any*/)
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"cacheID": "338cbffe84fb19cdf46c97b739216342",
|
||||||
|
"id": null,
|
||||||
|
"metadata": {},
|
||||||
|
"name": "FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation",
|
||||||
|
"operationKind": "mutation",
|
||||||
|
"text": "mutation FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation(\n $frameworkId: ID!\n) {\n generateFrameworkStateOfApplicability(input: {frameworkId: $frameworkId}) {\n downloadUrl\n }\n}\n"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
|
(node as any).hash = "f5c0a7d2bebedecc3de7d55d52f06cd8";
|
||||||
|
|
||||||
|
export default node;
|
||||||
6
go.mod
6
go.mod
@@ -18,6 +18,7 @@ require (
|
|||||||
github.com/openai/openai-go v1.1.0
|
github.com/openai/openai-go v1.1.0
|
||||||
github.com/prometheus/client_golang v1.22.0
|
github.com/prometheus/client_golang v1.22.0
|
||||||
github.com/vektah/gqlparser/v2 v2.5.27
|
github.com/vektah/gqlparser/v2 v2.5.27
|
||||||
|
github.com/xuri/excelize/v2 v2.9.1
|
||||||
go.gearno.de/crypto/uuid v0.1.0
|
go.gearno.de/crypto/uuid v0.1.0
|
||||||
go.gearno.de/kit v0.0.0-20250623163305-45b4f6905899
|
go.gearno.de/kit v0.0.0-20250623163305-45b4f6905899
|
||||||
go.gearno.de/x/ref v0.0.0-20240502200927-d74926fcb14c
|
go.gearno.de/x/ref v0.0.0-20240502200927-d74926fcb14c
|
||||||
@@ -61,6 +62,8 @@ require (
|
|||||||
github.com/prometheus/client_model v0.6.2 // indirect
|
github.com/prometheus/client_model v0.6.2 // indirect
|
||||||
github.com/prometheus/common v0.64.0 // indirect
|
github.com/prometheus/common v0.64.0 // indirect
|
||||||
github.com/prometheus/procfs v0.16.1 // indirect
|
github.com/prometheus/procfs v0.16.1 // indirect
|
||||||
|
github.com/richardlehane/mscfb v1.0.4 // indirect
|
||||||
|
github.com/richardlehane/msoleps v1.0.4 // indirect
|
||||||
github.com/rivo/uniseg v0.4.7 // indirect
|
github.com/rivo/uniseg v0.4.7 // indirect
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||||
github.com/sosodev/duration v1.3.1 // indirect
|
github.com/sosodev/duration v1.3.1 // indirect
|
||||||
@@ -69,8 +72,11 @@ require (
|
|||||||
github.com/tidwall/match v1.1.1 // indirect
|
github.com/tidwall/match v1.1.1 // indirect
|
||||||
github.com/tidwall/pretty v1.2.1 // indirect
|
github.com/tidwall/pretty v1.2.1 // indirect
|
||||||
github.com/tidwall/sjson v1.2.5 // indirect
|
github.com/tidwall/sjson v1.2.5 // indirect
|
||||||
|
github.com/tiendc/go-deepcopy v1.6.0 // indirect
|
||||||
github.com/urfave/cli/v2 v2.27.6 // indirect
|
github.com/urfave/cli/v2 v2.27.6 // indirect
|
||||||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
|
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
|
||||||
|
github.com/xuri/efp v0.0.1 // indirect
|
||||||
|
github.com/xuri/nfp v0.0.1 // indirect
|
||||||
go.gearno.de/x/panicf v0.1.1 // indirect
|
go.gearno.de/x/panicf v0.1.1 // indirect
|
||||||
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect
|
||||||
|
|||||||
15
go.sum
15
go.sum
@@ -120,6 +120,11 @@ github.com/prometheus/common v0.64.0 h1:pdZeA+g617P7oGv1CzdTzyeShxAGrTBsolKNOLQP
|
|||||||
github.com/prometheus/common v0.64.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8=
|
github.com/prometheus/common v0.64.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8=
|
||||||
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
|
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
|
||||||
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
|
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
|
||||||
|
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
|
||||||
|
github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
|
||||||
|
github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
|
||||||
|
github.com/richardlehane/msoleps v1.0.4 h1:WuESlvhX3gH2IHcd8UqyCuFY5yiq/GR/yqaSM/9/g00=
|
||||||
|
github.com/richardlehane/msoleps v1.0.4/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
|
||||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||||
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||||
@@ -150,12 +155,20 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
|
|||||||
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
|
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
|
||||||
github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
|
github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
|
||||||
github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
|
github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
|
||||||
|
github.com/tiendc/go-deepcopy v1.6.0 h1:0UtfV/imoCwlLxVsyfUd4hNHnB3drXsfle+wzSCA5Wo=
|
||||||
|
github.com/tiendc/go-deepcopy v1.6.0/go.mod h1:toXoeQoUqXOOS/X4sKuiAoSk6elIdqc0pN7MTgOOo2I=
|
||||||
github.com/urfave/cli/v2 v2.27.6 h1:VdRdS98FNhKZ8/Az8B7MTyGQmpIr36O1EHybx/LaZ4g=
|
github.com/urfave/cli/v2 v2.27.6 h1:VdRdS98FNhKZ8/Az8B7MTyGQmpIr36O1EHybx/LaZ4g=
|
||||||
github.com/urfave/cli/v2 v2.27.6/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ=
|
github.com/urfave/cli/v2 v2.27.6/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ=
|
||||||
github.com/vektah/gqlparser/v2 v2.5.27 h1:RHPD3JOplpk5mP5JGX8RKZkt2/Vwj/PZv0HxTdwFp0s=
|
github.com/vektah/gqlparser/v2 v2.5.27 h1:RHPD3JOplpk5mP5JGX8RKZkt2/Vwj/PZv0HxTdwFp0s=
|
||||||
github.com/vektah/gqlparser/v2 v2.5.27/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo=
|
github.com/vektah/gqlparser/v2 v2.5.27/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo=
|
||||||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
|
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
|
||||||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
|
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
|
||||||
|
github.com/xuri/efp v0.0.1 h1:fws5Rv3myXyYni8uwj2qKjVaRP30PdjeYe2Y6FDsCL8=
|
||||||
|
github.com/xuri/efp v0.0.1/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
|
||||||
|
github.com/xuri/excelize/v2 v2.9.1 h1:VdSGk+rraGmgLHGFaGG9/9IWu1nj4ufjJ7uwMDtj8Qw=
|
||||||
|
github.com/xuri/excelize/v2 v2.9.1/go.mod h1:x7L6pKz2dvo9ejrRuD8Lnl98z4JLt0TGAwjhW+EiP8s=
|
||||||
|
github.com/xuri/nfp v0.0.1 h1:MDamSGatIvp8uOmDP8FnmjuQpu90NzdJxo7242ANR9Q=
|
||||||
|
github.com/xuri/nfp v0.0.1/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
|
||||||
go.gearno.de/crypto/uuid v0.1.0 h1:94BYg7GYItJ6yYZ1GJayb3VYhI9/FjxuR1nFaduR4hE=
|
go.gearno.de/crypto/uuid v0.1.0 h1:94BYg7GYItJ6yYZ1GJayb3VYhI9/FjxuR1nFaduR4hE=
|
||||||
go.gearno.de/crypto/uuid v0.1.0/go.mod h1:fnIIvKO9QnsyLO3ZJLJT3r8KZv/p0FOeT5eZKilYWXg=
|
go.gearno.de/crypto/uuid v0.1.0/go.mod h1:fnIIvKO9QnsyLO3ZJLJT3r8KZv/p0FOeT5eZKilYWXg=
|
||||||
go.gearno.de/kit v0.0.0-20250623163305-45b4f6905899 h1:g44W/Fhm5bW7fhMqr874dJKOuHHsRhv6Tr3h6yHLcqY=
|
go.gearno.de/kit v0.0.0-20250623163305-45b4f6905899 h1:g44W/Fhm5bW7fhMqr874dJKOuHHsRhv6Tr3h6yHLcqY=
|
||||||
@@ -186,6 +199,8 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
|||||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||||
golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=
|
golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=
|
||||||
golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
|
golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
|
||||||
|
golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ=
|
||||||
|
golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs=
|
||||||
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
|
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
|
||||||
golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
|
golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
|
||||||
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
|
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -22,6 +22,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"runtime/debug"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -234,7 +235,7 @@ func graphqlHandler(logger *log.Logger, proboSvc *probo.Service, usrmgrSvc *usrm
|
|||||||
srv.Use(tracingExtension{})
|
srv.Use(tracingExtension{})
|
||||||
srv.SetRecoverFunc(func(ctx context.Context, err any) error {
|
srv.SetRecoverFunc(func(ctx context.Context, err any) error {
|
||||||
logger := httpserver.LoggerFromContext(ctx)
|
logger := httpserver.LoggerFromContext(ctx)
|
||||||
logger.Error("resolver panic", log.Any("error", err))
|
logger.Error("resolver panic", log.Any("error", err), log.Any("stack", string(debug.Stack())))
|
||||||
|
|
||||||
return errors.New("internal server error")
|
return errors.New("internal server error")
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1289,6 +1289,9 @@ type Mutation {
|
|||||||
updateFramework(input: UpdateFrameworkInput!): UpdateFrameworkPayload!
|
updateFramework(input: UpdateFrameworkInput!): UpdateFrameworkPayload!
|
||||||
importFramework(input: ImportFrameworkInput!): ImportFrameworkPayload!
|
importFramework(input: ImportFrameworkInput!): ImportFrameworkPayload!
|
||||||
deleteFramework(input: DeleteFrameworkInput!): DeleteFrameworkPayload!
|
deleteFramework(input: DeleteFrameworkInput!): DeleteFrameworkPayload!
|
||||||
|
generateFrameworkStateOfApplicability(
|
||||||
|
input: GenerateFrameworkStateOfApplicabilityInput!
|
||||||
|
): GenerateFrameworkStateOfApplicabilityPayload!
|
||||||
|
|
||||||
# Control mutations
|
# Control mutations
|
||||||
createControl(input: CreateControlInput!): CreateControlPayload!
|
createControl(input: CreateControlInput!): CreateControlPayload!
|
||||||
@@ -1398,6 +1401,14 @@ type Mutation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Input Types
|
# Input Types
|
||||||
|
input GenerateFrameworkStateOfApplicabilityInput {
|
||||||
|
frameworkId: ID!
|
||||||
|
}
|
||||||
|
|
||||||
|
type GenerateFrameworkStateOfApplicabilityPayload {
|
||||||
|
downloadUrl: String!
|
||||||
|
}
|
||||||
|
|
||||||
input CreateOrganizationInput {
|
input CreateOrganizationInput {
|
||||||
name: String!
|
name: String!
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -456,6 +456,10 @@ type ComplexityRoot struct {
|
|||||||
Changelog func(childComplexity int) int
|
Changelog func(childComplexity int) int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GenerateFrameworkStateOfApplicabilityPayload struct {
|
||||||
|
DownloadURL func(childComplexity int) int
|
||||||
|
}
|
||||||
|
|
||||||
ImportFrameworkPayload struct {
|
ImportFrameworkPayload struct {
|
||||||
FrameworkEdge func(childComplexity int) int
|
FrameworkEdge func(childComplexity int) int
|
||||||
}
|
}
|
||||||
@@ -494,69 +498,70 @@ type ComplexityRoot struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Mutation struct {
|
Mutation struct {
|
||||||
AssessVendor func(childComplexity int, input types.AssessVendorInput) int
|
AssessVendor func(childComplexity int, input types.AssessVendorInput) int
|
||||||
AssignTask func(childComplexity int, input types.AssignTaskInput) int
|
AssignTask func(childComplexity int, input types.AssignTaskInput) int
|
||||||
ConfirmEmail func(childComplexity int, input types.ConfirmEmailInput) int
|
ConfirmEmail func(childComplexity int, input types.ConfirmEmailInput) int
|
||||||
CreateAsset func(childComplexity int, input types.CreateAssetInput) int
|
CreateAsset func(childComplexity int, input types.CreateAssetInput) int
|
||||||
CreateControl func(childComplexity int, input types.CreateControlInput) int
|
CreateControl func(childComplexity int, input types.CreateControlInput) int
|
||||||
CreateControlDocumentMapping func(childComplexity int, input types.CreateControlDocumentMappingInput) int
|
CreateControlDocumentMapping func(childComplexity int, input types.CreateControlDocumentMappingInput) int
|
||||||
CreateControlMeasureMapping func(childComplexity int, input types.CreateControlMeasureMappingInput) int
|
CreateControlMeasureMapping func(childComplexity int, input types.CreateControlMeasureMappingInput) int
|
||||||
CreateDatum func(childComplexity int, input types.CreateDatumInput) int
|
CreateDatum func(childComplexity int, input types.CreateDatumInput) int
|
||||||
CreateDocument func(childComplexity int, input types.CreateDocumentInput) int
|
CreateDocument func(childComplexity int, input types.CreateDocumentInput) int
|
||||||
CreateDraftDocumentVersion func(childComplexity int, input types.CreateDraftDocumentVersionInput) int
|
CreateDraftDocumentVersion func(childComplexity int, input types.CreateDraftDocumentVersionInput) int
|
||||||
CreateFramework func(childComplexity int, input types.CreateFrameworkInput) int
|
CreateFramework func(childComplexity int, input types.CreateFrameworkInput) int
|
||||||
CreateMeasure func(childComplexity int, input types.CreateMeasureInput) int
|
CreateMeasure func(childComplexity int, input types.CreateMeasureInput) int
|
||||||
CreateOrganization func(childComplexity int, input types.CreateOrganizationInput) int
|
CreateOrganization func(childComplexity int, input types.CreateOrganizationInput) int
|
||||||
CreatePeople func(childComplexity int, input types.CreatePeopleInput) int
|
CreatePeople func(childComplexity int, input types.CreatePeopleInput) int
|
||||||
CreateRisk func(childComplexity int, input types.CreateRiskInput) int
|
CreateRisk func(childComplexity int, input types.CreateRiskInput) int
|
||||||
CreateRiskDocumentMapping func(childComplexity int, input types.CreateRiskDocumentMappingInput) int
|
CreateRiskDocumentMapping func(childComplexity int, input types.CreateRiskDocumentMappingInput) int
|
||||||
CreateRiskMeasureMapping func(childComplexity int, input types.CreateRiskMeasureMappingInput) int
|
CreateRiskMeasureMapping func(childComplexity int, input types.CreateRiskMeasureMappingInput) int
|
||||||
CreateTask func(childComplexity int, input types.CreateTaskInput) int
|
CreateTask func(childComplexity int, input types.CreateTaskInput) int
|
||||||
CreateVendor func(childComplexity int, input types.CreateVendorInput) int
|
CreateVendor func(childComplexity int, input types.CreateVendorInput) int
|
||||||
CreateVendorRiskAssessment func(childComplexity int, input types.CreateVendorRiskAssessmentInput) int
|
CreateVendorRiskAssessment func(childComplexity int, input types.CreateVendorRiskAssessmentInput) int
|
||||||
DeleteAsset func(childComplexity int, input types.DeleteAssetInput) int
|
DeleteAsset func(childComplexity int, input types.DeleteAssetInput) int
|
||||||
DeleteControl func(childComplexity int, input types.DeleteControlInput) int
|
DeleteControl func(childComplexity int, input types.DeleteControlInput) int
|
||||||
DeleteControlDocumentMapping func(childComplexity int, input types.DeleteControlDocumentMappingInput) int
|
DeleteControlDocumentMapping func(childComplexity int, input types.DeleteControlDocumentMappingInput) int
|
||||||
DeleteControlMeasureMapping func(childComplexity int, input types.DeleteControlMeasureMappingInput) int
|
DeleteControlMeasureMapping func(childComplexity int, input types.DeleteControlMeasureMappingInput) int
|
||||||
DeleteDatum func(childComplexity int, input types.DeleteDatumInput) int
|
DeleteDatum func(childComplexity int, input types.DeleteDatumInput) int
|
||||||
DeleteDocument func(childComplexity int, input types.DeleteDocumentInput) int
|
DeleteDocument func(childComplexity int, input types.DeleteDocumentInput) int
|
||||||
DeleteEvidence func(childComplexity int, input types.DeleteEvidenceInput) int
|
DeleteEvidence func(childComplexity int, input types.DeleteEvidenceInput) int
|
||||||
DeleteFramework func(childComplexity int, input types.DeleteFrameworkInput) int
|
DeleteFramework func(childComplexity int, input types.DeleteFrameworkInput) int
|
||||||
DeleteMeasure func(childComplexity int, input types.DeleteMeasureInput) int
|
DeleteMeasure func(childComplexity int, input types.DeleteMeasureInput) int
|
||||||
DeletePeople func(childComplexity int, input types.DeletePeopleInput) int
|
DeletePeople func(childComplexity int, input types.DeletePeopleInput) int
|
||||||
DeleteRisk func(childComplexity int, input types.DeleteRiskInput) int
|
DeleteRisk func(childComplexity int, input types.DeleteRiskInput) int
|
||||||
DeleteRiskDocumentMapping func(childComplexity int, input types.DeleteRiskDocumentMappingInput) int
|
DeleteRiskDocumentMapping func(childComplexity int, input types.DeleteRiskDocumentMappingInput) int
|
||||||
DeleteRiskMeasureMapping func(childComplexity int, input types.DeleteRiskMeasureMappingInput) int
|
DeleteRiskMeasureMapping func(childComplexity int, input types.DeleteRiskMeasureMappingInput) int
|
||||||
DeleteTask func(childComplexity int, input types.DeleteTaskInput) int
|
DeleteTask func(childComplexity int, input types.DeleteTaskInput) int
|
||||||
DeleteVendor func(childComplexity int, input types.DeleteVendorInput) int
|
DeleteVendor func(childComplexity int, input types.DeleteVendorInput) int
|
||||||
DeleteVendorComplianceReport func(childComplexity int, input types.DeleteVendorComplianceReportInput) int
|
DeleteVendorComplianceReport func(childComplexity int, input types.DeleteVendorComplianceReportInput) int
|
||||||
ExportAudit func(childComplexity int, input types.ExportAuditInput) int
|
ExportAudit func(childComplexity int, input types.ExportAuditInput) int
|
||||||
FulfillEvidence func(childComplexity int, input types.FulfillEvidenceInput) int
|
FulfillEvidence func(childComplexity int, input types.FulfillEvidenceInput) int
|
||||||
GenerateDocumentChangelog func(childComplexity int, input types.GenerateDocumentChangelogInput) int
|
GenerateDocumentChangelog func(childComplexity int, input types.GenerateDocumentChangelogInput) int
|
||||||
ImportFramework func(childComplexity int, input types.ImportFrameworkInput) int
|
GenerateFrameworkStateOfApplicability func(childComplexity int, input types.GenerateFrameworkStateOfApplicabilityInput) int
|
||||||
ImportMeasure func(childComplexity int, input types.ImportMeasureInput) int
|
ImportFramework func(childComplexity int, input types.ImportFrameworkInput) int
|
||||||
InviteUser func(childComplexity int, input types.InviteUserInput) int
|
ImportMeasure func(childComplexity int, input types.ImportMeasureInput) int
|
||||||
PublishDocumentVersion func(childComplexity int, input types.PublishDocumentVersionInput) int
|
InviteUser func(childComplexity int, input types.InviteUserInput) int
|
||||||
RemoveUser func(childComplexity int, input types.RemoveUserInput) int
|
PublishDocumentVersion func(childComplexity int, input types.PublishDocumentVersionInput) int
|
||||||
RequestEvidence func(childComplexity int, input types.RequestEvidenceInput) int
|
RemoveUser func(childComplexity int, input types.RemoveUserInput) int
|
||||||
RequestSignature func(childComplexity int, input types.RequestSignatureInput) int
|
RequestEvidence func(childComplexity int, input types.RequestEvidenceInput) int
|
||||||
SendSigningNotifications func(childComplexity int, input types.SendSigningNotificationsInput) int
|
RequestSignature func(childComplexity int, input types.RequestSignatureInput) int
|
||||||
UnassignTask func(childComplexity int, input types.UnassignTaskInput) int
|
SendSigningNotifications func(childComplexity int, input types.SendSigningNotificationsInput) int
|
||||||
UpdateAsset func(childComplexity int, input types.UpdateAssetInput) int
|
UnassignTask func(childComplexity int, input types.UnassignTaskInput) int
|
||||||
UpdateControl func(childComplexity int, input types.UpdateControlInput) int
|
UpdateAsset func(childComplexity int, input types.UpdateAssetInput) int
|
||||||
UpdateDatum func(childComplexity int, input types.UpdateDatumInput) int
|
UpdateControl func(childComplexity int, input types.UpdateControlInput) int
|
||||||
UpdateDocument func(childComplexity int, input types.UpdateDocumentInput) int
|
UpdateDatum func(childComplexity int, input types.UpdateDatumInput) int
|
||||||
UpdateDocumentVersion func(childComplexity int, input types.UpdateDocumentVersionInput) int
|
UpdateDocument func(childComplexity int, input types.UpdateDocumentInput) int
|
||||||
UpdateFramework func(childComplexity int, input types.UpdateFrameworkInput) int
|
UpdateDocumentVersion func(childComplexity int, input types.UpdateDocumentVersionInput) int
|
||||||
UpdateMeasure func(childComplexity int, input types.UpdateMeasureInput) int
|
UpdateFramework func(childComplexity int, input types.UpdateFrameworkInput) int
|
||||||
UpdateOrganization func(childComplexity int, input types.UpdateOrganizationInput) int
|
UpdateMeasure func(childComplexity int, input types.UpdateMeasureInput) int
|
||||||
UpdatePeople func(childComplexity int, input types.UpdatePeopleInput) int
|
UpdateOrganization func(childComplexity int, input types.UpdateOrganizationInput) int
|
||||||
UpdateRisk func(childComplexity int, input types.UpdateRiskInput) int
|
UpdatePeople func(childComplexity int, input types.UpdatePeopleInput) int
|
||||||
UpdateTask func(childComplexity int, input types.UpdateTaskInput) int
|
UpdateRisk func(childComplexity int, input types.UpdateRiskInput) int
|
||||||
UpdateVendor func(childComplexity int, input types.UpdateVendorInput) int
|
UpdateTask func(childComplexity int, input types.UpdateTaskInput) int
|
||||||
UploadMeasureEvidence func(childComplexity int, input types.UploadMeasureEvidenceInput) int
|
UpdateVendor func(childComplexity int, input types.UpdateVendorInput) int
|
||||||
UploadTaskEvidence func(childComplexity int, input types.UploadTaskEvidenceInput) int
|
UploadMeasureEvidence func(childComplexity int, input types.UploadMeasureEvidenceInput) int
|
||||||
UploadVendorComplianceReport func(childComplexity int, input types.UploadVendorComplianceReportInput) int
|
UploadTaskEvidence func(childComplexity int, input types.UploadTaskEvidenceInput) int
|
||||||
|
UploadVendorComplianceReport func(childComplexity int, input types.UploadVendorComplianceReportInput) int
|
||||||
}
|
}
|
||||||
|
|
||||||
Organization struct {
|
Organization struct {
|
||||||
@@ -974,6 +979,7 @@ type MutationResolver interface {
|
|||||||
UpdateFramework(ctx context.Context, input types.UpdateFrameworkInput) (*types.UpdateFrameworkPayload, error)
|
UpdateFramework(ctx context.Context, input types.UpdateFrameworkInput) (*types.UpdateFrameworkPayload, error)
|
||||||
ImportFramework(ctx context.Context, input types.ImportFrameworkInput) (*types.ImportFrameworkPayload, error)
|
ImportFramework(ctx context.Context, input types.ImportFrameworkInput) (*types.ImportFrameworkPayload, error)
|
||||||
DeleteFramework(ctx context.Context, input types.DeleteFrameworkInput) (*types.DeleteFrameworkPayload, error)
|
DeleteFramework(ctx context.Context, input types.DeleteFrameworkInput) (*types.DeleteFrameworkPayload, error)
|
||||||
|
GenerateFrameworkStateOfApplicability(ctx context.Context, input types.GenerateFrameworkStateOfApplicabilityInput) (*types.GenerateFrameworkStateOfApplicabilityPayload, error)
|
||||||
CreateControl(ctx context.Context, input types.CreateControlInput) (*types.CreateControlPayload, error)
|
CreateControl(ctx context.Context, input types.CreateControlInput) (*types.CreateControlPayload, error)
|
||||||
UpdateControl(ctx context.Context, input types.UpdateControlInput) (*types.UpdateControlPayload, error)
|
UpdateControl(ctx context.Context, input types.UpdateControlInput) (*types.UpdateControlPayload, error)
|
||||||
DeleteControl(ctx context.Context, input types.DeleteControlInput) (*types.DeleteControlPayload, error)
|
DeleteControl(ctx context.Context, input types.DeleteControlInput) (*types.DeleteControlPayload, error)
|
||||||
@@ -2389,6 +2395,13 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin
|
|||||||
|
|
||||||
return e.complexity.GenerateDocumentChangelogPayload.Changelog(childComplexity), true
|
return e.complexity.GenerateDocumentChangelogPayload.Changelog(childComplexity), true
|
||||||
|
|
||||||
|
case "GenerateFrameworkStateOfApplicabilityPayload.downloadUrl":
|
||||||
|
if e.complexity.GenerateFrameworkStateOfApplicabilityPayload.DownloadURL == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.GenerateFrameworkStateOfApplicabilityPayload.DownloadURL(childComplexity), true
|
||||||
|
|
||||||
case "ImportFrameworkPayload.frameworkEdge":
|
case "ImportFrameworkPayload.frameworkEdge":
|
||||||
if e.complexity.ImportFrameworkPayload.FrameworkEdge == nil {
|
if e.complexity.ImportFrameworkPayload.FrameworkEdge == nil {
|
||||||
break
|
break
|
||||||
@@ -3010,6 +3023,18 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin
|
|||||||
|
|
||||||
return e.complexity.Mutation.GenerateDocumentChangelog(childComplexity, args["input"].(types.GenerateDocumentChangelogInput)), true
|
return e.complexity.Mutation.GenerateDocumentChangelog(childComplexity, args["input"].(types.GenerateDocumentChangelogInput)), true
|
||||||
|
|
||||||
|
case "Mutation.generateFrameworkStateOfApplicability":
|
||||||
|
if e.complexity.Mutation.GenerateFrameworkStateOfApplicability == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
args, err := ec.field_Mutation_generateFrameworkStateOfApplicability_args(ctx, rawArgs)
|
||||||
|
if err != nil {
|
||||||
|
return 0, false
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.Mutation.GenerateFrameworkStateOfApplicability(childComplexity, args["input"].(types.GenerateFrameworkStateOfApplicabilityInput)), true
|
||||||
|
|
||||||
case "Mutation.importFramework":
|
case "Mutation.importFramework":
|
||||||
if e.complexity.Mutation.ImportFramework == nil {
|
if e.complexity.Mutation.ImportFramework == nil {
|
||||||
break
|
break
|
||||||
@@ -4695,6 +4720,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
|
|||||||
ec.unmarshalInputFrameworkOrder,
|
ec.unmarshalInputFrameworkOrder,
|
||||||
ec.unmarshalInputFulfillEvidenceInput,
|
ec.unmarshalInputFulfillEvidenceInput,
|
||||||
ec.unmarshalInputGenerateDocumentChangelogInput,
|
ec.unmarshalInputGenerateDocumentChangelogInput,
|
||||||
|
ec.unmarshalInputGenerateFrameworkStateOfApplicabilityInput,
|
||||||
ec.unmarshalInputImportFrameworkInput,
|
ec.unmarshalInputImportFrameworkInput,
|
||||||
ec.unmarshalInputImportMeasureInput,
|
ec.unmarshalInputImportMeasureInput,
|
||||||
ec.unmarshalInputInviteUserInput,
|
ec.unmarshalInputInviteUserInput,
|
||||||
@@ -6118,6 +6144,9 @@ type Mutation {
|
|||||||
updateFramework(input: UpdateFrameworkInput!): UpdateFrameworkPayload!
|
updateFramework(input: UpdateFrameworkInput!): UpdateFrameworkPayload!
|
||||||
importFramework(input: ImportFrameworkInput!): ImportFrameworkPayload!
|
importFramework(input: ImportFrameworkInput!): ImportFrameworkPayload!
|
||||||
deleteFramework(input: DeleteFrameworkInput!): DeleteFrameworkPayload!
|
deleteFramework(input: DeleteFrameworkInput!): DeleteFrameworkPayload!
|
||||||
|
generateFrameworkStateOfApplicability(
|
||||||
|
input: GenerateFrameworkStateOfApplicabilityInput!
|
||||||
|
): GenerateFrameworkStateOfApplicabilityPayload!
|
||||||
|
|
||||||
# Control mutations
|
# Control mutations
|
||||||
createControl(input: CreateControlInput!): CreateControlPayload!
|
createControl(input: CreateControlInput!): CreateControlPayload!
|
||||||
@@ -6227,6 +6256,14 @@ type Mutation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Input Types
|
# Input Types
|
||||||
|
input GenerateFrameworkStateOfApplicabilityInput {
|
||||||
|
frameworkId: ID!
|
||||||
|
}
|
||||||
|
|
||||||
|
type GenerateFrameworkStateOfApplicabilityPayload {
|
||||||
|
downloadUrl: String!
|
||||||
|
}
|
||||||
|
|
||||||
input CreateOrganizationInput {
|
input CreateOrganizationInput {
|
||||||
name: String!
|
name: String!
|
||||||
}
|
}
|
||||||
@@ -9273,6 +9310,29 @@ func (ec *executionContext) field_Mutation_generateDocumentChangelog_argsInput(
|
|||||||
return zeroVal, nil
|
return zeroVal, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) field_Mutation_generateFrameworkStateOfApplicability_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
|
||||||
|
var err error
|
||||||
|
args := map[string]any{}
|
||||||
|
arg0, err := ec.field_Mutation_generateFrameworkStateOfApplicability_argsInput(ctx, rawArgs)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
args["input"] = arg0
|
||||||
|
return args, nil
|
||||||
|
}
|
||||||
|
func (ec *executionContext) field_Mutation_generateFrameworkStateOfApplicability_argsInput(
|
||||||
|
ctx context.Context,
|
||||||
|
rawArgs map[string]any,
|
||||||
|
) (types.GenerateFrameworkStateOfApplicabilityInput, error) {
|
||||||
|
ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
||||||
|
if tmp, ok := rawArgs["input"]; ok {
|
||||||
|
return ec.unmarshalNGenerateFrameworkStateOfApplicabilityInput2githubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐGenerateFrameworkStateOfApplicabilityInput(ctx, tmp)
|
||||||
|
}
|
||||||
|
|
||||||
|
var zeroVal types.GenerateFrameworkStateOfApplicabilityInput
|
||||||
|
return zeroVal, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) field_Mutation_importFramework_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
|
func (ec *executionContext) field_Mutation_importFramework_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
|
||||||
var err error
|
var err error
|
||||||
args := map[string]any{}
|
args := map[string]any{}
|
||||||
@@ -20810,6 +20870,50 @@ func (ec *executionContext) fieldContext_GenerateDocumentChangelogPayload_change
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _GenerateFrameworkStateOfApplicabilityPayload_downloadUrl(ctx context.Context, field graphql.CollectedField, obj *types.GenerateFrameworkStateOfApplicabilityPayload) (ret graphql.Marshaler) {
|
||||||
|
fc, err := ec.fieldContext_GenerateFrameworkStateOfApplicabilityPayload_downloadUrl(ctx, field)
|
||||||
|
if err != nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = graphql.Null
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||||
|
ctx = rctx // use context from middleware stack in children
|
||||||
|
return obj.DownloadURL, nil
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
if resTmp == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, fc) {
|
||||||
|
ec.Errorf(ctx, "must not be null")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
res := resTmp.(string)
|
||||||
|
fc.Result = res
|
||||||
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_GenerateFrameworkStateOfApplicabilityPayload_downloadUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "GenerateFrameworkStateOfApplicabilityPayload",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: false,
|
||||||
|
IsResolver: false,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
return nil, errors.New("field of type String does not have child fields")
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _ImportFrameworkPayload_frameworkEdge(ctx context.Context, field graphql.CollectedField, obj *types.ImportFrameworkPayload) (ret graphql.Marshaler) {
|
func (ec *executionContext) _ImportFrameworkPayload_frameworkEdge(ctx context.Context, field graphql.CollectedField, obj *types.ImportFrameworkPayload) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_ImportFrameworkPayload_frameworkEdge(ctx, field)
|
fc, err := ec.fieldContext_ImportFrameworkPayload_frameworkEdge(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -22659,6 +22763,65 @@ func (ec *executionContext) fieldContext_Mutation_deleteFramework(ctx context.Co
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Mutation_generateFrameworkStateOfApplicability(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||||
|
fc, err := ec.fieldContext_Mutation_generateFrameworkStateOfApplicability(ctx, field)
|
||||||
|
if err != nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = graphql.Null
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||||
|
ctx = rctx // use context from middleware stack in children
|
||||||
|
return ec.resolvers.Mutation().GenerateFrameworkStateOfApplicability(rctx, fc.Args["input"].(types.GenerateFrameworkStateOfApplicabilityInput))
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
if resTmp == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, fc) {
|
||||||
|
ec.Errorf(ctx, "must not be null")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
res := resTmp.(*types.GenerateFrameworkStateOfApplicabilityPayload)
|
||||||
|
fc.Result = res
|
||||||
|
return ec.marshalNGenerateFrameworkStateOfApplicabilityPayload2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐGenerateFrameworkStateOfApplicabilityPayload(ctx, field.Selections, res)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_Mutation_generateFrameworkStateOfApplicability(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "Mutation",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: true,
|
||||||
|
IsResolver: true,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
switch field.Name {
|
||||||
|
case "downloadUrl":
|
||||||
|
return ec.fieldContext_GenerateFrameworkStateOfApplicabilityPayload_downloadUrl(ctx, field)
|
||||||
|
}
|
||||||
|
return nil, fmt.Errorf("no field named %q was found under type GenerateFrameworkStateOfApplicabilityPayload", field.Name)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
err = ec.Recover(ctx, r)
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
if fc.Args, err = ec.field_Mutation_generateFrameworkStateOfApplicability_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return fc, err
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _Mutation_createControl(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
func (ec *executionContext) _Mutation_createControl(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_Mutation_createControl(ctx, field)
|
fc, err := ec.fieldContext_Mutation_createControl(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -38883,6 +39046,33 @@ func (ec *executionContext) unmarshalInputGenerateDocumentChangelogInput(ctx con
|
|||||||
return it, nil
|
return it, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) unmarshalInputGenerateFrameworkStateOfApplicabilityInput(ctx context.Context, obj any) (types.GenerateFrameworkStateOfApplicabilityInput, error) {
|
||||||
|
var it types.GenerateFrameworkStateOfApplicabilityInput
|
||||||
|
asMap := map[string]any{}
|
||||||
|
for k, v := range obj.(map[string]any) {
|
||||||
|
asMap[k] = v
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldsInOrder := [...]string{"frameworkId"}
|
||||||
|
for _, k := range fieldsInOrder {
|
||||||
|
v, ok := asMap[k]
|
||||||
|
if !ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
switch k {
|
||||||
|
case "frameworkId":
|
||||||
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("frameworkId"))
|
||||||
|
data, err := ec.unmarshalNID2githubᚗcomᚋgetproboᚋproboᚋpkgᚋgidᚐGID(ctx, v)
|
||||||
|
if err != nil {
|
||||||
|
return it, err
|
||||||
|
}
|
||||||
|
it.FrameworkID = data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return it, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) unmarshalInputImportFrameworkInput(ctx context.Context, obj any) (types.ImportFrameworkInput, error) {
|
func (ec *executionContext) unmarshalInputImportFrameworkInput(ctx context.Context, obj any) (types.ImportFrameworkInput, error) {
|
||||||
var it types.ImportFrameworkInput
|
var it types.ImportFrameworkInput
|
||||||
asMap := map[string]any{}
|
asMap := map[string]any{}
|
||||||
@@ -44756,6 +44946,45 @@ func (ec *executionContext) _GenerateDocumentChangelogPayload(ctx context.Contex
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var generateFrameworkStateOfApplicabilityPayloadImplementors = []string{"GenerateFrameworkStateOfApplicabilityPayload"}
|
||||||
|
|
||||||
|
func (ec *executionContext) _GenerateFrameworkStateOfApplicabilityPayload(ctx context.Context, sel ast.SelectionSet, obj *types.GenerateFrameworkStateOfApplicabilityPayload) graphql.Marshaler {
|
||||||
|
fields := graphql.CollectFields(ec.OperationContext, sel, generateFrameworkStateOfApplicabilityPayloadImplementors)
|
||||||
|
|
||||||
|
out := graphql.NewFieldSet(fields)
|
||||||
|
deferred := make(map[string]*graphql.FieldSet)
|
||||||
|
for i, field := range fields {
|
||||||
|
switch field.Name {
|
||||||
|
case "__typename":
|
||||||
|
out.Values[i] = graphql.MarshalString("GenerateFrameworkStateOfApplicabilityPayload")
|
||||||
|
case "downloadUrl":
|
||||||
|
out.Values[i] = ec._GenerateFrameworkStateOfApplicabilityPayload_downloadUrl(ctx, field, obj)
|
||||||
|
if out.Values[i] == graphql.Null {
|
||||||
|
out.Invalids++
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
out.Dispatch(ctx)
|
||||||
|
if out.Invalids > 0 {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
|
||||||
|
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
||||||
|
|
||||||
|
for label, dfs := range deferred {
|
||||||
|
ec.processDeferredGroup(graphql.DeferredGroup{
|
||||||
|
Label: label,
|
||||||
|
Path: graphql.GetPath(ctx),
|
||||||
|
FieldSet: dfs,
|
||||||
|
Context: ctx,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
var importFrameworkPayloadImplementors = []string{"ImportFrameworkPayload"}
|
var importFrameworkPayloadImplementors = []string{"ImportFrameworkPayload"}
|
||||||
|
|
||||||
func (ec *executionContext) _ImportFrameworkPayload(ctx context.Context, sel ast.SelectionSet, obj *types.ImportFrameworkPayload) graphql.Marshaler {
|
func (ec *executionContext) _ImportFrameworkPayload(ctx context.Context, sel ast.SelectionSet, obj *types.ImportFrameworkPayload) graphql.Marshaler {
|
||||||
@@ -45334,6 +45563,13 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet)
|
|||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
out.Invalids++
|
out.Invalids++
|
||||||
}
|
}
|
||||||
|
case "generateFrameworkStateOfApplicability":
|
||||||
|
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
|
||||||
|
return ec._Mutation_generateFrameworkStateOfApplicability(ctx, field)
|
||||||
|
})
|
||||||
|
if out.Values[i] == graphql.Null {
|
||||||
|
out.Invalids++
|
||||||
|
}
|
||||||
case "createControl":
|
case "createControl":
|
||||||
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
|
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
|
||||||
return ec._Mutation_createControl(ctx, field)
|
return ec._Mutation_createControl(ctx, field)
|
||||||
@@ -51728,6 +51964,25 @@ func (ec *executionContext) marshalNGenerateDocumentChangelogPayload2ᚖgithub
|
|||||||
return ec._GenerateDocumentChangelogPayload(ctx, sel, v)
|
return ec._GenerateDocumentChangelogPayload(ctx, sel, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) unmarshalNGenerateFrameworkStateOfApplicabilityInput2githubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐGenerateFrameworkStateOfApplicabilityInput(ctx context.Context, v any) (types.GenerateFrameworkStateOfApplicabilityInput, error) {
|
||||||
|
res, err := ec.unmarshalInputGenerateFrameworkStateOfApplicabilityInput(ctx, v)
|
||||||
|
return res, graphql.ErrorOnPath(ctx, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) marshalNGenerateFrameworkStateOfApplicabilityPayload2githubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐGenerateFrameworkStateOfApplicabilityPayload(ctx context.Context, sel ast.SelectionSet, v types.GenerateFrameworkStateOfApplicabilityPayload) graphql.Marshaler {
|
||||||
|
return ec._GenerateFrameworkStateOfApplicabilityPayload(ctx, sel, &v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) marshalNGenerateFrameworkStateOfApplicabilityPayload2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐGenerateFrameworkStateOfApplicabilityPayload(ctx context.Context, sel ast.SelectionSet, v *types.GenerateFrameworkStateOfApplicabilityPayload) graphql.Marshaler {
|
||||||
|
if v == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||||
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
return ec._GenerateFrameworkStateOfApplicabilityPayload(ctx, sel, v)
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) unmarshalNID2githubᚗcomᚋgetproboᚋproboᚋpkgᚋgidᚐGID(ctx context.Context, v any) (gid.GID, error) {
|
func (ec *executionContext) unmarshalNID2githubᚗcomᚋgetproboᚋproboᚋpkgᚋgidᚐGID(ctx context.Context, v any) (gid.GID, error) {
|
||||||
res, err := types.UnmarshalGIDScalar(v)
|
res, err := types.UnmarshalGIDScalar(v)
|
||||||
return res, graphql.ErrorOnPath(ctx, err)
|
return res, graphql.ErrorOnPath(ctx, err)
|
||||||
|
|||||||
@@ -654,6 +654,14 @@ type GenerateDocumentChangelogPayload struct {
|
|||||||
Changelog string `json:"changelog"`
|
Changelog string `json:"changelog"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GenerateFrameworkStateOfApplicabilityInput struct {
|
||||||
|
FrameworkID gid.GID `json:"frameworkId"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type GenerateFrameworkStateOfApplicabilityPayload struct {
|
||||||
|
DownloadURL string `json:"downloadUrl"`
|
||||||
|
}
|
||||||
|
|
||||||
type ImportFrameworkInput struct {
|
type ImportFrameworkInput struct {
|
||||||
OrganizationID gid.GID `json:"organizationId"`
|
OrganizationID gid.GID `json:"organizationId"`
|
||||||
File graphql.Upload `json:"file"`
|
File graphql.Upload `json:"file"`
|
||||||
|
|||||||
@@ -1178,6 +1178,20 @@ func (r *mutationResolver) DeleteFramework(ctx context.Context, input types.Dele
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GenerateFrameworkStateOfApplicability is the resolver for the generateFrameworkStateOfApplicability field.
|
||||||
|
func (r *mutationResolver) GenerateFrameworkStateOfApplicability(ctx context.Context, input types.GenerateFrameworkStateOfApplicabilityInput) (*types.GenerateFrameworkStateOfApplicabilityPayload, error) {
|
||||||
|
prb := r.ProboService(ctx, input.FrameworkID.TenantID())
|
||||||
|
|
||||||
|
soa, err := prb.Frameworks.StateOfApplicability(ctx, input.FrameworkID)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("cannot generate framework SOA: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return &types.GenerateFrameworkStateOfApplicabilityPayload{
|
||||||
|
DownloadURL: soa,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
// CreateControl is the resolver for the createControl field.
|
// CreateControl is the resolver for the createControl field.
|
||||||
func (r *mutationResolver) CreateControl(ctx context.Context, input types.CreateControlInput) (*types.CreateControlPayload, error) {
|
func (r *mutationResolver) CreateControl(ctx context.Context, input types.CreateControlInput) (*types.CreateControlPayload, error) {
|
||||||
prb := r.ProboService(ctx, input.FrameworkID.TenantID())
|
prb := r.ProboService(ctx, input.FrameworkID.TenantID())
|
||||||
|
|||||||
Reference in New Issue
Block a user