Add trust center files

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-10-24 10:04:54 +02:00
parent e53b1239db
commit 1bd6f7c1c9
55 changed files with 9074 additions and 394 deletions

View File

@@ -21,6 +21,7 @@ import { useIsAuthenticated } from "/hooks/useIsAuthenticated.ts";
type Props = PropsWithChildren<{
documentId?: string;
reportId?: string;
trustCenterFileId?: string;
onSuccess?: () => void;
}>;
@@ -33,6 +34,7 @@ export function RequestAccessDialog({
children,
documentId,
reportId,
trustCenterFileId,
onSuccess,
}: Props) {
const trustCenter = useTrustCenter();
@@ -46,7 +48,7 @@ export function RequestAccessDialog({
});
const isAuthenticated = useIsAuthenticated();
const dialogRef = useDialogRef();
const [commitMutation, isMutating] = useMutation({ documentId, reportId });
const [commitMutation, isMutating] = useMutation({ documentId, reportId, trustCenterFileId });
const submitCallback = (data: z.infer<typeof schema> | null) => {
commitMutation(data)
@@ -155,13 +157,26 @@ const requestReportAccessMutation = graphql`
}
`;
const requestTrustCenterFileAccessMutation = graphql`
mutation RequestAccessDialogTrustCenterFileMutation(
$input: RequestTrustCenterFileAccessInput!
) {
requestTrustCenterFileAccess(input: $input) {
trustCenterAccess {
id
}
}
}
`;
/**
* Use the correct mutation using the shape
*/
function useMutation({
documentId,
reportId,
}: Pick<Props, "documentId" | "reportId">): [
trustCenterFileId,
}: Pick<Props, "documentId" | "reportId" | "trustCenterFileId">): [
(data: z.infer<typeof schema> | null) => Promise<unknown>,
boolean,
] {
@@ -173,8 +188,25 @@ function useMutation({
useMutationWithToasts(requestDocumentAccessMutation);
const [commitRequestReportAccess, isRequestingReportAccess] =
useMutationWithToasts(requestReportAccessMutation);
const [commitRequestTrustCenterFileAccess, isRequestingTrustCenterFileAccess] =
useMutationWithToasts(requestTrustCenterFileAccessMutation);
if (reportId) {
if (trustCenterFileId) {
return [
(data) => {
return commitRequestTrustCenterFileAccess({
variables: {
input: {
trustCenterId: trustCenter.id,
trustCenterFileId: trustCenterFileId,
...data,
},
},
});
},
isRequestingTrustCenterFileAccess,
];
} else if (reportId) {
return [
(data) => {
return commitRequestReportAccess({

View File

@@ -0,0 +1,88 @@
import { graphql } from "relay-runtime";
import type { TrustCenterFileRowFragment$key } from "./__generated__/TrustCenterFileRowFragment.graphql";
import { useFragment } from "react-relay";
import {
Button,
IconArrowInbox,
IconLock,
IconPageTextLine,
Spinner,
} from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import type { TrustCenterFileRowDownloadMutation } from "./__generated__/TrustCenterFileRowDownloadMutation.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 TrustCenterFileRowDownloadMutation($input: ExportTrustCenterFileInput!) {
exportTrustCenterFile(input: $input) {
data
}
}
`;
const trustCenterFileRowFragment = graphql`
fragment TrustCenterFileRowFragment on TrustCenterFile {
id
name
isUserAuthorized
hasUserRequestedAccess
}
`;
export function TrustCenterFileRow(props: { file: TrustCenterFileRowFragment$key }) {
const file = useFragment(trustCenterFileRowFragment, props.file);
const { __ } = useTranslate();
const [commitDownload, downloading] =
useMutationWithToasts<TrustCenterFileRowDownloadMutation>(downloadMutation);
const handleDownload = () => {
commitDownload({
variables: {
input: {
trustCenterFileId: file.id,
},
},
onSuccess(response) {
downloadFile(response.exportTrustCenterFile.data, file.name);
},
});
};
const [hasRequested, setHasRequested] = useState(
file.hasUserRequestedAccess,
);
return (
<div className="text-sm border-1 border-border-solid -mt-[1px] flex gap-3 flex-col md:flex-row md:justify-between px-6 py-3">
<div className="flex items-center gap-2">
<IconPageTextLine size={16} className=" flex-none text-txt-tertiary" />
{file.name}
</div>
{file.isUserAuthorized ? (
<Button
className="w-full md:w-max"
variant="secondary"
disabled={downloading}
icon={downloading ? Spinner : IconArrowInbox}
onClick={handleDownload}
>
{__("Download")}
</Button>
) : (
<RequestAccessDialog
trustCenterFileId={file.id}
onSuccess={() => setHasRequested(true)}
>
<Button
disabled={hasRequested}
className="w-full md:w-max"
variant="secondary"
icon={IconLock}
>
{hasRequested ? __("Access requested") : __("Request access")}
</Button>
</RequestAccessDialog>
)}
</div>
);
}

View File

@@ -0,0 +1,108 @@
/**
* @generated SignedSource<<4c07d5c8e345a8e3015f512403927890>>
* @lightSyntaxTransform
* @nogrep
*/
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type RequestTrustCenterFileAccessInput = {
email?: string | null | undefined;
name?: string | null | undefined;
trustCenterFileId: string;
trustCenterId: string;
};
export type RequestAccessDialogTrustCenterFileMutation$variables = {
input: RequestTrustCenterFileAccessInput;
};
export type RequestAccessDialogTrustCenterFileMutation$data = {
readonly requestTrustCenterFileAccess: {
readonly trustCenterAccess: {
readonly id: string;
};
};
};
export type RequestAccessDialogTrustCenterFileMutation = {
response: RequestAccessDialogTrustCenterFileMutation$data;
variables: RequestAccessDialogTrustCenterFileMutation$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": "requestTrustCenterFileAccess",
"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": "RequestAccessDialogTrustCenterFileMutation",
"selections": (v1/*: any*/),
"type": "Mutation",
"abstractKey": null
},
"kind": "Request",
"operation": {
"argumentDefinitions": (v0/*: any*/),
"kind": "Operation",
"name": "RequestAccessDialogTrustCenterFileMutation",
"selections": (v1/*: any*/)
},
"params": {
"cacheID": "73b3007ef1a45f6dc6d31be0c627e482",
"id": null,
"metadata": {},
"name": "RequestAccessDialogTrustCenterFileMutation",
"operationKind": "mutation",
"text": "mutation RequestAccessDialogTrustCenterFileMutation(\n $input: RequestTrustCenterFileAccessInput!\n) {\n requestTrustCenterFileAccess(input: $input) {\n trustCenterAccess {\n id\n }\n }\n}\n"
}
};
})();
(node as any).hash = "a97eb6c4ec94c79a293d1cc51bf18e66";
export default node;

View File

@@ -0,0 +1,92 @@
/**
* @generated SignedSource<<8d608da0bcff489887f71f6e69f1bfe3>>
* @lightSyntaxTransform
* @nogrep
*/
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type ExportTrustCenterFileInput = {
trustCenterFileId: string;
};
export type TrustCenterFileRowDownloadMutation$variables = {
input: ExportTrustCenterFileInput;
};
export type TrustCenterFileRowDownloadMutation$data = {
readonly exportTrustCenterFile: {
readonly data: string;
};
};
export type TrustCenterFileRowDownloadMutation = {
response: TrustCenterFileRowDownloadMutation$data;
variables: TrustCenterFileRowDownloadMutation$variables;
};
const node: ConcreteRequest = (function(){
var v0 = [
{
"defaultValue": null,
"kind": "LocalArgument",
"name": "input"
}
],
v1 = [
{
"alias": null,
"args": [
{
"kind": "Variable",
"name": "input",
"variableName": "input"
}
],
"concreteType": "ExportTrustCenterFilePayload",
"kind": "LinkedField",
"name": "exportTrustCenterFile",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "data",
"storageKey": null
}
],
"storageKey": null
}
];
return {
"fragment": {
"argumentDefinitions": (v0/*: any*/),
"kind": "Fragment",
"metadata": null,
"name": "TrustCenterFileRowDownloadMutation",
"selections": (v1/*: any*/),
"type": "Mutation",
"abstractKey": null
},
"kind": "Request",
"operation": {
"argumentDefinitions": (v0/*: any*/),
"kind": "Operation",
"name": "TrustCenterFileRowDownloadMutation",
"selections": (v1/*: any*/)
},
"params": {
"cacheID": "8a97b9e7ac44deea6da6e79f1d0c662f",
"id": null,
"metadata": {},
"name": "TrustCenterFileRowDownloadMutation",
"operationKind": "mutation",
"text": "mutation TrustCenterFileRowDownloadMutation(\n $input: ExportTrustCenterFileInput!\n) {\n exportTrustCenterFile(input: $input) {\n data\n }\n}\n"
}
};
})();
(node as any).hash = "e6d74e96e929cf1aa79711b8315a8b85";
export default node;

View File

@@ -0,0 +1,66 @@
/**
* @generated SignedSource<<0261adc72d21035b906b6156ea9d0b40>>
* @lightSyntaxTransform
* @nogrep
*/
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ReaderFragment } from 'relay-runtime';
import { FragmentRefs } from "relay-runtime";
export type TrustCenterFileRowFragment$data = {
readonly hasUserRequestedAccess: boolean;
readonly id: string;
readonly isUserAuthorized: boolean;
readonly name: string;
readonly " $fragmentType": "TrustCenterFileRowFragment";
};
export type TrustCenterFileRowFragment$key = {
readonly " $data"?: TrustCenterFileRowFragment$data;
readonly " $fragmentSpreads": FragmentRefs<"TrustCenterFileRowFragment">;
};
const node: ReaderFragment = {
"argumentDefinitions": [],
"kind": "Fragment",
"metadata": null,
"name": "TrustCenterFileRowFragment",
"selections": [
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "id",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "name",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "isUserAuthorized",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "hasUserRequestedAccess",
"storageKey": null
}
],
"type": "TrustCenterFile",
"abstractKey": null
};
(node as any).hash = "4ff11c14e65566f0dfe3a77ea73903e8";
export default node;

View File

@@ -6,6 +6,7 @@ import { documentTypeLabel } from "/helpers/documents";
import { useTranslate } from "@probo/i18n";
import { Fragment } from "react";
import { DocumentRow } from "/components/DocumentRow";
import { TrustCenterFileRow } from "/components/TrustCenterFileRow";
import { Rows } from "/components/Rows.tsx";
import { RowHeader } from "/components/RowHeader.tsx";
@@ -21,9 +22,12 @@ export function DocumentsPage({ queryRef }: Props) {
);
const documents =
data.currentTrustCenter?.documents.edges.map((edge) => edge.node) ?? [];
const files =
data.currentTrustCenter?.trustCenterFiles.edges.map((edge) => edge.node) ?? [];
const documentsPerType = groupBy(documents, (document) =>
documentTypeLabel(document.documentType, __)
);
const filesPerCategory = groupBy(files, (file) => file.category);
return (
<div>
<h2 className="font-medium mb-1">{__("Documents")}</h2>
@@ -39,6 +43,14 @@ export function DocumentsPage({ queryRef }: Props) {
))}
</Fragment>
))}
{objectEntries(filesPerCategory).map(([category, files]) => (
<Fragment key={category}>
<RowHeader>{category}</RowHeader>
{files.map((file) => (
<TrustCenterFileRow key={file.id} file={file} />
))}
</Fragment>
))}
</Rows>
</div>
);

View File

@@ -18,6 +18,7 @@ import { AuditRow } from "/components/AuditRow";
import { documentTypeLabel } from "/helpers/documents";
import { Fragment } from "react";
import { DocumentRow } from "/components/DocumentRow";
import { TrustCenterFileRow } from "/components/TrustCenterFileRow";
import { VendorRow } from "/components/VendorRow";
import { RowHeader } from "/components/RowHeader.tsx";
import { Rows } from "/components/Rows.tsx";
@@ -52,6 +53,15 @@ const overviewFragment = graphql`
}
}
}
trustCenterFiles(first: 5) {
edges {
node {
id
category
...TrustCenterFileRowFragment
}
}
}
}
`;
@@ -69,6 +79,7 @@ export function OverviewPage() {
<Documents
audits={trustCenter.audits.edges}
documents={fragment.documents.edges}
files={fragment.trustCenterFiles.edges}
url={getTrustCenterUrl("documents")}
/>
<Subprocessors
@@ -82,10 +93,12 @@ export function OverviewPage() {
function Documents({
documents,
files,
audits,
url,
}: {
documents: OverviewPageFragment$data["documents"]["edges"];
files: OverviewPageFragment$data["trustCenterFiles"]["edges"];
audits: NonNullable<
TrustGraphQuery$data["trustCenterBySlug"]
>["audits"]["edges"];
@@ -96,8 +109,12 @@ function Documents({
documents.map((edge) => edge.node),
(node) => documentTypeLabel(node.documentType, __)
);
const filesPerCategory = groupBy(
files.map((edge) => edge.node),
(node) => node.category
);
const hasAudits = audits.length > 0;
const hasDocuments = hasAudits || documents.length > 0;
const hasDocuments = hasAudits || documents.length > 0 || files.length > 0;
if (!hasDocuments) {
return null;
@@ -126,6 +143,14 @@ function Documents({
))}
</Fragment>
))}
{objectEntries(filesPerCategory).map(([category, files]) => (
<Fragment key={category}>
<RowHeader>{category}</RowHeader>
{files.map((file) => (
<TrustCenterFileRow key={file.id} file={file} />
))}
</Fragment>
))}
<Link to={url} className="text-sm font-medium flex gap-2 items-center">
{__("See all documents")}
<IconChevronRight size={16} />

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<7b1972657d83c7bb17b997e287f575d8>>
* @generated SignedSource<<cde79d7c929ba1be8e0d033c90e7eeb7>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -32,6 +32,15 @@ export type OverviewPageFragment$data = {
};
}>;
};
readonly trustCenterFiles: {
readonly edges: ReadonlyArray<{
readonly node: {
readonly category: string;
readonly id: string;
readonly " $fragmentSpreads": FragmentRefs<"TrustCenterFileRowFragment">;
};
}>;
};
readonly vendors: {
readonly edges: ReadonlyArray<{
readonly node: {
@@ -55,7 +64,14 @@ var v0 = {
"kind": "ScalarField",
"name": "id",
"storageKey": null
};
},
v1 = [
{
"kind": "Literal",
"name": "first",
"value": 5
}
];
return {
"argumentDefinitions": [],
"kind": "Fragment",
@@ -177,13 +193,7 @@ return {
},
{
"alias": null,
"args": [
{
"kind": "Literal",
"name": "first",
"value": 5
}
],
"args": (v1/*: any*/),
"concreteType": "DocumentConnection",
"kind": "LinkedField",
"name": "documents",
@@ -226,6 +236,52 @@ return {
}
],
"storageKey": "documents(first:5)"
},
{
"alias": null,
"args": (v1/*: any*/),
"concreteType": "TrustCenterFileConnection",
"kind": "LinkedField",
"name": "trustCenterFiles",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenterFileEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenterFile",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v0/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "category",
"storageKey": null
},
{
"args": null,
"kind": "FragmentSpread",
"name": "TrustCenterFileRowFragment"
}
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": "trustCenterFiles(first:5)"
}
],
"type": "TrustCenter",
@@ -233,6 +289,6 @@ return {
};
})();
(node as any).hash = "0bda7993ef3be4cfe86083658fc77813";
(node as any).hash = "0f4e9ac02d068ba971bb1f5be5fdaccf";
export default node;

View File

@@ -46,6 +46,15 @@ export const trustDocumentsQuery = graphql`
}
}
}
trustCenterFiles(first: 50) {
edges {
node {
id
category
...TrustCenterFileRowFragment
}
}
}
}
}
`;
@@ -117,6 +126,15 @@ export const currentTrustDocumentsQuery = graphql`
}
}
}
trustCenterFiles(first: 50) {
edges {
node {
id
category
...TrustCenterFileRowFragment
}
}
}
}
}
`;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<091d468e321f2cd6cdead063c35c6a45>>
* @generated SignedSource<<dabe16493c003a98ed8fd555efc85ddc>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -27,6 +27,15 @@ export type TrustGraphCurrentDocumentsQuery$data = {
readonly organization: {
readonly name: string;
};
readonly trustCenterFiles: {
readonly edges: ReadonlyArray<{
readonly node: {
readonly category: string;
readonly id: string;
readonly " $fragmentSpreads": FragmentRefs<"TrustCenterFileRowFragment">;
};
}>;
};
} | null | undefined;
};
export type TrustGraphCurrentDocumentsQuery = {
@@ -62,6 +71,27 @@ v3 = {
"kind": "ScalarField",
"name": "documentType",
"storageKey": null
},
v4 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "category",
"storageKey": null
},
v5 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "isUserAuthorized",
"storageKey": null
},
v6 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "hasUserRequestedAccess",
"storageKey": null
};
return {
"fragment": {
@@ -130,6 +160,46 @@ return {
}
],
"storageKey": "documents(first:50)"
},
{
"alias": null,
"args": (v2/*: any*/),
"concreteType": "TrustCenterFileConnection",
"kind": "LinkedField",
"name": "trustCenterFiles",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenterFileEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenterFile",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v0/*: any*/),
(v4/*: any*/),
{
"args": null,
"kind": "FragmentSpread",
"name": "TrustCenterFileRowFragment"
}
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": "trustCenterFiles(first:50)"
}
],
"storageKey": null
@@ -199,20 +269,8 @@ return {
"name": "title",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "isUserAuthorized",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "hasUserRequestedAccess",
"storageKey": null
}
(v5/*: any*/),
(v6/*: any*/)
],
"storageKey": null
}
@@ -221,6 +279,44 @@ return {
}
],
"storageKey": "documents(first:50)"
},
{
"alias": null,
"args": (v2/*: any*/),
"concreteType": "TrustCenterFileConnection",
"kind": "LinkedField",
"name": "trustCenterFiles",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenterFileEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenterFile",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v0/*: any*/),
(v4/*: any*/),
(v1/*: any*/),
(v5/*: any*/),
(v6/*: any*/)
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": "trustCenterFiles(first:50)"
}
],
"storageKey": null
@@ -228,16 +324,16 @@ return {
]
},
"params": {
"cacheID": "9e99faf40ba87ee06df5ddd64431586e",
"cacheID": "c9c4cb18da98c40646fbbe21c2c5b46f",
"id": null,
"metadata": {},
"name": "TrustGraphCurrentDocumentsQuery",
"operationKind": "query",
"text": "query TrustGraphCurrentDocumentsQuery {\n currentTrustCenter {\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"
"text": "query TrustGraphCurrentDocumentsQuery {\n currentTrustCenter {\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 trustCenterFiles(first: 50) {\n edges {\n node {\n id\n category\n ...TrustCenterFileRowFragment\n }\n }\n }\n }\n}\n\nfragment DocumentRowFragment on Document {\n id\n title\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment TrustCenterFileRowFragment on TrustCenterFile {\n id\n name\n isUserAuthorized\n hasUserRequestedAccess\n}\n"
}
};
})();
(node as any).hash = "73636da5c06a16813a57b92f30ab93d2";
(node as any).hash = "0900835ad8e59a40a2907fb787b936ef";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<fe440b5c7a8a8ed54723161632320857>>
* @generated SignedSource<<fe9ca4e5a2ddb60ea7a7f353d431d18c>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -136,13 +136,27 @@ v12 = [
}
],
v13 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "category",
"storageKey": null
},
v14 = [
{
"kind": "Literal",
"name": "first",
"value": 5
}
],
v15 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "isUserAuthorized",
"storageKey": null
},
v14 = {
v16 = {
"alias": null,
"args": null,
"kind": "ScalarField",
@@ -358,13 +372,7 @@ return {
"storageKey": null
},
(v6/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "category",
"storageKey": null
},
(v13/*: any*/),
(v8/*: any*/),
{
"alias": null,
@@ -384,13 +392,7 @@ return {
},
{
"alias": null,
"args": [
{
"kind": "Literal",
"name": "first",
"value": 5
}
],
"args": (v14/*: any*/),
"concreteType": "DocumentConnection",
"kind": "LinkedField",
"name": "documents",
@@ -420,8 +422,8 @@ return {
"name": "title",
"storageKey": null
},
(v13/*: any*/),
(v14/*: any*/),
(v15/*: any*/),
(v16/*: any*/),
{
"alias": null,
"args": null,
@@ -438,6 +440,44 @@ return {
],
"storageKey": "documents(first:5)"
},
{
"alias": null,
"args": (v14/*: any*/),
"concreteType": "TrustCenterFileConnection",
"kind": "LinkedField",
"name": "trustCenterFiles",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenterFileEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenterFile",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v0/*: any*/),
(v13/*: any*/),
(v6/*: any*/),
(v15/*: any*/),
(v16/*: any*/)
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": "trustCenterFiles(first:5)"
},
{
"alias": null,
"args": (v12/*: any*/),
@@ -479,8 +519,8 @@ return {
"name": "filename",
"storageKey": null
},
(v13/*: any*/),
(v14/*: any*/)
(v15/*: any*/),
(v16/*: any*/)
],
"storageKey": null
},
@@ -512,12 +552,12 @@ return {
]
},
"params": {
"cacheID": "d2c9b2a457cd3840f4b23d71cd399c84",
"cacheID": "da8080ccbc08adb03fbf360f1e472f84",
"id": null,
"metadata": {},
"name": "TrustGraphCurrentQuery",
"operationKind": "query",
"text": "query TrustGraphCurrentQuery {\n currentTrustCenter {\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 countries\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 TrustGraphCurrentQuery {\n currentTrustCenter {\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 countries\n ...VendorRowFragment\n }\n }\n }\n documents(first: 5) {\n edges {\n node {\n id\n ...DocumentRowFragment\n documentType\n }\n }\n }\n trustCenterFiles(first: 5) {\n edges {\n node {\n id\n category\n ...TrustCenterFileRowFragment\n }\n }\n }\n}\n\nfragment TrustCenterFileRowFragment on TrustCenterFile {\n id\n name\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment VendorRowFragment on Vendor {\n id\n name\n category\n websiteUrl\n privacyPolicyUrl\n countries\n}\n"
}
};
})();

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<922757406dbc7a2c20b502ef6dd4c0d8>>
* @generated SignedSource<<0faaebe3baf4c750825599985210137d>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -29,6 +29,15 @@ export type TrustGraphDocumentsQuery$data = {
readonly organization: {
readonly name: string;
};
readonly trustCenterFiles: {
readonly edges: ReadonlyArray<{
readonly node: {
readonly category: string;
readonly id: string;
readonly " $fragmentSpreads": FragmentRefs<"TrustCenterFileRowFragment">;
};
}>;
};
} | null | undefined;
};
export type TrustGraphDocumentsQuery = {
@@ -78,6 +87,27 @@ v5 = {
"kind": "ScalarField",
"name": "documentType",
"storageKey": null
},
v6 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "category",
"storageKey": null
},
v7 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "isUserAuthorized",
"storageKey": null
},
v8 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "hasUserRequestedAccess",
"storageKey": null
};
return {
"fragment": {
@@ -146,6 +176,46 @@ return {
}
],
"storageKey": "documents(first:50)"
},
{
"alias": null,
"args": (v4/*: any*/),
"concreteType": "TrustCenterFileConnection",
"kind": "LinkedField",
"name": "trustCenterFiles",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenterFileEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenterFile",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v2/*: any*/),
(v6/*: any*/),
{
"args": null,
"kind": "FragmentSpread",
"name": "TrustCenterFileRowFragment"
}
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": "trustCenterFiles(first:50)"
}
],
"storageKey": null
@@ -215,20 +285,8 @@ return {
"name": "title",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "isUserAuthorized",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "hasUserRequestedAccess",
"storageKey": null
}
(v7/*: any*/),
(v8/*: any*/)
],
"storageKey": null
}
@@ -237,6 +295,44 @@ return {
}
],
"storageKey": "documents(first:50)"
},
{
"alias": null,
"args": (v4/*: any*/),
"concreteType": "TrustCenterFileConnection",
"kind": "LinkedField",
"name": "trustCenterFiles",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenterFileEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenterFile",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v2/*: any*/),
(v6/*: any*/),
(v3/*: any*/),
(v7/*: any*/),
(v8/*: any*/)
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": "trustCenterFiles(first:50)"
}
],
"storageKey": null
@@ -244,16 +340,16 @@ return {
]
},
"params": {
"cacheID": "8a333723782b24714393e89240704cf2",
"cacheID": "151fc8b1cf3becb2a69d87ce978fb71b",
"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 isUserAuthorized\n hasUserRequestedAccess\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 trustCenterFiles(first: 50) {\n edges {\n node {\n id\n category\n ...TrustCenterFileRowFragment\n }\n }\n }\n }\n}\n\nfragment DocumentRowFragment on Document {\n id\n title\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment TrustCenterFileRowFragment on TrustCenterFile {\n id\n name\n isUserAuthorized\n hasUserRequestedAccess\n}\n"
}
};
})();
(node as any).hash = "9c56f70fca2afb316f4fd38d646ec545";
(node as any).hash = "79e21d586ec18a0977c37df27aa9bdea";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<e1f3b93147b9e72d9cfc41e8e0befd6e>>
* @generated SignedSource<<8b9ec6ee6f688ae6f6d1463104c72df4>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -152,13 +152,27 @@ v14 = [
}
],
v15 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "category",
"storageKey": null
},
v16 = [
{
"kind": "Literal",
"name": "first",
"value": 5
}
],
v17 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "isUserAuthorized",
"storageKey": null
},
v16 = {
v18 = {
"alias": null,
"args": null,
"kind": "ScalarField",
@@ -374,13 +388,7 @@ return {
"storageKey": null
},
(v8/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "category",
"storageKey": null
},
(v15/*: any*/),
(v10/*: any*/),
{
"alias": null,
@@ -400,13 +408,7 @@ return {
},
{
"alias": null,
"args": [
{
"kind": "Literal",
"name": "first",
"value": 5
}
],
"args": (v16/*: any*/),
"concreteType": "DocumentConnection",
"kind": "LinkedField",
"name": "documents",
@@ -436,8 +438,8 @@ return {
"name": "title",
"storageKey": null
},
(v15/*: any*/),
(v16/*: any*/),
(v17/*: any*/),
(v18/*: any*/),
{
"alias": null,
"args": null,
@@ -454,6 +456,44 @@ return {
],
"storageKey": "documents(first:5)"
},
{
"alias": null,
"args": (v16/*: any*/),
"concreteType": "TrustCenterFileConnection",
"kind": "LinkedField",
"name": "trustCenterFiles",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenterFileEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenterFile",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v2/*: any*/),
(v15/*: any*/),
(v8/*: any*/),
(v17/*: any*/),
(v18/*: any*/)
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": "trustCenterFiles(first:5)"
},
{
"alias": null,
"args": (v14/*: any*/),
@@ -495,8 +535,8 @@ return {
"name": "filename",
"storageKey": null
},
(v15/*: any*/),
(v16/*: any*/)
(v17/*: any*/),
(v18/*: any*/)
],
"storageKey": null
},
@@ -528,12 +568,12 @@ return {
]
},
"params": {
"cacheID": "c3cb244842768ef771ea209a51a06c4a",
"cacheID": "f3ac933cf00a798d12b1a8e1fedcaee9",
"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 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 countries\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 countries\n ...VendorRowFragment\n }\n }\n }\n documents(first: 5) {\n edges {\n node {\n id\n ...DocumentRowFragment\n documentType\n }\n }\n }\n trustCenterFiles(first: 5) {\n edges {\n node {\n id\n category\n ...TrustCenterFileRowFragment\n }\n }\n }\n}\n\nfragment TrustCenterFileRowFragment on TrustCenterFile {\n id\n name\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment VendorRowFragment on Vendor {\n id\n name\n category\n websiteUrl\n privacyPolicyUrl\n countries\n}\n"
}
};
})();