diff --git a/apps/trust/src/components/AuditRow.tsx b/apps/trust/src/components/AuditRow.tsx index 5829ef303..33e479256 100644 --- a/apps/trust/src/components/AuditRow.tsx +++ b/apps/trust/src/components/AuditRow.tsx @@ -6,7 +6,6 @@ import { Button, Dialog, DialogContent, - FrameworkLogo, IconArrowInbox, IconLock, IconMedal, @@ -14,11 +13,10 @@ import { Table, } from "@probo/ui"; import { useTranslate } from "@probo/i18n"; -import { useIsAuthenticated } from "/hooks/useIsAuthenticated"; import type { AuditRowDownloadMutation } from "./__generated__/AuditRowDownloadMutation.graphql"; import { useMutationWithToasts } from "/hooks/useMutationWithToast"; import { downloadFile } from "@probo/helpers"; -import type { PropsWithChildren } from "react"; +import { type PropsWithChildren, useState } from "react"; import { useLocation } from "react-router"; import { RequestAccessDialog } from "/components/RequestAccessDialog.tsx"; @@ -35,6 +33,8 @@ const auditRowFragment = graphql` report { id filename + isUserAuthorized + hasUserRequestedAccess } framework { id @@ -46,7 +46,6 @@ const auditRowFragment = graphql` export function AuditRow(props: { audit: AuditRowFragment$key }) { const audit = useFragment(auditRowFragment, props.audit); const { __ } = useTranslate(); - const isAuthenticated = useIsAuthenticated(); const [commitDownload, downloading] = useMutationWithToasts(downloadMutation); const handleDownload = () => { @@ -64,35 +63,42 @@ export function AuditRow(props: { audit: AuditRowFragment$key }) { }, }); }; + + const [hasRequested, setHasRequested] = useState( + audit.report?.hasUserRequestedAccess, + ); return (
- + {audit.framework.name}
- {audit.report ? ( - isAuthenticated ? ( + {audit.report && audit.report.isUserAuthorized && ( + + )} + {audit.report && !audit.report.isUserAuthorized && ( + setHasRequested(true)} + > - ) : ( - - - - ) - ) : null} + + )}
); } @@ -108,41 +114,28 @@ export function AuditRowAvatar(props: { audit: AuditRowFragment$key }) { const audit = useFragment(auditRowFragment, props.audit); return ( <> - - - - + @@ -152,7 +145,7 @@ export function AuditRowAvatar(props: { audit: AuditRowFragment$key }) { } function AuditDialog( - props: PropsWithChildren<{ audit: AuditRowFragment$key }>, + props: PropsWithChildren<{ audit: AuditRowFragment$key; logo?: string }>, ) { const audit = useFragment(auditRowFragment, props.audit); const location = useLocation(); @@ -174,11 +167,13 @@ function AuditDialog( title={} > - + {props.logo && ( + {audit.framework.name} + )}

{audit.framework.name}

Framework description

diff --git a/apps/trust/src/components/DocumentRow.tsx b/apps/trust/src/components/DocumentRow.tsx index f45a2fc9d..210729865 100644 --- a/apps/trust/src/components/DocumentRow.tsx +++ b/apps/trust/src/components/DocumentRow.tsx @@ -9,11 +9,11 @@ import { Spinner, } from "@probo/ui"; import { useTranslate } from "@probo/i18n"; -import { useIsAuthenticated } from "/hooks/useIsAuthenticated"; import type { DocumentRowDownloadMutation } from "./__generated__/DocumentRowDownloadMutation.graphql"; import { useMutationWithToasts } from "/hooks/useMutationWithToast"; import { downloadFile } from "@probo/helpers"; import { RequestAccessDialog } from "/components/RequestAccessDialog.tsx"; +import { useState } from "react"; const downloadMutation = graphql` mutation DocumentRowDownloadMutation($input: ExportDocumentPDFInput!) { @@ -27,13 +27,14 @@ const documentRowFragment = graphql` fragment DocumentRowFragment on Document { id title + isUserAuthorized + hasUserRequestedAccess } `; export function DocumentRow(props: { document: DocumentRowFragment$key }) { const document = useFragment(documentRowFragment, props.document); const { __ } = useTranslate(); - const isAuthenticated = useIsAuthenticated(); const [commitDownload, downloading] = useMutationWithToasts(downloadMutation); const handleDownload = () => { @@ -48,13 +49,16 @@ export function DocumentRow(props: { document: DocumentRowFragment$key }) { }, }); }; + const [hasRequested, setHasRequested] = useState( + document.hasUserRequestedAccess, + ); return (
- + {document.title}
- {isAuthenticated ? ( + {document.isUserAuthorized ? ( )} diff --git a/apps/trust/src/components/OrganizationSidebar.tsx b/apps/trust/src/components/OrganizationSidebar.tsx index e059a9c87..510f37e62 100644 --- a/apps/trust/src/components/OrganizationSidebar.tsx +++ b/apps/trust/src/components/OrganizationSidebar.tsx @@ -71,24 +71,28 @@ export function OrganizationSidebar({
{/* Certifications */} -
-

- - {__("Certifications")} -

-
- {trustCenter.audits.edges.map((audit) => ( - - ))} -
-
+ {trustCenter.audits.edges.length > 0 && ( + <> +
+

+ + {__("Certifications")} +

+
+ {trustCenter.audits.edges.map((audit) => ( + + ))} +
+
-
+
+ + )} {/* Actions */} {!isAuthenticated && ( diff --git a/apps/trust/src/components/RequestAccessDialog.tsx b/apps/trust/src/components/RequestAccessDialog.tsx index 4fcd58d2a..76c226a94 100644 --- a/apps/trust/src/components/RequestAccessDialog.tsx +++ b/apps/trust/src/components/RequestAccessDialog.tsx @@ -15,27 +15,26 @@ import { useFormWithSchema } from "/hooks/useFormWithSchema"; import { graphql } from "relay-runtime"; import { useMutationWithToasts } from "/hooks/useMutationWithToast"; import { useTrustCenter } from "/hooks/useTrustCenter"; +import { type FormEventHandler, type PropsWithChildren } from "react"; +import { useIsAuthenticated } from "/hooks/useIsAuthenticated.ts"; -type Props = { - children: React.ReactNode; -}; +type Props = PropsWithChildren<{ + documentId?: string; + reportId?: string; + onSuccess?: () => void; +}>; const schema = z.object({ name: z.string(), email: z.string().email(), }); -const requestAccessMutation = graphql` - mutation RequestAccessDialogMutation($input: RequestAllAccessesInput!) { - requestAllAccesses(input: $input) { - trustCenterAccess { - id - } - } - } -`; - -export function RequestAccessDialog({ children }: Props) { +export function RequestAccessDialog({ + children, + documentId, + reportId, + onSuccess, +}: Props) { const trustCenter = useTrustCenter(); const { toast } = useToast(); const { __ } = useTranslate(); @@ -45,32 +44,37 @@ export function RequestAccessDialog({ children }: Props) { email: "", }, }); + const isAuthenticated = useIsAuthenticated(); const dialogRef = useDialogRef(); - const [commitRequestAccess, isRequestingAccess] = useMutationWithToasts( - requestAccessMutation, - { - onSuccess: () => { + const [commitMutation, isMutating] = useMutation({ documentId, reportId }); + + const submitCallback = (data: z.infer | null) => { + commitMutation(data) + .then(() => { + onSuccess?.(); toast({ title: __("Success"), description: __("Access request submitted successfully"), variant: "success", }); dialogRef.current?.close(); - }, - }, - ); + }) + .catch((error) => { + console.error(error); + toast({ + title: __("Error"), + description: __("Cannot request access"), + variant: "error", + }); + }); + }; - const onSubmit = handleSubmit((data) => { - commitRequestAccess({ - variables: { - input: { - trustCenterId: trustCenter.id, - name: data.name, - email: data.email, - }, - }, - }); - }); + const onSubmit: FormEventHandler = isAuthenticated + ? (e) => { + e.preventDefault(); + submitCallback(null); + } + : handleSubmit(submitCallback); return ( -
- - -
+ {!isAuthenticated && ( +
+ + +
+ )} - @@ -114,3 +120,103 @@ export function RequestAccessDialog({ children }: Props) {
); } + +const requestAccessMutation = graphql` + mutation RequestAccessDialogMutation($input: RequestAllAccessesInput!) { + requestAllAccesses(input: $input) { + trustCenterAccess { + id + } + } + } +`; + +const requestDocumentAccessMutation = graphql` + mutation RequestAccessDialogDocumentMutation( + $input: RequestDocumentAccessInput! + ) { + requestDocumentAccess(input: $input) { + trustCenterAccess { + id + } + } + } +`; + +const requestReportAccessMutation = graphql` + mutation RequestAccessDialogReportMutation( + $input: RequestReportAccessInput! + ) { + requestReportAccess(input: $input) { + trustCenterAccess { + id + } + } + } +`; + +/** + * Use the correct mutation using the shape + */ +function useMutation({ + documentId, + reportId, +}: Pick): [ + (data: z.infer | null) => Promise, + boolean, +] { + const trustCenter = useTrustCenter(); + const [commitRequestAccess, isRequestingAccess] = useMutationWithToasts( + requestAccessMutation, + ); + const [commitRequestDocumentAccess, isRequestingDocumentAccess] = + useMutationWithToasts(requestDocumentAccessMutation); + const [commitRequestReportAccess, isRequestingReportAccess] = + useMutationWithToasts(requestReportAccessMutation); + + if (reportId) { + return [ + (data) => { + return commitRequestReportAccess({ + variables: { + input: { + trustCenterId: trustCenter.id, + reportId: reportId, + ...data, + }, + }, + }); + }, + isRequestingReportAccess, + ]; + } else if (documentId) { + return [ + (data) => { + return commitRequestDocumentAccess({ + variables: { + input: { + trustCenterId: trustCenter.id, + documentId: documentId, + ...data, + }, + }, + }); + }, + isRequestingDocumentAccess, + ]; + } else { + return [ + (data) => { + return commitRequestAccess({ + variables: { + input: { + trustCenterId: trustCenter.id, + ...data, + }, + }, + }); + }, + isRequestingAccess, + ]; + } +} diff --git a/apps/trust/src/components/__generated__/AuditRowFragment.graphql.ts b/apps/trust/src/components/__generated__/AuditRowFragment.graphql.ts index c437da8c2..869cb53ed 100644 --- a/apps/trust/src/components/__generated__/AuditRowFragment.graphql.ts +++ b/apps/trust/src/components/__generated__/AuditRowFragment.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<5ad8bcd5ca3b7635248d13cef0a24edf>> + * @generated SignedSource<<2f595b4efd5e7b13207d433830a64c98>> * @lightSyntaxTransform * @nogrep */ @@ -17,7 +17,9 @@ export type AuditRowFragment$data = { }; readonly report: { readonly filename: string; + readonly hasUserRequestedAccess: boolean; readonly id: string; + readonly isUserAuthorized: boolean; } | null | undefined; readonly " $fragmentType": "AuditRowFragment"; }; @@ -55,6 +57,20 @@ return { "kind": "ScalarField", "name": "filename", "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "isUserAuthorized", + "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "hasUserRequestedAccess", + "storageKey": null } ], "storageKey": null @@ -84,6 +100,6 @@ return { }; })(); -(node as any).hash = "255e447eb5ac9b4cb889e7a8f0463902"; +(node as any).hash = "3aabed006b65dc913c81a63f0f6f4523"; export default node; diff --git a/apps/trust/src/components/__generated__/DocumentRowFragment.graphql.ts b/apps/trust/src/components/__generated__/DocumentRowFragment.graphql.ts index b534b430c..add4734e1 100644 --- a/apps/trust/src/components/__generated__/DocumentRowFragment.graphql.ts +++ b/apps/trust/src/components/__generated__/DocumentRowFragment.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<266bdec238fe7397f3cff10dc7da8fc6>> + * @generated SignedSource<<396f9d87342c909ca373f60a1e6f7ff3>> * @lightSyntaxTransform * @nogrep */ @@ -11,7 +11,9 @@ import { ReaderFragment } from 'relay-runtime'; import { FragmentRefs } from "relay-runtime"; export type DocumentRowFragment$data = { + readonly hasUserRequestedAccess: boolean; readonly id: string; + readonly isUserAuthorized: boolean; readonly title: string; readonly " $fragmentType": "DocumentRowFragment"; }; @@ -39,12 +41,26 @@ const node: ReaderFragment = { "kind": "ScalarField", "name": "title", "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "isUserAuthorized", + "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "hasUserRequestedAccess", + "storageKey": null } ], "type": "Document", "abstractKey": null }; -(node as any).hash = "437d68812bcc68724d2e347fea22b5e3"; +(node as any).hash = "1b0f0b9cae621268d72b0fd0646aa672"; export default node; diff --git a/apps/trust/src/components/__generated__/RequestAccessDialogDocumentMutation.graphql.ts b/apps/trust/src/components/__generated__/RequestAccessDialogDocumentMutation.graphql.ts new file mode 100644 index 000000000..3912154d9 --- /dev/null +++ b/apps/trust/src/components/__generated__/RequestAccessDialogDocumentMutation.graphql.ts @@ -0,0 +1,108 @@ +/** + * @generated SignedSource<<446953c5eafa3b9a465d245da3bea1af>> + * @lightSyntaxTransform + * @nogrep + */ + +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck + +import { ConcreteRequest } from 'relay-runtime'; +export type RequestDocumentAccessInput = { + documentId: string; + email?: string | null | undefined; + name?: string | null | undefined; + trustCenterId: string; +}; +export type RequestAccessDialogDocumentMutation$variables = { + input: RequestDocumentAccessInput; +}; +export type RequestAccessDialogDocumentMutation$data = { + readonly requestDocumentAccess: { + readonly trustCenterAccess: { + readonly id: string; + }; + }; +}; +export type RequestAccessDialogDocumentMutation = { + response: RequestAccessDialogDocumentMutation$data; + variables: RequestAccessDialogDocumentMutation$variables; +}; + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "defaultValue": null, + "kind": "LocalArgument", + "name": "input" + } +], +v1 = [ + { + "alias": null, + "args": [ + { + "kind": "Variable", + "name": "input", + "variableName": "input" + } + ], + "concreteType": "RequestAccessesPayload", + "kind": "LinkedField", + "name": "requestDocumentAccess", + "plural": false, + "selections": [ + { + "alias": null, + "args": null, + "concreteType": "TrustCenterAccess", + "kind": "LinkedField", + "name": "trustCenterAccess", + "plural": false, + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + } + ], + "storageKey": null + } + ], + "storageKey": null + } +]; +return { + "fragment": { + "argumentDefinitions": (v0/*: any*/), + "kind": "Fragment", + "metadata": null, + "name": "RequestAccessDialogDocumentMutation", + "selections": (v1/*: any*/), + "type": "Mutation", + "abstractKey": null + }, + "kind": "Request", + "operation": { + "argumentDefinitions": (v0/*: any*/), + "kind": "Operation", + "name": "RequestAccessDialogDocumentMutation", + "selections": (v1/*: any*/) + }, + "params": { + "cacheID": "2ed1f0d19711a9f22acdc6251dbfca8f", + "id": null, + "metadata": {}, + "name": "RequestAccessDialogDocumentMutation", + "operationKind": "mutation", + "text": "mutation RequestAccessDialogDocumentMutation(\n $input: RequestDocumentAccessInput!\n) {\n requestDocumentAccess(input: $input) {\n trustCenterAccess {\n id\n }\n }\n}\n" + } +}; +})(); + +(node as any).hash = "c3ebabe2f3fac32e5035cc7acfd54799"; + +export default node; diff --git a/apps/trust/src/components/__generated__/RequestAccessDialogReportMutation.graphql.ts b/apps/trust/src/components/__generated__/RequestAccessDialogReportMutation.graphql.ts new file mode 100644 index 000000000..2b6c613af --- /dev/null +++ b/apps/trust/src/components/__generated__/RequestAccessDialogReportMutation.graphql.ts @@ -0,0 +1,108 @@ +/** + * @generated SignedSource<<74bc40a8998c962930b3f0b63dc6acd9>> + * @lightSyntaxTransform + * @nogrep + */ + +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck + +import { ConcreteRequest } from 'relay-runtime'; +export type RequestReportAccessInput = { + email?: string | null | undefined; + name?: string | null | undefined; + reportId: string; + trustCenterId: string; +}; +export type RequestAccessDialogReportMutation$variables = { + input: RequestReportAccessInput; +}; +export type RequestAccessDialogReportMutation$data = { + readonly requestReportAccess: { + readonly trustCenterAccess: { + readonly id: string; + }; + }; +}; +export type RequestAccessDialogReportMutation = { + response: RequestAccessDialogReportMutation$data; + variables: RequestAccessDialogReportMutation$variables; +}; + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "defaultValue": null, + "kind": "LocalArgument", + "name": "input" + } +], +v1 = [ + { + "alias": null, + "args": [ + { + "kind": "Variable", + "name": "input", + "variableName": "input" + } + ], + "concreteType": "RequestAccessesPayload", + "kind": "LinkedField", + "name": "requestReportAccess", + "plural": false, + "selections": [ + { + "alias": null, + "args": null, + "concreteType": "TrustCenterAccess", + "kind": "LinkedField", + "name": "trustCenterAccess", + "plural": false, + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + } + ], + "storageKey": null + } + ], + "storageKey": null + } +]; +return { + "fragment": { + "argumentDefinitions": (v0/*: any*/), + "kind": "Fragment", + "metadata": null, + "name": "RequestAccessDialogReportMutation", + "selections": (v1/*: any*/), + "type": "Mutation", + "abstractKey": null + }, + "kind": "Request", + "operation": { + "argumentDefinitions": (v0/*: any*/), + "kind": "Operation", + "name": "RequestAccessDialogReportMutation", + "selections": (v1/*: any*/) + }, + "params": { + "cacheID": "da69c3e370244e4a9a7793b06b2abdd5", + "id": null, + "metadata": {}, + "name": "RequestAccessDialogReportMutation", + "operationKind": "mutation", + "text": "mutation RequestAccessDialogReportMutation(\n $input: RequestReportAccessInput!\n) {\n requestReportAccess(input: $input) {\n trustCenterAccess {\n id\n }\n }\n}\n" + } +}; +})(); + +(node as any).hash = "3ef2b6424ba751f15f91ad7f4bd28fc5"; + +export default node; diff --git a/apps/trust/src/pages/OverviewPage.tsx b/apps/trust/src/pages/OverviewPage.tsx index 44c7ac5c1..86717a4f6 100644 --- a/apps/trust/src/pages/OverviewPage.tsx +++ b/apps/trust/src/pages/OverviewPage.tsx @@ -1,6 +1,9 @@ import { useFragment } from "react-relay"; import { graphql } from "relay-runtime"; -import type { OverviewPageFragment$key } from "./__generated__/OverviewPageFragment.graphql"; +import type { + OverviewPageFragment$data, + OverviewPageFragment$key, +} from "./__generated__/OverviewPageFragment.graphql"; import { Link, useOutletContext } from "react-router"; import { groupBy, objectEntries, sprintf } from "@probo/helpers"; import type { TrustGraphQuery$data } from "/queries/__generated__/TrustGraphQuery.graphql"; @@ -51,26 +54,64 @@ export function OverviewPage() { trustCenter: OverviewPageFragment$key & TrustGraphQuery$data["trustCenterBySlug"]; }>(); - const { __ } = useTranslate(); const fragment = useFragment(overviewFragment, trustCenter); - const documentsPerType = groupBy( - fragment.documents.edges.map((edge) => edge.node), - (node) => documentTypeLabel(node.documentType, __), - ); return (
edge.node)} /> + + +
+ ); +} + +function Documents({ + documents, + audits, + url, +}: { + documents: OverviewPageFragment$data["documents"]["edges"]; + audits: NonNullable< + TrustGraphQuery$data["trustCenterBySlug"] + >["audits"]["edges"]; + url: string; +}) { + const { __ } = useTranslate(); + const documentsPerType = groupBy( + documents.map((edge) => edge.node), + (node) => documentTypeLabel(node.documentType, __), + ); + const hasAudits = audits.length > 0; + const hasDocuments = hasAudits || documents.length > 0; + + if (!hasDocuments) { + return null; + } + + return ( +

{__("Documents")}

{__("Security and compliance documentation:")}

- {__("Certifications")} - {trustCenter.audits.edges.map((edge) => ( - - ))} + {audits.length > 0 && ( + <> + {__("Certifications")} + {audits.map((audit) => ( + + ))} + + )} {objectEntries(documentsPerType).map(([label, documents]) => ( {label} @@ -79,30 +120,43 @@ export function OverviewPage() { ))} ))} - + {__("See all documents")} +
+ ); +} +function Subprocessors({ + vendors, + url, + organizationName, +}: { + vendors: OverviewPageFragment$data["vendors"]["edges"]; + url: string; + organizationName: string; +}) { + const { __ } = useTranslate(); + if (vendors.length === 0) { + return null; + } + + return ( +

{__("Subprocessors")}

{sprintf( __("Third-party subprocessors %s work with:"), - trustCenter.organization.name, + organizationName, )}

- {fragment.vendors.edges.map((edge) => ( - + {vendors.map((vendor) => ( + ))} - + {__("See all subprocessors")} diff --git a/apps/trust/src/queries/__generated__/TrustGraphDocumentsQuery.graphql.ts b/apps/trust/src/queries/__generated__/TrustGraphDocumentsQuery.graphql.ts index f5d6f96fd..4436164ae 100644 --- a/apps/trust/src/queries/__generated__/TrustGraphDocumentsQuery.graphql.ts +++ b/apps/trust/src/queries/__generated__/TrustGraphDocumentsQuery.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<55d256287ee091b57754d2d76080ad25>> + * @generated SignedSource<> * @lightSyntaxTransform * @nogrep */ @@ -214,6 +214,20 @@ return { "kind": "ScalarField", "name": "title", "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "isUserAuthorized", + "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "hasUserRequestedAccess", + "storageKey": null } ], "storageKey": null @@ -230,12 +244,12 @@ return { ] }, "params": { - "cacheID": "71e1dc4102d19cdd2fb8d0ff60a391ca", + "cacheID": "8a333723782b24714393e89240704cf2", "id": null, "metadata": {}, "name": "TrustGraphDocumentsQuery", "operationKind": "query", - "text": "query TrustGraphDocumentsQuery(\n $slug: String!\n) {\n trustCenterBySlug(slug: $slug) {\n id\n organization {\n name\n id\n }\n documents(first: 50) {\n edges {\n node {\n id\n documentType\n ...DocumentRowFragment\n }\n }\n }\n }\n}\n\nfragment DocumentRowFragment on Document {\n id\n title\n}\n" + "text": "query TrustGraphDocumentsQuery(\n $slug: String!\n) {\n trustCenterBySlug(slug: $slug) {\n id\n organization {\n name\n id\n }\n documents(first: 50) {\n edges {\n node {\n id\n documentType\n ...DocumentRowFragment\n }\n }\n }\n }\n}\n\nfragment DocumentRowFragment on Document {\n id\n title\n isUserAuthorized\n hasUserRequestedAccess\n}\n" } }; })(); diff --git a/apps/trust/src/queries/__generated__/TrustGraphQuery.graphql.ts b/apps/trust/src/queries/__generated__/TrustGraphQuery.graphql.ts index 1851f4878..a902edfe8 100644 --- a/apps/trust/src/queries/__generated__/TrustGraphQuery.graphql.ts +++ b/apps/trust/src/queries/__generated__/TrustGraphQuery.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<25d09fc2d93d9fbbcde08bd8a8d48214>> + * @generated SignedSource<> * @lightSyntaxTransform * @nogrep */ @@ -150,7 +150,21 @@ v14 = [ "name": "first", "value": 50 } -]; +], +v15 = { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "isUserAuthorized", + "storageKey": null +}, +v16 = { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "hasUserRequestedAccess", + "storageKey": null +}; return { "fragment": { "argumentDefinitions": (v0/*: any*/), @@ -422,6 +436,8 @@ return { "name": "title", "storageKey": null }, + (v15/*: any*/), + (v16/*: any*/), { "alias": null, "args": null, @@ -478,7 +494,9 @@ return { "kind": "ScalarField", "name": "filename", "storageKey": null - } + }, + (v15/*: any*/), + (v16/*: any*/) ], "storageKey": null }, @@ -510,12 +528,12 @@ return { ] }, "params": { - "cacheID": "3303b20452c558a107492263e7fc0c61", + "cacheID": "512205bc2cccff46b097cabaab4ec338", "id": null, "metadata": {}, "name": "TrustGraphQuery", "operationKind": "query", - "text": "query TrustGraphQuery(\n $slug: String!\n) {\n trustCenterBySlug(slug: $slug) {\n id\n slug\n isUserAuthenticated\n hasAcceptedNonDisclosureAgreement\n ndaFileName\n ndaFileUrl\n organization {\n name\n description\n websiteUrl\n logoUrl\n email\n headquarterAddress\n id\n }\n ...OverviewPageFragment\n audits(first: 50) {\n edges {\n node {\n id\n ...AuditRowFragment\n }\n }\n }\n }\n}\n\nfragment AuditRowFragment on Audit {\n report {\n id\n filename\n }\n framework {\n id\n name\n }\n}\n\nfragment DocumentRowFragment on Document {\n id\n title\n}\n\nfragment OverviewPageFragment on TrustCenter {\n references(first: 14) {\n edges {\n node {\n id\n name\n logoUrl\n websiteUrl\n }\n }\n }\n vendors(first: 3) {\n edges {\n node {\n id\n ...VendorRowFragment\n }\n }\n }\n documents(first: 5) {\n edges {\n node {\n id\n ...DocumentRowFragment\n documentType\n }\n }\n }\n}\n\nfragment VendorRowFragment on Vendor {\n id\n name\n category\n websiteUrl\n privacyPolicyUrl\n countries\n}\n" + "text": "query TrustGraphQuery(\n $slug: String!\n) {\n trustCenterBySlug(slug: $slug) {\n id\n slug\n isUserAuthenticated\n hasAcceptedNonDisclosureAgreement\n ndaFileName\n ndaFileUrl\n organization {\n name\n description\n websiteUrl\n logoUrl\n email\n headquarterAddress\n id\n }\n ...OverviewPageFragment\n audits(first: 50) {\n edges {\n node {\n id\n ...AuditRowFragment\n }\n }\n }\n }\n}\n\nfragment AuditRowFragment on Audit {\n report {\n id\n filename\n isUserAuthorized\n hasUserRequestedAccess\n }\n framework {\n id\n name\n }\n}\n\nfragment DocumentRowFragment on Document {\n id\n title\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment OverviewPageFragment on TrustCenter {\n references(first: 14) {\n edges {\n node {\n id\n name\n logoUrl\n websiteUrl\n }\n }\n }\n vendors(first: 3) {\n edges {\n node {\n id\n ...VendorRowFragment\n }\n }\n }\n documents(first: 5) {\n edges {\n node {\n id\n ...DocumentRowFragment\n documentType\n }\n }\n }\n}\n\nfragment VendorRowFragment on Vendor {\n id\n name\n category\n websiteUrl\n privacyPolicyUrl\n countries\n}\n" } }; })();