Add procedure document type

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-10-13 22:36:37 +02:00
parent b2392f51c4
commit 0c4a7169df
23 changed files with 73 additions and 53 deletions

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<743c5a0c4d380bd05c0d8ccd7a664e58>>
* @generated SignedSource<<0f8cdaa2d7380a1128e7c42004b7d506>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,7 +10,7 @@
import { ReaderFragment } from 'relay-runtime';
export type DocumentStatus = "DRAFT" | "PUBLISHED";
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
import { FragmentRefs } from "relay-runtime";
export type LinkedDocumentsCardFragment$data = {
readonly createdAt: any;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<7b0ec493ab146db602cae612158407cb>>
* @generated SignedSource<<096eea04ea39ac931b8627aee0ebb26c>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -9,7 +9,7 @@
// @ts-nocheck
import { ReaderFragment } from 'relay-runtime';
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
import { FragmentRefs } from "relay-runtime";
export type LinkedDocumentsDialogFragment$data = {
readonly documents: {

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<869852416d522b3851e516a543454edb>>
* @generated SignedSource<<40e45041dd8b72c58f1059d9cad3c15c>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,7 +10,7 @@
import { ReaderFragment } from 'relay-runtime';
export type DocumentStatus = "DRAFT" | "PUBLISHED";
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type TrustCenterVisibility = "NONE" | "PRIVATE" | "PUBLIC";
import { FragmentRefs } from "relay-runtime";
export type TrustCenterDocumentsCardFragment$data = {

View File

@@ -5,7 +5,7 @@ export const documentSchema = z.object({
title: z.string(),
content: z.string(),
ownerId: z.string(),
documentType: z.enum(["OTHER", "ISMS", "POLICY"]),
documentType: z.enum(["OTHER", "ISMS", "POLICY", "PROCEDURE"]),
});
export const useDocumentForm = () => {

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<2ff966b9632595cece04e7a5ef3f7dd7>>
* @generated SignedSource<<5c208d2afc4eb2968b59215d3e79231b>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -9,7 +9,7 @@
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type CreateTrustCenterAccessInput = {
active: boolean;
email: string;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<4aef541df2f5673dd3694ca275f3164d>>
* @generated SignedSource<<395567ba680d0a9e1bad1cdef52bc2e1>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -9,7 +9,7 @@
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type UpdateTrustCenterAccessInput = {
active?: boolean | null | undefined;
documentIds?: ReadonlyArray<string> | null | undefined;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<3717625e10534aaff2d7967a1824405b>>
* @generated SignedSource<<ef0d644a344dbab40145e3f4128cd0ec>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -9,7 +9,7 @@
// @ts-nocheck
import { ReaderFragment } from 'relay-runtime';
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
import { FragmentRefs } from "relay-runtime";
export type TrustCenterAccessGraph_accesses$data = {
readonly accesses: {

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<64b79a80214710d6c3e4676cd63136e4>>
* @generated SignedSource<<18b931f119e8ef68f016dfcdf76366cc>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,7 +10,7 @@
import { ConcreteRequest } from 'relay-runtime';
import { FragmentRefs } from "relay-runtime";
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type TrustCenterVisibility = "NONE" | "PRIVATE" | "PUBLIC";
export type UpdateDocumentInput = {
content?: string | null | undefined;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<9bec5530e7a90ab3fb9f21c5c2d92286>>
* @generated SignedSource<<993de5bc8086378a2993bf0d0cf13658>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,7 +10,7 @@
import { ReaderFragment } from 'relay-runtime';
export type DocumentStatus = "DRAFT" | "PUBLISHED";
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type DocumentVersionSignatureState = "REQUESTED" | "SIGNED";
import { FragmentRefs } from "relay-runtime";
export type DocumentDetailPageDocumentFragment$data = {

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<4cf9e23d757753509bb695aab205ee46>>
* @generated SignedSource<<07388b39e4109439464531d46a890841>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,7 +10,7 @@
import { ReaderFragment } from 'relay-runtime';
export type DocumentStatus = "DRAFT" | "PUBLISHED";
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type DocumentVersionSignatureState = "REQUESTED" | "SIGNED";
import { FragmentRefs } from "relay-runtime";
export type DocumentDetailPageRowFragment$data = {

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<efe95ef5290fa021d00c7f32922ae801>>
* @generated SignedSource<<575a6c27726fb3e5457989b0d5a4edc2>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -9,7 +9,7 @@
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type TrustCenterVisibility = "NONE" | "PRIVATE" | "PUBLIC";
export type UpdateDocumentInput = {
content?: string | null | undefined;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<428295a295761694c38d77aa3476d01f>>
* @generated SignedSource<<87090235b9f77e1e018ec30e6ff9bacb>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,7 +10,7 @@
import { ReaderFragment } from 'relay-runtime';
export type DocumentStatus = "DRAFT" | "PUBLISHED";
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type DocumentVersionSignatureState = "REQUESTED" | "SIGNED";
import { FragmentRefs } from "relay-runtime";
export type DocumentsPageRowFragment$data = {

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<7f9d3e67d06cbf2aaf21c61be65bc7ee>>
* @generated SignedSource<<b4a59b6243c579d023e7ab12cc037f20>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,7 +10,7 @@
import { ConcreteRequest } from 'relay-runtime';
import { FragmentRefs } from "relay-runtime";
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type TrustCenterVisibility = "NONE" | "PRIVATE" | "PUBLIC";
export type CreateDocumentInput = {
content: string;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<83bb224d046b751075c6a8667e91e88b>>
* @generated SignedSource<<308785cba630e97aaf861905cf22c423>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,7 +10,7 @@
import { ReaderFragment } from 'relay-runtime';
export type CountryCode = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
import { FragmentRefs } from "relay-runtime";
export type OverviewPageFragment$data = {
readonly documents: {

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<c1dbff6aa4c7dd1ce114b8d1fb9b76e6>>
* @generated SignedSource<<091d468e321f2cd6cdead063c35c6a45>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,7 +10,7 @@
import { ConcreteRequest } from 'relay-runtime';
import { FragmentRefs } from "relay-runtime";
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type TrustGraphCurrentDocumentsQuery$variables = Record<PropertyKey, never>;
export type TrustGraphCurrentDocumentsQuery$data = {
readonly currentTrustCenter: {

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<f592abfc32b9882d40bdfd0d91908ea2>>
* @generated SignedSource<<922757406dbc7a2c20b502ef6dd4c0d8>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,7 +10,7 @@
import { ConcreteRequest } from 'relay-runtime';
import { FragmentRefs } from "relay-runtime";
export type DocumentType = "ISMS" | "OTHER" | "POLICY";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type TrustGraphDocumentsQuery$variables = {
slug: string;
};

View File

@@ -1,6 +1,6 @@
type Translator = (s: string) => string;
export const documentTypes = ["OTHER", "ISMS", "POLICY"] as const;
export const documentTypes = ["OTHER", "ISMS", "POLICY", "PROCEDURE"] as const;
export function getDocumentTypeLabel(__: Translator, type: string) {
switch (type) {
@@ -10,5 +10,7 @@ export function getDocumentTypeLabel(__: Translator, type: string) {
return __("ISMS");
case "POLICY":
return __("Policy");
case "PROCEDURE":
return __("Procedure");
}
}

View File

@@ -24,9 +24,10 @@ type (
)
const (
DocumentTypeOther DocumentType = "OTHER"
DocumentTypeISMS DocumentType = "ISMS"
DocumentTypePolicy DocumentType = "POLICY"
DocumentTypeOther DocumentType = "OTHER"
DocumentTypeISMS DocumentType = "ISMS"
DocumentTypePolicy DocumentType = "POLICY"
DocumentTypeProcedure DocumentType = "PROCEDURE"
)
func (dt DocumentType) MarshalText() ([]byte, error) {
@@ -43,6 +44,8 @@ func (dt *DocumentType) UnmarshalText(data []byte) error {
*dt = DocumentTypeISMS
case DocumentTypePolicy.String():
*dt = DocumentTypePolicy
case DocumentTypeProcedure.String():
*dt = DocumentTypeProcedure
default:
return fmt.Errorf("invalid DocumentType value: %q", val)
}

View File

@@ -0,0 +1 @@
ALTER TYPE document_type ADD VALUE 'PROCEDURE';

View File

@@ -942,6 +942,8 @@ enum DocumentType
ISMS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeISMS")
POLICY
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypePolicy")
PROCEDURE
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeProcedure")
}
enum AssetType

View File

@@ -9642,6 +9642,8 @@ enum DocumentType
ISMS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeISMS")
POLICY
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypePolicy")
PROCEDURE
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeProcedure")
}
enum AssetType
@@ -92138,14 +92140,16 @@ func (ec *executionContext) marshalNDocumentType2githubᚗcomᚋgetproboᚋprobo
var (
unmarshalNDocumentType2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐDocumentType = map[string]coredata.DocumentType{
"OTHER": coredata.DocumentTypeOther,
"ISMS": coredata.DocumentTypeISMS,
"POLICY": coredata.DocumentTypePolicy,
"OTHER": coredata.DocumentTypeOther,
"ISMS": coredata.DocumentTypeISMS,
"POLICY": coredata.DocumentTypePolicy,
"PROCEDURE": coredata.DocumentTypeProcedure,
}
marshalNDocumentType2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐDocumentType = map[coredata.DocumentType]string{
coredata.DocumentTypeOther: "OTHER",
coredata.DocumentTypeISMS: "ISMS",
coredata.DocumentTypePolicy: "POLICY",
coredata.DocumentTypeOther: "OTHER",
coredata.DocumentTypeISMS: "ISMS",
coredata.DocumentTypePolicy: "POLICY",
coredata.DocumentTypeProcedure: "PROCEDURE",
}
)
@@ -97396,14 +97400,16 @@ func (ec *executionContext) marshalODocumentType2ᚖgithubᚗcomᚋgetproboᚋpr
var (
unmarshalODocumentType2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐDocumentType = map[string]coredata.DocumentType{
"OTHER": coredata.DocumentTypeOther,
"ISMS": coredata.DocumentTypeISMS,
"POLICY": coredata.DocumentTypePolicy,
"OTHER": coredata.DocumentTypeOther,
"ISMS": coredata.DocumentTypeISMS,
"POLICY": coredata.DocumentTypePolicy,
"PROCEDURE": coredata.DocumentTypeProcedure,
}
marshalODocumentType2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐDocumentType = map[coredata.DocumentType]string{
coredata.DocumentTypeOther: "OTHER",
coredata.DocumentTypeISMS: "ISMS",
coredata.DocumentTypePolicy: "POLICY",
coredata.DocumentTypeOther: "OTHER",
coredata.DocumentTypeISMS: "ISMS",
coredata.DocumentTypePolicy: "POLICY",
coredata.DocumentTypeProcedure: "PROCEDURE",
}
)

View File

@@ -51,6 +51,8 @@ enum DocumentType
ISMS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeISMS")
POLICY
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypePolicy")
PROCEDURE
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeProcedure")
}
type Document implements Node {

View File

@@ -1073,6 +1073,8 @@ enum DocumentType
ISMS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeISMS")
POLICY
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypePolicy")
PROCEDURE
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeProcedure")
}
type Document implements Node {
@@ -12243,14 +12245,16 @@ func (ec *executionContext) marshalNDocumentType2githubᚗcomᚋgetproboᚋprobo
var (
unmarshalNDocumentType2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐDocumentType = map[string]coredata.DocumentType{
"OTHER": coredata.DocumentTypeOther,
"ISMS": coredata.DocumentTypeISMS,
"POLICY": coredata.DocumentTypePolicy,
"OTHER": coredata.DocumentTypeOther,
"ISMS": coredata.DocumentTypeISMS,
"POLICY": coredata.DocumentTypePolicy,
"PROCEDURE": coredata.DocumentTypeProcedure,
}
marshalNDocumentType2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐDocumentType = map[coredata.DocumentType]string{
coredata.DocumentTypeOther: "OTHER",
coredata.DocumentTypeISMS: "ISMS",
coredata.DocumentTypePolicy: "POLICY",
coredata.DocumentTypeOther: "OTHER",
coredata.DocumentTypeISMS: "ISMS",
coredata.DocumentTypePolicy: "POLICY",
coredata.DocumentTypeProcedure: "PROCEDURE",
}
)