Fix request mutations on complete store updates
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
Table,
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { type PropsWithChildren, useState } from "react";
|
||||
import { type PropsWithChildren } from "react";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import { useLocation, useNavigate, useSearchParams } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
@@ -29,8 +29,13 @@ import type { AuditRowFragment$key } from "./__generated__/AuditRowFragment.grap
|
||||
const requestAccessMutation = graphql`
|
||||
mutation AuditRow_requestAccessMutation($input: RequestReportAccessInput!) {
|
||||
requestReportAccess(input: $input) {
|
||||
trustCenterAccess {
|
||||
id
|
||||
audit {
|
||||
report {
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,7 +56,10 @@ const auditRowFragment = graphql`
|
||||
id
|
||||
filename
|
||||
isUserAuthorized
|
||||
hasUserRequestedAccess
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
framework {
|
||||
id
|
||||
@@ -70,9 +78,7 @@ export function AuditRow(props: { audit: AuditRowFragment$key }) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const audit = useFragment(auditRowFragment, props.audit);
|
||||
const [hasRequested, setHasRequested] = useState(
|
||||
audit.report?.hasUserRequestedAccess,
|
||||
);
|
||||
const hasRequested = !!audit.report?.access;
|
||||
|
||||
const [requestAccess, isRequestingAccess]
|
||||
= useMutation<AuditRow_requestAccessMutation>(requestAccessMutation);
|
||||
@@ -95,7 +101,6 @@ export function AuditRow(props: { audit: AuditRowFragment$key }) {
|
||||
});
|
||||
return;
|
||||
}
|
||||
setHasRequested(true);
|
||||
toast({
|
||||
title: __("Success"),
|
||||
description: __("Access request submitted successfully."),
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
Spinner,
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { useState } from "react";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import { useLocation, useNavigate, useSearchParams } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
@@ -26,8 +25,11 @@ const requestAccessMutation = graphql`
|
||||
$input: RequestDocumentAccessInput!
|
||||
) {
|
||||
requestDocumentAccess(input: $input) {
|
||||
trustCenterAccess {
|
||||
id
|
||||
document {
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,7 +48,10 @@ const documentRowFragment = graphql`
|
||||
id
|
||||
title
|
||||
isUserAuthorized
|
||||
hasUserRequestedAccess
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -58,9 +63,7 @@ export function DocumentRow(props: { document: DocumentRowFragment$key }) {
|
||||
const [searchParams] = useSearchParams();
|
||||
|
||||
const document = useFragment(documentRowFragment, props.document);
|
||||
const [hasRequested, setHasRequested] = useState(
|
||||
document.hasUserRequestedAccess,
|
||||
);
|
||||
const hasRequested = !!document.access;
|
||||
|
||||
const [requestAccess, isRequestingAccess]
|
||||
= useMutation<DocumentRow_requestAccessMutation>(requestAccessMutation);
|
||||
@@ -83,7 +86,6 @@ export function DocumentRow(props: { document: DocumentRowFragment$key }) {
|
||||
});
|
||||
return;
|
||||
}
|
||||
setHasRequested(true);
|
||||
toast({
|
||||
title: __("Success"),
|
||||
description: __("Access request submitted successfully."),
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
} from "@probo/ui";
|
||||
import { type PropsWithChildren } from "react";
|
||||
import { useMutation } from "react-relay";
|
||||
import { useNavigate, useSearchParams } from "react-router";
|
||||
import { useLocation, useNavigate, useSearchParams } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import type { TrustGraphCurrentQuery$data } from "#/queries/__generated__/TrustGraphCurrentQuery.graphql";
|
||||
@@ -41,6 +41,7 @@ export function OrganizationSidebar({
|
||||
const theme = useSystemTheme();
|
||||
const [searchParams] = useSearchParams();
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
|
||||
const logoFileUrl = theme === "dark" ? (trustCenter?.darkLogoFileUrl ?? trustCenter?.logoFileUrl) : trustCenter?.logoFileUrl;
|
||||
|
||||
@@ -66,6 +67,8 @@ export function OrganizationSidebar({
|
||||
description: __("Access request submitted successfully."),
|
||||
variant: "success",
|
||||
});
|
||||
|
||||
window.location.href = location.pathname;
|
||||
},
|
||||
onError: (error) => {
|
||||
if (error instanceof UnAuthenticatedError) {
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
Spinner,
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { useState } from "react";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import { useLocation, useNavigate, useSearchParams } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
@@ -26,8 +25,11 @@ const requestAccessMutation = graphql`
|
||||
$input: RequestTrustCenterFileAccessInput!
|
||||
) {
|
||||
requestTrustCenterFileAccess(input: $input) {
|
||||
trustCenterAccess {
|
||||
id
|
||||
file {
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,7 +50,10 @@ const trustCenterFileRowFragment = graphql`
|
||||
id
|
||||
name
|
||||
isUserAuthorized
|
||||
hasUserRequestedAccess
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -62,7 +67,7 @@ export function TrustCenterFileRow(props: {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const file = useFragment(trustCenterFileRowFragment, props.file);
|
||||
const [hasRequested, setHasRequested] = useState(file.hasUserRequestedAccess);
|
||||
const hasRequested = !!file.access;
|
||||
|
||||
const [requestAccess, isRequestingAccess]
|
||||
= useMutation<TrustCenterFileRow_requestAccessMutation>(
|
||||
@@ -87,7 +92,6 @@ export function TrustCenterFileRow(props: {
|
||||
});
|
||||
return;
|
||||
}
|
||||
setHasRequested(true);
|
||||
toast({
|
||||
title: __("Success"),
|
||||
description: __("Access request submitted successfully."),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<9540bd74ce3b0dd5366c237b56070d9f>>
|
||||
* @generated SignedSource<<beb9130a1b213333ae647116467056a0>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,6 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ReaderFragment } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type AuditRowFragment$data = {
|
||||
readonly framework: {
|
||||
@@ -19,8 +20,11 @@ export type AuditRowFragment$data = {
|
||||
};
|
||||
readonly name: string | null | undefined;
|
||||
readonly report: {
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
readonly filename: string;
|
||||
readonly hasUserRequestedAccess: boolean;
|
||||
readonly id: string;
|
||||
readonly isUserAuthorized: boolean;
|
||||
} | null | undefined;
|
||||
@@ -79,8 +83,20 @@ return {
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasUserRequestedAccess",
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
@@ -119,6 +135,6 @@ return {
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "ebf47a97014ba4dad0da94f2bb01666f";
|
||||
(node as any).hash = "1e3e89368594b05e0926b5ee8bc7c0b5";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<0e5c234b565a3031a774995bff249b97>>
|
||||
* @generated SignedSource<<5439a269fe5c79f6d90f2421fdacb090>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,6 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
export type RequestReportAccessInput = {
|
||||
reportId: string;
|
||||
};
|
||||
@@ -17,9 +18,14 @@ export type AuditRow_requestAccessMutation$variables = {
|
||||
};
|
||||
export type AuditRow_requestAccessMutation$data = {
|
||||
readonly requestReportAccess: {
|
||||
readonly trustCenterAccess: {
|
||||
readonly id: string;
|
||||
};
|
||||
readonly audit: {
|
||||
readonly report: {
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
} | null | undefined;
|
||||
} | null | undefined;
|
||||
};
|
||||
};
|
||||
export type AuditRow_requestAccessMutation = {
|
||||
@@ -37,48 +43,79 @@ var v0 = [
|
||||
],
|
||||
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
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
];
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "AuditRow_requestAccessMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestReportAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestReportAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Audit",
|
||||
"kind": "LinkedField",
|
||||
"name": "audit",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Report",
|
||||
"kind": "LinkedField",
|
||||
"name": "report",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
@@ -87,19 +124,56 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "AuditRow_requestAccessMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestReportAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestReportAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Audit",
|
||||
"kind": "LinkedField",
|
||||
"name": "audit",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Report",
|
||||
"kind": "LinkedField",
|
||||
"name": "report",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "6760f1ec8a6990f62461c3fab2b2934a",
|
||||
"cacheID": "8d33e98c3b907ff4ddf6d08a0d9e7ff8",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "AuditRow_requestAccessMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation AuditRow_requestAccessMutation(\n $input: RequestReportAccessInput!\n) {\n requestReportAccess(input: $input) {\n trustCenterAccess {\n id\n }\n }\n}\n"
|
||||
"text": "mutation AuditRow_requestAccessMutation(\n $input: RequestReportAccessInput!\n) {\n requestReportAccess(input: $input) {\n audit {\n report {\n access {\n id\n status\n }\n id\n }\n id\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "6ab5eb701126385e717a381e21e55ae0";
|
||||
(node as any).hash = "01e09978f688128c89698e9a0877fa37";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<396f9d87342c909ca373f60a1e6f7ff3>>
|
||||
* @generated SignedSource<<5698d403c8907dad78a4070f710f46b4>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,9 +9,13 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ReaderFragment } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type DocumentRowFragment$data = {
|
||||
readonly hasUserRequestedAccess: boolean;
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
readonly id: string;
|
||||
readonly isUserAuthorized: boolean;
|
||||
readonly title: string;
|
||||
@@ -22,19 +26,21 @@ export type DocumentRowFragment$key = {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"DocumentRowFragment">;
|
||||
};
|
||||
|
||||
const node: ReaderFragment = {
|
||||
const node: ReaderFragment = (function(){
|
||||
var v0 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"argumentDefinitions": [],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "DocumentRowFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -52,15 +58,28 @@ const node: ReaderFragment = {
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasUserRequestedAccess",
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Document",
|
||||
"abstractKey": null
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "1b0f0b9cae621268d72b0fd0646aa672";
|
||||
(node as any).hash = "6839ab4ad70d571dcce4e74583723244";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<e62c28d53365ca5d5f3d53282aefd4e7>>
|
||||
* @generated SignedSource<<b24d17465cf3d4aca2ade3fbd21326eb>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,6 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
export type RequestDocumentAccessInput = {
|
||||
documentId: string;
|
||||
};
|
||||
@@ -17,9 +18,12 @@ export type DocumentRow_requestAccessMutation$variables = {
|
||||
};
|
||||
export type DocumentRow_requestAccessMutation$data = {
|
||||
readonly requestDocumentAccess: {
|
||||
readonly trustCenterAccess: {
|
||||
readonly id: string;
|
||||
};
|
||||
readonly document: {
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
} | null | undefined;
|
||||
};
|
||||
};
|
||||
export type DocumentRow_requestAccessMutation = {
|
||||
@@ -37,48 +41,68 @@ var v0 = [
|
||||
],
|
||||
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
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
];
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "DocumentRow_requestAccessMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestDocumentAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestDocumentAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Document",
|
||||
"kind": "LinkedField",
|
||||
"name": "document",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
@@ -87,19 +111,44 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "DocumentRow_requestAccessMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestDocumentAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestDocumentAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Document",
|
||||
"kind": "LinkedField",
|
||||
"name": "document",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "13715b7cb8784d050b6d0381e460bbad",
|
||||
"cacheID": "0bd652390e5413f5ba2c66af0796cbc9",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "DocumentRow_requestAccessMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation DocumentRow_requestAccessMutation(\n $input: RequestDocumentAccessInput!\n) {\n requestDocumentAccess(input: $input) {\n trustCenterAccess {\n id\n }\n }\n}\n"
|
||||
"text": "mutation DocumentRow_requestAccessMutation(\n $input: RequestDocumentAccessInput!\n) {\n requestDocumentAccess(input: $input) {\n document {\n access {\n id\n status\n }\n id\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "ca9026b04c2de91067759e3a80e5c276";
|
||||
(node as any).hash = "bc8897aa5c4a7d7fb05604f8aa3b8491";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<0261adc72d21035b906b6156ea9d0b40>>
|
||||
* @generated SignedSource<<bd09e92db1b1b5bf9c45145f4058e88f>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,9 +9,13 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ReaderFragment } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type TrustCenterFileRowFragment$data = {
|
||||
readonly hasUserRequestedAccess: boolean;
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
readonly id: string;
|
||||
readonly isUserAuthorized: boolean;
|
||||
readonly name: string;
|
||||
@@ -22,19 +26,21 @@ export type TrustCenterFileRowFragment$key = {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"TrustCenterFileRowFragment">;
|
||||
};
|
||||
|
||||
const node: ReaderFragment = {
|
||||
const node: ReaderFragment = (function(){
|
||||
var v0 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"argumentDefinitions": [],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "TrustCenterFileRowFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -52,15 +58,28 @@ const node: ReaderFragment = {
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasUserRequestedAccess",
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "TrustCenterFile",
|
||||
"abstractKey": null
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "4ff11c14e65566f0dfe3a77ea73903e8";
|
||||
(node as any).hash = "98e5e399ab6d45c22cd85d663cfb3748";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<a8da5aa24d8696b55231f44d861f347c>>
|
||||
* @generated SignedSource<<19d9adae53e45d4399358c9307928265>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,6 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
export type RequestTrustCenterFileAccessInput = {
|
||||
trustCenterFileId: string;
|
||||
};
|
||||
@@ -17,9 +18,12 @@ export type TrustCenterFileRow_requestAccessMutation$variables = {
|
||||
};
|
||||
export type TrustCenterFileRow_requestAccessMutation$data = {
|
||||
readonly requestTrustCenterFileAccess: {
|
||||
readonly trustCenterAccess: {
|
||||
readonly id: string;
|
||||
};
|
||||
readonly file: {
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
} | null | undefined;
|
||||
};
|
||||
};
|
||||
export type TrustCenterFileRow_requestAccessMutation = {
|
||||
@@ -37,48 +41,68 @@ var v0 = [
|
||||
],
|
||||
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
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
];
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "TrustCenterFileRow_requestAccessMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestFileAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestTrustCenterFileAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "TrustCenterFile",
|
||||
"kind": "LinkedField",
|
||||
"name": "file",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
@@ -87,19 +111,44 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "TrustCenterFileRow_requestAccessMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestFileAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestTrustCenterFileAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "TrustCenterFile",
|
||||
"kind": "LinkedField",
|
||||
"name": "file",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "77a09810aa9c3ddf3a3baddf709f9a42",
|
||||
"cacheID": "f96fd0464a34ad565cc7b6bb2e13308f",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "TrustCenterFileRow_requestAccessMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation TrustCenterFileRow_requestAccessMutation(\n $input: RequestTrustCenterFileAccessInput!\n) {\n requestTrustCenterFileAccess(input: $input) {\n trustCenterAccess {\n id\n }\n }\n}\n"
|
||||
"text": "mutation TrustCenterFileRow_requestAccessMutation(\n $input: RequestTrustCenterFileAccessInput!\n) {\n requestTrustCenterFileAccess(input: $input) {\n file {\n access {\n id\n status\n }\n id\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "eba04489de9ec18ab9816328a481ef33";
|
||||
(node as any).hash = "1a9f7ac6860d4bca88d04d73f9c6020d";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<6b6304c9a22de890f171632f8c9dabe1>>
|
||||
* @generated SignedSource<<aae03fb419e3ef00b45151ceeb0988cd>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,6 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
export type RequestDocumentAccessInput = {
|
||||
documentId: string;
|
||||
};
|
||||
@@ -17,9 +18,12 @@ export type useRequestAccessCallback_documentMutation$variables = {
|
||||
};
|
||||
export type useRequestAccessCallback_documentMutation$data = {
|
||||
readonly requestDocumentAccess: {
|
||||
readonly trustCenterAccess: {
|
||||
readonly id: string;
|
||||
};
|
||||
readonly document: {
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
} | null | undefined;
|
||||
};
|
||||
};
|
||||
export type useRequestAccessCallback_documentMutation = {
|
||||
@@ -37,48 +41,68 @@ var v0 = [
|
||||
],
|
||||
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
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
];
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "useRequestAccessCallback_documentMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestDocumentAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestDocumentAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Document",
|
||||
"kind": "LinkedField",
|
||||
"name": "document",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
@@ -87,19 +111,44 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "useRequestAccessCallback_documentMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestDocumentAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestDocumentAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Document",
|
||||
"kind": "LinkedField",
|
||||
"name": "document",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "849ea6a746660bdee8ebf805baef7a33",
|
||||
"cacheID": "e3153093fd3da3f95ac5bc98a09163a7",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "useRequestAccessCallback_documentMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation useRequestAccessCallback_documentMutation(\n $input: RequestDocumentAccessInput!\n) {\n requestDocumentAccess(input: $input) {\n trustCenterAccess {\n id\n }\n }\n}\n"
|
||||
"text": "mutation useRequestAccessCallback_documentMutation(\n $input: RequestDocumentAccessInput!\n) {\n requestDocumentAccess(input: $input) {\n document {\n access {\n id\n status\n }\n id\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "1ff8b5f560d8c3024e6d5c11bb2ed889";
|
||||
(node as any).hash = "afc533a5d5b764f81f6bc7632f1614ff";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<6db2a4322199d638b3f1ac498ecd066b>>
|
||||
* @generated SignedSource<<688bb06b7534c867b9427a6fcbb52d57>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,6 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
export type RequestTrustCenterFileAccessInput = {
|
||||
trustCenterFileId: string;
|
||||
};
|
||||
@@ -17,9 +18,12 @@ export type useRequestAccessCallback_fileMutation$variables = {
|
||||
};
|
||||
export type useRequestAccessCallback_fileMutation$data = {
|
||||
readonly requestTrustCenterFileAccess: {
|
||||
readonly trustCenterAccess: {
|
||||
readonly id: string;
|
||||
};
|
||||
readonly file: {
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
} | null | undefined;
|
||||
};
|
||||
};
|
||||
export type useRequestAccessCallback_fileMutation = {
|
||||
@@ -37,48 +41,68 @@ var v0 = [
|
||||
],
|
||||
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
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
];
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "useRequestAccessCallback_fileMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestFileAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestTrustCenterFileAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "TrustCenterFile",
|
||||
"kind": "LinkedField",
|
||||
"name": "file",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
@@ -87,19 +111,44 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "useRequestAccessCallback_fileMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestFileAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestTrustCenterFileAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "TrustCenterFile",
|
||||
"kind": "LinkedField",
|
||||
"name": "file",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "1ed0d9f8a3b3dc08c2af16101729d3a9",
|
||||
"cacheID": "0c66e592bdb92aa92fbaef21c8133e17",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "useRequestAccessCallback_fileMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation useRequestAccessCallback_fileMutation(\n $input: RequestTrustCenterFileAccessInput!\n) {\n requestTrustCenterFileAccess(input: $input) {\n trustCenterAccess {\n id\n }\n }\n}\n"
|
||||
"text": "mutation useRequestAccessCallback_fileMutation(\n $input: RequestTrustCenterFileAccessInput!\n) {\n requestTrustCenterFileAccess(input: $input) {\n file {\n access {\n id\n status\n }\n id\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "5105b60de987b135523ada9ee2777dea";
|
||||
(node as any).hash = "0dbe835b29f81d086b94cfecb8fc832f";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<d36c3f435afa928b80d415bd53786d81>>
|
||||
* @generated SignedSource<<b995c7259ba7df94fbdc49770ec83a92>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,6 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
export type RequestReportAccessInput = {
|
||||
reportId: string;
|
||||
};
|
||||
@@ -17,9 +18,14 @@ export type useRequestAccessCallback_reportMutation$variables = {
|
||||
};
|
||||
export type useRequestAccessCallback_reportMutation$data = {
|
||||
readonly requestReportAccess: {
|
||||
readonly trustCenterAccess: {
|
||||
readonly id: string;
|
||||
};
|
||||
readonly audit: {
|
||||
readonly report: {
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
} | null | undefined;
|
||||
} | null | undefined;
|
||||
};
|
||||
};
|
||||
export type useRequestAccessCallback_reportMutation = {
|
||||
@@ -37,48 +43,79 @@ var v0 = [
|
||||
],
|
||||
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
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
];
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "useRequestAccessCallback_reportMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestReportAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestReportAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Audit",
|
||||
"kind": "LinkedField",
|
||||
"name": "audit",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Report",
|
||||
"kind": "LinkedField",
|
||||
"name": "report",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
@@ -87,19 +124,56 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "useRequestAccessCallback_reportMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestReportAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestReportAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Audit",
|
||||
"kind": "LinkedField",
|
||||
"name": "audit",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Report",
|
||||
"kind": "LinkedField",
|
||||
"name": "report",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "c859384ca219b8302245e0bed292e698",
|
||||
"cacheID": "82539e9ad64aa2bd9e5bd2cac4597f23",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "useRequestAccessCallback_reportMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation useRequestAccessCallback_reportMutation(\n $input: RequestReportAccessInput!\n) {\n requestReportAccess(input: $input) {\n trustCenterAccess {\n id\n }\n }\n}\n"
|
||||
"text": "mutation useRequestAccessCallback_reportMutation(\n $input: RequestReportAccessInput!\n) {\n requestReportAccess(input: $input) {\n audit {\n report {\n access {\n id\n status\n }\n id\n }\n id\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "6ad61c2f6638f5d31c9c25b0044f080a";
|
||||
(node as any).hash = "6b07d19642a0227f76f81bb64dac82ea";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useTranslate } from "@probo/i18n";
|
||||
import { useToast } from "@probo/ui";
|
||||
import { useEffect } from "react";
|
||||
import { useMutation } from "react-relay";
|
||||
import { useSearchParams } from "react-router";
|
||||
import { useLocation, useSearchParams } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import type { useRequestAccessCallback_allMutation } from "./__generated__/useRequestAccessCallback_allMutation.graphql";
|
||||
@@ -16,8 +16,11 @@ const documentMutation = graphql`
|
||||
$input: RequestDocumentAccessInput!
|
||||
) {
|
||||
requestDocumentAccess(input: $input) {
|
||||
trustCenterAccess {
|
||||
id
|
||||
document {
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,8 +31,13 @@ const reportMutation = graphql`
|
||||
$input: RequestReportAccessInput!
|
||||
) {
|
||||
requestReportAccess(input: $input) {
|
||||
trustCenterAccess {
|
||||
id
|
||||
audit {
|
||||
report {
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,8 +48,11 @@ const fileMutation = graphql`
|
||||
$input: RequestTrustCenterFileAccessInput!
|
||||
) {
|
||||
requestTrustCenterFileAccess(input: $input) {
|
||||
trustCenterAccess {
|
||||
id
|
||||
file {
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -75,6 +86,7 @@ function successToastArgs(__: (s: string) => string) {
|
||||
|
||||
export function useRequestAccessCallback() {
|
||||
const [searchParams, setSearchParams] = useSearchParams();
|
||||
const location = useLocation();
|
||||
|
||||
const documentId = searchParams.get("request-document-id");
|
||||
const reportId = searchParams.get("request-report-id");
|
||||
@@ -173,6 +185,7 @@ export function useRequestAccessCallback() {
|
||||
toast(successToastArgs(__));
|
||||
searchParams.delete("request-all");
|
||||
setSearchParams(searchParams);
|
||||
window.location.href = location.pathname;
|
||||
},
|
||||
onError: (error) => {
|
||||
toast(errorToastArgs(__, error));
|
||||
@@ -194,5 +207,6 @@ export function useRequestAccessCallback() {
|
||||
searchParams,
|
||||
setSearchParams,
|
||||
toast,
|
||||
location,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<dabe16493c003a98ed8fd555efc85ddc>>
|
||||
* @generated SignedSource<<49da700d766fbc346562bd5c8ec01ade>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -89,8 +89,20 @@ v5 = {
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasUserRequestedAccess",
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
@@ -324,12 +336,12 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "c9c4cb18da98c40646fbbe21c2c5b46f",
|
||||
"cacheID": "479815df76932e5e2a6c57f97efdd029",
|
||||
"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 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"
|
||||
"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 access {\n id\n status\n }\n}\n\nfragment TrustCenterFileRowFragment on TrustCenterFile {\n id\n name\n isUserAuthorized\n access {\n id\n status\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<e0f568dfda1fadf66ee2ec5f79129196>>
|
||||
* @generated SignedSource<<47a6e80d3532b4c93d18495c2be7676d>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -184,8 +184,14 @@ v15 = {
|
||||
v16 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasUserRequestedAccess",
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
(v6/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
@@ -648,12 +654,12 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "442afcae5b414e0130cd702cf01f5c63",
|
||||
"cacheID": "42b477429f092f97b0f444433a78c6d1",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "TrustGraphCurrentQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query TrustGraphCurrentQuery {\n currentTrustCenter {\n id\n slug\n logoFileUrl\n darkLogoFileUrl\n nonDisclosureAgreement {\n fileName\n fileUrl\n viewerSignature {\n status\n id\n }\n }\n organization {\n name\n description\n websiteUrl\n email\n headquarterAddress\n id\n }\n ...OverviewPageFragment\n vendorInfo: vendors(first: 0) {\n totalCount\n }\n audits(first: 50) {\n edges {\n node {\n id\n ...AuditRowFragment\n }\n }\n }\n }\n}\n\nfragment AuditRowFragment on Audit {\n name\n report {\n id\n filename\n isUserAuthorized\n hasUserRequestedAccess\n }\n framework {\n id\n name\n lightLogoURL\n darkLogoURL\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 name\n description\n websiteUrl\n countries\n}\n"
|
||||
"text": "query TrustGraphCurrentQuery {\n currentTrustCenter {\n id\n slug\n logoFileUrl\n darkLogoFileUrl\n nonDisclosureAgreement {\n fileName\n fileUrl\n viewerSignature {\n status\n id\n }\n }\n organization {\n name\n description\n websiteUrl\n email\n headquarterAddress\n id\n }\n ...OverviewPageFragment\n vendorInfo: vendors(first: 0) {\n totalCount\n }\n audits(first: 50) {\n edges {\n node {\n id\n ...AuditRowFragment\n }\n }\n }\n }\n}\n\nfragment AuditRowFragment on Audit {\n name\n report {\n id\n filename\n isUserAuthorized\n access {\n id\n status\n }\n }\n framework {\n id\n name\n lightLogoURL\n darkLogoURL\n }\n}\n\nfragment DocumentRowFragment on Document {\n id\n title\n isUserAuthorized\n access {\n id\n status\n }\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 access {\n id\n status\n }\n}\n\nfragment VendorRowFragment on Vendor {\n name\n description\n websiteUrl\n countries\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user