Add nda to trust center

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-09-09 16:17:24 +02:00
parent 28c41fa4ae
commit b06bd113f3
37 changed files with 2921 additions and 259 deletions

View File

@@ -26,6 +26,7 @@ export const trustCenterAccessesQuery = graphql`
email
name
active
hasAcceptedNonDisclosureAgreement
createdAt
}
}
@@ -48,6 +49,7 @@ export const createTrustCenterAccessMutation = graphql`
email
name
active
hasAcceptedNonDisclosureAgreement
createdAt
}
}
@@ -65,6 +67,7 @@ export const updateTrustCenterAccessMutation = graphql`
email
name
active
hasAcceptedNonDisclosureAgreement
createdAt
updatedAt
}

View File

@@ -12,6 +12,8 @@ export const trustCenterQuery = graphql`
id
active
slug
ndaFileName
ndaFileUrl
createdAt
updatedAt
}
@@ -66,3 +68,48 @@ export function useUpdateTrustCenterMutation() {
}
);
}
export const uploadTrustCenterNDAMutation = graphql`
mutation TrustCenterGraphUploadNDAMutation($input: UploadTrustCenterNDAInput!) {
uploadTrustCenterNDA(input: $input) {
trustCenter {
id
ndaFileName
updatedAt
}
}
}
`;
export function useUploadTrustCenterNDAMutation() {
return useMutationWithToasts(
uploadTrustCenterNDAMutation,
{
successMessage: "NDA uploaded successfully",
errorMessage: "Failed to upload NDA",
}
);
}
export const deleteTrustCenterNDAMutation = graphql`
mutation TrustCenterGraphDeleteNDAMutation($input: DeleteTrustCenterNDAInput!) {
deleteTrustCenterNDA(input: $input) {
trustCenter {
id
ndaFileName
updatedAt
}
}
}
`;
export function useDeleteTrustCenterNDAMutation() {
return useMutationWithToasts(
deleteTrustCenterNDAMutation,
{
successMessage: "NDA deleted successfully",
errorMessage: "Failed to delete NDA",
}
);
}

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<ae95aed7bc22c95f8cc2ab591039c810>>
* @generated SignedSource<<5ccaab70e4cb8c4b5bee7fbe6ba2c0b6>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -27,6 +27,7 @@ export type TrustCenterAccessGraphCreateMutation$data = {
readonly active: boolean;
readonly createdAt: any;
readonly email: string;
readonly hasAcceptedNonDisclosureAgreement: boolean;
readonly id: string;
readonly name: string;
};
@@ -107,6 +108,13 @@ v3 = {
"name": "active",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "hasAcceptedNonDisclosureAgreement",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -186,16 +194,16 @@ return {
]
},
"params": {
"cacheID": "eafddcd0263963235d3249c22eb50593",
"cacheID": "fa88b100be7598cf46159cf79199c398",
"id": null,
"metadata": {},
"name": "TrustCenterAccessGraphCreateMutation",
"operationKind": "mutation",
"text": "mutation TrustCenterAccessGraphCreateMutation(\n $input: CreateTrustCenterAccessInput!\n) {\n createTrustCenterAccess(input: $input) {\n trustCenterAccessEdge {\n cursor\n node {\n id\n email\n name\n active\n createdAt\n }\n }\n }\n}\n"
"text": "mutation TrustCenterAccessGraphCreateMutation(\n $input: CreateTrustCenterAccessInput!\n) {\n createTrustCenterAccess(input: $input) {\n trustCenterAccessEdge {\n cursor\n node {\n id\n email\n name\n active\n hasAcceptedNonDisclosureAgreement\n createdAt\n }\n }\n }\n}\n"
}
};
})();
(node as any).hash = "99676fee0b2de06a92cdad66c577eee7";
(node as any).hash = "6c6c1344730e7d908a5c6392f578ca81";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<2333a6a7d5415f1a08a5612dcaceee8f>>
* @generated SignedSource<<e9cdda9f586cee5ffe66f238216060f6>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -22,6 +22,7 @@ export type TrustCenterAccessGraphQuery$data = {
readonly active: boolean;
readonly createdAt: any;
readonly email: string;
readonly hasAcceptedNonDisclosureAgreement: boolean;
readonly id: string;
readonly name: string;
};
@@ -163,6 +164,13 @@ v5 = [
"name": "active",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "hasAcceptedNonDisclosureAgreement",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -290,7 +298,7 @@ return {
]
},
"params": {
"cacheID": "5b83cd4ae2434ce2e00de7230d264432",
"cacheID": "0286ec03fb4ae012ada7bae8a2234152",
"id": null,
"metadata": {
"connection": [
@@ -307,11 +315,11 @@ return {
},
"name": "TrustCenterAccessGraphQuery",
"operationKind": "query",
"text": "query TrustCenterAccessGraphQuery(\n $trustCenterId: ID!\n) {\n node(id: $trustCenterId) {\n __typename\n ... on TrustCenter {\n id\n accesses(first: 100, orderBy: {field: CREATED_AT, direction: DESC}) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n edges {\n cursor\n node {\n id\n email\n name\n active\n createdAt\n __typename\n }\n }\n }\n }\n id\n }\n}\n"
"text": "query TrustCenterAccessGraphQuery(\n $trustCenterId: ID!\n) {\n node(id: $trustCenterId) {\n __typename\n ... on TrustCenter {\n id\n accesses(first: 100, orderBy: {field: CREATED_AT, direction: DESC}) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n edges {\n cursor\n node {\n id\n email\n name\n active\n hasAcceptedNonDisclosureAgreement\n createdAt\n __typename\n }\n }\n }\n }\n id\n }\n}\n"
}
};
})();
(node as any).hash = "af598fd2af198e63ed84fd618857a985";
(node as any).hash = "f837b96937f1397ac1a3065f58386e4d";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<6de2ecb63a58c88c3008368061943b49>>
* @generated SignedSource<<d2f40d8fc2bd9c7627d308660dedb1e5>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -23,6 +23,7 @@ export type TrustCenterAccessGraphUpdateMutation$data = {
readonly active: boolean;
readonly createdAt: any;
readonly email: string;
readonly hasAcceptedNonDisclosureAgreement: boolean;
readonly id: string;
readonly name: string;
readonly updatedAt: any;
@@ -93,6 +94,13 @@ v1 = [
"name": "active",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "hasAcceptedNonDisclosureAgreement",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -132,16 +140,16 @@ return {
"selections": (v1/*: any*/)
},
"params": {
"cacheID": "683ee01fb5173b49b0a7f3c2d99cf002",
"cacheID": "223169ee8a4f65008047097ecff68fc5",
"id": null,
"metadata": {},
"name": "TrustCenterAccessGraphUpdateMutation",
"operationKind": "mutation",
"text": "mutation TrustCenterAccessGraphUpdateMutation(\n $input: UpdateTrustCenterAccessInput!\n) {\n updateTrustCenterAccess(input: $input) {\n trustCenterAccess {\n id\n email\n name\n active\n createdAt\n updatedAt\n }\n }\n}\n"
"text": "mutation TrustCenterAccessGraphUpdateMutation(\n $input: UpdateTrustCenterAccessInput!\n) {\n updateTrustCenterAccess(input: $input) {\n trustCenterAccess {\n id\n email\n name\n active\n hasAcceptedNonDisclosureAgreement\n createdAt\n updatedAt\n }\n }\n}\n"
}
};
})();
(node as any).hash = "cccd083b0047f6bc7b504b7494205e9d";
(node as any).hash = "0da1f737e6ea1db7a1b9930c4b6cc545";
export default node;

View File

@@ -0,0 +1,121 @@
/**
* @generated SignedSource<<43a8665719f251c1bae028ff7821b14a>>
* @lightSyntaxTransform
* @nogrep
*/
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type DeleteTrustCenterNDAInput = {
trustCenterId: string;
};
export type TrustCenterGraphDeleteNDAMutation$variables = {
input: DeleteTrustCenterNDAInput;
};
export type TrustCenterGraphDeleteNDAMutation$data = {
readonly deleteTrustCenterNDA: {
readonly trustCenter: {
readonly id: string;
readonly ndaFileName: string | null | undefined;
readonly updatedAt: any;
};
};
};
export type TrustCenterGraphDeleteNDAMutation = {
response: TrustCenterGraphDeleteNDAMutation$data;
variables: TrustCenterGraphDeleteNDAMutation$variables;
};
const node: ConcreteRequest = (function(){
var v0 = [
{
"defaultValue": null,
"kind": "LocalArgument",
"name": "input"
}
],
v1 = [
{
"alias": null,
"args": [
{
"kind": "Variable",
"name": "input",
"variableName": "input"
}
],
"concreteType": "DeleteTrustCenterNDAPayload",
"kind": "LinkedField",
"name": "deleteTrustCenterNDA",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenter",
"kind": "LinkedField",
"name": "trustCenter",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "id",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "ndaFileName",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "updatedAt",
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": null
}
];
return {
"fragment": {
"argumentDefinitions": (v0/*: any*/),
"kind": "Fragment",
"metadata": null,
"name": "TrustCenterGraphDeleteNDAMutation",
"selections": (v1/*: any*/),
"type": "Mutation",
"abstractKey": null
},
"kind": "Request",
"operation": {
"argumentDefinitions": (v0/*: any*/),
"kind": "Operation",
"name": "TrustCenterGraphDeleteNDAMutation",
"selections": (v1/*: any*/)
},
"params": {
"cacheID": "fa3ebf3593c396bf05819d357d9f909f",
"id": null,
"metadata": {},
"name": "TrustCenterGraphDeleteNDAMutation",
"operationKind": "mutation",
"text": "mutation TrustCenterGraphDeleteNDAMutation(\n $input: DeleteTrustCenterNDAInput!\n) {\n deleteTrustCenterNDA(input: $input) {\n trustCenter {\n id\n ndaFileName\n updatedAt\n }\n }\n}\n"
}
};
})();
(node as any).hash = "9c055069b9e2e7432fed7509f6578a07";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<25550a93c5459c3b405c782be19ac888>>
* @generated SignedSource<<9dbea87f398ce8189cb2431d7c03912c>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -37,6 +37,8 @@ export type TrustCenterGraphQuery$data = {
readonly active: boolean;
readonly createdAt: any;
readonly id: string;
readonly ndaFileName: string | null | undefined;
readonly ndaFileUrl: string | null | undefined;
readonly slug: string;
readonly updatedAt: any;
} | null | undefined;
@@ -114,6 +116,20 @@ v5 = {
"name": "slug",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "ndaFileName",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "ndaFileUrl",
"storageKey": null
},
(v4/*: any*/),
{
"alias": null,
@@ -544,16 +560,16 @@ return {
]
},
"params": {
"cacheID": "28c1a32327e2fee9320fd091100ec800",
"cacheID": "8dff30a639470418ba7151cb5743d3cc",
"id": null,
"metadata": {},
"name": "TrustCenterGraphQuery",
"operationKind": "query",
"text": "query TrustCenterGraphQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n name\n trustCenter {\n id\n active\n slug\n createdAt\n updatedAt\n }\n documents(first: 100) {\n edges {\n node {\n id\n ...TrustCenterDocumentsCardFragment\n }\n }\n }\n audits(first: 100) {\n edges {\n node {\n id\n ...TrustCenterAuditsCardFragment\n }\n }\n }\n vendors(first: 100) {\n edges {\n node {\n id\n ...TrustCenterVendorsCardFragment\n }\n }\n }\n }\n id\n }\n}\n\nfragment TrustCenterAuditsCardFragment on Audit {\n id\n name\n framework {\n name\n id\n }\n validFrom\n validUntil\n state\n showOnTrustCenter\n createdAt\n}\n\nfragment TrustCenterDocumentsCardFragment on Document {\n id\n title\n createdAt\n documentType\n showOnTrustCenter\n versions(first: 1) {\n edges {\n node {\n id\n status\n }\n }\n }\n}\n\nfragment TrustCenterVendorsCardFragment on Vendor {\n id\n name\n category\n description\n showOnTrustCenter\n createdAt\n}\n"
"text": "query TrustCenterGraphQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n name\n trustCenter {\n id\n active\n slug\n ndaFileName\n ndaFileUrl\n createdAt\n updatedAt\n }\n documents(first: 100) {\n edges {\n node {\n id\n ...TrustCenterDocumentsCardFragment\n }\n }\n }\n audits(first: 100) {\n edges {\n node {\n id\n ...TrustCenterAuditsCardFragment\n }\n }\n }\n vendors(first: 100) {\n edges {\n node {\n id\n ...TrustCenterVendorsCardFragment\n }\n }\n }\n }\n id\n }\n}\n\nfragment TrustCenterAuditsCardFragment on Audit {\n id\n name\n framework {\n name\n id\n }\n validFrom\n validUntil\n state\n showOnTrustCenter\n createdAt\n}\n\nfragment TrustCenterDocumentsCardFragment on Document {\n id\n title\n createdAt\n documentType\n showOnTrustCenter\n versions(first: 1) {\n edges {\n node {\n id\n status\n }\n }\n }\n}\n\nfragment TrustCenterVendorsCardFragment on Vendor {\n id\n name\n category\n description\n showOnTrustCenter\n createdAt\n}\n"
}
};
})();
(node as any).hash = "260529b3ca03240b07989f278bb7a539";
(node as any).hash = "21b2915ae5002dd54c990013e94adf5d";
export default node;

View File

@@ -0,0 +1,123 @@
/**
* @generated SignedSource<<966d4aa638042469c717ddc96e5c5d78>>
* @lightSyntaxTransform
* @nogrep
*/
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type UploadTrustCenterNDAInput = {
file: any;
fileName: string;
trustCenterId: string;
};
export type TrustCenterGraphUploadNDAMutation$variables = {
input: UploadTrustCenterNDAInput;
};
export type TrustCenterGraphUploadNDAMutation$data = {
readonly uploadTrustCenterNDA: {
readonly trustCenter: {
readonly id: string;
readonly ndaFileName: string | null | undefined;
readonly updatedAt: any;
};
};
};
export type TrustCenterGraphUploadNDAMutation = {
response: TrustCenterGraphUploadNDAMutation$data;
variables: TrustCenterGraphUploadNDAMutation$variables;
};
const node: ConcreteRequest = (function(){
var v0 = [
{
"defaultValue": null,
"kind": "LocalArgument",
"name": "input"
}
],
v1 = [
{
"alias": null,
"args": [
{
"kind": "Variable",
"name": "input",
"variableName": "input"
}
],
"concreteType": "UploadTrustCenterNDAPayload",
"kind": "LinkedField",
"name": "uploadTrustCenterNDA",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "TrustCenter",
"kind": "LinkedField",
"name": "trustCenter",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "id",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "ndaFileName",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "updatedAt",
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": null
}
];
return {
"fragment": {
"argumentDefinitions": (v0/*: any*/),
"kind": "Fragment",
"metadata": null,
"name": "TrustCenterGraphUploadNDAMutation",
"selections": (v1/*: any*/),
"type": "Mutation",
"abstractKey": null
},
"kind": "Request",
"operation": {
"argumentDefinitions": (v0/*: any*/),
"kind": "Operation",
"name": "TrustCenterGraphUploadNDAMutation",
"selections": (v1/*: any*/)
},
"params": {
"cacheID": "09a5dbf73f3e279173691b235f9da2e2",
"id": null,
"metadata": {},
"name": "TrustCenterGraphUploadNDAMutation",
"operationKind": "mutation",
"text": "mutation TrustCenterGraphUploadNDAMutation(\n $input: UploadTrustCenterNDAInput!\n) {\n uploadTrustCenterNDA(input: $input) {\n trustCenter {\n id\n ndaFileName\n updatedAt\n }\n }\n}\n"
}
};
})();
(node as any).hash = "b9877f8a5b9c2c12addeb939360719f1";
export default node;