Add compliance page mailing list base
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import { UnAuthenticatedError } from "@probo/relay";
|
||||
import {
|
||||
Button,
|
||||
Card,
|
||||
IconBell2,
|
||||
IconBlock,
|
||||
IconLock,
|
||||
IconMedal,
|
||||
@@ -20,6 +21,8 @@ import type { TrustGraphCurrentQuery$data } from "#/queries/__generated__/TrustG
|
||||
import { getPathPrefix } from "#/utils/pathPrefix";
|
||||
|
||||
import type { OrganizationSidebar_requestAllAccessesMutation } from "./__generated__/OrganizationSidebar_requestAllAccessesMutation.graphql";
|
||||
import type { OrganizationSidebar_subscribeToMailingListMutation } from "./__generated__/OrganizationSidebar_subscribeToMailingListMutation.graphql";
|
||||
import type { OrganizationSidebar_unsubscribeFromMailingListMutation } from "./__generated__/OrganizationSidebar_unsubscribeFromMailingListMutation.graphql";
|
||||
import { FrameworkBadge } from "./FrameworkBadge";
|
||||
|
||||
const requestAllAccessesMutation = graphql`
|
||||
@@ -32,11 +35,35 @@ const requestAllAccessesMutation = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
const subscribeToMailingListMutation = graphql`
|
||||
mutation OrganizationSidebar_subscribeToMailingListMutation {
|
||||
subscribeToMailingList {
|
||||
subscription {
|
||||
id
|
||||
email
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const unsubscribeFromMailingListMutation = graphql`
|
||||
mutation OrganizationSidebar_unsubscribeFromMailingListMutation {
|
||||
unsubscribeFromMailingList {
|
||||
deletedMailingListSubscriberId @deleteRecord
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export function OrganizationSidebar({
|
||||
trustCenter,
|
||||
isAuthenticated,
|
||||
}: {
|
||||
trustCenter: TrustGraphCurrentQuery$data["currentTrustCenter"];
|
||||
isAuthenticated: boolean;
|
||||
}) {
|
||||
const trustCenterId = trustCenter?.id;
|
||||
const { __ } = useTranslate();
|
||||
const { toast } = useToast();
|
||||
const theme = useSystemTheme();
|
||||
@@ -51,6 +78,16 @@ export function OrganizationSidebar({
|
||||
requestAllAccessesMutation,
|
||||
);
|
||||
|
||||
const [subscribeToMailingList, isSubscribing]
|
||||
= useMutation<OrganizationSidebar_subscribeToMailingListMutation>(
|
||||
subscribeToMailingListMutation,
|
||||
);
|
||||
|
||||
const [unsubscribeFromMailingList, isUnsubscribing]
|
||||
= useMutation<OrganizationSidebar_unsubscribeFromMailingListMutation>(
|
||||
unsubscribeFromMailingListMutation,
|
||||
);
|
||||
|
||||
const handleRequestAllAccesses = () => {
|
||||
requestAllAccesses({
|
||||
variables: {},
|
||||
@@ -93,6 +130,71 @@ export function OrganizationSidebar({
|
||||
});
|
||||
};
|
||||
|
||||
const handleSubscribe = () => {
|
||||
subscribeToMailingList({
|
||||
variables: {},
|
||||
updater: (store, data) => {
|
||||
const subscription = data?.subscribeToMailingList?.subscription;
|
||||
if (!subscription?.id || !trustCenterId) return;
|
||||
const trustCenterRecord = store.get(trustCenterId);
|
||||
if (!trustCenterRecord) return;
|
||||
const subscriptionRecord = store.get(subscription.id);
|
||||
if (!subscriptionRecord) return;
|
||||
trustCenterRecord.setLinkedRecord(subscriptionRecord, "viewerSubscription");
|
||||
},
|
||||
onCompleted: (_, errors) => {
|
||||
if (errors?.length) {
|
||||
toast({
|
||||
title: __("Error"),
|
||||
description: formatError(__("Cannot subscribe"), errors),
|
||||
variant: "error",
|
||||
});
|
||||
return;
|
||||
}
|
||||
toast({
|
||||
title: __("Subscribed"),
|
||||
description: __("You will be notified of security updates."),
|
||||
variant: "success",
|
||||
});
|
||||
},
|
||||
onError: (error) => {
|
||||
toast({
|
||||
title: __("Error"),
|
||||
description: error.message ?? __("Cannot subscribe"),
|
||||
variant: "error",
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const handleUnsubscribe = () => {
|
||||
unsubscribeFromMailingList({
|
||||
variables: {},
|
||||
onCompleted: (_, errors) => {
|
||||
if (errors?.length) {
|
||||
toast({
|
||||
title: __("Error"),
|
||||
description: formatError(__("Cannot unsubscribe"), errors),
|
||||
variant: "error",
|
||||
});
|
||||
return;
|
||||
}
|
||||
toast({
|
||||
title: __("Unsubscribed"),
|
||||
description: __("You will no longer receive security updates."),
|
||||
variant: "success",
|
||||
});
|
||||
},
|
||||
onError: (error) => {
|
||||
toast({
|
||||
title: __("Error"),
|
||||
description: error.message ?? __("Cannot unsubscribe"),
|
||||
variant: "error",
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
if (!trustCenter) {
|
||||
return null;
|
||||
}
|
||||
@@ -188,15 +290,43 @@ export function OrganizationSidebar({
|
||||
</>
|
||||
)}
|
||||
|
||||
<Button
|
||||
disabled={isRequestingAccess}
|
||||
variant="primary"
|
||||
icon={IconLock}
|
||||
className="w-full h-10"
|
||||
onClick={handleRequestAllAccesses}
|
||||
>
|
||||
{__("Request access")}
|
||||
</Button>
|
||||
{/* Actions */}
|
||||
<div className="space-y-2">
|
||||
<Button
|
||||
disabled={isRequestingAccess}
|
||||
variant="primary"
|
||||
icon={IconLock}
|
||||
className="w-full h-10"
|
||||
onClick={handleRequestAllAccesses}
|
||||
>
|
||||
{__("Request access")}
|
||||
</Button>
|
||||
{isAuthenticated && (
|
||||
trustCenter.viewerSubscription
|
||||
? (
|
||||
<Button
|
||||
disabled={isUnsubscribing}
|
||||
variant="secondary"
|
||||
icon={IconBell2}
|
||||
className="w-full h-10"
|
||||
onClick={handleUnsubscribe}
|
||||
>
|
||||
{__("Unsubscribe from updates")}
|
||||
</Button>
|
||||
)
|
||||
: (
|
||||
<Button
|
||||
disabled={isSubscribing}
|
||||
variant="secondary"
|
||||
icon={IconBell2}
|
||||
className="w-full h-10"
|
||||
onClick={handleSubscribe}
|
||||
>
|
||||
{__("Subscribe to updates")}
|
||||
</Button>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
|
||||
111
apps/trust/src/components/__generated__/OrganizationSidebar_subscribeToMailingListMutation.graphql.ts
generated
Normal file
111
apps/trust/src/components/__generated__/OrganizationSidebar_subscribeToMailingListMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* @generated SignedSource<<80e6e1e3558d126472e7affb5b7b6cbd>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type OrganizationSidebar_subscribeToMailingListMutation$variables = Record<PropertyKey, never>;
|
||||
export type OrganizationSidebar_subscribeToMailingListMutation$data = {
|
||||
readonly subscribeToMailingList: {
|
||||
readonly subscription: {
|
||||
readonly createdAt: any;
|
||||
readonly email: any;
|
||||
readonly id: string;
|
||||
readonly updatedAt: any;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type OrganizationSidebar_subscribeToMailingListMutation = {
|
||||
response: OrganizationSidebar_subscribeToMailingListMutation$data;
|
||||
variables: OrganizationSidebar_subscribeToMailingListMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "SubscribeToMailingListPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "subscribeToMailingList",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "MailingListSubscriber",
|
||||
"kind": "LinkedField",
|
||||
"name": "subscription",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "email",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "OrganizationSidebar_subscribeToMailingListMutation",
|
||||
"selections": (v0/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [],
|
||||
"kind": "Operation",
|
||||
"name": "OrganizationSidebar_subscribeToMailingListMutation",
|
||||
"selections": (v0/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "07d99ad1645ea1e8752678fd9b5e6748",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "OrganizationSidebar_subscribeToMailingListMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation OrganizationSidebar_subscribeToMailingListMutation {\n subscribeToMailingList {\n subscription {\n id\n email\n createdAt\n updatedAt\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "80d3e85f4a55a7de7b066959f4a457c8";
|
||||
|
||||
export default node;
|
||||
@@ -0,0 +1,96 @@
|
||||
/**
|
||||
* @generated SignedSource<<8c1211258e4480dcaa6fdf14364cb49b>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type OrganizationSidebar_unsubscribeFromMailingListMutation$variables = Record<PropertyKey, never>;
|
||||
export type OrganizationSidebar_unsubscribeFromMailingListMutation$data = {
|
||||
readonly unsubscribeFromMailingList: {
|
||||
readonly deletedMailingListSubscriberId: string | null | undefined;
|
||||
};
|
||||
};
|
||||
export type OrganizationSidebar_unsubscribeFromMailingListMutation = {
|
||||
response: OrganizationSidebar_unsubscribeFromMailingListMutation$data;
|
||||
variables: OrganizationSidebar_unsubscribeFromMailingListMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedMailingListSubscriberId",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "OrganizationSidebar_unsubscribeFromMailingListMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "UnsubscribeFromMailingListPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "unsubscribeFromMailingList",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [],
|
||||
"kind": "Operation",
|
||||
"name": "OrganizationSidebar_unsubscribeFromMailingListMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "UnsubscribeFromMailingListPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "unsubscribeFromMailingList",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "deleteRecord",
|
||||
"key": "",
|
||||
"kind": "ScalarHandle",
|
||||
"name": "deletedMailingListSubscriberId"
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "1c6706f94348a5426c1e57d5fe99ab82",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "OrganizationSidebar_unsubscribeFromMailingListMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation OrganizationSidebar_unsubscribeFromMailingListMutation {\n unsubscribeFromMailingList {\n deletedMailingListSubscriberId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "7f3949f63166fc3bd23838a44fb94993";
|
||||
|
||||
export default node;
|
||||
@@ -18,6 +18,7 @@ export function MainLayout(props: Props) {
|
||||
const { __ } = useTranslate();
|
||||
const data = usePreloadedQuery(currentTrustGraphQuery, props.queryRef);
|
||||
const trustCenter = data.currentTrustCenter;
|
||||
const isAuthenticated = data.viewer != null;
|
||||
|
||||
const theme = useSystemTheme();
|
||||
|
||||
@@ -31,7 +32,7 @@ export function MainLayout(props: Props) {
|
||||
return (
|
||||
<TrustCenterProvider trustCenter={trustCenter}>
|
||||
<div className="grid grid-cols-1 max-w-[1280px] mx-4 pt-6 gap-4 lg:mx-auto lg:gap-10 lg:pt-20 lg:grid-cols-[400px_1fr] lg:items-start ">
|
||||
<OrganizationSidebar trustCenter={trustCenter} />
|
||||
<OrganizationSidebar trustCenter={trustCenter} isAuthenticated={isAuthenticated} />
|
||||
<main>
|
||||
<Tabs className="mb-8">
|
||||
<TabLink to="/overview">{__("Overview")}</TabLink>
|
||||
|
||||
@@ -3,9 +3,18 @@ import { graphql } from "relay-runtime";
|
||||
// Queries for custom domain (subdomain) approach
|
||||
export const currentTrustGraphQuery = graphql`
|
||||
query TrustGraphCurrentQuery {
|
||||
viewer {
|
||||
id
|
||||
}
|
||||
currentTrustCenter @required(action: THROW) {
|
||||
id
|
||||
slug
|
||||
viewerSubscription {
|
||||
id
|
||||
email
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
logoFileUrl
|
||||
darkLogoFileUrl
|
||||
nonDisclosureAgreement {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<74757bf9a32552f6353eb888c9f663cd>>
|
||||
* @generated SignedSource<<5b0657c3423f38cbd689de2dae810831>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -62,8 +62,17 @@ export type TrustGraphCurrentQuery$data = {
|
||||
readonly vendorInfo: {
|
||||
readonly totalCount: number;
|
||||
};
|
||||
readonly viewerSubscription: {
|
||||
readonly createdAt: any;
|
||||
readonly email: any;
|
||||
readonly id: string;
|
||||
readonly updatedAt: any;
|
||||
} | null | undefined;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"OverviewPageFragment">;
|
||||
};
|
||||
readonly viewer: {
|
||||
readonly id: string;
|
||||
} | null | undefined;
|
||||
};
|
||||
export type TrustGraphCurrentQuery = {
|
||||
response: TrustGraphCurrentQuery$data;
|
||||
@@ -81,81 +90,120 @@ var v0 = {
|
||||
v1 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "slug",
|
||||
"concreteType": "Identity",
|
||||
"kind": "LinkedField",
|
||||
"name": "viewer",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "logoFileUrl",
|
||||
"name": "slug",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "darkLogoFileUrl",
|
||||
"name": "email",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "fileName",
|
||||
"concreteType": "MailingListSubscriber",
|
||||
"kind": "LinkedField",
|
||||
"name": "viewerSubscription",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "fileUrl",
|
||||
"name": "logoFileUrl",
|
||||
"storageKey": null
|
||||
},
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"name": "darkLogoFileUrl",
|
||||
"storageKey": null
|
||||
},
|
||||
v7 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"name": "fileName",
|
||||
"storageKey": null
|
||||
},
|
||||
v8 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"name": "fileUrl",
|
||||
"storageKey": null
|
||||
},
|
||||
v9 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "websiteUrl",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
},
|
||||
v10 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "email",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v11 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "headquarterAddress",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
v12 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "websiteUrl",
|
||||
"storageKey": null
|
||||
},
|
||||
v13 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "headquarterAddress",
|
||||
"storageKey": null
|
||||
},
|
||||
v14 = {
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
@@ -186,7 +234,7 @@ v12 = {
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v10/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -203,7 +251,7 @@ v12 = {
|
||||
],
|
||||
"storageKey": "externalUrls(first:20)"
|
||||
},
|
||||
v13 = {
|
||||
v15 = {
|
||||
"alias": "vendorInfo",
|
||||
"args": [
|
||||
{
|
||||
@@ -227,28 +275,28 @@ v13 = {
|
||||
],
|
||||
"storageKey": "vendors(first:0)"
|
||||
},
|
||||
v14 = [
|
||||
v16 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 50
|
||||
}
|
||||
],
|
||||
v15 = [
|
||||
v17 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 5
|
||||
}
|
||||
],
|
||||
v16 = {
|
||||
v18 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "isUserAuthorized",
|
||||
"storageKey": null
|
||||
},
|
||||
v17 = {
|
||||
v19 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "DocumentAccess",
|
||||
@@ -257,11 +305,11 @@ v17 = {
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
(v6/*: any*/)
|
||||
(v9/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v18 = {
|
||||
v20 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
@@ -270,7 +318,7 @@ v18 = {
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v10/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -295,6 +343,7 @@ return {
|
||||
"metadata": null,
|
||||
"name": "TrustGraphCurrentQuery",
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"kind": "RequiredField",
|
||||
"field": {
|
||||
@@ -306,9 +355,10 @@ return {
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -317,8 +367,8 @@ return {
|
||||
"name": "nonDisclosureAgreement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -327,7 +377,7 @@ return {
|
||||
"name": "viewerSignature",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v6/*: any*/)
|
||||
(v9/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
@@ -342,24 +392,24 @@ return {
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/)
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v13/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v12/*: any*/),
|
||||
(v14/*: any*/),
|
||||
{
|
||||
"args": null,
|
||||
"kind": "FragmentSpread",
|
||||
"name": "OverviewPageFragment"
|
||||
},
|
||||
(v13/*: any*/),
|
||||
(v15/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v14/*: any*/),
|
||||
"args": (v16/*: any*/),
|
||||
"concreteType": "AuditConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "audits",
|
||||
@@ -398,7 +448,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v14/*: any*/),
|
||||
"args": (v16/*: any*/),
|
||||
"concreteType": "ComplianceFrameworkConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "complianceFrameworks",
|
||||
@@ -461,6 +511,7 @@ return {
|
||||
"kind": "Operation",
|
||||
"name": "TrustGraphCurrentQuery",
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -470,9 +521,10 @@ return {
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -481,8 +533,8 @@ return {
|
||||
"name": "nonDisclosureAgreement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -491,7 +543,7 @@ return {
|
||||
"name": "viewerSignature",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v6/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
@@ -507,16 +559,16 @@ return {
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v13/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v12/*: any*/),
|
||||
(v14/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
@@ -548,7 +600,7 @@ return {
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v10/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -556,7 +608,7 @@ return {
|
||||
"name": "logoUrl",
|
||||
"storageKey": null
|
||||
},
|
||||
(v9/*: any*/)
|
||||
(v12/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
@@ -604,9 +656,9 @@ return {
|
||||
"name": "countries",
|
||||
"storageKey": null
|
||||
},
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/)
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
@@ -618,7 +670,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v15/*: any*/),
|
||||
"args": (v17/*: any*/),
|
||||
"concreteType": "DocumentConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "documents",
|
||||
@@ -648,8 +700,8 @@ return {
|
||||
"name": "title",
|
||||
"storageKey": null
|
||||
},
|
||||
(v16/*: any*/),
|
||||
(v17/*: any*/),
|
||||
(v18/*: any*/),
|
||||
(v19/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -668,7 +720,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v15/*: any*/),
|
||||
"args": (v17/*: any*/),
|
||||
"concreteType": "TrustCenterFileConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "trustCenterFiles",
|
||||
@@ -698,9 +750,9 @@ return {
|
||||
"name": "category",
|
||||
"storageKey": null
|
||||
},
|
||||
(v7/*: any*/),
|
||||
(v16/*: any*/),
|
||||
(v17/*: any*/)
|
||||
(v10/*: any*/),
|
||||
(v18/*: any*/),
|
||||
(v19/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
@@ -710,10 +762,10 @@ return {
|
||||
],
|
||||
"storageKey": "trustCenterFiles(first:5)"
|
||||
},
|
||||
(v13/*: any*/),
|
||||
(v15/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v14/*: any*/),
|
||||
"args": (v16/*: any*/),
|
||||
"concreteType": "AuditConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "audits",
|
||||
@@ -736,7 +788,7 @@ return {
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v10/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -753,12 +805,12 @@ return {
|
||||
"name": "filename",
|
||||
"storageKey": null
|
||||
},
|
||||
(v16/*: any*/),
|
||||
(v17/*: any*/)
|
||||
(v18/*: any*/),
|
||||
(v19/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v18/*: any*/)
|
||||
(v20/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
@@ -770,7 +822,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v14/*: any*/),
|
||||
"args": (v16/*: any*/),
|
||||
"concreteType": "ComplianceFrameworkConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "complianceFrameworks",
|
||||
@@ -793,7 +845,7 @@ return {
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
(v18/*: any*/)
|
||||
(v20/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
@@ -809,16 +861,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "96e75937f385e17b760440e001cefc47",
|
||||
"cacheID": "80334c766999a3d299eaf40fd32235b7",
|
||||
"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 externalUrls(first: 20) {\n edges {\n node {\n id\n name\n url\n }\n }\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 complianceFrameworks(first: 50) {\n edges {\n node {\n id\n framework {\n ...FrameworkBadgeFragment\n id\n }\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 FrameworkBadgeFragment on Framework {\n id\n name\n lightLogoURL\n darkLogoURL\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"
|
||||
"text": "query TrustGraphCurrentQuery {\n viewer {\n id\n }\n currentTrustCenter {\n id\n slug\n viewerSubscription {\n id\n email\n createdAt\n updatedAt\n }\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 externalUrls(first: 20) {\n edges {\n node {\n id\n name\n url\n }\n }\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 complianceFrameworks(first: 50) {\n edges {\n node {\n id\n framework {\n ...FrameworkBadgeFragment\n id\n }\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 FrameworkBadgeFragment on Framework {\n id\n name\n lightLogoURL\n darkLogoURL\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"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "ca6f04fecf9bce92407f33e8c0e4bd03";
|
||||
(node as any).hash = "d38cdfff47370448fff4d9c6c22ad1bd";
|
||||
|
||||
export default node;
|
||||
|
||||
Reference in New Issue
Block a user