Remove criticity on assets

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-10-13 22:06:49 +02:00
parent 344b340d1a
commit f808a90bba
22 changed files with 71 additions and 409 deletions

View File

@@ -22,7 +22,6 @@ export const assetNodeQuery = graphql`
snapshotId
name
amount
criticity
assetType
dataTypesStored
owner {
@@ -58,7 +57,6 @@ export const createAssetMutation = graphql`
snapshotId
name
amount
criticity
assetType
dataTypesStored
owner {
@@ -89,7 +87,6 @@ export const updateAssetMutation = graphql`
snapshotId
name
amount
criticity
assetType
dataTypesStored
owner {
@@ -163,7 +160,6 @@ export const useCreateAsset = (connectionId: string) => {
return (input: {
name: string;
amount: number;
criticity: string;
assetType: string;
ownerId: string;
organizationId: string;
@@ -188,7 +184,6 @@ export const useCreateAsset = (connectionId: string) => {
input: {
name: input.name,
amount: input.amount,
criticity: input.criticity,
assetType: input.assetType,
dataTypesStored: input.dataTypesStored || "",
ownerId: input.ownerId,
@@ -209,7 +204,6 @@ export const useUpdateAsset = () => {
id: string;
name?: string;
amount?: number;
criticity?: string;
assetType?: string;
dataTypesStored?: string;
ownerId?: string;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<9f6605e9adebeee2a681da0278642501>>
* @generated SignedSource<<0f47a0632a7158414d8c87cf9de16a7a>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,11 +10,9 @@
import { ConcreteRequest } from 'relay-runtime';
export type AssetType = "PHYSICAL" | "VIRTUAL";
export type CriticityLevel = "HIGH" | "LOW" | "MEDIUM";
export type CreateAssetInput = {
amount: number;
assetType: AssetType;
criticity?: CriticityLevel;
dataTypesStored: string;
name: string;
organizationId: string;
@@ -32,7 +30,6 @@ export type AssetGraphCreateMutation$data = {
readonly amount: number;
readonly assetType: AssetType;
readonly createdAt: any;
readonly criticity: CriticityLevel;
readonly dataTypesStored: string;
readonly id: string;
readonly name: string;
@@ -123,13 +120,6 @@ v5 = {
"name": "amount",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "criticity",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -290,16 +280,16 @@ return {
]
},
"params": {
"cacheID": "f11f5052ed6dd175bd701812c0cd136b",
"cacheID": "bc22942b9b4b5efb63a0167c083823fc",
"id": null,
"metadata": {},
"name": "AssetGraphCreateMutation",
"operationKind": "mutation",
"text": "mutation AssetGraphCreateMutation(\n $input: CreateAssetInput!\n) {\n createAsset(input: $input) {\n assetEdge {\n node {\n id\n snapshotId\n name\n amount\n criticity\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors(first: 50) {\n edges {\n node {\n id\n name\n websiteUrl\n }\n }\n }\n createdAt\n }\n }\n }\n}\n"
"text": "mutation AssetGraphCreateMutation(\n $input: CreateAssetInput!\n) {\n createAsset(input: $input) {\n assetEdge {\n node {\n id\n snapshotId\n name\n amount\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors(first: 50) {\n edges {\n node {\n id\n name\n websiteUrl\n }\n }\n }\n createdAt\n }\n }\n }\n}\n"
}
};
})();
(node as any).hash = "3cec119022d8dffb8536d93294e2633b";
(node as any).hash = "1d36f3080ab525417516779740f5977c";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<8d257a13d23e2dd68542540dd12ca35b>>
* @generated SignedSource<<cd1648fe4f86e16da121483001ec1a80>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -177,13 +177,6 @@ return {
"name": "amount",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "criticity",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -361,12 +354,12 @@ return {
]
},
"params": {
"cacheID": "29eec1243d3cceb5d9931562635e1f24",
"cacheID": "273752608722b727e8c8999b93d45cd4",
"id": null,
"metadata": {},
"name": "AssetGraphListQuery",
"operationKind": "query",
"text": "query AssetGraphListQuery(\n $organizationId: ID!\n $snapshotId: ID\n) {\n node(id: $organizationId) {\n __typename\n ... on Organization {\n ...AssetsPageFragment_3iomuz\n }\n id\n }\n}\n\nfragment AssetsPageFragment_3iomuz on Organization {\n assets(first: 10, filter: {snapshotId: $snapshotId}) {\n edges {\n node {\n id\n snapshotId\n name\n amount\n criticity\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors(first: 50) {\n edges {\n node {\n id\n name\n websiteUrl\n }\n }\n }\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
"text": "query AssetGraphListQuery(\n $organizationId: ID!\n $snapshotId: ID\n) {\n node(id: $organizationId) {\n __typename\n ... on Organization {\n ...AssetsPageFragment_3iomuz\n }\n id\n }\n}\n\nfragment AssetsPageFragment_3iomuz on Organization {\n assets(first: 10, filter: {snapshotId: $snapshotId}) {\n edges {\n node {\n id\n snapshotId\n name\n amount\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors(first: 50) {\n edges {\n node {\n id\n name\n websiteUrl\n }\n }\n }\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
}
};
})();

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<f1d88685da6d13c894f029b8ac4cf3e4>>
* @generated SignedSource<<c8cbb4eb1df9d733a86642b8f27d6df6>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,7 +10,6 @@
import { ConcreteRequest } from 'relay-runtime';
export type AssetType = "PHYSICAL" | "VIRTUAL";
export type CriticityLevel = "HIGH" | "LOW" | "MEDIUM";
export type VendorCategory = "ANALYTICS" | "CLOUD_MONITORING" | "CLOUD_PROVIDER" | "COLLABORATION" | "CUSTOMER_SUPPORT" | "DATA_STORAGE_AND_PROCESSING" | "DOCUMENT_MANAGEMENT" | "EMPLOYEE_MANAGEMENT" | "ENGINEERING" | "FINANCE" | "IDENTITY_PROVIDER" | "IT" | "MARKETING" | "OFFICE_OPERATIONS" | "OTHER" | "PASSWORD_MANAGEMENT" | "PRODUCT_AND_DESIGN" | "PROFESSIONAL_SERVICES" | "RECRUITING" | "SALES" | "SECURITY" | "VERSION_CONTROL";
export type AssetGraphNodeQuery$variables = {
assetId: string;
@@ -20,7 +19,6 @@ export type AssetGraphNodeQuery$data = {
readonly amount?: number;
readonly assetType?: AssetType;
readonly createdAt?: any;
readonly criticity?: CriticityLevel;
readonly dataTypesStored?: string;
readonly id?: string;
readonly name?: string;
@@ -94,24 +92,17 @@ v6 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "criticity",
"name": "assetType",
"storageKey": null
},
v7 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "assetType",
"storageKey": null
},
v8 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "dataTypesStored",
"storageKey": null
},
v9 = {
v8 = {
"alias": null,
"args": null,
"concreteType": "People",
@@ -130,7 +121,7 @@ v9 = {
],
"storageKey": null
},
v10 = {
v9 = {
"alias": null,
"args": [
{
@@ -185,14 +176,14 @@ v10 = {
],
"storageKey": "vendors(first:50)"
},
v11 = {
v10 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "createdAt",
"storageKey": null
},
v12 = {
v11 = {
"alias": null,
"args": null,
"kind": "ScalarField",
@@ -226,8 +217,7 @@ return {
(v8/*: any*/),
(v9/*: any*/),
(v10/*: any*/),
(v11/*: any*/),
(v12/*: any*/)
(v11/*: any*/)
],
"type": "Asset",
"abstractKey": null
@@ -272,8 +262,7 @@ return {
(v8/*: any*/),
(v9/*: any*/),
(v10/*: any*/),
(v11/*: any*/),
(v12/*: any*/)
(v11/*: any*/)
],
"type": "Asset",
"abstractKey": null
@@ -284,16 +273,16 @@ return {
]
},
"params": {
"cacheID": "6c6e10d25c9bd116703346393adb7a3f",
"cacheID": "f0aebb3dbefaf776a518bb72892d8983",
"id": null,
"metadata": {},
"name": "AssetGraphNodeQuery",
"operationKind": "query",
"text": "query AssetGraphNodeQuery(\n $assetId: ID!\n) {\n node(id: $assetId) {\n __typename\n ... on Asset {\n id\n snapshotId\n name\n amount\n criticity\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors(first: 50) {\n edges {\n node {\n id\n name\n websiteUrl\n category\n }\n }\n }\n createdAt\n updatedAt\n }\n id\n }\n}\n"
"text": "query AssetGraphNodeQuery(\n $assetId: ID!\n) {\n node(id: $assetId) {\n __typename\n ... on Asset {\n id\n snapshotId\n name\n amount\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors(first: 50) {\n edges {\n node {\n id\n name\n websiteUrl\n category\n }\n }\n }\n createdAt\n updatedAt\n }\n id\n }\n}\n"
}
};
})();
(node as any).hash = "60053f70c9a65d4658be7b830a3dae72";
(node as any).hash = "08e11e09bc4462efdbebc36aec347c4c";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<6bc692e9d9ab5b78611dc2a326227761>>
* @generated SignedSource<<0d663dac1f9d0086e52882297fbc8944>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,11 +10,9 @@
import { ConcreteRequest } from 'relay-runtime';
export type AssetType = "PHYSICAL" | "VIRTUAL";
export type CriticityLevel = "HIGH" | "LOW" | "MEDIUM";
export type UpdateAssetInput = {
amount?: number | null | undefined;
assetType?: AssetType | null | undefined;
criticity?: CriticityLevel | null | undefined;
dataTypesStored?: string | null | undefined;
id: string;
name?: string | null | undefined;
@@ -29,7 +27,6 @@ export type AssetGraphUpdateMutation$data = {
readonly asset: {
readonly amount: number;
readonly assetType: AssetType;
readonly criticity: CriticityLevel;
readonly dataTypesStored: string;
readonly id: string;
readonly name: string;
@@ -117,13 +114,6 @@ v3 = [
"name": "amount",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "criticity",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -237,16 +227,16 @@ return {
"selections": (v3/*: any*/)
},
"params": {
"cacheID": "1447ea6f965bbd6fcdba1ebc72e2d23f",
"cacheID": "ee67fc797e7a09d39db357b1b8e68d11",
"id": null,
"metadata": {},
"name": "AssetGraphUpdateMutation",
"operationKind": "mutation",
"text": "mutation AssetGraphUpdateMutation(\n $input: UpdateAssetInput!\n) {\n updateAsset(input: $input) {\n asset {\n id\n snapshotId\n name\n amount\n criticity\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors(first: 50) {\n edges {\n node {\n id\n name\n websiteUrl\n }\n }\n }\n updatedAt\n }\n }\n}\n"
"text": "mutation AssetGraphUpdateMutation(\n $input: UpdateAssetInput!\n) {\n updateAsset(input: $input) {\n asset {\n id\n snapshotId\n name\n amount\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors(first: 50) {\n edges {\n node {\n id\n name\n websiteUrl\n }\n }\n }\n updatedAt\n }\n }\n}\n"
}
};
})();
(node as any).hash = "21b0c94b6245eb849e6118a58fb97490";
(node as any).hash = "65a76cfab2b2fba398cd19e566e3ee33";
export default node;

View File

@@ -26,13 +26,12 @@ import { PeopleSelectField } from "/components/form/PeopleSelectField";
import { VendorsMultiSelectField } from "/components/form/VendorsMultiSelectField";
import { useFormWithSchema } from "/hooks/useFormWithSchema";
import z from "zod";
import { getAssetTypeVariant, getCriticityVariant, validateSnapshotConsistency } from "@probo/helpers";
import { getAssetTypeVariant, validateSnapshotConsistency } from "@probo/helpers";
import { SnapshotBanner } from "/components/SnapshotBanner";
const updateAssetSchema = z.object({
name: z.string().min(1, "Name is required"),
amount: z.number().min(1, "Amount is required"),
criticity: z.enum(["LOW", "MEDIUM", "HIGH"]),
assetType: z.enum(["PHYSICAL", "VIRTUAL"]),
dataTypesStored: z.string().min(1, "Data types stored is required"),
ownerId: z.string().min(1, "Owner is required"),
@@ -71,7 +70,6 @@ export default function AssetDetailsPage(props: Props) {
defaultValues: {
name: assetEntry?.name || "",
amount: assetEntry?.amount || 0,
criticity: assetEntry?.criticity || "LOW",
assetType: assetEntry?.assetType || "VIRTUAL",
dataTypesStored: assetEntry?.dataTypesStored || "",
ownerId: assetEntry?.owner?.id || "",
@@ -118,9 +116,6 @@ export default function AssetDetailsPage(props: Props) {
<Badge variant={getAssetTypeVariant(assetEntry?.assetType)}>
{assetEntry?.assetType === "PHYSICAL" ? __("Physical") : __("Virtual")}
</Badge>
<Badge variant={getCriticityVariant(assetEntry?.criticity)}>
{assetEntry?.criticity}
</Badge>
</div>
{!isSnapshotMode && (
<ActionDropdown variant="secondary">
@@ -150,18 +145,6 @@ export default function AssetDetailsPage(props: Props) {
disabled={isSnapshotMode}
/>
<ControlledField
control={control}
name="criticity"
type="select"
label={__("Criticity")}
disabled={isSnapshotMode}
>
<Option value="LOW">{__("Low")}</Option>
<Option value="MEDIUM">{__("Medium")}</Option>
<Option value="HIGH">{__("High")}</Option>
</ControlledField>
<ControlledField
control={control}
name="assetType"

View File

@@ -28,7 +28,7 @@ import { useDeleteAsset, assetsQuery } from "../../../hooks/graph/AssetGraph";
import type { AssetGraphListQuery } from "/hooks/graph/__generated__/AssetGraphListQuery.graphql";
import { faviconUrl } from "@probo/helpers";
import type { NodeOf } from "/types";
import { getAssetTypeVariant, getCriticityVariant } from "@probo/helpers";
import { getAssetTypeVariant } from "@probo/helpers";
import type {
AssetsPageFragment$data,
AssetsPageFragment$key,
@@ -62,7 +62,6 @@ const paginatedAssetsFragment = graphql`
snapshotId
name
amount
criticity
assetType
dataTypesStored
owner {
@@ -130,7 +129,6 @@ export default function AssetsPage(props: Props) {
<Tr>
<Th>{__("Name")}</Th>
<Th>{__("Type")}</Th>
<Th>{__("Criticity")}</Th>
<Th>{__("Amount")}</Th>
<Th>{__("Owner")}</Th>
<Th>{__("Vendors")}</Th>
@@ -177,11 +175,6 @@ function AssetRow({
{entry.assetType === "PHYSICAL" ? __("Physical") : __("Virtual")}
</Badge>
</Td>
<Td>
<Badge variant={getCriticityVariant(entry.criticity)}>
{entry.criticity}
</Badge>
</Td>
<Td>{entry.amount}</Td>
<Td>{entry.owner?.fullName ?? __("Unassigned")}</Td>
<Td>

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<f2135bf85e1d0dffde8c1bcaa7940504>>
* @generated SignedSource<<794ba3ed2ccc75355a8c69c83d143587>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,7 +10,7 @@
import { ConcreteRequest } from 'relay-runtime';
import { FragmentRefs } from "relay-runtime";
export type AssetOrderField = "AMOUNT" | "CREATED_AT" | "CRITICITY";
export type AssetOrderField = "AMOUNT" | "CREATED_AT";
export type OrderDirection = "ASC" | "DESC";
export type AssetOrder = {
direction: OrderDirection;
@@ -252,13 +252,6 @@ return {
"name": "amount",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "criticity",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -436,16 +429,16 @@ return {
]
},
"params": {
"cacheID": "2eab5fe4d402f48ac4dcd8220284ea41",
"cacheID": "71aa6b89d4eba225262e326fdfe04cf7",
"id": null,
"metadata": {},
"name": "AssetsListQuery",
"operationKind": "query",
"text": "query AssetsListQuery(\n $after: CursorKey = null\n $before: CursorKey = null\n $first: Int = 10\n $last: Int = null\n $orderBy: AssetOrder = null\n $snapshotId: ID = null\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...AssetsPageFragment_38J9tm\n id\n }\n}\n\nfragment AssetsPageFragment_38J9tm on Organization {\n assets(first: $first, after: $after, last: $last, before: $before, orderBy: $orderBy, filter: {snapshotId: $snapshotId}) {\n edges {\n node {\n id\n snapshotId\n name\n amount\n criticity\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors(first: 50) {\n edges {\n node {\n id\n name\n websiteUrl\n }\n }\n }\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
"text": "query AssetsListQuery(\n $after: CursorKey = null\n $before: CursorKey = null\n $first: Int = 10\n $last: Int = null\n $orderBy: AssetOrder = null\n $snapshotId: ID = null\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...AssetsPageFragment_38J9tm\n id\n }\n}\n\nfragment AssetsPageFragment_38J9tm on Organization {\n assets(first: $first, after: $after, last: $last, before: $before, orderBy: $orderBy, filter: {snapshotId: $snapshotId}) {\n edges {\n node {\n id\n snapshotId\n name\n amount\n assetType\n dataTypesStored\n owner {\n id\n fullName\n }\n vendors(first: 50) {\n edges {\n node {\n id\n name\n websiteUrl\n }\n }\n }\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
}
};
})();
(node as any).hash = "4bc1af55d208f3c773c49b753a76aa5c";
(node as any).hash = "a230182c928f189b50fdc39950602ffd";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<663b14d82ccaeebe2dda8dc256fddfc5>>
* @generated SignedSource<<6f077a71ef62a9c059bee1b50d3a23ef>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,7 +10,6 @@
import { ReaderFragment } from 'relay-runtime';
export type AssetType = "PHYSICAL" | "VIRTUAL";
export type CriticityLevel = "HIGH" | "LOW" | "MEDIUM";
import { FragmentRefs } from "relay-runtime";
export type AssetsPageFragment$data = {
readonly assets: {
@@ -20,7 +19,6 @@ export type AssetsPageFragment$data = {
readonly amount: number;
readonly assetType: AssetType;
readonly createdAt: any;
readonly criticity: CriticityLevel;
readonly dataTypesStored: string;
readonly id: string;
readonly name: string;
@@ -188,13 +186,6 @@ return {
"name": "amount",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "criticity",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -364,6 +355,6 @@ return {
};
})();
(node as any).hash = "4bc1af55d208f3c773c49b753a76aa5c";
(node as any).hash = "a230182c928f189b50fdc39950602ffd";
export default node;

View File

@@ -19,7 +19,6 @@ import { useCreateAsset } from "/hooks/graph/AssetGraph";
const schema = z.object({
name: z.string().min(1, "Name is required"),
amount: z.number().min(1, "Amount is required"),
criticity: z.enum(["LOW", "MEDIUM", "HIGH"]),
assetType: z.enum(["PHYSICAL", "VIRTUAL"]),
ownerId: z.string().min(1, "Owner is required"),
vendorIds: z.array(z.string()).optional(),
@@ -43,7 +42,6 @@ export function CreateAssetDialog({
defaultValues: {
name: "",
amount: 0,
criticity: "LOW",
assetType: "VIRTUAL",
ownerId: "",
vendorIds: [],
@@ -79,16 +77,6 @@ export function CreateAssetDialog({
{...register("amount", { valueAsNumber: true })}
type="number"
/>
<ControlledField
control={control}
name="criticity"
type="select"
label={__("Criticity")}
>
<Option value="LOW">{__("Low")}</Option>
<Option value="MEDIUM">{__("Medium")}</Option>
<Option value="HIGH">{__("High")}</Option>
</ControlledField>
<ControlledField
control={control}
name="assetType"

View File

@@ -8,16 +8,3 @@ export const getAssetTypeVariant = (type: string) => {
return "neutral";
}
};
export const getCriticityVariant = (criticity: string) => {
switch (criticity) {
case "HIGH":
return "danger";
case "MEDIUM":
return "warning";
case "LOW":
return "neutral";
default:
return "neutral";
}
};

View File

@@ -21,7 +21,7 @@ export {
} from "./countries";
export { availableFrameworks } from "./frameworks";
export { getDocumentTypeLabel, documentTypes } from "./documents";
export { getAssetTypeVariant, getCriticityVariant } from "./assets";
export { getAssetTypeVariant } from "./assets";
export {
getSnapshotTypeLabel,
getSnapshotTypeUrlPath,

View File

@@ -28,18 +28,17 @@ import (
type (
Asset struct {
ID gid.GID `db:"id"`
SnapshotID *gid.GID `db:"snapshot_id"`
SourceID *gid.GID `db:"source_id"`
Name string `db:"name"`
Amount int `db:"amount"`
OwnerID gid.GID `db:"owner_id"`
OrganizationID gid.GID `db:"organization_id"`
Criticity CriticityLevel `db:"criticity"`
AssetType AssetType `db:"asset_type"`
DataTypesStored string `db:"data_types_stored"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
ID gid.GID `db:"id"`
SnapshotID *gid.GID `db:"snapshot_id"`
SourceID *gid.GID `db:"source_id"`
Name string `db:"name"`
Amount int `db:"amount"`
OwnerID gid.GID `db:"owner_id"`
OrganizationID gid.GID `db:"organization_id"`
AssetType AssetType `db:"asset_type"`
DataTypesStored string `db:"data_types_stored"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
Assets []*Asset
@@ -51,8 +50,6 @@ func (a *Asset) CursorKey(field AssetOrderField) page.CursorKey {
return page.NewCursorKey(a.ID, a.CreatedAt)
case AssetOrderFieldAmount:
return page.NewCursorKey(a.ID, a.Amount)
case AssetOrderFieldCriticity:
return page.NewCursorKey(a.ID, a.Criticity)
}
panic(fmt.Sprintf("unsupported order by: %s", field))
@@ -73,7 +70,6 @@ SELECT
organization_id,
owner_id,
amount,
criticity,
asset_type,
data_types_stored,
created_at,
@@ -120,7 +116,6 @@ SELECT
organization_id,
owner_id,
amount,
criticity,
asset_type,
data_types_stored,
created_at,
@@ -204,7 +199,6 @@ SELECT
organization_id,
owner_id,
amount,
criticity,
asset_type,
data_types_stored,
created_at,
@@ -253,7 +247,6 @@ INSERT INTO assets (
organization_id,
owner_id,
amount,
criticity,
asset_type,
data_types_stored,
created_at,
@@ -265,7 +258,6 @@ INSERT INTO assets (
@organization_id,
@owner_id,
@amount,
@criticity,
@asset_type,
@data_types_stored,
@created_at,
@@ -280,7 +272,6 @@ INSERT INTO assets (
"name": a.Name,
"owner_id": a.OwnerID,
"amount": a.Amount,
"criticity": a.Criticity,
"asset_type": a.AssetType,
"data_types_stored": a.DataTypesStored,
"created_at": a.CreatedAt,
@@ -306,7 +297,6 @@ SET
name = @name,
owner_id = @owner_id,
amount = @amount,
criticity = @criticity,
asset_type = @asset_type,
data_types_stored = @data_types_stored,
updated_at = @updated_at
@@ -322,7 +312,6 @@ RETURNING
organization_id,
owner_id,
amount,
criticity,
asset_type,
data_types_stored,
created_at,
@@ -336,7 +325,6 @@ RETURNING
"name": a.Name,
"owner_id": a.OwnerID,
"amount": a.Amount,
"criticity": a.Criticity,
"asset_type": a.AssetType,
"data_types_stored": a.DataTypesStored,
"updated_at": time.Now(),
@@ -419,7 +407,6 @@ INSERT INTO assets (
organization_id,
owner_id,
amount,
criticity,
asset_type,
data_types_stored,
created_at,
@@ -434,7 +421,6 @@ SELECT
a.organization_id,
a.owner_id,
a.amount,
a.criticity,
a.asset_type,
a.data_types_stored,
a.created_at,

View File

@@ -19,7 +19,6 @@ type AssetOrderField string
const (
AssetOrderFieldCreatedAt AssetOrderField = "CREATED_AT"
AssetOrderFieldAmount AssetOrderField = "AMOUNT"
AssetOrderFieldCriticity AssetOrderField = "CRITICITY"
AssetOrderFieldName AssetOrderField = "NAME"
)

View File

@@ -1,23 +0,0 @@
// Copyright (c) 2025 Probo Inc <hello@getprobo.com>.
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
package coredata
type CriticityLevel string
const (
CriticityLevelLow CriticityLevel = "LOW"
CriticityLevelMedium CriticityLevel = "MEDIUM"
CriticityLevelHigh CriticityLevel = "HIGH"
)

View File

@@ -0,0 +1 @@
ALTER TABLE assets DROP COLUMN criticity;

View File

@@ -20,7 +20,6 @@ type CreateAssetRequest struct {
Name string
Amount int
OwnerID gid.GID
Criticity coredata.CriticityLevel
AssetType coredata.AssetType
DataTypesStored string
VendorIDs []gid.GID
@@ -31,7 +30,6 @@ type UpdateAssetRequest struct {
Name *string
Amount *int
OwnerID *gid.GID
Criticity *coredata.CriticityLevel
AssetType *coredata.AssetType
DataTypesStored *string
VendorIDs []gid.GID
@@ -156,9 +154,6 @@ func (s AssetService) Update(
if req.OwnerID != nil {
asset.OwnerID = *req.OwnerID
}
if req.Criticity != nil {
asset.Criticity = *req.Criticity
}
if req.AssetType != nil {
asset.AssetType = *req.AssetType
}
@@ -200,7 +195,6 @@ func (s AssetService) Create(
Name: req.Name,
Amount: req.Amount,
OwnerID: req.OwnerID,
Criticity: req.Criticity,
AssetType: req.AssetType,
DataTypesStored: req.DataTypesStored,
CreatedAt: now,

View File

@@ -952,17 +952,6 @@ enum AssetType
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.AssetTypeVirtual")
}
enum CriticityLevel
@goModel(model: "github.com/getprobo/probo/pkg/coredata.CriticityLevel") {
LOW @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CriticityLevelLow")
MEDIUM
@goEnum(
value: "github.com/getprobo/probo/pkg/coredata.CriticityLevelMedium"
)
HIGH
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.CriticityLevelHigh")
}
enum AssetOrderField
@goModel(model: "github.com/getprobo/probo/pkg/coredata.AssetOrderField") {
CREATED_AT
@@ -973,10 +962,6 @@ enum AssetOrderField
@goEnum(
value: "github.com/getprobo/probo/pkg/coredata.AssetOrderFieldAmount"
)
CRITICITY
@goEnum(
value: "github.com/getprobo/probo/pkg/coredata.AssetOrderFieldCriticity"
)
}
enum DatumOrderField
@@ -4216,7 +4201,6 @@ type Asset implements Node {
before: CursorKey
orderBy: VendorOrder
): VendorConnection! @goField(forceResolver: true)
criticity: CriticityLevel!
assetType: AssetType! @goField(forceResolver: true)
dataTypesStored: String!
organization: Organization! @goField(forceResolver: true)
@@ -4251,7 +4235,6 @@ input CreateAssetInput {
name: String!
amount: Int!
ownerId: ID!
criticity: CriticityLevel! = MEDIUM
assetType: AssetType!
dataTypesStored: String!
vendorIds: [ID!]
@@ -4262,7 +4245,6 @@ input UpdateAssetInput {
name: String
amount: Int
ownerId: ID
criticity: CriticityLevel
assetType: AssetType
dataTypesStored: String
vendorIds: [ID!]

View File

@@ -113,7 +113,6 @@ type ComplexityRoot struct {
Amount func(childComplexity int) int
AssetType func(childComplexity int) int
CreatedAt func(childComplexity int) int
Criticity func(childComplexity int) int
DataTypesStored func(childComplexity int) int
ID func(childComplexity int) int
Name func(childComplexity int) int
@@ -1579,7 +1578,6 @@ type ComplexityRoot struct {
type AssetResolver interface {
Owner(ctx context.Context, obj *types.Asset) (*types.People, error)
Vendors(ctx context.Context, obj *types.Asset, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.VendorOrderBy) (*types.VendorConnection, error)
AssetType(ctx context.Context, obj *types.Asset) (coredata.AssetType, error)
Organization(ctx context.Context, obj *types.Asset) (*types.Organization, error)
@@ -1996,13 +1994,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin
return e.complexity.Asset.CreatedAt(childComplexity), true
case "Asset.criticity":
if e.complexity.Asset.Criticity == nil {
break
}
return e.complexity.Asset.Criticity(childComplexity), true
case "Asset.dataTypesStored":
if e.complexity.Asset.DataTypesStored == nil {
break
@@ -9669,17 +9660,6 @@ enum AssetType
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.AssetTypeVirtual")
}
enum CriticityLevel
@goModel(model: "github.com/getprobo/probo/pkg/coredata.CriticityLevel") {
LOW @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CriticityLevelLow")
MEDIUM
@goEnum(
value: "github.com/getprobo/probo/pkg/coredata.CriticityLevelMedium"
)
HIGH
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.CriticityLevelHigh")
}
enum AssetOrderField
@goModel(model: "github.com/getprobo/probo/pkg/coredata.AssetOrderField") {
CREATED_AT
@@ -9690,10 +9670,6 @@ enum AssetOrderField
@goEnum(
value: "github.com/getprobo/probo/pkg/coredata.AssetOrderFieldAmount"
)
CRITICITY
@goEnum(
value: "github.com/getprobo/probo/pkg/coredata.AssetOrderFieldCriticity"
)
}
enum DatumOrderField
@@ -12933,7 +12909,6 @@ type Asset implements Node {
before: CursorKey
orderBy: VendorOrder
): VendorConnection! @goField(forceResolver: true)
criticity: CriticityLevel!
assetType: AssetType! @goField(forceResolver: true)
dataTypesStored: String!
organization: Organization! @goField(forceResolver: true)
@@ -12968,7 +12943,6 @@ input CreateAssetInput {
name: String!
amount: Int!
ownerId: ID!
criticity: CriticityLevel! = MEDIUM
assetType: AssetType!
dataTypesStored: String!
vendorIds: [ID!]
@@ -12979,7 +12953,6 @@ input UpdateAssetInput {
name: String
amount: Int
ownerId: ID
criticity: CriticityLevel
assetType: AssetType
dataTypesStored: String
vendorIds: [ID!]
@@ -21413,50 +21386,6 @@ func (ec *executionContext) fieldContext_Asset_vendors(ctx context.Context, fiel
return fc, nil
}
func (ec *executionContext) _Asset_criticity(ctx context.Context, field graphql.CollectedField, obj *types.Asset) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Asset_criticity(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Criticity, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(coredata.CriticityLevel)
fc.Result = res
return ec.marshalNCriticityLevel2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Asset_criticity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Asset",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type CriticityLevel does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _Asset_assetType(ctx context.Context, field graphql.CollectedField, obj *types.Asset) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Asset_assetType(ctx, field)
if err != nil {
@@ -21980,8 +21909,6 @@ func (ec *executionContext) fieldContext_AssetEdge_node(_ context.Context, field
return ec.fieldContext_Asset_owner(ctx, field)
case "vendors":
return ec.fieldContext_Asset_vendors(ctx, field)
case "criticity":
return ec.fieldContext_Asset_criticity(ctx, field)
case "assetType":
return ec.fieldContext_Asset_assetType(ctx, field)
case "dataTypesStored":
@@ -55737,8 +55664,6 @@ func (ec *executionContext) fieldContext_UpdateAssetPayload_asset(_ context.Cont
return ec.fieldContext_Asset_owner(ctx, field)
case "vendors":
return ec.fieldContext_Asset_vendors(ctx, field)
case "criticity":
return ec.fieldContext_Asset_criticity(ctx, field)
case "assetType":
return ec.fieldContext_Asset_assetType(ctx, field)
case "dataTypesStored":
@@ -66053,11 +65978,7 @@ func (ec *executionContext) unmarshalInputCreateAssetInput(ctx context.Context,
asMap[k] = v
}
if _, present := asMap["criticity"]; !present {
asMap["criticity"] = "MEDIUM"
}
fieldsInOrder := [...]string{"organizationId", "name", "amount", "ownerId", "criticity", "assetType", "dataTypesStored", "vendorIds"}
fieldsInOrder := [...]string{"organizationId", "name", "amount", "ownerId", "assetType", "dataTypesStored", "vendorIds"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
@@ -66092,13 +66013,6 @@ func (ec *executionContext) unmarshalInputCreateAssetInput(ctx context.Context,
return it, err
}
it.OwnerID = data
case "criticity":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("criticity"))
data, err := ec.unmarshalNCriticityLevel2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel(ctx, v)
if err != nil {
return it, err
}
it.Criticity = data
case "assetType":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("assetType"))
data, err := ec.unmarshalNAssetType2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐAssetType(ctx, v)
@@ -70385,7 +70299,7 @@ func (ec *executionContext) unmarshalInputUpdateAssetInput(ctx context.Context,
asMap[k] = v
}
fieldsInOrder := [...]string{"id", "name", "amount", "ownerId", "criticity", "assetType", "dataTypesStored", "vendorIds"}
fieldsInOrder := [...]string{"id", "name", "amount", "ownerId", "assetType", "dataTypesStored", "vendorIds"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
@@ -70420,13 +70334,6 @@ func (ec *executionContext) unmarshalInputUpdateAssetInput(ctx context.Context,
return it, err
}
it.OwnerID = data
case "criticity":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("criticity"))
data, err := ec.unmarshalOCriticityLevel2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel(ctx, v)
if err != nil {
return it, err
}
it.Criticity = data
case "assetType":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("assetType"))
data, err := ec.unmarshalOAssetType2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐAssetType(ctx, v)
@@ -72933,11 +72840,6 @@ func (ec *executionContext) _Asset(ctx context.Context, sel ast.SelectionSet, ob
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "criticity":
out.Values[i] = ec._Asset_criticity(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
}
case "assetType":
field := field
@@ -88716,12 +88618,10 @@ var (
unmarshalNAssetOrderField2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐAssetOrderField = map[string]coredata.AssetOrderField{
"CREATED_AT": coredata.AssetOrderFieldCreatedAt,
"AMOUNT": coredata.AssetOrderFieldAmount,
"CRITICITY": coredata.AssetOrderFieldCriticity,
}
marshalNAssetOrderField2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐAssetOrderField = map[coredata.AssetOrderField]string{
coredata.AssetOrderFieldCreatedAt: "CREATED_AT",
coredata.AssetOrderFieldAmount: "AMOUNT",
coredata.AssetOrderFieldCriticity: "CRITICITY",
}
)
@@ -91181,36 +91081,6 @@ func (ec *executionContext) marshalNCreateVendorServicePayload2ᚖgithubᚗcom
return ec._CreateVendorServicePayload(ctx, sel, v)
}
func (ec *executionContext) unmarshalNCriticityLevel2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel(ctx context.Context, v any) (coredata.CriticityLevel, error) {
tmp, err := graphql.UnmarshalString(v)
res := unmarshalNCriticityLevel2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel[tmp]
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNCriticityLevel2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel(ctx context.Context, sel ast.SelectionSet, v coredata.CriticityLevel) graphql.Marshaler {
_ = sel
res := graphql.MarshalString(marshalNCriticityLevel2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel[v])
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
}
var (
unmarshalNCriticityLevel2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel = map[string]coredata.CriticityLevel{
"LOW": coredata.CriticityLevelLow,
"MEDIUM": coredata.CriticityLevelMedium,
"HIGH": coredata.CriticityLevelHigh,
}
marshalNCriticityLevel2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel = map[coredata.CriticityLevel]string{
coredata.CriticityLevelLow: "LOW",
coredata.CriticityLevelMedium: "MEDIUM",
coredata.CriticityLevelHigh: "HIGH",
}
)
func (ec *executionContext) unmarshalNCursorKey2githubᚗcomᚋgetproboᚋproboᚋpkgᚋpageᚐCursorKey(ctx context.Context, v any) (page.CursorKey, error) {
res, err := cursor.UnmarshalCursorKeyScalar(v)
return res, graphql.ErrorOnPath(ctx, err)
@@ -97415,38 +97285,6 @@ var (
}
)
func (ec *executionContext) unmarshalOCriticityLevel2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel(ctx context.Context, v any) (*coredata.CriticityLevel, error) {
if v == nil {
return nil, nil
}
tmp, err := graphql.UnmarshalString(v)
res := unmarshalOCriticityLevel2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel[tmp]
return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOCriticityLevel2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel(ctx context.Context, sel ast.SelectionSet, v *coredata.CriticityLevel) graphql.Marshaler {
if v == nil {
return graphql.Null
}
_ = sel
_ = ctx
res := graphql.MarshalString(marshalOCriticityLevel2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel[*v])
return res
}
var (
unmarshalOCriticityLevel2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel = map[string]coredata.CriticityLevel{
"LOW": coredata.CriticityLevelLow,
"MEDIUM": coredata.CriticityLevelMedium,
"HIGH": coredata.CriticityLevelHigh,
}
marshalOCriticityLevel2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCriticityLevel = map[coredata.CriticityLevel]string{
coredata.CriticityLevelLow: "LOW",
coredata.CriticityLevelMedium: "MEDIUM",
coredata.CriticityLevelHigh: "HIGH",
}
)
func (ec *executionContext) unmarshalOCursorKey2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋpageᚐCursorKey(ctx context.Context, v any) (*page.CursorKey, error) {
if v == nil {
return nil, nil

View File

@@ -47,7 +47,6 @@ func NewAsset(asset *coredata.Asset) *Asset {
SnapshotID: asset.SnapshotID,
Name: asset.Name,
Amount: asset.Amount,
Criticity: asset.Criticity,
AssetType: asset.AssetType,
DataTypesStored: asset.DataTypesStored,
CreatedAt: asset.CreatedAt,

View File

@@ -26,18 +26,17 @@ type AssessVendorPayload struct {
}
type Asset struct {
ID gid.GID `json:"id"`
SnapshotID *gid.GID `json:"snapshotId,omitempty"`
Name string `json:"name"`
Amount int `json:"amount"`
Owner *People `json:"owner"`
Vendors *VendorConnection `json:"vendors"`
Criticity coredata.CriticityLevel `json:"criticity"`
AssetType coredata.AssetType `json:"assetType"`
DataTypesStored string `json:"dataTypesStored"`
Organization *Organization `json:"organization"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
ID gid.GID `json:"id"`
SnapshotID *gid.GID `json:"snapshotId,omitempty"`
Name string `json:"name"`
Amount int `json:"amount"`
Owner *People `json:"owner"`
Vendors *VendorConnection `json:"vendors"`
AssetType coredata.AssetType `json:"assetType"`
DataTypesStored string `json:"dataTypesStored"`
Organization *Organization `json:"organization"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
func (Asset) IsNode() {}
@@ -222,14 +221,13 @@ type ControlFilter struct {
}
type CreateAssetInput struct {
OrganizationID gid.GID `json:"organizationId"`
Name string `json:"name"`
Amount int `json:"amount"`
OwnerID gid.GID `json:"ownerId"`
Criticity coredata.CriticityLevel `json:"criticity"`
AssetType coredata.AssetType `json:"assetType"`
DataTypesStored string `json:"dataTypesStored"`
VendorIds []gid.GID `json:"vendorIds,omitempty"`
OrganizationID gid.GID `json:"organizationId"`
Name string `json:"name"`
Amount int `json:"amount"`
OwnerID gid.GID `json:"ownerId"`
AssetType coredata.AssetType `json:"assetType"`
DataTypesStored string `json:"dataTypesStored"`
VendorIds []gid.GID `json:"vendorIds,omitempty"`
}
type CreateAssetPayload struct {
@@ -1652,14 +1650,13 @@ type UnassignTaskPayload struct {
}
type UpdateAssetInput struct {
ID gid.GID `json:"id"`
Name *string `json:"name,omitempty"`
Amount *int `json:"amount,omitempty"`
OwnerID *gid.GID `json:"ownerId,omitempty"`
Criticity *coredata.CriticityLevel `json:"criticity,omitempty"`
AssetType *coredata.AssetType `json:"assetType,omitempty"`
DataTypesStored *string `json:"dataTypesStored,omitempty"`
VendorIds []gid.GID `json:"vendorIds,omitempty"`
ID gid.GID `json:"id"`
Name *string `json:"name,omitempty"`
Amount *int `json:"amount,omitempty"`
OwnerID *gid.GID `json:"ownerId,omitempty"`
AssetType *coredata.AssetType `json:"assetType,omitempty"`
DataTypesStored *string `json:"dataTypesStored,omitempty"`
VendorIds []gid.GID `json:"vendorIds,omitempty"`
}
type UpdateAssetPayload struct {

View File

@@ -2794,7 +2794,6 @@ func (r *mutationResolver) CreateAsset(ctx context.Context, input types.CreateAs
Name: input.Name,
Amount: input.Amount,
OwnerID: input.OwnerID,
Criticity: input.Criticity,
AssetType: input.AssetType,
DataTypesStored: input.DataTypesStored,
VendorIDs: input.VendorIds,
@@ -2818,7 +2817,6 @@ func (r *mutationResolver) UpdateAsset(ctx context.Context, input types.UpdateAs
Name: input.Name,
Amount: input.Amount,
OwnerID: input.OwnerID,
Criticity: input.Criticity,
AssetType: input.AssetType,
DataTypesStored: input.DataTypesStored,
VendorIDs: input.VendorIds,