From 5a5fe0a19f0b56e84e30e46286e2cd3a8dd46312 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Wed, 21 Jan 2026 20:00:04 +0100 Subject: [PATCH 01/32] move deletion async --- internal/ent/hooks/listeners_entitlements.go | 17 +++++++++++++---- internal/graphapi/organization.resolvers.go | 6 ------ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/internal/ent/hooks/listeners_entitlements.go b/internal/ent/hooks/listeners_entitlements.go index 2510293f53..e3b8c424a8 100644 --- a/internal/ent/hooks/listeners_entitlements.go +++ b/internal/ent/hooks/listeners_entitlements.go @@ -9,6 +9,10 @@ import ( "github.com/rs/zerolog" "github.com/samber/lo" + "github.com/theopenlane/entx" + "github.com/theopenlane/iam/auth" + "github.com/theopenlane/utils/contextx" + "github.com/theopenlane/core/common/models" "github.com/theopenlane/core/internal/ent/events" entgen "github.com/theopenlane/core/internal/ent/generated" @@ -18,9 +22,6 @@ import ( "github.com/theopenlane/core/pkg/entitlements" "github.com/theopenlane/core/pkg/events/soiree" "github.com/theopenlane/core/pkg/logx" - "github.com/theopenlane/entx" - "github.com/theopenlane/iam/auth" - "github.com/theopenlane/utils/contextx" ) // handleOrganizationMutation routes organization mutations to the correct entitlement handler @@ -53,7 +54,8 @@ func handleOrganizationSettingMutation(ctx *soiree.EventContext, payload *events } } -// handleOrganizationDelete deactivates an organization's customer subscription when it is deleted +// handleOrganizationDelete deactivates an organization's customer subscription when it is deleted. +// it also makes sure to clean up the edges to the data func handleOrganizationDelete(ctx *soiree.EventContext, payload *events.MutationPayload) error { inv, ok := newEntitlementInvocation(ctx, payload, softDeleteAllowContext) if !ok { @@ -75,6 +77,13 @@ func handleOrganizationDelete(ctx *soiree.EventContext, payload *events.Mutation return nil } + cleanupContext := entgen.NewContext(inv.Context(), inv.client) + if err := entgen.OrganizationEdgeCleanup(cleanupContext, inv.orgID); err != nil { + inv.Logger().Error().Err(err).Str("organization_id", inv.orgID). + Msg("failed to cascade delete organization edges") + return err + } + if err := inv.client.EntitlementManager.FindAndDeactivateCustomerSubscription(inv.Context(), *org.StripeCustomerID); err != nil { inv.Logger().Error().Err(err).Msg("failed to deactivate customer subscription") return err diff --git a/internal/graphapi/organization.resolvers.go b/internal/graphapi/organization.resolvers.go index 798bf399fb..2442b900e0 100644 --- a/internal/graphapi/organization.resolvers.go +++ b/internal/graphapi/organization.resolvers.go @@ -84,12 +84,6 @@ func (r *mutationResolver) DeleteOrganization(ctx context.Context, id string) (* return nil, parseRequestError(ctx, err, common.Action{Action: common.ActionDelete, Object: "organization"}) } - if err := generated.OrganizationEdgeCleanup(ctx, id); err != nil { - logx.FromContext(ctx).Error().Str("organization_id", id).Err(err).Msg("failed to cascade delete organization edges") - - return nil, common.NewCascadeDeleteError(ctx, err) - } - return &model.OrganizationDeletePayload{ DeletedID: id, }, nil From 597f9b12b874ca26234d9f11332d84f70be7244c Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Wed, 21 Jan 2026 20:18:53 +0100 Subject: [PATCH 02/32] register event listener in tests --- internal/graphapi/organization_test.go | 15 ++++++----- internal/graphapi/tools_test.go | 26 +++++++++++++++++++ .../workflows/observability/observer_test.go | 22 ++++++++++------ 3 files changed, 49 insertions(+), 14 deletions(-) diff --git a/internal/graphapi/organization_test.go b/internal/graphapi/organization_test.go index c5e3240e7a..438c604022 100644 --- a/internal/graphapi/organization_test.go +++ b/internal/graphapi/organization_test.go @@ -1002,12 +1002,15 @@ func TestMutationOrganizationCascadeDelete(t *testing.T) { assert.ErrorContains(t, err, notFoundErrorMsg) - _, err = suite.client.api.GetOrganizationByID(reqCtx, childOrg.ID) - - assert.ErrorContains(t, err, notFoundErrorMsg) - - _, err = suite.client.api.GetGroupByID(reqCtx, group1.ID) - assert.ErrorContains(t, err, notFoundErrorMsg) + waitForCondition(t, func() bool { + _, err := suite.client.api.GetOrganizationByID(reqCtx, childOrg.ID) + return err != nil && strings.Contains(err.Error(), notFoundErrorMsg) + }, "child org should be deleted by async edge cleanup") + + waitForCondition(t, func() bool { + _, err := suite.client.api.GetGroupByID(reqCtx, group1.ID) + return err != nil && strings.Contains(err.Error(), notFoundErrorMsg) + }, "group should be deleted by async edge cleanup") // allow after tuples have been deleted ctx := privacy.DecisionContext(reqCtx, privacy.Allow) diff --git a/internal/graphapi/tools_test.go b/internal/graphapi/tools_test.go index 26fced199b..b567041744 100644 --- a/internal/graphapi/tools_test.go +++ b/internal/graphapi/tools_test.go @@ -250,6 +250,12 @@ func (suite *GraphTestSuite) SetupSuite(t *testing.T) { db, err := entdb.NewTestClient(ctx, suite.tf, jobOpts, opts) requireNoError(t, err) + eventer := hooks.NewEventerPool(db) + hooks.RegisterGlobalHooks(db, eventer) + + err = hooks.RegisterListeners(eventer) + requireNoError(t, err) + c.objectStore, c.mockProvider, err = coreutils.MockStorageServiceWithValidationAndProvider(t, nil, validators.MimeTypeValidator) requireNoError(t, err) @@ -409,6 +415,26 @@ func requireNoError(t *testing.T, err error) { } } +func waitForCondition(t *testing.T, condition func() bool, msg string) { + t.Helper() + + timeout := 5 * time.Second + interval := 50 * time.Millisecond + + deadline := time.Now().Add(timeout) + for time.Now().Before(deadline) { + if condition() { + return + } + + time.Sleep(interval) + } + + if !condition() { + t.Fatalf("timed out waiting for condition: %s", msg) + } +} + // mockStripeClient creates a new stripe client with mock backend func (suite *GraphTestSuite) mockStripeClient() (*entitlements.StripeClient, error) { suite.stripeMockBackend = new(mocks.MockStripeBackend) diff --git a/internal/workflows/observability/observer_test.go b/internal/workflows/observability/observer_test.go index a455a2f747..9da444351b 100644 --- a/internal/workflows/observability/observer_test.go +++ b/internal/workflows/observability/observer_test.go @@ -103,9 +103,9 @@ func TestHandleEmitRecordsError(t *testing.T) { t.Fatalf("expected nil error, got %v", err) } - waitForMetric(t, func() float64 { - return testutil.ToFloat64(metrics.WorkflowEmitErrorsTotal.WithLabelValues(topic, string(op.Origin))) - }, before+1) + waitForCondition(t, func() bool { + return testutil.ToFloat64(metrics.WorkflowEmitErrorsTotal.WithLabelValues(topic, string(op.Origin))) == before+1 + }, "metric to increment after emit error") } func TestBeginListenerTopicAppliesSpec(t *testing.T) { @@ -201,18 +201,24 @@ func findLogEntry(t *testing.T, buf *bytes.Buffer, msg string) map[string]any { return nil } -func waitForMetric(t *testing.T, read func() float64, want float64) { +func waitForCondition(t *testing.T, condition func() bool, msg string) { t.Helper() - deadline := time.Now().Add(500 * time.Millisecond) + timeout := 500 * time.Millisecond + interval := 10 * time.Millisecond + + deadline := time.Now().Add(timeout) for time.Now().Before(deadline) { - if got := read(); got == want { + if condition() { return } - time.Sleep(10 * time.Millisecond) + + time.Sleep(interval) } - t.Fatalf("timed out waiting for metric, got %v want %v", read(), want) + if !condition() { + t.Fatalf("timed out waiting for condition: %s", msg) + } } func TestScopeSkipMarksSkippedAndLogsDebug(t *testing.T) { From e6a599097971759f0ef316a97e7a49ad157cf88d Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Thu, 22 Jan 2026 16:58:45 +0100 Subject: [PATCH 03/32] fix edge deletions --- .task/checksum/generate-ent-smart | 2 +- .task/checksum/generate-graphql-smart | 2 +- .task/checksum/generate-others-smart | 2 +- cli/go.mod | 1 + cli/go.sum | 3 +- .../ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- .../generate/templates/ent/edge_cleanup.tmpl | 14 + internal/ent/generated/edge_cleanup.go | 1204 +++++++++++++++++ internal/ent/hooks/listeners_entitlements.go | 13 +- internal/ent/schema/control.go | 8 + internal/graphapi/checksum/.schema_checksum | 2 +- 12 files changed, 1240 insertions(+), 15 deletions(-) diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index 3e79b3739d..808d629bf3 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1 +1 @@ -9095d1d09aa17ca9e7a922dfa2fbb18e +6b2b9b5059146a86661d500e08c624ad diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index de503dd568..55c9714fee 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1 +1 @@ -9700b6445d3d42d0aab84de26bf14201 +266abc397049e295f84241557a4f85cf diff --git a/.task/checksum/generate-others-smart b/.task/checksum/generate-others-smart index b4ad373f2b..b8d80acd65 100644 --- a/.task/checksum/generate-others-smart +++ b/.task/checksum/generate-others-smart @@ -1 +1 @@ -b3af7fd8a9f19773ed6fed58865c7eb +fe6983826cbedc804966fa2bda0e9d61 diff --git a/cli/go.mod b/cli/go.mod index 78bd0d6226..a45c230b26 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -30,6 +30,7 @@ require ( require ( al.essio.dev/pkg/shellescape v1.6.0 // indirect github.com/Yamashou/gqlgenc v0.33.0 // indirect + github.com/alicebob/miniredis/v2 v2.36.0 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/buger/jsonparser v1.1.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect diff --git a/cli/go.sum b/cli/go.sum index b27f4e1d46..443a90527c 100644 --- a/cli/go.sum +++ b/cli/go.sum @@ -8,8 +8,7 @@ github.com/Yamashou/gqlgenc v0.33.0 h1:0fxTnNE8/JVmFpfo7reA5pEgOcr7VjNc+/nEpVhNj github.com/Yamashou/gqlgenc v0.33.0/go.mod h1:MZGXx/nALyxcehcFeLGmYiNsJ+hQTOGJzNYCGNX4rL0= github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KOX7eoM= github.com/agnivade/levenshtein v1.2.1/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU= -github.com/alicebob/miniredis/v2 v2.35.0 h1:QwLphYqCEAo1eu1TqPRN2jgVMPBweeQcR21jeqDCONI= -github.com/alicebob/miniredis/v2 v2.35.0/go.mod h1:TcL7YfarKPGDAthEtl5NBeHZfeUQj6OXMm/+iu5cLMM= +github.com/alicebob/miniredis/v2 v2.36.0 h1:yKczg+ez0bQYsG/PrgqtMMmCfl820RPu27kVGjP53eY= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index 08d963d9ce..adffa6e0bc 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -2eeb65de364dc56feee9b90a072326b4050205cdd2b6d589f25ec3698b8154fb \ No newline at end of file +c25bfcddb4ab4fb5bbe1a6443158960bf98fdd80d857c39d4df5ea6b11eb14d9 \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index 5602a28f74..730a0ccb82 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -5f3854ee9738c5da709d782e9207bbc9deeef7db869d51d7e647e460230361d7 \ No newline at end of file +d224acc94bb593a832184b936b967bc26e5bafb002cd7463137798580b909bcf \ No newline at end of file diff --git a/internal/ent/generate/templates/ent/edge_cleanup.tmpl b/internal/ent/generate/templates/ent/edge_cleanup.tmpl index 4307269e8d..a0a4406640 100644 --- a/internal/ent/generate/templates/ent/edge_cleanup.tmpl +++ b/internal/ent/generate/templates/ent/edge_cleanup.tmpl @@ -34,6 +34,20 @@ } } {{- else }} + {{/* clean up nested edges before deleting */}} + { + ids, err := FromContext(ctx).{{ $edge.Type.Name }}.Query().Where({{ $edge.Type.Name | lower }}.Has{{ $annotation.Field }}With({{ $node.Name | lower }}.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying {{ $edge.Type.Name | lower }} ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := {{ $edge.Type.Name }}EdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up {{ $edge.Type.Name | lower }} edges") + return err + } + } + } if exists, err := FromContext(ctx).{{ $edge.Type.Name }}.Query().Where(({{ $edge.Type.Name | lower }}.Has{{ $annotation.Field }}With({{ $node.Name | lower }}.ID(id)))).Exist(ctx); err == nil && exists { if {{ $edge.Type.Name | lower }}Count, err := FromContext(ctx).{{ $edge.Type.Name }}.Delete().Where({{ $edge.Type.Name | lower }}.Has{{ $annotation.Field }}With({{ $node.Name | lower }}.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", {{ $edge.Type.Name | lower }}Count).Msg("error deleting {{ $edge.Type.Name | lower }}") diff --git a/internal/ent/generated/edge_cleanup.go b/internal/ent/generated/edge_cleanup.go index dba124d8bb..9831ff2acf 100644 --- a/internal/ent/generated/edge_cleanup.go +++ b/internal/ent/generated/edge_cleanup.go @@ -32,6 +32,7 @@ import ( "github.com/theopenlane/core/internal/ent/generated/file" "github.com/theopenlane/core/internal/ent/generated/filedownloadtoken" "github.com/theopenlane/core/internal/ent/generated/finding" + "github.com/theopenlane/core/internal/ent/generated/findingcontrol" "github.com/theopenlane/core/internal/ent/generated/group" "github.com/theopenlane/core/internal/ent/generated/groupmembership" "github.com/theopenlane/core/internal/ent/generated/groupsetting" @@ -137,6 +138,19 @@ func ContactEdgeCleanup(ctx context.Context, id string) error { func ControlEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup control edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).Subcontrol.Query().Where(subcontrol.HasControlWith(control.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying subcontrol ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := SubcontrolEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up subcontrol edges") + return err + } + } + } if exists, err := FromContext(ctx).Subcontrol.Query().Where((subcontrol.HasControlWith(control.ID(id)))).Exist(ctx); err == nil && exists { if subcontrolCount, err := FromContext(ctx).Subcontrol.Delete().Where(subcontrol.HasControlWith(control.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", subcontrolCount).Msg("error deleting subcontrol") @@ -144,6 +158,13 @@ func ControlEdgeCleanup(ctx context.Context, id string) error { } } + if exists, err := FromContext(ctx).FindingControl.Query().Where((findingcontrol.HasControlWith(control.ID(id)))).Exist(ctx); err == nil && exists { + if findingcontrolCount, err := FromContext(ctx).FindingControl.Delete().Where(findingcontrol.HasControlWith(control.ID(id))).Exec(ctx); err != nil { + logx.FromContext(ctx).Error().Err(err).Int("count", findingcontrolCount).Msg("error deleting findingcontrol") + return err + } + } + return nil } @@ -218,6 +239,19 @@ func DirectorySyncRunEdgeCleanup(ctx context.Context, id string) error { func DiscussionEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup discussion edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).Note.Query().Where(note.HasDiscussionWith(discussion.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying note ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NoteEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up note edges") + return err + } + } + } if exists, err := FromContext(ctx).Note.Query().Where((note.HasDiscussionWith(discussion.ID(id)))).Exist(ctx); err == nil && exists { if noteCount, err := FromContext(ctx).Note.Delete().Where(note.HasDiscussionWith(discussion.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", noteCount).Msg("error deleting note") @@ -297,6 +331,19 @@ func FindingControlEdgeCleanup(ctx context.Context, id string) error { func GroupEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup group edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).GroupSetting.Query().Where(groupsetting.HasGroupWith(group.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying groupsetting ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := GroupSettingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up groupsetting edges") + return err + } + } + } if exists, err := FromContext(ctx).GroupSetting.Query().Where((groupsetting.HasGroupWith(group.ID(id)))).Exist(ctx); err == nil && exists { if groupsettingCount, err := FromContext(ctx).GroupSetting.Delete().Where(groupsetting.HasGroupWith(group.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", groupsettingCount).Msg("error deleting groupsetting") @@ -383,6 +430,19 @@ func JobRunnerTokenEdgeCleanup(ctx context.Context, id string) error { func JobTemplateEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup jobtemplate edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).ScheduledJob.Query().Where(scheduledjob.HasJobTemplateWith(jobtemplate.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying scheduledjob ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ScheduledJobEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up scheduledjob edges") + return err + } + } + } if exists, err := FromContext(ctx).ScheduledJob.Query().Where((scheduledjob.HasJobTemplateWith(jobtemplate.ID(id)))).Exist(ctx); err == nil && exists { if scheduledjobCount, err := FromContext(ctx).ScheduledJob.Delete().Where(scheduledjob.HasJobTemplateWith(jobtemplate.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", scheduledjobCount).Msg("error deleting scheduledjob") @@ -483,6 +543,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrganizationSetting.Query().Where(organizationsetting.HasOrganizationWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying organizationsetting ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrganizationSettingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up organizationsetting edges") + return err + } + } + } if exists, err := FromContext(ctx).OrganizationSetting.Query().Where((organizationsetting.HasOrganizationWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if organizationsettingCount, err := FromContext(ctx).OrganizationSetting.Delete().Where(organizationsetting.HasOrganizationWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", organizationsettingCount).Msg("error deleting organizationsetting") @@ -490,6 +563,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).APIToken.Query().Where(apitoken.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying apitoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := APITokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up apitoken edges") + return err + } + } + } if exists, err := FromContext(ctx).APIToken.Query().Where((apitoken.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if apitokenCount, err := FromContext(ctx).APIToken.Delete().Where(apitoken.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", apitokenCount).Msg("error deleting apitoken") @@ -497,6 +583,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).File.Query().Where(file.HasOrganizationWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying file ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FileEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up file edges") + return err + } + } + } if exists, err := FromContext(ctx).File.Query().Where((file.HasOrganizationWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if fileCount, err := FromContext(ctx).File.Delete().Where(file.HasOrganizationWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", fileCount).Msg("error deleting file") @@ -504,6 +603,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Hush.Query().Where(hush.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying hush ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := HushEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up hush edges") + return err + } + } + } if exists, err := FromContext(ctx).Hush.Query().Where((hush.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if hushCount, err := FromContext(ctx).Hush.Delete().Where(hush.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", hushCount).Msg("error deleting hush") @@ -511,6 +623,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Group.Query().Where(group.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying group ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := GroupEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up group edges") + return err + } + } + } if exists, err := FromContext(ctx).Group.Query().Where((group.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if groupCount, err := FromContext(ctx).Group.Delete().Where(group.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", groupCount).Msg("error deleting group") @@ -518,6 +643,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Template.Query().Where(template.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying template ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TemplateEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up template edges") + return err + } + } + } if exists, err := FromContext(ctx).Template.Query().Where((template.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if templateCount, err := FromContext(ctx).Template.Delete().Where(template.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", templateCount).Msg("error deleting template") @@ -525,6 +663,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Integration.Query().Where(integration.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying integration ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := IntegrationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up integration edges") + return err + } + } + } if exists, err := FromContext(ctx).Integration.Query().Where((integration.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if integrationCount, err := FromContext(ctx).Integration.Delete().Where(integration.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", integrationCount).Msg("error deleting integration") @@ -532,6 +683,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DocumentData.Query().Where(documentdata.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying documentdata ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DocumentDataEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up documentdata edges") + return err + } + } + } if exists, err := FromContext(ctx).DocumentData.Query().Where((documentdata.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if documentdataCount, err := FromContext(ctx).DocumentData.Delete().Where(documentdata.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", documentdataCount).Msg("error deleting documentdata") @@ -539,6 +703,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrgSubscription.Query().Where(orgsubscription.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying orgsubscription ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrgSubscriptionEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up orgsubscription edges") + return err + } + } + } if exists, err := FromContext(ctx).OrgSubscription.Query().Where((orgsubscription.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if orgsubscriptionCount, err := FromContext(ctx).OrgSubscription.Delete().Where(orgsubscription.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", orgsubscriptionCount).Msg("error deleting orgsubscription") @@ -546,6 +723,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrgProduct.Query().Where(orgproduct.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying orgproduct ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrgProductEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up orgproduct edges") + return err + } + } + } if exists, err := FromContext(ctx).OrgProduct.Query().Where((orgproduct.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if orgproductCount, err := FromContext(ctx).OrgProduct.Delete().Where(orgproduct.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", orgproductCount).Msg("error deleting orgproduct") @@ -553,6 +743,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrgPrice.Query().Where(orgprice.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying orgprice ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrgPriceEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up orgprice edges") + return err + } + } + } if exists, err := FromContext(ctx).OrgPrice.Query().Where((orgprice.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if orgpriceCount, err := FromContext(ctx).OrgPrice.Delete().Where(orgprice.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", orgpriceCount).Msg("error deleting orgprice") @@ -560,6 +763,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrgModule.Query().Where(orgmodule.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying orgmodule ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrgModuleEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up orgmodule edges") + return err + } + } + } if exists, err := FromContext(ctx).OrgModule.Query().Where((orgmodule.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if orgmoduleCount, err := FromContext(ctx).OrgModule.Delete().Where(orgmodule.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", orgmoduleCount).Msg("error deleting orgmodule") @@ -567,6 +783,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Invite.Query().Where(invite.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying invite ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := InviteEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up invite edges") + return err + } + } + } if exists, err := FromContext(ctx).Invite.Query().Where((invite.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if inviteCount, err := FromContext(ctx).Invite.Delete().Where(invite.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", inviteCount).Msg("error deleting invite") @@ -574,6 +803,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Subscriber.Query().Where(subscriber.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying subscriber ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := SubscriberEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up subscriber edges") + return err + } + } + } if exists, err := FromContext(ctx).Subscriber.Query().Where((subscriber.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if subscriberCount, err := FromContext(ctx).Subscriber.Delete().Where(subscriber.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", subscriberCount).Msg("error deleting subscriber") @@ -581,6 +823,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Entity.Query().Where(entity.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying entity ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := EntityEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up entity edges") + return err + } + } + } if exists, err := FromContext(ctx).Entity.Query().Where((entity.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if entityCount, err := FromContext(ctx).Entity.Delete().Where(entity.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", entityCount).Msg("error deleting entity") @@ -588,6 +843,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).EntityType.Query().Where(entitytype.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying entitytype ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := EntityTypeEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up entitytype edges") + return err + } + } + } if exists, err := FromContext(ctx).EntityType.Query().Where((entitytype.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if entitytypeCount, err := FromContext(ctx).EntityType.Delete().Where(entitytype.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", entitytypeCount).Msg("error deleting entitytype") @@ -595,6 +863,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Contact.Query().Where(contact.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying contact ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ContactEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up contact edges") + return err + } + } + } if exists, err := FromContext(ctx).Contact.Query().Where((contact.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if contactCount, err := FromContext(ctx).Contact.Delete().Where(contact.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", contactCount).Msg("error deleting contact") @@ -602,6 +883,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Note.Query().Where(note.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying note ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NoteEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up note edges") + return err + } + } + } if exists, err := FromContext(ctx).Note.Query().Where((note.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if noteCount, err := FromContext(ctx).Note.Delete().Where(note.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", noteCount).Msg("error deleting note") @@ -609,6 +903,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Task.Query().Where(task.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying task ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TaskEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up task edges") + return err + } + } + } if exists, err := FromContext(ctx).Task.Query().Where((task.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if taskCount, err := FromContext(ctx).Task.Delete().Where(task.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", taskCount).Msg("error deleting task") @@ -616,6 +923,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Program.Query().Where(program.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying program ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ProgramEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up program edges") + return err + } + } + } if exists, err := FromContext(ctx).Program.Query().Where((program.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if programCount, err := FromContext(ctx).Program.Delete().Where(program.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", programCount).Msg("error deleting program") @@ -623,6 +943,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Procedure.Query().Where(procedure.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying procedure ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ProcedureEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up procedure edges") + return err + } + } + } if exists, err := FromContext(ctx).Procedure.Query().Where((procedure.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if procedureCount, err := FromContext(ctx).Procedure.Delete().Where(procedure.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", procedureCount).Msg("error deleting procedure") @@ -630,6 +963,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).InternalPolicy.Query().Where(internalpolicy.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying internalpolicy ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := InternalPolicyEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up internalpolicy edges") + return err + } + } + } if exists, err := FromContext(ctx).InternalPolicy.Query().Where((internalpolicy.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if internalpolicyCount, err := FromContext(ctx).InternalPolicy.Delete().Where(internalpolicy.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", internalpolicyCount).Msg("error deleting internalpolicy") @@ -637,6 +983,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Risk.Query().Where(risk.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying risk ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := RiskEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up risk edges") + return err + } + } + } if exists, err := FromContext(ctx).Risk.Query().Where((risk.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if riskCount, err := FromContext(ctx).Risk.Delete().Where(risk.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", riskCount).Msg("error deleting risk") @@ -644,6 +1003,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ControlObjective.Query().Where(controlobjective.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying controlobjective ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ControlObjectiveEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up controlobjective edges") + return err + } + } + } if exists, err := FromContext(ctx).ControlObjective.Query().Where((controlobjective.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if controlobjectiveCount, err := FromContext(ctx).ControlObjective.Delete().Where(controlobjective.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", controlobjectiveCount).Msg("error deleting controlobjective") @@ -651,6 +1023,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Narrative.Query().Where(narrative.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying narrative ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NarrativeEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up narrative edges") + return err + } + } + } if exists, err := FromContext(ctx).Narrative.Query().Where((narrative.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if narrativeCount, err := FromContext(ctx).Narrative.Delete().Where(narrative.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", narrativeCount).Msg("error deleting narrative") @@ -658,6 +1043,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Control.Query().Where(control.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying control ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ControlEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up control edges") + return err + } + } + } if exists, err := FromContext(ctx).Control.Query().Where((control.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if controlCount, err := FromContext(ctx).Control.Delete().Where(control.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", controlCount).Msg("error deleting control") @@ -665,6 +1063,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Subcontrol.Query().Where(subcontrol.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying subcontrol ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := SubcontrolEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up subcontrol edges") + return err + } + } + } if exists, err := FromContext(ctx).Subcontrol.Query().Where((subcontrol.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if subcontrolCount, err := FromContext(ctx).Subcontrol.Delete().Where(subcontrol.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", subcontrolCount).Msg("error deleting subcontrol") @@ -672,6 +1083,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ControlImplementation.Query().Where(controlimplementation.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying controlimplementation ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ControlImplementationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up controlimplementation edges") + return err + } + } + } if exists, err := FromContext(ctx).ControlImplementation.Query().Where((controlimplementation.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if controlimplementationCount, err := FromContext(ctx).ControlImplementation.Delete().Where(controlimplementation.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", controlimplementationCount).Msg("error deleting controlimplementation") @@ -679,6 +1103,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).MappedControl.Query().Where(mappedcontrol.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying mappedcontrol ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := MappedControlEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up mappedcontrol edges") + return err + } + } + } if exists, err := FromContext(ctx).MappedControl.Query().Where((mappedcontrol.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if mappedcontrolCount, err := FromContext(ctx).MappedControl.Delete().Where(mappedcontrol.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", mappedcontrolCount).Msg("error deleting mappedcontrol") @@ -686,6 +1123,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Evidence.Query().Where(evidence.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying evidence ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := EvidenceEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up evidence edges") + return err + } + } + } if exists, err := FromContext(ctx).Evidence.Query().Where((evidence.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if evidenceCount, err := FromContext(ctx).Evidence.Delete().Where(evidence.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", evidenceCount).Msg("error deleting evidence") @@ -693,6 +1143,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Standard.Query().Where(standard.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying standard ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := StandardEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up standard edges") + return err + } + } + } if exists, err := FromContext(ctx).Standard.Query().Where((standard.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if standardCount, err := FromContext(ctx).Standard.Delete().Where(standard.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", standardCount).Msg("error deleting standard") @@ -700,6 +1163,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ActionPlan.Query().Where(actionplan.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying actionplan ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ActionPlanEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up actionplan edges") + return err + } + } + } if exists, err := FromContext(ctx).ActionPlan.Query().Where((actionplan.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if actionplanCount, err := FromContext(ctx).ActionPlan.Delete().Where(actionplan.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", actionplanCount).Msg("error deleting actionplan") @@ -707,6 +1183,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).CustomDomain.Query().Where(customdomain.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying customdomain ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := CustomDomainEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up customdomain edges") + return err + } + } + } if exists, err := FromContext(ctx).CustomDomain.Query().Where((customdomain.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if customdomainCount, err := FromContext(ctx).CustomDomain.Delete().Where(customdomain.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", customdomainCount).Msg("error deleting customdomain") @@ -714,6 +1203,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobRunner.Query().Where(jobrunner.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobrunner ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobRunnerEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobrunner edges") + return err + } + } + } if exists, err := FromContext(ctx).JobRunner.Query().Where((jobrunner.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobrunnerCount, err := FromContext(ctx).JobRunner.Delete().Where(jobrunner.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobrunnerCount).Msg("error deleting jobrunner") @@ -721,6 +1223,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobRunnerToken.Query().Where(jobrunnertoken.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobrunnertoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobRunnerTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobrunnertoken edges") + return err + } + } + } if exists, err := FromContext(ctx).JobRunnerToken.Query().Where((jobrunnertoken.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobrunnertokenCount, err := FromContext(ctx).JobRunnerToken.Delete().Where(jobrunnertoken.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobrunnertokenCount).Msg("error deleting jobrunnertoken") @@ -728,6 +1243,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobRunnerRegistrationToken.Query().Where(jobrunnerregistrationtoken.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobrunnerregistrationtoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobRunnerRegistrationTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobrunnerregistrationtoken edges") + return err + } + } + } if exists, err := FromContext(ctx).JobRunnerRegistrationToken.Query().Where((jobrunnerregistrationtoken.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobrunnerregistrationtokenCount, err := FromContext(ctx).JobRunnerRegistrationToken.Delete().Where(jobrunnerregistrationtoken.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobrunnerregistrationtokenCount).Msg("error deleting jobrunnerregistrationtoken") @@ -735,6 +1263,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DNSVerification.Query().Where(dnsverification.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying dnsverification ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DNSVerificationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up dnsverification edges") + return err + } + } + } if exists, err := FromContext(ctx).DNSVerification.Query().Where((dnsverification.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if dnsverificationCount, err := FromContext(ctx).DNSVerification.Delete().Where(dnsverification.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", dnsverificationCount).Msg("error deleting dnsverification") @@ -742,6 +1283,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobTemplate.Query().Where(jobtemplate.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobtemplate ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobTemplateEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobtemplate edges") + return err + } + } + } if exists, err := FromContext(ctx).JobTemplate.Query().Where((jobtemplate.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobtemplateCount, err := FromContext(ctx).JobTemplate.Delete().Where(jobtemplate.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobtemplateCount).Msg("error deleting jobtemplate") @@ -749,6 +1303,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ScheduledJob.Query().Where(scheduledjob.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying scheduledjob ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ScheduledJobEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up scheduledjob edges") + return err + } + } + } if exists, err := FromContext(ctx).ScheduledJob.Query().Where((scheduledjob.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if scheduledjobCount, err := FromContext(ctx).ScheduledJob.Delete().Where(scheduledjob.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", scheduledjobCount).Msg("error deleting scheduledjob") @@ -756,6 +1323,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobResult.Query().Where(jobresult.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobresult ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobResultEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobresult edges") + return err + } + } + } if exists, err := FromContext(ctx).JobResult.Query().Where((jobresult.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobresultCount, err := FromContext(ctx).JobResult.Delete().Where(jobresult.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobresultCount).Msg("error deleting jobresult") @@ -763,6 +1343,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ScheduledJobRun.Query().Where(scheduledjobrun.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying scheduledjobrun ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ScheduledJobRunEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up scheduledjobrun edges") + return err + } + } + } if exists, err := FromContext(ctx).ScheduledJobRun.Query().Where((scheduledjobrun.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if scheduledjobrunCount, err := FromContext(ctx).ScheduledJobRun.Delete().Where(scheduledjobrun.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", scheduledjobrunCount).Msg("error deleting scheduledjobrun") @@ -770,6 +1363,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenter.Query().Where(trustcenter.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenter ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenter edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenter.Query().Where((trustcenter.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterCount, err := FromContext(ctx).TrustCenter.Delete().Where(trustcenter.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterCount).Msg("error deleting trustcenter") @@ -777,6 +1383,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Asset.Query().Where(asset.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying asset ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := AssetEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up asset edges") + return err + } + } + } if exists, err := FromContext(ctx).Asset.Query().Where((asset.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if assetCount, err := FromContext(ctx).Asset.Delete().Where(asset.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", assetCount).Msg("error deleting asset") @@ -784,6 +1403,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Scan.Query().Where(scan.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying scan ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ScanEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up scan edges") + return err + } + } + } if exists, err := FromContext(ctx).Scan.Query().Where((scan.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if scanCount, err := FromContext(ctx).Scan.Delete().Where(scan.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", scanCount).Msg("error deleting scan") @@ -791,6 +1423,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Subprocessor.Query().Where(subprocessor.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying subprocessor ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := SubprocessorEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up subprocessor edges") + return err + } + } + } if exists, err := FromContext(ctx).Subprocessor.Query().Where((subprocessor.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if subprocessorCount, err := FromContext(ctx).Subprocessor.Delete().Where(subprocessor.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", subprocessorCount).Msg("error deleting subprocessor") @@ -798,6 +1443,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Export.Query().Where(export.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying export ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ExportEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up export edges") + return err + } + } + } if exists, err := FromContext(ctx).Export.Query().Where((export.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if exportCount, err := FromContext(ctx).Export.Delete().Where(export.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", exportCount).Msg("error deleting export") @@ -805,6 +1463,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterWatermarkConfig.Query().Where(trustcenterwatermarkconfig.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterwatermarkconfig ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterWatermarkConfigEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterwatermarkconfig edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterWatermarkConfig.Query().Where((trustcenterwatermarkconfig.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterwatermarkconfigCount, err := FromContext(ctx).TrustCenterWatermarkConfig.Delete().Where(trustcenterwatermarkconfig.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterwatermarkconfigCount).Msg("error deleting trustcenterwatermarkconfig") @@ -812,6 +1483,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Assessment.Query().Where(assessment.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying assessment ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := AssessmentEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up assessment edges") + return err + } + } + } if exists, err := FromContext(ctx).Assessment.Query().Where((assessment.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if assessmentCount, err := FromContext(ctx).Assessment.Delete().Where(assessment.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", assessmentCount).Msg("error deleting assessment") @@ -819,6 +1503,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).AssessmentResponse.Query().Where(assessmentresponse.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying assessmentresponse ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := AssessmentResponseEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up assessmentresponse edges") + return err + } + } + } if exists, err := FromContext(ctx).AssessmentResponse.Query().Where((assessmentresponse.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if assessmentresponseCount, err := FromContext(ctx).AssessmentResponse.Delete().Where(assessmentresponse.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", assessmentresponseCount).Msg("error deleting assessmentresponse") @@ -826,6 +1523,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).CustomTypeEnum.Query().Where(customtypeenum.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying customtypeenum ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := CustomTypeEnumEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up customtypeenum edges") + return err + } + } + } if exists, err := FromContext(ctx).CustomTypeEnum.Query().Where((customtypeenum.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if customtypeenumCount, err := FromContext(ctx).CustomTypeEnum.Delete().Where(customtypeenum.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", customtypeenumCount).Msg("error deleting customtypeenum") @@ -833,6 +1543,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TagDefinition.Query().Where(tagdefinition.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying tagdefinition ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TagDefinitionEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up tagdefinition edges") + return err + } + } + } if exists, err := FromContext(ctx).TagDefinition.Query().Where((tagdefinition.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if tagdefinitionCount, err := FromContext(ctx).TagDefinition.Delete().Where(tagdefinition.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", tagdefinitionCount).Msg("error deleting tagdefinition") @@ -840,6 +1563,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Remediation.Query().Where(remediation.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying remediation ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := RemediationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up remediation edges") + return err + } + } + } if exists, err := FromContext(ctx).Remediation.Query().Where((remediation.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if remediationCount, err := FromContext(ctx).Remediation.Delete().Where(remediation.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", remediationCount).Msg("error deleting remediation") @@ -847,6 +1583,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Finding.Query().Where(finding.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying finding ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FindingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up finding edges") + return err + } + } + } if exists, err := FromContext(ctx).Finding.Query().Where((finding.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if findingCount, err := FromContext(ctx).Finding.Delete().Where(finding.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", findingCount).Msg("error deleting finding") @@ -854,6 +1603,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Review.Query().Where(review.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying review ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ReviewEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up review edges") + return err + } + } + } if exists, err := FromContext(ctx).Review.Query().Where((review.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if reviewCount, err := FromContext(ctx).Review.Delete().Where(review.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", reviewCount).Msg("error deleting review") @@ -861,6 +1623,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Vulnerability.Query().Where(vulnerability.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying vulnerability ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := VulnerabilityEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up vulnerability edges") + return err + } + } + } if exists, err := FromContext(ctx).Vulnerability.Query().Where((vulnerability.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if vulnerabilityCount, err := FromContext(ctx).Vulnerability.Delete().Where(vulnerability.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", vulnerabilityCount).Msg("error deleting vulnerability") @@ -868,6 +1643,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Notification.Query().Where(notification.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying notification ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NotificationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up notification edges") + return err + } + } + } if exists, err := FromContext(ctx).Notification.Query().Where((notification.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if notificationCount, err := FromContext(ctx).Notification.Delete().Where(notification.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", notificationCount).Msg("error deleting notification") @@ -875,6 +1663,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowDefinition.Query().Where(workflowdefinition.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowdefinition ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowDefinitionEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowdefinition edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowDefinition.Query().Where((workflowdefinition.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowdefinitionCount, err := FromContext(ctx).WorkflowDefinition.Delete().Where(workflowdefinition.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowdefinitionCount).Msg("error deleting workflowdefinition") @@ -882,6 +1683,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowInstance.Query().Where(workflowinstance.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowinstance ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowInstanceEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowinstance edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowInstance.Query().Where((workflowinstance.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowinstanceCount, err := FromContext(ctx).WorkflowInstance.Delete().Where(workflowinstance.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowinstanceCount).Msg("error deleting workflowinstance") @@ -889,6 +1703,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowEvent.Query().Where(workflowevent.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowevent ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowEventEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowevent edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowEvent.Query().Where((workflowevent.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workfloweventCount, err := FromContext(ctx).WorkflowEvent.Delete().Where(workflowevent.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workfloweventCount).Msg("error deleting workflowevent") @@ -896,6 +1723,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowAssignment.Query().Where(workflowassignment.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowassignment ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowAssignmentEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowassignment edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowAssignment.Query().Where((workflowassignment.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowassignmentCount, err := FromContext(ctx).WorkflowAssignment.Delete().Where(workflowassignment.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowassignmentCount).Msg("error deleting workflowassignment") @@ -903,6 +1743,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowAssignmentTarget.Query().Where(workflowassignmenttarget.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowassignmenttarget ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowAssignmentTargetEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowassignmenttarget edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowAssignmentTarget.Query().Where((workflowassignmenttarget.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowassignmenttargetCount, err := FromContext(ctx).WorkflowAssignmentTarget.Delete().Where(workflowassignmenttarget.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowassignmenttargetCount).Msg("error deleting workflowassignmenttarget") @@ -910,6 +1763,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowObjectRef.Query().Where(workflowobjectref.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowobjectref ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowObjectRefEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowobjectref edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowObjectRef.Query().Where((workflowobjectref.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowobjectrefCount, err := FromContext(ctx).WorkflowObjectRef.Delete().Where(workflowobjectref.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowobjectrefCount).Msg("error deleting workflowobjectref") @@ -917,6 +1783,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowProposal.Query().Where(workflowproposal.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowproposal ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowProposalEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowproposal edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowProposal.Query().Where((workflowproposal.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowproposalCount, err := FromContext(ctx).WorkflowProposal.Delete().Where(workflowproposal.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowproposalCount).Msg("error deleting workflowproposal") @@ -924,6 +1803,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DirectoryAccount.Query().Where(directoryaccount.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying directoryaccount ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DirectoryAccountEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up directoryaccount edges") + return err + } + } + } if exists, err := FromContext(ctx).DirectoryAccount.Query().Where((directoryaccount.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if directoryaccountCount, err := FromContext(ctx).DirectoryAccount.Delete().Where(directoryaccount.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", directoryaccountCount).Msg("error deleting directoryaccount") @@ -931,6 +1823,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DirectoryGroup.Query().Where(directorygroup.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying directorygroup ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DirectoryGroupEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up directorygroup edges") + return err + } + } + } if exists, err := FromContext(ctx).DirectoryGroup.Query().Where((directorygroup.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if directorygroupCount, err := FromContext(ctx).DirectoryGroup.Delete().Where(directorygroup.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", directorygroupCount).Msg("error deleting directorygroup") @@ -938,6 +1843,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DirectoryMembership.Query().Where(directorymembership.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying directorymembership ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DirectoryMembershipEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up directorymembership edges") + return err + } + } + } if exists, err := FromContext(ctx).DirectoryMembership.Query().Where((directorymembership.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if directorymembershipCount, err := FromContext(ctx).DirectoryMembership.Delete().Where(directorymembership.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", directorymembershipCount).Msg("error deleting directorymembership") @@ -945,6 +1863,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DirectorySyncRun.Query().Where(directorysyncrun.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying directorysyncrun ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DirectorySyncRunEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up directorysyncrun edges") + return err + } + } + } if exists, err := FromContext(ctx).DirectorySyncRun.Query().Where((directorysyncrun.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if directorysyncrunCount, err := FromContext(ctx).DirectorySyncRun.Delete().Where(directorysyncrun.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", directorysyncrunCount).Msg("error deleting directorysyncrun") @@ -952,6 +1883,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Discussion.Query().Where(discussion.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying discussion ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DiscussionEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up discussion edges") + return err + } + } + } if exists, err := FromContext(ctx).Discussion.Query().Where((discussion.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if discussionCount, err := FromContext(ctx).Discussion.Delete().Where(discussion.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", discussionCount).Msg("error deleting discussion") @@ -1063,6 +2007,19 @@ func SubcontrolEdgeCleanup(ctx context.Context, id string) error { func SubprocessorEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup subprocessor edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).TrustCenterSubprocessor.Query().Where(trustcentersubprocessor.HasSubprocessorWith(subprocessor.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcentersubprocessor ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterSubprocessorEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcentersubprocessor edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterSubprocessor.Query().Where((trustcentersubprocessor.HasSubprocessorWith(subprocessor.ID(id)))).Exist(ctx); err == nil && exists { if trustcentersubprocessorCount, err := FromContext(ctx).TrustCenterSubprocessor.Delete().Where(trustcentersubprocessor.HasSubprocessorWith(subprocessor.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcentersubprocessorCount).Msg("error deleting trustcentersubprocessor") @@ -1100,6 +2057,19 @@ func TaskEdgeCleanup(ctx context.Context, id string) error { func TemplateEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup template edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).DocumentData.Query().Where(documentdata.HasTemplateWith(template.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying documentdata ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DocumentDataEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up documentdata edges") + return err + } + } + } if exists, err := FromContext(ctx).DocumentData.Query().Where((documentdata.HasTemplateWith(template.ID(id)))).Exist(ctx); err == nil && exists { if documentdataCount, err := FromContext(ctx).DocumentData.Delete().Where(documentdata.HasTemplateWith(template.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", documentdataCount).Msg("error deleting documentdata") @@ -1127,6 +2097,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterWatermarkConfig.Query().Where(trustcenterwatermarkconfig.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterwatermarkconfig ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterWatermarkConfigEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterwatermarkconfig edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterWatermarkConfig.Query().Where((trustcenterwatermarkconfig.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterwatermarkconfigCount, err := FromContext(ctx).TrustCenterWatermarkConfig.Delete().Where(trustcenterwatermarkconfig.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterwatermarkconfigCount).Msg("error deleting trustcenterwatermarkconfig") @@ -1134,6 +2117,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterSubprocessor.Query().Where(trustcentersubprocessor.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcentersubprocessor ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterSubprocessorEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcentersubprocessor edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterSubprocessor.Query().Where((trustcentersubprocessor.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcentersubprocessorCount, err := FromContext(ctx).TrustCenterSubprocessor.Delete().Where(trustcentersubprocessor.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcentersubprocessorCount).Msg("error deleting trustcentersubprocessor") @@ -1141,6 +2137,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterDoc.Query().Where(trustcenterdoc.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterdoc ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterDocEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterdoc edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterDoc.Query().Where((trustcenterdoc.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterdocCount, err := FromContext(ctx).TrustCenterDoc.Delete().Where(trustcenterdoc.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterdocCount).Msg("error deleting trustcenterdoc") @@ -1148,6 +2157,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterCompliance.Query().Where(trustcentercompliance.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcentercompliance ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterComplianceEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcentercompliance edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterCompliance.Query().Where((trustcentercompliance.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcentercomplianceCount, err := FromContext(ctx).TrustCenterCompliance.Delete().Where(trustcentercompliance.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcentercomplianceCount).Msg("error deleting trustcentercompliance") @@ -1155,6 +2177,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Template.Query().Where(template.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying template ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TemplateEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up template edges") + return err + } + } + } if exists, err := FromContext(ctx).Template.Query().Where((template.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if templateCount, err := FromContext(ctx).Template.Delete().Where(template.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", templateCount).Msg("error deleting template") @@ -1162,6 +2197,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Note.Query().Where(note.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying note ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NoteEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up note edges") + return err + } + } + } if exists, err := FromContext(ctx).Note.Query().Where((note.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if noteCount, err := FromContext(ctx).Note.Delete().Where(note.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", noteCount).Msg("error deleting note") @@ -1169,6 +2217,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterEntity.Query().Where(trustcenterentity.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterentity ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterEntityEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterentity edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterEntity.Query().Where((trustcenterentity.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterentityCount, err := FromContext(ctx).TrustCenterEntity.Delete().Where(trustcenterentity.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterentityCount).Msg("error deleting trustcenterentity") @@ -1176,6 +2237,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterNDARequest.Query().Where(trustcenterndarequest.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterndarequest ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterNDARequestEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterndarequest edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterNDARequest.Query().Where((trustcenterndarequest.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterndarequestCount, err := FromContext(ctx).TrustCenterNDARequest.Delete().Where(trustcenterndarequest.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterndarequestCount).Msg("error deleting trustcenterndarequest") @@ -1195,6 +2269,19 @@ func TrustCenterComplianceEdgeCleanup(ctx context.Context, id string) error { func TrustCenterDocEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup trustcenterdoc edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).File.Query().Where(file.HasTrustCenterDocWith(trustcenterdoc.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying file ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FileEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up file edges") + return err + } + } + } if exists, err := FromContext(ctx).File.Query().Where((file.HasTrustCenterDocWith(trustcenterdoc.ID(id)))).Exist(ctx); err == nil && exists { if fileCount, err := FromContext(ctx).File.Delete().Where(file.HasTrustCenterDocWith(trustcenterdoc.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", fileCount).Msg("error deleting file") @@ -1202,6 +2289,19 @@ func TrustCenterDocEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).File.Query().Where(file.HasTrustCenterDocWith(trustcenterdoc.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying file ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FileEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up file edges") + return err + } + } + } if exists, err := FromContext(ctx).File.Query().Where((file.HasTrustCenterDocWith(trustcenterdoc.ID(id)))).Exist(ctx); err == nil && exists { if fileCount, err := FromContext(ctx).File.Delete().Where(file.HasTrustCenterDocWith(trustcenterdoc.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", fileCount).Msg("error deleting file") @@ -1245,6 +2345,19 @@ func TrustCenterWatermarkConfigEdgeCleanup(ctx context.Context, id string) error func UserEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup user edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).PersonalAccessToken.Query().Where(personalaccesstoken.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying personalaccesstoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := PersonalAccessTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up personalaccesstoken edges") + return err + } + } + } if exists, err := FromContext(ctx).PersonalAccessToken.Query().Where((personalaccesstoken.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if personalaccesstokenCount, err := FromContext(ctx).PersonalAccessToken.Delete().Where(personalaccesstoken.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", personalaccesstokenCount).Msg("error deleting personalaccesstoken") @@ -1252,6 +2365,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TFASetting.Query().Where(tfasetting.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying tfasetting ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TFASettingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up tfasetting edges") + return err + } + } + } if exists, err := FromContext(ctx).TFASetting.Query().Where((tfasetting.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if tfasettingCount, err := FromContext(ctx).TFASetting.Delete().Where(tfasetting.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", tfasettingCount).Msg("error deleting tfasetting") @@ -1259,6 +2385,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).UserSetting.Query().Where(usersetting.HasUserWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying usersetting ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := UserSettingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up usersetting edges") + return err + } + } + } if exists, err := FromContext(ctx).UserSetting.Query().Where((usersetting.HasUserWith(user.ID(id)))).Exist(ctx); err == nil && exists { if usersettingCount, err := FromContext(ctx).UserSetting.Delete().Where(usersetting.HasUserWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", usersettingCount).Msg("error deleting usersetting") @@ -1266,6 +2405,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).EmailVerificationToken.Query().Where(emailverificationtoken.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying emailverificationtoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := EmailVerificationTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up emailverificationtoken edges") + return err + } + } + } if exists, err := FromContext(ctx).EmailVerificationToken.Query().Where((emailverificationtoken.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if emailverificationtokenCount, err := FromContext(ctx).EmailVerificationToken.Delete().Where(emailverificationtoken.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", emailverificationtokenCount).Msg("error deleting emailverificationtoken") @@ -1273,6 +2425,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).FileDownloadToken.Query().Where(filedownloadtoken.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying filedownloadtoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FileDownloadTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up filedownloadtoken edges") + return err + } + } + } if exists, err := FromContext(ctx).FileDownloadToken.Query().Where((filedownloadtoken.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if filedownloadtokenCount, err := FromContext(ctx).FileDownloadToken.Delete().Where(filedownloadtoken.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", filedownloadtokenCount).Msg("error deleting filedownloadtoken") @@ -1280,6 +2445,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).PasswordResetToken.Query().Where(passwordresettoken.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying passwordresettoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := PasswordResetTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up passwordresettoken edges") + return err + } + } + } if exists, err := FromContext(ctx).PasswordResetToken.Query().Where((passwordresettoken.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if passwordresettokenCount, err := FromContext(ctx).PasswordResetToken.Delete().Where(passwordresettoken.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", passwordresettokenCount).Msg("error deleting passwordresettoken") @@ -1287,6 +2465,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Webauthn.Query().Where(webauthn.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying webauthn ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WebauthnEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up webauthn edges") + return err + } + } + } if exists, err := FromContext(ctx).Webauthn.Query().Where((webauthn.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if webauthnCount, err := FromContext(ctx).Webauthn.Delete().Where(webauthn.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", webauthnCount).Msg("error deleting webauthn") @@ -1294,6 +2485,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Notification.Query().Where(notification.HasUserWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying notification ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NotificationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up notification edges") + return err + } + } + } if exists, err := FromContext(ctx).Notification.Query().Where((notification.HasUserWith(user.ID(id)))).Exist(ctx); err == nil && exists { if notificationCount, err := FromContext(ctx).Notification.Delete().Where(notification.HasUserWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", notificationCount).Msg("error deleting notification") diff --git a/internal/ent/hooks/listeners_entitlements.go b/internal/ent/hooks/listeners_entitlements.go index e3b8c424a8..c2ebaac5ec 100644 --- a/internal/ent/hooks/listeners_entitlements.go +++ b/internal/ent/hooks/listeners_entitlements.go @@ -54,8 +54,7 @@ func handleOrganizationSettingMutation(ctx *soiree.EventContext, payload *events } } -// handleOrganizationDelete deactivates an organization's customer subscription when it is deleted. -// it also makes sure to clean up the edges to the data +// handleOrganizationDelete cleans up organization edges and deactivates the Stripe subscription func handleOrganizationDelete(ctx *soiree.EventContext, payload *events.MutationPayload) error { inv, ok := newEntitlementInvocation(ctx, payload, softDeleteAllowContext) if !ok { @@ -73,17 +72,17 @@ func handleOrganizationDelete(ctx *soiree.EventContext, payload *events.Mutation return nil } - if org.StripeCustomerID == nil { - return nil - } - - cleanupContext := entgen.NewContext(inv.Context(), inv.client) + cleanupContext := entgen.NewContext(inv.Allow(), inv.client) if err := entgen.OrganizationEdgeCleanup(cleanupContext, inv.orgID); err != nil { inv.Logger().Error().Err(err).Str("organization_id", inv.orgID). Msg("failed to cascade delete organization edges") return err } + if org.StripeCustomerID == nil { + return nil + } + if err := inv.client.EntitlementManager.FindAndDeactivateCustomerSubscription(inv.Context(), *org.StripeCustomerID); err != nil { inv.Logger().Error().Err(err).Msg("failed to deactivate customer subscription") return err diff --git a/internal/ent/schema/control.go b/internal/ent/schema/control.go index df828edec7..cb95f01607 100644 --- a/internal/ent/schema/control.go +++ b/internal/ent/schema/control.go @@ -220,6 +220,14 @@ func (Control) Modules() []models.OrgModule { // Annotations of the Control func (c Control) Annotations() []schema.Annotation { return []schema.Annotation{ + entx.CascadeThroughAnnotationField( + []entx.ThroughCleanup{ + { + Field: "Control", + Through: "FindingControl", + }, + }, + ), entfga.SelfAccessChecks(), entx.Exportable{}, } diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index c7b80a9ca8..4c75ebc806 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1 +1 @@ -7dff717b62b1d487c818fd15e714023fc667e5a9ae4736331212d945f952c4fc \ No newline at end of file +576af58b3ad84ec211a404191b43ee1dd59480d1f1497886c1fb303a45e07600 \ No newline at end of file From 522e471b0d0be973727c4428c5aca4115c565453 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Thu, 22 Jan 2026 19:26:11 +0100 Subject: [PATCH 04/32] review fixes --- internal/entdb/client.go | 8 ++------ internal/graphapi/organization_test.go | 17 ++++------------- internal/graphapi/tools_test.go | 9 +++------ internal/httpserve/handlers/tools_test.go | 2 +- 4 files changed, 10 insertions(+), 26 deletions(-) diff --git a/internal/entdb/client.go b/internal/entdb/client.go index c12cad2ffd..8f7fd70a40 100644 --- a/internal/entdb/client.go +++ b/internal/entdb/client.go @@ -417,7 +417,7 @@ func NewTestFixture() *testutils.TestFixture { } // NewTestClient creates a entdb client that can be used for TEST purposes ONLY -func NewTestClient(ctx context.Context, ctr *testutils.TestFixture, jobOpts []riverqueue.Option, entOpts []ent.Option) (*ent.Client, error) { +func NewTestClient(ctx context.Context, ctr *testutils.TestFixture, jobOpts []riverqueue.Option, clientOpts []Option, entOpts []ent.Option) (*ent.Client, error) { dbconf := entx.Config{ Debug: true, DriverName: ctr.Dialect, @@ -435,11 +435,7 @@ func NewTestClient(ctx context.Context, ctr *testutils.TestFixture, jobOpts []ri // run migrations for tests jobOpts = append(jobOpts, riverqueue.WithRunMigrations(true)) - // Do not enable eventer or metrics in test clients - // to avoid polluting test output - clientOpts := []Option{ - WithModules(), - } + clientOpts = append([]Option{WithModules()}, clientOpts...) // If a test container is used, retry the connection to the database to ensure it is up and running if ctr.Pool != nil { diff --git a/internal/graphapi/organization_test.go b/internal/graphapi/organization_test.go index 438c604022..a2fbdfb007 100644 --- a/internal/graphapi/organization_test.go +++ b/internal/graphapi/organization_test.go @@ -1012,21 +1012,12 @@ func TestMutationOrganizationCascadeDelete(t *testing.T) { return err != nil && strings.Contains(err.Error(), notFoundErrorMsg) }, "group should be deleted by async edge cleanup") - // allow after tuples have been deleted + // verify the parent org is soft-deleted (not hard-deleted) by querying the db directly ctx := privacy.DecisionContext(reqCtx, privacy.Allow) ctx = entx.SkipSoftDelete(ctx) - o, err := suite.client.api.GetOrganizationByID(ctx, org.ID) - - assert.NilError(t, err) - assert.Equal(t, o.Organization.ID, org.ID) - - // allow after tuples have been deleted - ctx = privacy.DecisionContext(ctx, privacy.Allow) - ctx = entx.SkipSoftDelete(ctx) - - co, err := suite.client.api.GetOrganizationByID(ctx, childOrg.ID) + o, err := suite.client.db.Organization.Get(ctx, org.ID) assert.NilError(t, err) - - assert.Equal(t, co.Organization.ID, childOrg.ID) + assert.Equal(t, o.ID, org.ID) + assert.Assert(t, !o.DeletedAt.IsZero()) } diff --git a/internal/graphapi/tools_test.go b/internal/graphapi/tools_test.go index b567041744..7bca008752 100644 --- a/internal/graphapi/tools_test.go +++ b/internal/graphapi/tools_test.go @@ -247,13 +247,10 @@ func (suite *GraphTestSuite) SetupSuite(t *testing.T) { // create database connection jobOpts := []riverqueue.Option{riverqueue.WithConnectionURI(suite.tf.URI)} - db, err := entdb.NewTestClient(ctx, suite.tf, jobOpts, opts) - requireNoError(t, err) - - eventer := hooks.NewEventerPool(db) - hooks.RegisterGlobalHooks(db, eventer) + eventer := hooks.NewEventer() + clientOpts := []entdb.Option{entdb.WithEventer(eventer)} - err = hooks.RegisterListeners(eventer) + db, err := entdb.NewTestClient(ctx, suite.tf, jobOpts, clientOpts, opts) requireNoError(t, err) c.objectStore, c.mockProvider, err = coreutils.MockStorageServiceWithValidationAndProvider(t, nil, validators.MimeTypeValidator) diff --git a/internal/httpserve/handlers/tools_test.go b/internal/httpserve/handlers/tools_test.go index 36acfe64e4..b5f3059627 100644 --- a/internal/httpserve/handlers/tools_test.go +++ b/internal/httpserve/handlers/tools_test.go @@ -229,7 +229,7 @@ func (suite *HandlerTestSuite) SetupTest() { // create database connection jobOpts := []riverqueue.Option{riverqueue.WithConnectionURI(suite.tf.URI)} - db, err := entdb.NewTestClient(ctx, suite.tf, jobOpts, opts) + db, err := entdb.NewTestClient(ctx, suite.tf, jobOpts, nil, opts) require.NoError(t, err, "failed opening connection to database") suite.objectStore, _, err = coreutils.MockStorageServiceWithValidationAndProvider(t, nil, nil) From 2cafd004f802de38ea25fb0007fe2bdda34b3b64 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Mon, 26 Jan 2026 18:18:17 +0100 Subject: [PATCH 05/32] task generate --- .task/checksum/generate-ent-smart | 2 +- .task/checksum/generate-graphql-smart | 2 +- .task/checksum/generate-others-smart | 2 +- cli/go.mod | 1 - .../ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- internal/ent/generated/edge_cleanup.go | 1256 +++++++++++++++++ .../checksum/.history_schema_checksum | 2 +- internal/graphapi/checksum/.schema_checksum | 2 +- .../clientschema/checksum/.schema_checksum | 2 +- .../graphapi/generated/root_.generated.go | 20 + internal/graphapi/schema/actionplan.graphql | 2 + internal/graphapi/schema/campaign.graphql | 2 + .../graphapi/schema/campaigntarget.graphql | 2 + internal/graphapi/schema/control.graphql | 2 + internal/graphapi/schema/evidence.graphql | 2 + .../graphapi/schema/identityholder.graphql | 2 + .../graphapi/schema/internalpolicy.graphql | 2 + internal/graphapi/schema/platform.graphql | 2 + internal/graphapi/schema/procedure.graphql | 2 + internal/graphapi/schema/subcontrol.graphql | 2 + 21 files changed, 1304 insertions(+), 9 deletions(-) diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index 9966feb1db..f36776fc29 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1 +1 @@ -393e013b53f9ff418d565692d017a8f +34fd5ccd4c48ebfaefcf62f68dad8e4e diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index b893d0ecf6..b683757ab5 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1 +1 @@ -440051bd31986e65b617f234c1564b00 +39f5a434019f3b8eb66d93018f2182be diff --git a/.task/checksum/generate-others-smart b/.task/checksum/generate-others-smart index b8d80acd65..2921334b22 100644 --- a/.task/checksum/generate-others-smart +++ b/.task/checksum/generate-others-smart @@ -1 +1 @@ -fe6983826cbedc804966fa2bda0e9d61 +7fa1b3f65058cecbab7f4df28b9bd785 diff --git a/cli/go.mod b/cli/go.mod index b1437fdf54..5485d3e7d7 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -30,7 +30,6 @@ require ( require ( al.essio.dev/pkg/shellescape v1.6.0 // indirect github.com/Yamashou/gqlgenc v0.33.0 // indirect - github.com/alicebob/miniredis/v2 v2.36.0 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/buger/jsonparser v1.1.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index e865150d2d..6c88c6ac2d 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -0b1b783c7ea7c044bad6a7beec7d7847104a6898b933e823649feba06adf80e1 \ No newline at end of file +a3d60695cbe9be2e08596023df584a54ab6ec1ac4981fce6b4fe5a8e1fcee510 \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index e33afc2245..545d86010b 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -4c822c58ae5eeacd254264e6c437d23667ae05af36669852f89e878c2515a868 \ No newline at end of file +04d6ee99f7b1f351d1727591feee1d6224ca82df75dc3948762fb0e480178f83 \ No newline at end of file diff --git a/internal/ent/generated/edge_cleanup.go b/internal/ent/generated/edge_cleanup.go index a611ba3be7..b36344f19a 100644 --- a/internal/ent/generated/edge_cleanup.go +++ b/internal/ent/generated/edge_cleanup.go @@ -34,6 +34,7 @@ import ( "github.com/theopenlane/core/internal/ent/generated/file" "github.com/theopenlane/core/internal/ent/generated/filedownloadtoken" "github.com/theopenlane/core/internal/ent/generated/finding" + "github.com/theopenlane/core/internal/ent/generated/findingcontrol" "github.com/theopenlane/core/internal/ent/generated/group" "github.com/theopenlane/core/internal/ent/generated/groupmembership" "github.com/theopenlane/core/internal/ent/generated/groupsetting" @@ -153,6 +154,19 @@ func ContactEdgeCleanup(ctx context.Context, id string) error { func ControlEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup control edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).Subcontrol.Query().Where(subcontrol.HasControlWith(control.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying subcontrol ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := SubcontrolEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up subcontrol edges") + return err + } + } + } if exists, err := FromContext(ctx).Subcontrol.Query().Where((subcontrol.HasControlWith(control.ID(id)))).Exist(ctx); err == nil && exists { if subcontrolCount, err := FromContext(ctx).Subcontrol.Delete().Where(subcontrol.HasControlWith(control.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", subcontrolCount).Msg("error deleting subcontrol") @@ -160,6 +174,13 @@ func ControlEdgeCleanup(ctx context.Context, id string) error { } } + if exists, err := FromContext(ctx).FindingControl.Query().Where((findingcontrol.HasControlWith(control.ID(id)))).Exist(ctx); err == nil && exists { + if findingcontrolCount, err := FromContext(ctx).FindingControl.Delete().Where(findingcontrol.HasControlWith(control.ID(id))).Exec(ctx); err != nil { + logx.FromContext(ctx).Error().Err(err).Int("count", findingcontrolCount).Msg("error deleting findingcontrol") + return err + } + } + return nil } @@ -234,6 +255,19 @@ func DirectorySyncRunEdgeCleanup(ctx context.Context, id string) error { func DiscussionEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup discussion edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).Note.Query().Where(note.HasDiscussionWith(discussion.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying note ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NoteEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up note edges") + return err + } + } + } if exists, err := FromContext(ctx).Note.Query().Where((note.HasDiscussionWith(discussion.ID(id)))).Exist(ctx); err == nil && exists { if noteCount, err := FromContext(ctx).Note.Delete().Where(note.HasDiscussionWith(discussion.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", noteCount).Msg("error deleting note") @@ -313,6 +347,19 @@ func FindingControlEdgeCleanup(ctx context.Context, id string) error { func GroupEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup group edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).GroupSetting.Query().Where(groupsetting.HasGroupWith(group.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying groupsetting ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := GroupSettingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up groupsetting edges") + return err + } + } + } if exists, err := FromContext(ctx).GroupSetting.Query().Where((groupsetting.HasGroupWith(group.ID(id)))).Exist(ctx); err == nil && exists { if groupsettingCount, err := FromContext(ctx).GroupSetting.Delete().Where(groupsetting.HasGroupWith(group.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", groupsettingCount).Msg("error deleting groupsetting") @@ -405,6 +452,19 @@ func JobRunnerTokenEdgeCleanup(ctx context.Context, id string) error { func JobTemplateEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup jobtemplate edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).ScheduledJob.Query().Where(scheduledjob.HasJobTemplateWith(jobtemplate.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying scheduledjob ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ScheduledJobEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up scheduledjob edges") + return err + } + } + } if exists, err := FromContext(ctx).ScheduledJob.Query().Where((scheduledjob.HasJobTemplateWith(jobtemplate.ID(id)))).Exist(ctx); err == nil && exists { if scheduledjobCount, err := FromContext(ctx).ScheduledJob.Delete().Where(scheduledjob.HasJobTemplateWith(jobtemplate.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", scheduledjobCount).Msg("error deleting scheduledjob") @@ -505,6 +565,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrganizationSetting.Query().Where(organizationsetting.HasOrganizationWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying organizationsetting ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrganizationSettingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up organizationsetting edges") + return err + } + } + } if exists, err := FromContext(ctx).OrganizationSetting.Query().Where((organizationsetting.HasOrganizationWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if organizationsettingCount, err := FromContext(ctx).OrganizationSetting.Delete().Where(organizationsetting.HasOrganizationWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", organizationsettingCount).Msg("error deleting organizationsetting") @@ -512,6 +585,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).APIToken.Query().Where(apitoken.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying apitoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := APITokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up apitoken edges") + return err + } + } + } if exists, err := FromContext(ctx).APIToken.Query().Where((apitoken.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if apitokenCount, err := FromContext(ctx).APIToken.Delete().Where(apitoken.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", apitokenCount).Msg("error deleting apitoken") @@ -519,6 +605,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).File.Query().Where(file.HasOrganizationWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying file ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FileEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up file edges") + return err + } + } + } if exists, err := FromContext(ctx).File.Query().Where((file.HasOrganizationWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if fileCount, err := FromContext(ctx).File.Delete().Where(file.HasOrganizationWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", fileCount).Msg("error deleting file") @@ -526,6 +625,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Hush.Query().Where(hush.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying hush ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := HushEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up hush edges") + return err + } + } + } if exists, err := FromContext(ctx).Hush.Query().Where((hush.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if hushCount, err := FromContext(ctx).Hush.Delete().Where(hush.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", hushCount).Msg("error deleting hush") @@ -533,6 +645,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Group.Query().Where(group.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying group ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := GroupEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up group edges") + return err + } + } + } if exists, err := FromContext(ctx).Group.Query().Where((group.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if groupCount, err := FromContext(ctx).Group.Delete().Where(group.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", groupCount).Msg("error deleting group") @@ -540,6 +665,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Template.Query().Where(template.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying template ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TemplateEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up template edges") + return err + } + } + } if exists, err := FromContext(ctx).Template.Query().Where((template.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if templateCount, err := FromContext(ctx).Template.Delete().Where(template.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", templateCount).Msg("error deleting template") @@ -547,6 +685,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Integration.Query().Where(integration.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying integration ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := IntegrationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up integration edges") + return err + } + } + } if exists, err := FromContext(ctx).Integration.Query().Where((integration.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if integrationCount, err := FromContext(ctx).Integration.Delete().Where(integration.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", integrationCount).Msg("error deleting integration") @@ -554,6 +705,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DocumentData.Query().Where(documentdata.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying documentdata ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DocumentDataEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up documentdata edges") + return err + } + } + } if exists, err := FromContext(ctx).DocumentData.Query().Where((documentdata.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if documentdataCount, err := FromContext(ctx).DocumentData.Delete().Where(documentdata.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", documentdataCount).Msg("error deleting documentdata") @@ -561,6 +725,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrgSubscription.Query().Where(orgsubscription.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying orgsubscription ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrgSubscriptionEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up orgsubscription edges") + return err + } + } + } if exists, err := FromContext(ctx).OrgSubscription.Query().Where((orgsubscription.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if orgsubscriptionCount, err := FromContext(ctx).OrgSubscription.Delete().Where(orgsubscription.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", orgsubscriptionCount).Msg("error deleting orgsubscription") @@ -568,6 +745,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrgProduct.Query().Where(orgproduct.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying orgproduct ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrgProductEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up orgproduct edges") + return err + } + } + } if exists, err := FromContext(ctx).OrgProduct.Query().Where((orgproduct.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if orgproductCount, err := FromContext(ctx).OrgProduct.Delete().Where(orgproduct.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", orgproductCount).Msg("error deleting orgproduct") @@ -575,6 +765,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrgPrice.Query().Where(orgprice.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying orgprice ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrgPriceEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up orgprice edges") + return err + } + } + } if exists, err := FromContext(ctx).OrgPrice.Query().Where((orgprice.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if orgpriceCount, err := FromContext(ctx).OrgPrice.Delete().Where(orgprice.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", orgpriceCount).Msg("error deleting orgprice") @@ -582,6 +785,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrgModule.Query().Where(orgmodule.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying orgmodule ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrgModuleEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up orgmodule edges") + return err + } + } + } if exists, err := FromContext(ctx).OrgModule.Query().Where((orgmodule.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if orgmoduleCount, err := FromContext(ctx).OrgModule.Delete().Where(orgmodule.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", orgmoduleCount).Msg("error deleting orgmodule") @@ -589,6 +805,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Invite.Query().Where(invite.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying invite ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := InviteEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up invite edges") + return err + } + } + } if exists, err := FromContext(ctx).Invite.Query().Where((invite.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if inviteCount, err := FromContext(ctx).Invite.Delete().Where(invite.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", inviteCount).Msg("error deleting invite") @@ -596,6 +825,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Subscriber.Query().Where(subscriber.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying subscriber ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := SubscriberEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up subscriber edges") + return err + } + } + } if exists, err := FromContext(ctx).Subscriber.Query().Where((subscriber.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if subscriberCount, err := FromContext(ctx).Subscriber.Delete().Where(subscriber.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", subscriberCount).Msg("error deleting subscriber") @@ -603,6 +845,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Entity.Query().Where(entity.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying entity ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := EntityEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up entity edges") + return err + } + } + } if exists, err := FromContext(ctx).Entity.Query().Where((entity.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if entityCount, err := FromContext(ctx).Entity.Delete().Where(entity.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", entityCount).Msg("error deleting entity") @@ -610,6 +865,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Platform.Query().Where(platform.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying platform ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := PlatformEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up platform edges") + return err + } + } + } if exists, err := FromContext(ctx).Platform.Query().Where((platform.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if platformCount, err := FromContext(ctx).Platform.Delete().Where(platform.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", platformCount).Msg("error deleting platform") @@ -617,6 +885,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).IdentityHolder.Query().Where(identityholder.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying identityholder ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := IdentityHolderEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up identityholder edges") + return err + } + } + } if exists, err := FromContext(ctx).IdentityHolder.Query().Where((identityholder.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if identityholderCount, err := FromContext(ctx).IdentityHolder.Delete().Where(identityholder.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", identityholderCount).Msg("error deleting identityholder") @@ -624,6 +905,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Campaign.Query().Where(campaign.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying campaign ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := CampaignEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up campaign edges") + return err + } + } + } if exists, err := FromContext(ctx).Campaign.Query().Where((campaign.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if campaignCount, err := FromContext(ctx).Campaign.Delete().Where(campaign.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", campaignCount).Msg("error deleting campaign") @@ -631,6 +925,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).CampaignTarget.Query().Where(campaigntarget.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying campaigntarget ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := CampaignTargetEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up campaigntarget edges") + return err + } + } + } if exists, err := FromContext(ctx).CampaignTarget.Query().Where((campaigntarget.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if campaigntargetCount, err := FromContext(ctx).CampaignTarget.Delete().Where(campaigntarget.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", campaigntargetCount).Msg("error deleting campaigntarget") @@ -638,6 +945,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).EntityType.Query().Where(entitytype.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying entitytype ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := EntityTypeEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up entitytype edges") + return err + } + } + } if exists, err := FromContext(ctx).EntityType.Query().Where((entitytype.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if entitytypeCount, err := FromContext(ctx).EntityType.Delete().Where(entitytype.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", entitytypeCount).Msg("error deleting entitytype") @@ -645,6 +965,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Contact.Query().Where(contact.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying contact ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ContactEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up contact edges") + return err + } + } + } if exists, err := FromContext(ctx).Contact.Query().Where((contact.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if contactCount, err := FromContext(ctx).Contact.Delete().Where(contact.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", contactCount).Msg("error deleting contact") @@ -652,6 +985,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Note.Query().Where(note.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying note ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NoteEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up note edges") + return err + } + } + } if exists, err := FromContext(ctx).Note.Query().Where((note.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if noteCount, err := FromContext(ctx).Note.Delete().Where(note.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", noteCount).Msg("error deleting note") @@ -659,6 +1005,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Task.Query().Where(task.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying task ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TaskEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up task edges") + return err + } + } + } if exists, err := FromContext(ctx).Task.Query().Where((task.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if taskCount, err := FromContext(ctx).Task.Delete().Where(task.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", taskCount).Msg("error deleting task") @@ -666,6 +1025,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Program.Query().Where(program.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying program ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ProgramEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up program edges") + return err + } + } + } if exists, err := FromContext(ctx).Program.Query().Where((program.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if programCount, err := FromContext(ctx).Program.Delete().Where(program.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", programCount).Msg("error deleting program") @@ -673,6 +1045,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Procedure.Query().Where(procedure.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying procedure ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ProcedureEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up procedure edges") + return err + } + } + } if exists, err := FromContext(ctx).Procedure.Query().Where((procedure.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if procedureCount, err := FromContext(ctx).Procedure.Delete().Where(procedure.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", procedureCount).Msg("error deleting procedure") @@ -680,6 +1065,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).InternalPolicy.Query().Where(internalpolicy.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying internalpolicy ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := InternalPolicyEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up internalpolicy edges") + return err + } + } + } if exists, err := FromContext(ctx).InternalPolicy.Query().Where((internalpolicy.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if internalpolicyCount, err := FromContext(ctx).InternalPolicy.Delete().Where(internalpolicy.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", internalpolicyCount).Msg("error deleting internalpolicy") @@ -687,6 +1085,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Risk.Query().Where(risk.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying risk ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := RiskEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up risk edges") + return err + } + } + } if exists, err := FromContext(ctx).Risk.Query().Where((risk.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if riskCount, err := FromContext(ctx).Risk.Delete().Where(risk.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", riskCount).Msg("error deleting risk") @@ -694,6 +1105,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ControlObjective.Query().Where(controlobjective.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying controlobjective ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ControlObjectiveEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up controlobjective edges") + return err + } + } + } if exists, err := FromContext(ctx).ControlObjective.Query().Where((controlobjective.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if controlobjectiveCount, err := FromContext(ctx).ControlObjective.Delete().Where(controlobjective.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", controlobjectiveCount).Msg("error deleting controlobjective") @@ -701,6 +1125,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Narrative.Query().Where(narrative.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying narrative ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NarrativeEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up narrative edges") + return err + } + } + } if exists, err := FromContext(ctx).Narrative.Query().Where((narrative.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if narrativeCount, err := FromContext(ctx).Narrative.Delete().Where(narrative.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", narrativeCount).Msg("error deleting narrative") @@ -708,6 +1145,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Control.Query().Where(control.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying control ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ControlEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up control edges") + return err + } + } + } if exists, err := FromContext(ctx).Control.Query().Where((control.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if controlCount, err := FromContext(ctx).Control.Delete().Where(control.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", controlCount).Msg("error deleting control") @@ -715,6 +1165,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Subcontrol.Query().Where(subcontrol.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying subcontrol ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := SubcontrolEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up subcontrol edges") + return err + } + } + } if exists, err := FromContext(ctx).Subcontrol.Query().Where((subcontrol.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if subcontrolCount, err := FromContext(ctx).Subcontrol.Delete().Where(subcontrol.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", subcontrolCount).Msg("error deleting subcontrol") @@ -722,6 +1185,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ControlImplementation.Query().Where(controlimplementation.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying controlimplementation ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ControlImplementationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up controlimplementation edges") + return err + } + } + } if exists, err := FromContext(ctx).ControlImplementation.Query().Where((controlimplementation.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if controlimplementationCount, err := FromContext(ctx).ControlImplementation.Delete().Where(controlimplementation.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", controlimplementationCount).Msg("error deleting controlimplementation") @@ -729,6 +1205,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).MappedControl.Query().Where(mappedcontrol.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying mappedcontrol ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := MappedControlEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up mappedcontrol edges") + return err + } + } + } if exists, err := FromContext(ctx).MappedControl.Query().Where((mappedcontrol.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if mappedcontrolCount, err := FromContext(ctx).MappedControl.Delete().Where(mappedcontrol.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", mappedcontrolCount).Msg("error deleting mappedcontrol") @@ -736,6 +1225,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Evidence.Query().Where(evidence.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying evidence ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := EvidenceEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up evidence edges") + return err + } + } + } if exists, err := FromContext(ctx).Evidence.Query().Where((evidence.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if evidenceCount, err := FromContext(ctx).Evidence.Delete().Where(evidence.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", evidenceCount).Msg("error deleting evidence") @@ -743,6 +1245,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Standard.Query().Where(standard.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying standard ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := StandardEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up standard edges") + return err + } + } + } if exists, err := FromContext(ctx).Standard.Query().Where((standard.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if standardCount, err := FromContext(ctx).Standard.Delete().Where(standard.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", standardCount).Msg("error deleting standard") @@ -750,6 +1265,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ActionPlan.Query().Where(actionplan.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying actionplan ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ActionPlanEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up actionplan edges") + return err + } + } + } if exists, err := FromContext(ctx).ActionPlan.Query().Where((actionplan.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if actionplanCount, err := FromContext(ctx).ActionPlan.Delete().Where(actionplan.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", actionplanCount).Msg("error deleting actionplan") @@ -757,6 +1285,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).CustomDomain.Query().Where(customdomain.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying customdomain ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := CustomDomainEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up customdomain edges") + return err + } + } + } if exists, err := FromContext(ctx).CustomDomain.Query().Where((customdomain.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if customdomainCount, err := FromContext(ctx).CustomDomain.Delete().Where(customdomain.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", customdomainCount).Msg("error deleting customdomain") @@ -764,6 +1305,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobRunner.Query().Where(jobrunner.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobrunner ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobRunnerEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobrunner edges") + return err + } + } + } if exists, err := FromContext(ctx).JobRunner.Query().Where((jobrunner.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobrunnerCount, err := FromContext(ctx).JobRunner.Delete().Where(jobrunner.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobrunnerCount).Msg("error deleting jobrunner") @@ -771,6 +1325,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobRunnerToken.Query().Where(jobrunnertoken.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobrunnertoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobRunnerTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobrunnertoken edges") + return err + } + } + } if exists, err := FromContext(ctx).JobRunnerToken.Query().Where((jobrunnertoken.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobrunnertokenCount, err := FromContext(ctx).JobRunnerToken.Delete().Where(jobrunnertoken.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobrunnertokenCount).Msg("error deleting jobrunnertoken") @@ -778,6 +1345,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobRunnerRegistrationToken.Query().Where(jobrunnerregistrationtoken.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobrunnerregistrationtoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobRunnerRegistrationTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobrunnerregistrationtoken edges") + return err + } + } + } if exists, err := FromContext(ctx).JobRunnerRegistrationToken.Query().Where((jobrunnerregistrationtoken.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobrunnerregistrationtokenCount, err := FromContext(ctx).JobRunnerRegistrationToken.Delete().Where(jobrunnerregistrationtoken.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobrunnerregistrationtokenCount).Msg("error deleting jobrunnerregistrationtoken") @@ -785,6 +1365,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DNSVerification.Query().Where(dnsverification.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying dnsverification ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DNSVerificationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up dnsverification edges") + return err + } + } + } if exists, err := FromContext(ctx).DNSVerification.Query().Where((dnsverification.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if dnsverificationCount, err := FromContext(ctx).DNSVerification.Delete().Where(dnsverification.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", dnsverificationCount).Msg("error deleting dnsverification") @@ -792,6 +1385,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobTemplate.Query().Where(jobtemplate.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobtemplate ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobTemplateEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobtemplate edges") + return err + } + } + } if exists, err := FromContext(ctx).JobTemplate.Query().Where((jobtemplate.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobtemplateCount, err := FromContext(ctx).JobTemplate.Delete().Where(jobtemplate.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobtemplateCount).Msg("error deleting jobtemplate") @@ -799,6 +1405,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ScheduledJob.Query().Where(scheduledjob.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying scheduledjob ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ScheduledJobEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up scheduledjob edges") + return err + } + } + } if exists, err := FromContext(ctx).ScheduledJob.Query().Where((scheduledjob.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if scheduledjobCount, err := FromContext(ctx).ScheduledJob.Delete().Where(scheduledjob.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", scheduledjobCount).Msg("error deleting scheduledjob") @@ -806,6 +1425,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobResult.Query().Where(jobresult.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobresult ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobResultEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobresult edges") + return err + } + } + } if exists, err := FromContext(ctx).JobResult.Query().Where((jobresult.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobresultCount, err := FromContext(ctx).JobResult.Delete().Where(jobresult.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobresultCount).Msg("error deleting jobresult") @@ -813,6 +1445,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ScheduledJobRun.Query().Where(scheduledjobrun.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying scheduledjobrun ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ScheduledJobRunEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up scheduledjobrun edges") + return err + } + } + } if exists, err := FromContext(ctx).ScheduledJobRun.Query().Where((scheduledjobrun.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if scheduledjobrunCount, err := FromContext(ctx).ScheduledJobRun.Delete().Where(scheduledjobrun.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", scheduledjobrunCount).Msg("error deleting scheduledjobrun") @@ -820,6 +1465,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenter.Query().Where(trustcenter.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenter ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenter edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenter.Query().Where((trustcenter.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterCount, err := FromContext(ctx).TrustCenter.Delete().Where(trustcenter.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterCount).Msg("error deleting trustcenter") @@ -827,6 +1485,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Asset.Query().Where(asset.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying asset ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := AssetEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up asset edges") + return err + } + } + } if exists, err := FromContext(ctx).Asset.Query().Where((asset.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if assetCount, err := FromContext(ctx).Asset.Delete().Where(asset.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", assetCount).Msg("error deleting asset") @@ -834,6 +1505,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Scan.Query().Where(scan.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying scan ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ScanEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up scan edges") + return err + } + } + } if exists, err := FromContext(ctx).Scan.Query().Where((scan.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if scanCount, err := FromContext(ctx).Scan.Delete().Where(scan.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", scanCount).Msg("error deleting scan") @@ -841,6 +1525,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Subprocessor.Query().Where(subprocessor.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying subprocessor ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := SubprocessorEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up subprocessor edges") + return err + } + } + } if exists, err := FromContext(ctx).Subprocessor.Query().Where((subprocessor.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if subprocessorCount, err := FromContext(ctx).Subprocessor.Delete().Where(subprocessor.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", subprocessorCount).Msg("error deleting subprocessor") @@ -848,6 +1545,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Export.Query().Where(export.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying export ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ExportEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up export edges") + return err + } + } + } if exists, err := FromContext(ctx).Export.Query().Where((export.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if exportCount, err := FromContext(ctx).Export.Delete().Where(export.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", exportCount).Msg("error deleting export") @@ -855,6 +1565,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterWatermarkConfig.Query().Where(trustcenterwatermarkconfig.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterwatermarkconfig ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterWatermarkConfigEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterwatermarkconfig edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterWatermarkConfig.Query().Where((trustcenterwatermarkconfig.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterwatermarkconfigCount, err := FromContext(ctx).TrustCenterWatermarkConfig.Delete().Where(trustcenterwatermarkconfig.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterwatermarkconfigCount).Msg("error deleting trustcenterwatermarkconfig") @@ -862,6 +1585,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Assessment.Query().Where(assessment.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying assessment ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := AssessmentEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up assessment edges") + return err + } + } + } if exists, err := FromContext(ctx).Assessment.Query().Where((assessment.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if assessmentCount, err := FromContext(ctx).Assessment.Delete().Where(assessment.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", assessmentCount).Msg("error deleting assessment") @@ -869,6 +1605,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).AssessmentResponse.Query().Where(assessmentresponse.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying assessmentresponse ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := AssessmentResponseEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up assessmentresponse edges") + return err + } + } + } if exists, err := FromContext(ctx).AssessmentResponse.Query().Where((assessmentresponse.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if assessmentresponseCount, err := FromContext(ctx).AssessmentResponse.Delete().Where(assessmentresponse.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", assessmentresponseCount).Msg("error deleting assessmentresponse") @@ -876,6 +1625,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).CustomTypeEnum.Query().Where(customtypeenum.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying customtypeenum ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := CustomTypeEnumEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up customtypeenum edges") + return err + } + } + } if exists, err := FromContext(ctx).CustomTypeEnum.Query().Where((customtypeenum.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if customtypeenumCount, err := FromContext(ctx).CustomTypeEnum.Delete().Where(customtypeenum.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", customtypeenumCount).Msg("error deleting customtypeenum") @@ -883,6 +1645,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TagDefinition.Query().Where(tagdefinition.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying tagdefinition ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TagDefinitionEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up tagdefinition edges") + return err + } + } + } if exists, err := FromContext(ctx).TagDefinition.Query().Where((tagdefinition.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if tagdefinitionCount, err := FromContext(ctx).TagDefinition.Delete().Where(tagdefinition.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", tagdefinitionCount).Msg("error deleting tagdefinition") @@ -890,6 +1665,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Remediation.Query().Where(remediation.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying remediation ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := RemediationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up remediation edges") + return err + } + } + } if exists, err := FromContext(ctx).Remediation.Query().Where((remediation.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if remediationCount, err := FromContext(ctx).Remediation.Delete().Where(remediation.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", remediationCount).Msg("error deleting remediation") @@ -897,6 +1685,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Finding.Query().Where(finding.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying finding ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FindingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up finding edges") + return err + } + } + } if exists, err := FromContext(ctx).Finding.Query().Where((finding.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if findingCount, err := FromContext(ctx).Finding.Delete().Where(finding.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", findingCount).Msg("error deleting finding") @@ -904,6 +1705,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Review.Query().Where(review.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying review ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ReviewEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up review edges") + return err + } + } + } if exists, err := FromContext(ctx).Review.Query().Where((review.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if reviewCount, err := FromContext(ctx).Review.Delete().Where(review.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", reviewCount).Msg("error deleting review") @@ -911,6 +1725,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Vulnerability.Query().Where(vulnerability.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying vulnerability ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := VulnerabilityEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up vulnerability edges") + return err + } + } + } if exists, err := FromContext(ctx).Vulnerability.Query().Where((vulnerability.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if vulnerabilityCount, err := FromContext(ctx).Vulnerability.Delete().Where(vulnerability.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", vulnerabilityCount).Msg("error deleting vulnerability") @@ -918,6 +1745,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Notification.Query().Where(notification.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying notification ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NotificationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up notification edges") + return err + } + } + } if exists, err := FromContext(ctx).Notification.Query().Where((notification.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if notificationCount, err := FromContext(ctx).Notification.Delete().Where(notification.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", notificationCount).Msg("error deleting notification") @@ -925,6 +1765,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowDefinition.Query().Where(workflowdefinition.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowdefinition ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowDefinitionEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowdefinition edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowDefinition.Query().Where((workflowdefinition.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowdefinitionCount, err := FromContext(ctx).WorkflowDefinition.Delete().Where(workflowdefinition.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowdefinitionCount).Msg("error deleting workflowdefinition") @@ -932,6 +1785,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowInstance.Query().Where(workflowinstance.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowinstance ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowInstanceEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowinstance edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowInstance.Query().Where((workflowinstance.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowinstanceCount, err := FromContext(ctx).WorkflowInstance.Delete().Where(workflowinstance.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowinstanceCount).Msg("error deleting workflowinstance") @@ -939,6 +1805,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowEvent.Query().Where(workflowevent.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowevent ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowEventEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowevent edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowEvent.Query().Where((workflowevent.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workfloweventCount, err := FromContext(ctx).WorkflowEvent.Delete().Where(workflowevent.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workfloweventCount).Msg("error deleting workflowevent") @@ -946,6 +1825,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowAssignment.Query().Where(workflowassignment.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowassignment ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowAssignmentEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowassignment edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowAssignment.Query().Where((workflowassignment.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowassignmentCount, err := FromContext(ctx).WorkflowAssignment.Delete().Where(workflowassignment.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowassignmentCount).Msg("error deleting workflowassignment") @@ -953,6 +1845,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowAssignmentTarget.Query().Where(workflowassignmenttarget.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowassignmenttarget ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowAssignmentTargetEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowassignmenttarget edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowAssignmentTarget.Query().Where((workflowassignmenttarget.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowassignmenttargetCount, err := FromContext(ctx).WorkflowAssignmentTarget.Delete().Where(workflowassignmenttarget.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowassignmenttargetCount).Msg("error deleting workflowassignmenttarget") @@ -960,6 +1865,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowObjectRef.Query().Where(workflowobjectref.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowobjectref ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowObjectRefEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowobjectref edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowObjectRef.Query().Where((workflowobjectref.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowobjectrefCount, err := FromContext(ctx).WorkflowObjectRef.Delete().Where(workflowobjectref.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowobjectrefCount).Msg("error deleting workflowobjectref") @@ -967,6 +1885,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowProposal.Query().Where(workflowproposal.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowproposal ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowProposalEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowproposal edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowProposal.Query().Where((workflowproposal.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowproposalCount, err := FromContext(ctx).WorkflowProposal.Delete().Where(workflowproposal.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowproposalCount).Msg("error deleting workflowproposal") @@ -974,6 +1905,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DirectoryAccount.Query().Where(directoryaccount.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying directoryaccount ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DirectoryAccountEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up directoryaccount edges") + return err + } + } + } if exists, err := FromContext(ctx).DirectoryAccount.Query().Where((directoryaccount.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if directoryaccountCount, err := FromContext(ctx).DirectoryAccount.Delete().Where(directoryaccount.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", directoryaccountCount).Msg("error deleting directoryaccount") @@ -981,6 +1925,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DirectoryGroup.Query().Where(directorygroup.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying directorygroup ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DirectoryGroupEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up directorygroup edges") + return err + } + } + } if exists, err := FromContext(ctx).DirectoryGroup.Query().Where((directorygroup.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if directorygroupCount, err := FromContext(ctx).DirectoryGroup.Delete().Where(directorygroup.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", directorygroupCount).Msg("error deleting directorygroup") @@ -988,6 +1945,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DirectoryMembership.Query().Where(directorymembership.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying directorymembership ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DirectoryMembershipEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up directorymembership edges") + return err + } + } + } if exists, err := FromContext(ctx).DirectoryMembership.Query().Where((directorymembership.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if directorymembershipCount, err := FromContext(ctx).DirectoryMembership.Delete().Where(directorymembership.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", directorymembershipCount).Msg("error deleting directorymembership") @@ -995,6 +1965,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DirectorySyncRun.Query().Where(directorysyncrun.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying directorysyncrun ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DirectorySyncRunEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up directorysyncrun edges") + return err + } + } + } if exists, err := FromContext(ctx).DirectorySyncRun.Query().Where((directorysyncrun.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if directorysyncrunCount, err := FromContext(ctx).DirectorySyncRun.Delete().Where(directorysyncrun.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", directorysyncrunCount).Msg("error deleting directorysyncrun") @@ -1002,6 +1985,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Discussion.Query().Where(discussion.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying discussion ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DiscussionEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up discussion edges") + return err + } + } + } if exists, err := FromContext(ctx).Discussion.Query().Where((discussion.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if discussionCount, err := FromContext(ctx).Discussion.Delete().Where(discussion.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", discussionCount).Msg("error deleting discussion") @@ -1119,6 +2115,19 @@ func SubcontrolEdgeCleanup(ctx context.Context, id string) error { func SubprocessorEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup subprocessor edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).TrustCenterSubprocessor.Query().Where(trustcentersubprocessor.HasSubprocessorWith(subprocessor.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcentersubprocessor ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterSubprocessorEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcentersubprocessor edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterSubprocessor.Query().Where((trustcentersubprocessor.HasSubprocessorWith(subprocessor.ID(id)))).Exist(ctx); err == nil && exists { if trustcentersubprocessorCount, err := FromContext(ctx).TrustCenterSubprocessor.Delete().Where(trustcentersubprocessor.HasSubprocessorWith(subprocessor.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcentersubprocessorCount).Msg("error deleting trustcentersubprocessor") @@ -1156,6 +2165,19 @@ func TaskEdgeCleanup(ctx context.Context, id string) error { func TemplateEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup template edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).DocumentData.Query().Where(documentdata.HasTemplateWith(template.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying documentdata ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DocumentDataEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up documentdata edges") + return err + } + } + } if exists, err := FromContext(ctx).DocumentData.Query().Where((documentdata.HasTemplateWith(template.ID(id)))).Exist(ctx); err == nil && exists { if documentdataCount, err := FromContext(ctx).DocumentData.Delete().Where(documentdata.HasTemplateWith(template.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", documentdataCount).Msg("error deleting documentdata") @@ -1183,6 +2205,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterWatermarkConfig.Query().Where(trustcenterwatermarkconfig.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterwatermarkconfig ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterWatermarkConfigEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterwatermarkconfig edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterWatermarkConfig.Query().Where((trustcenterwatermarkconfig.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterwatermarkconfigCount, err := FromContext(ctx).TrustCenterWatermarkConfig.Delete().Where(trustcenterwatermarkconfig.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterwatermarkconfigCount).Msg("error deleting trustcenterwatermarkconfig") @@ -1190,6 +2225,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterSubprocessor.Query().Where(trustcentersubprocessor.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcentersubprocessor ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterSubprocessorEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcentersubprocessor edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterSubprocessor.Query().Where((trustcentersubprocessor.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcentersubprocessorCount, err := FromContext(ctx).TrustCenterSubprocessor.Delete().Where(trustcentersubprocessor.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcentersubprocessorCount).Msg("error deleting trustcentersubprocessor") @@ -1197,6 +2245,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterDoc.Query().Where(trustcenterdoc.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterdoc ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterDocEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterdoc edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterDoc.Query().Where((trustcenterdoc.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterdocCount, err := FromContext(ctx).TrustCenterDoc.Delete().Where(trustcenterdoc.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterdocCount).Msg("error deleting trustcenterdoc") @@ -1204,6 +2265,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterCompliance.Query().Where(trustcentercompliance.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcentercompliance ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterComplianceEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcentercompliance edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterCompliance.Query().Where((trustcentercompliance.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcentercomplianceCount, err := FromContext(ctx).TrustCenterCompliance.Delete().Where(trustcentercompliance.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcentercomplianceCount).Msg("error deleting trustcentercompliance") @@ -1211,6 +2285,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Template.Query().Where(template.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying template ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TemplateEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up template edges") + return err + } + } + } if exists, err := FromContext(ctx).Template.Query().Where((template.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if templateCount, err := FromContext(ctx).Template.Delete().Where(template.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", templateCount).Msg("error deleting template") @@ -1218,6 +2305,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Note.Query().Where(note.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying note ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NoteEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up note edges") + return err + } + } + } if exists, err := FromContext(ctx).Note.Query().Where((note.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if noteCount, err := FromContext(ctx).Note.Delete().Where(note.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", noteCount).Msg("error deleting note") @@ -1225,6 +2325,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterEntity.Query().Where(trustcenterentity.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterentity ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterEntityEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterentity edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterEntity.Query().Where((trustcenterentity.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterentityCount, err := FromContext(ctx).TrustCenterEntity.Delete().Where(trustcenterentity.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterentityCount).Msg("error deleting trustcenterentity") @@ -1232,6 +2345,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterNDARequest.Query().Where(trustcenterndarequest.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterndarequest ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterNDARequestEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterndarequest edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterNDARequest.Query().Where((trustcenterndarequest.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterndarequestCount, err := FromContext(ctx).TrustCenterNDARequest.Delete().Where(trustcenterndarequest.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterndarequestCount).Msg("error deleting trustcenterndarequest") @@ -1251,6 +2377,19 @@ func TrustCenterComplianceEdgeCleanup(ctx context.Context, id string) error { func TrustCenterDocEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup trustcenterdoc edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).File.Query().Where(file.HasTrustCenterDocWith(trustcenterdoc.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying file ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FileEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up file edges") + return err + } + } + } if exists, err := FromContext(ctx).File.Query().Where((file.HasTrustCenterDocWith(trustcenterdoc.ID(id)))).Exist(ctx); err == nil && exists { if fileCount, err := FromContext(ctx).File.Delete().Where(file.HasTrustCenterDocWith(trustcenterdoc.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", fileCount).Msg("error deleting file") @@ -1258,6 +2397,19 @@ func TrustCenterDocEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).File.Query().Where(file.HasTrustCenterDocWith(trustcenterdoc.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying file ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FileEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up file edges") + return err + } + } + } if exists, err := FromContext(ctx).File.Query().Where((file.HasTrustCenterDocWith(trustcenterdoc.ID(id)))).Exist(ctx); err == nil && exists { if fileCount, err := FromContext(ctx).File.Delete().Where(file.HasTrustCenterDocWith(trustcenterdoc.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", fileCount).Msg("error deleting file") @@ -1301,6 +2453,19 @@ func TrustCenterWatermarkConfigEdgeCleanup(ctx context.Context, id string) error func UserEdgeCleanup(ctx context.Context, id string) error { ctx = contextx.With(privacy.DecisionContext(ctx, privacy.Allowf("cleanup user edge")), entfga.DeleteTuplesFirstKey{}) + { + ids, err := FromContext(ctx).PersonalAccessToken.Query().Where(personalaccesstoken.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying personalaccesstoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := PersonalAccessTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up personalaccesstoken edges") + return err + } + } + } if exists, err := FromContext(ctx).PersonalAccessToken.Query().Where((personalaccesstoken.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if personalaccesstokenCount, err := FromContext(ctx).PersonalAccessToken.Delete().Where(personalaccesstoken.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", personalaccesstokenCount).Msg("error deleting personalaccesstoken") @@ -1308,6 +2473,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TFASetting.Query().Where(tfasetting.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying tfasetting ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TFASettingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up tfasetting edges") + return err + } + } + } if exists, err := FromContext(ctx).TFASetting.Query().Where((tfasetting.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if tfasettingCount, err := FromContext(ctx).TFASetting.Delete().Where(tfasetting.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", tfasettingCount).Msg("error deleting tfasetting") @@ -1315,6 +2493,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).UserSetting.Query().Where(usersetting.HasUserWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying usersetting ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := UserSettingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up usersetting edges") + return err + } + } + } if exists, err := FromContext(ctx).UserSetting.Query().Where((usersetting.HasUserWith(user.ID(id)))).Exist(ctx); err == nil && exists { if usersettingCount, err := FromContext(ctx).UserSetting.Delete().Where(usersetting.HasUserWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", usersettingCount).Msg("error deleting usersetting") @@ -1322,6 +2513,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).EmailVerificationToken.Query().Where(emailverificationtoken.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying emailverificationtoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := EmailVerificationTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up emailverificationtoken edges") + return err + } + } + } if exists, err := FromContext(ctx).EmailVerificationToken.Query().Where((emailverificationtoken.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if emailverificationtokenCount, err := FromContext(ctx).EmailVerificationToken.Delete().Where(emailverificationtoken.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", emailverificationtokenCount).Msg("error deleting emailverificationtoken") @@ -1329,6 +2533,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).FileDownloadToken.Query().Where(filedownloadtoken.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying filedownloadtoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FileDownloadTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up filedownloadtoken edges") + return err + } + } + } if exists, err := FromContext(ctx).FileDownloadToken.Query().Where((filedownloadtoken.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if filedownloadtokenCount, err := FromContext(ctx).FileDownloadToken.Delete().Where(filedownloadtoken.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", filedownloadtokenCount).Msg("error deleting filedownloadtoken") @@ -1336,6 +2553,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).PasswordResetToken.Query().Where(passwordresettoken.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying passwordresettoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := PasswordResetTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up passwordresettoken edges") + return err + } + } + } if exists, err := FromContext(ctx).PasswordResetToken.Query().Where((passwordresettoken.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if passwordresettokenCount, err := FromContext(ctx).PasswordResetToken.Delete().Where(passwordresettoken.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", passwordresettokenCount).Msg("error deleting passwordresettoken") @@ -1343,6 +2573,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Webauthn.Query().Where(webauthn.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying webauthn ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WebauthnEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up webauthn edges") + return err + } + } + } if exists, err := FromContext(ctx).Webauthn.Query().Where((webauthn.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if webauthnCount, err := FromContext(ctx).Webauthn.Delete().Where(webauthn.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", webauthnCount).Msg("error deleting webauthn") @@ -1350,6 +2593,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Notification.Query().Where(notification.HasUserWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying notification ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NotificationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up notification edges") + return err + } + } + } if exists, err := FromContext(ctx).Notification.Query().Where((notification.HasUserWith(user.ID(id)))).Exist(ctx); err == nil && exists { if notificationCount, err := FromContext(ctx).Notification.Delete().Where(notification.HasUserWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", notificationCount).Msg("error deleting notification") diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index bf1450e192..e8a501c176 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1 +1 @@ -e94ca137cb6e35d4574cca611992e64eb571a791c5395a07a5191fcd69313084 \ No newline at end of file +1ebfdd3d95dbaf937cb3f255064655b16d57f54c090950ea71b7661b56f931a8 \ No newline at end of file diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index 973081e441..94f4c46279 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1 +1 @@ -835cdb20e7e364a3e332b883f128a6f35fd7f1b9e31f378039eb22923fc1b755 \ No newline at end of file +a2e027c7cddcef1d48653c7874134c4481a6b8ae1a6353bfc313a240e8d4db1d \ No newline at end of file diff --git a/internal/graphapi/clientschema/checksum/.schema_checksum b/internal/graphapi/clientschema/checksum/.schema_checksum index a3011e7760..346823aed0 100644 --- a/internal/graphapi/clientschema/checksum/.schema_checksum +++ b/internal/graphapi/clientschema/checksum/.schema_checksum @@ -1 +1 @@ -29270654cce4d47b359916b7f8072c94a95fe921d06c72bc3df713408e90404a \ No newline at end of file +1f9b111f0c60868c0fd0cc87d1409bea69781667f94efb72623ce97d2a755cf3 \ No newline at end of file diff --git a/internal/graphapi/generated/root_.generated.go b/internal/graphapi/generated/root_.generated.go index f25352d86a..92b87efcbf 100644 --- a/internal/graphapi/generated/root_.generated.go +++ b/internal/graphapi/generated/root_.generated.go @@ -43777,6 +43777,8 @@ scalar Any`, BuiltIn: false}, + + extend type Query { """ Look up actionPlan by ID @@ -44354,6 +44356,8 @@ type AssetBulkDeletePayload { + + extend type Query { """ Look up campaign by ID @@ -44489,6 +44493,8 @@ type CampaignBulkCreatePayload { + + extend type Query { """ Look up campaignTarget by ID @@ -44774,6 +44780,8 @@ type ContactBulkDeletePayload { + + extend type Query { """ Look up control by ID @@ -121564,6 +121572,8 @@ type EventBulkDeletePayload { + + extend type Query { """ Look up evidence by ID @@ -122870,6 +122880,8 @@ type HushBulkDeletePayload { + + extend type Query { """ Look up identityHolder by ID @@ -123037,6 +123049,8 @@ type IntegrationDeletePayload { + + extend type Query { """ Look up internalPolicy by ID @@ -124942,6 +124956,8 @@ type PersonalAccessTokenBulkCreatePayload { + + extend type Query { """ Look up platform by ID @@ -125076,6 +125092,8 @@ type PlatformBulkCreatePayload { + + extend type Query { """ Look up procedure by ID @@ -127477,6 +127495,8 @@ type StandardBulkCreatePayload { + + extend type Query { """ Look up subcontrol by ID diff --git a/internal/graphapi/schema/actionplan.graphql b/internal/graphapi/schema/actionplan.graphql index 2a238a179d..64b4e32d85 100644 --- a/internal/graphapi/schema/actionplan.graphql +++ b/internal/graphapi/schema/actionplan.graphql @@ -29,6 +29,8 @@ extend type ActionPlan { + + extend type Query { """ Look up actionPlan by ID diff --git a/internal/graphapi/schema/campaign.graphql b/internal/graphapi/schema/campaign.graphql index 3b697349b5..768a3f0607 100644 --- a/internal/graphapi/schema/campaign.graphql +++ b/internal/graphapi/schema/campaign.graphql @@ -29,6 +29,8 @@ extend type Campaign { + + extend type Query { """ Look up campaign by ID diff --git a/internal/graphapi/schema/campaigntarget.graphql b/internal/graphapi/schema/campaigntarget.graphql index 7ab85bf8c4..9b97740acb 100644 --- a/internal/graphapi/schema/campaigntarget.graphql +++ b/internal/graphapi/schema/campaigntarget.graphql @@ -29,6 +29,8 @@ extend type CampaignTarget { + + extend type Query { """ Look up campaignTarget by ID diff --git a/internal/graphapi/schema/control.graphql b/internal/graphapi/schema/control.graphql index 310ef0a98c..6928a1a29a 100644 --- a/internal/graphapi/schema/control.graphql +++ b/internal/graphapi/schema/control.graphql @@ -29,6 +29,8 @@ extend type Control { + + extend type Query { """ Look up control by ID diff --git a/internal/graphapi/schema/evidence.graphql b/internal/graphapi/schema/evidence.graphql index 3b8565ea62..b487c2db33 100644 --- a/internal/graphapi/schema/evidence.graphql +++ b/internal/graphapi/schema/evidence.graphql @@ -29,6 +29,8 @@ extend type Evidence { + + extend type Query { """ Look up evidence by ID diff --git a/internal/graphapi/schema/identityholder.graphql b/internal/graphapi/schema/identityholder.graphql index 639b1e8ba8..3b32d3d658 100644 --- a/internal/graphapi/schema/identityholder.graphql +++ b/internal/graphapi/schema/identityholder.graphql @@ -29,6 +29,8 @@ extend type IdentityHolder { + + extend type Query { """ Look up identityHolder by ID diff --git a/internal/graphapi/schema/internalpolicy.graphql b/internal/graphapi/schema/internalpolicy.graphql index 87c6d85a08..67f15e129c 100644 --- a/internal/graphapi/schema/internalpolicy.graphql +++ b/internal/graphapi/schema/internalpolicy.graphql @@ -29,6 +29,8 @@ extend type InternalPolicy { + + extend type Query { """ Look up internalPolicy by ID diff --git a/internal/graphapi/schema/platform.graphql b/internal/graphapi/schema/platform.graphql index 588f897be2..efc4456626 100644 --- a/internal/graphapi/schema/platform.graphql +++ b/internal/graphapi/schema/platform.graphql @@ -29,6 +29,8 @@ extend type Platform { + + extend type Query { """ Look up platform by ID diff --git a/internal/graphapi/schema/procedure.graphql b/internal/graphapi/schema/procedure.graphql index a877b2a7c7..4ee6cbad06 100644 --- a/internal/graphapi/schema/procedure.graphql +++ b/internal/graphapi/schema/procedure.graphql @@ -29,6 +29,8 @@ extend type Procedure { + + extend type Query { """ Look up procedure by ID diff --git a/internal/graphapi/schema/subcontrol.graphql b/internal/graphapi/schema/subcontrol.graphql index f83b943ef9..9b64a53195 100644 --- a/internal/graphapi/schema/subcontrol.graphql +++ b/internal/graphapi/schema/subcontrol.graphql @@ -29,6 +29,8 @@ extend type Subcontrol { + + extend type Query { """ Look up subcontrol by ID From c01f22a6276fb22e198d56d04b498d6f9fe366e9 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Wed, 18 Mar 2026 23:24:03 +0100 Subject: [PATCH 06/32] revert listener --- internal/ent/hooks/listeners_entitlements.go | 201 +++++++------------ 1 file changed, 71 insertions(+), 130 deletions(-) diff --git a/internal/ent/hooks/listeners_entitlements.go b/internal/ent/hooks/listeners_entitlements.go index c2ebaac5ec..31c925df70 100644 --- a/internal/ent/hooks/listeners_entitlements.go +++ b/internal/ent/hooks/listeners_entitlements.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "strings" "entgo.io/ent" "github.com/rs/zerolog" @@ -11,51 +12,68 @@ import ( "github.com/theopenlane/entx" "github.com/theopenlane/iam/auth" - "github.com/theopenlane/utils/contextx" "github.com/theopenlane/core/common/models" - "github.com/theopenlane/core/internal/ent/events" + "github.com/theopenlane/core/internal/ent/eventqueue" entgen "github.com/theopenlane/core/internal/ent/generated" "github.com/theopenlane/core/internal/ent/generated/organization" "github.com/theopenlane/core/internal/ent/generated/privacy" sync "github.com/theopenlane/core/internal/entitlements/reconciler" "github.com/theopenlane/core/pkg/entitlements" - "github.com/theopenlane/core/pkg/events/soiree" + "github.com/theopenlane/core/pkg/gala" "github.com/theopenlane/core/pkg/logx" ) -// handleOrganizationMutation routes organization mutations to the correct entitlement handler -func handleOrganizationMutation(ctx *soiree.EventContext, payload *events.MutationPayload) error { - if payload == nil { - return nil - } +// RegisterGalaEntitlementListeners registers entitlement mutation listeners on Gala. +func RegisterGalaEntitlementListeners(registry *gala.Registry) ([]gala.ListenerID, error) { + return gala.RegisterListeners(registry, + gala.Definition[eventqueue.MutationGalaPayload]{ + Topic: eventqueue.MutationTopic(eventqueue.MutationConcernDirect, entgen.TypeOrganization), + Name: "entitlements.organization", + Operations: []string{ + ent.OpCreate.String(), + ent.OpDelete.String(), + ent.OpDeleteOne.String(), + eventqueue.SoftDeleteOne, + }, + Handle: handleOrganizationMutationGala, + }, + gala.Definition[eventqueue.MutationGalaPayload]{ + Topic: eventqueue.MutationTopic(eventqueue.MutationConcernDirect, entgen.TypeOrganizationSetting), + Name: "entitlements.organization_setting", + Operations: []string{ + ent.OpUpdate.String(), + ent.OpUpdateOne.String(), + }, + Handle: handleOrganizationSettingMutationGala, + }, + ) +} - switch payload.Operation { +// handleOrganizationMutationGala routes organization mutations to entitlement handlers. +func handleOrganizationMutationGala(ctx gala.HandlerContext, payload eventqueue.MutationGalaPayload) error { + switch strings.TrimSpace(payload.Operation) { case ent.OpCreate.String(): - return handleOrganizationCreated(ctx, payload) - case ent.OpDelete.String(), ent.OpDeleteOne.String(), SoftDeleteOne: - return handleOrganizationDelete(ctx, payload) + return handleOrganizationCreatedGala(ctx, payload) + case ent.OpDelete.String(), ent.OpDeleteOne.String(), eventqueue.SoftDeleteOne: + return handleOrganizationDeleteGala(ctx, payload) default: return nil } } -// handleOrganizationSettingMutation handles billing-related updates on organization settings -func handleOrganizationSettingMutation(ctx *soiree.EventContext, payload *events.MutationPayload) error { - if payload == nil { - return nil - } - - switch payload.Operation { +// handleOrganizationSettingMutationGala handles billing updates on organization settings. +func handleOrganizationSettingMutationGala(ctx gala.HandlerContext, payload eventqueue.MutationGalaPayload) error { + switch strings.TrimSpace(payload.Operation) { case ent.OpUpdate.String(), ent.OpUpdateOne.String(): - return handleOrganizationSettingsUpdateOne(ctx, payload) + return handleOrganizationSettingsUpdateOneGala(ctx, payload) default: return nil } } -// handleOrganizationDelete cleans up organization edges and deactivates the Stripe subscription -func handleOrganizationDelete(ctx *soiree.EventContext, payload *events.MutationPayload) error { +// handleOrganizationDeleteGala deactivates an organization's customer subscription when deleted. +func handleOrganizationDeleteGala(ctx gala.HandlerContext, payload eventqueue.MutationGalaPayload) error { inv, ok := newEntitlementInvocation(ctx, payload, softDeleteAllowContext) if !ok { return nil @@ -72,13 +90,6 @@ func handleOrganizationDelete(ctx *soiree.EventContext, payload *events.Mutation return nil } - cleanupContext := entgen.NewContext(inv.Allow(), inv.client) - if err := entgen.OrganizationEdgeCleanup(cleanupContext, inv.orgID); err != nil { - inv.Logger().Error().Err(err).Str("organization_id", inv.orgID). - Msg("failed to cascade delete organization edges") - return err - } - if org.StripeCustomerID == nil { return nil } @@ -91,8 +102,8 @@ func handleOrganizationDelete(ctx *soiree.EventContext, payload *events.Mutation return nil } -// handleOrganizationCreated reconciles entitlements after an organization is created -func handleOrganizationCreated(ctx *soiree.EventContext, payload *events.MutationPayload) error { +// handleOrganizationCreatedGala reconciles entitlements after organization creation. +func handleOrganizationCreatedGala(ctx gala.HandlerContext, payload eventqueue.MutationGalaPayload) error { inv, ok := newEntitlementInvocation(ctx, payload, orgAllowContext) if !ok { return nil @@ -101,9 +112,11 @@ func handleOrganizationCreated(ctx *soiree.EventContext, payload *events.Mutatio return inv.reconcile() } -// handleOrganizationSettingsUpdateOne updates Stripe customer details when billing fields change -func handleOrganizationSettingsUpdateOne(ctx *soiree.EventContext, payload *events.MutationPayload) error { - if !mutationTouches(payload.Mutation, "billing_email", "billing_phone", "billing_address") { +// handleOrganizationSettingsUpdateOneGala updates Stripe customer details for billing changes. +func handleOrganizationSettingsUpdateOneGala(ctx gala.HandlerContext, payload eventqueue.MutationGalaPayload) error { + if !lo.SomeBy([]string{"billing_email", "billing_phone", "billing_address"}, func(field string) bool { + return eventqueue.MutationFieldChanged(payload, field) + }) { return nil } @@ -114,7 +127,7 @@ func handleOrganizationSettingsUpdateOne(ctx *soiree.EventContext, payload *even orgSettingID := inv.entityID if orgSettingID == "" { - if id, ok := mutationEntityID(ctx, payload); ok { + if id, ok := eventqueue.MutationEntityID(payload, ctx.Envelope.Headers.Properties); ok { orgSettingID = id } } @@ -126,9 +139,7 @@ func handleOrganizationSettingsUpdateOne(ctx *soiree.EventContext, payload *even orgCustomer, err := fetchOrganizationCustomerByOrgSettingID(inv, orgSettingID) if err != nil { - // We deliberately bubble the failure so the GraphQL mutation surfaces the issue inv.Logger().Err(err).Str("organization_setting_id", orgSettingID).Msg("failed to fetch organization customer") - return err } @@ -136,14 +147,11 @@ func handleOrganizationSettingsUpdateOne(ctx *soiree.EventContext, payload *even return inv.reconcile() } - params := entitlements.GetUpdatedFields(ctx.Properties(), orgCustomer) + params := entitlements.GetUpdatedFields(payload.ProposedChanges, orgCustomer) if params != nil { if _, err := inv.client.EntitlementManager.UpdateCustomer(inv.Context(), orgCustomer.StripeCustomerID, params); err != nil { - // Stripe update failures should not fall back to reconciliation because the reconciler - // assumes the customer metadata is already aligned inv.Logger().Err(err).Str("stripe_customer_id", orgCustomer.StripeCustomerID).Msg("failed to update stripe customer metadata") - return err } } @@ -153,71 +161,69 @@ func handleOrganizationSettingsUpdateOne(ctx *soiree.EventContext, payload *even var errMissingOrgCustomerPrereqs = errors.New("entitlement invocation missing prerequisites") -// entitlementInvocation bundles the data required for entitlement listeners to perform their work +// entitlementInvocation bundles all data needed by entitlement listeners. type entitlementInvocation struct { - event *soiree.EventContext - payload *events.MutationPayload + ctx context.Context client *entgen.Client orgID string entityID string allow context.Context } -// Context returns the listener context associated with the invocation +// Context returns the listener context associated with the invocation. func (inv *entitlementInvocation) Context() context.Context { - return inv.event.Context() + return inv.ctx } -// Logger returns a contextual logger for the invocation +// Logger returns a contextual logger for the invocation. func (inv *entitlementInvocation) Logger() *zerolog.Logger { return logx.FromContext(inv.Context()) } -// Allow returns the elevated context used for entitlement operations +// Allow returns the elevated context used for entitlement operations. func (inv *entitlementInvocation) Allow() context.Context { return inv.allow } -// orgAllowContext returns a context that bypasses privacy rules when running entitlement logic against an organization +// orgAllowContext bypasses privacy rules for entitlement logic against an organization. func orgAllowContext(ctx context.Context) context.Context { allowCtx := privacy.DecisionContext(ctx, privacy.Allow) - return contextx.With(allowCtx, auth.OrgSubscriptionContextKey{}) + return auth.WithCaller(allowCtx, auth.NewWebhookCaller("")) } -// softDeleteAllowContext extends orgAllowContext to skip soft delete filters so listeners can access archived records +// softDeleteAllowContext extends orgAllowContext to include soft-deleted records. func softDeleteAllowContext(ctx context.Context) context.Context { ctx = orgAllowContext(ctx) - return context.WithValue(ctx, entx.SoftDeleteSkipKey{}, true) + return entx.SkipSoftDelete(ctx) } -// newEntitlementInvocation gathers the elements required to run entitlement logic for a mutation -func newEntitlementInvocation(event *soiree.EventContext, payload *events.MutationPayload, allow func(context.Context) context.Context) (*entitlementInvocation, bool) { - client := mutationClient(event, payload) - if client == nil || client.EntitlementManager == nil { +// newEntitlementInvocation gathers prerequisites for entitlement mutation handling. +func newEntitlementInvocation(handlerCtx gala.HandlerContext, payload eventqueue.MutationGalaPayload, allow func(context.Context) context.Context) (*entitlementInvocation, bool) { + handlerCtx, client, ok := eventqueue.ClientFromHandler(handlerCtx) + if !ok || client.EntitlementManager == nil { return nil, false } if allow == nil { - // hard to spot but this is a func signature check, not a nil comparison allow = orgAllowContext } - allowCtx := allow(event.Context()) + allowCtx := allow(handlerCtx.Context) - entityID, ok := mutationEntityID(event, payload) + entityID, ok := eventqueue.MutationEntityID(payload, handlerCtx.Envelope.Headers.Properties) if !ok { return nil, false } orgID := entityID - if payload != nil && payload.Mutation != nil && payload.Mutation.Type() == entgen.TypeOrganizationSetting { - // OrganizationSetting mutations carry the setting ID, but the reconciler needs the owning organization + if strings.TrimSpace(payload.MutationType) == entgen.TypeOrganizationSetting { setting, err := client.OrganizationSetting.Get(allowCtx, entityID) if err != nil { - logx.FromContext(event.Context()).Err(err).Str("organization_setting_id", entityID).Msg("failed to resolve organization from organization setting") + logx.FromContext(handlerCtx.Context).Error().Err(err).Str("organization_setting_id", entityID).Msg("failed to resolve organization from organization setting") + return nil, false } @@ -225,8 +231,7 @@ func newEntitlementInvocation(event *soiree.EventContext, payload *events.Mutati } return &entitlementInvocation{ - event: event, - payload: payload, + ctx: handlerCtx.Context, client: client, orgID: orgID, entityID: entityID, @@ -234,71 +239,7 @@ func newEntitlementInvocation(event *soiree.EventContext, payload *events.Mutati }, true } -// mutationEntityID derives the entity identifier from the payload or event properties -func mutationEntityID(ctx *soiree.EventContext, payload *events.MutationPayload) (string, bool) { - if payload != nil && payload.EntityID != "" { - return payload.EntityID, true - } - - if ctx == nil { - return "", false - } - - if id, ok := ctx.PropertyString("ID"); ok && id != "" { - return id, true - } - - if raw, ok := ctx.Property("ID"); ok && raw != nil { - if str, ok := raw.(fmt.Stringer); ok { - value := str.String() - if value == "" { - return "", false - } - - return value, true - } - - value := fmt.Sprint(raw) - if value == "" || value == "" { - return "", false - } - - return value, true - } - - return "", false -} - -// mutationClient returns the ent client associated with the mutation -func mutationClient(ctx *soiree.EventContext, payload *events.MutationPayload) *entgen.Client { - if payload != nil && payload.Client != nil { - return payload.Client - } - - client, ok := soiree.ClientAs[*entgen.Client](ctx) - if !ok { - return nil - } - - return client -} - -// mutationTouches reports whether the mutation updates ("touches" don't get weird) any of the requested fields -func mutationTouches(m ent.Mutation, fields ...string) bool { - if m == nil { - return false - } - - for _, field := range fields { - if _, ok := m.Field(field); ok { - return true - } - } - - return false -} - -// fetchOrganizationCustomerByOrgSettingID loads the organization and customer data linked to an organization setting +// fetchOrganizationCustomerByOrgSettingID loads organization and customer data for a setting. func fetchOrganizationCustomerByOrgSettingID(inv *entitlementInvocation, orgSettingID string) (*entitlements.OrganizationCustomer, error) { if inv == nil || inv.client == nil || orgSettingID == "" { return nil, fmt.Errorf("%w: organization_setting_id=%s", errMissingOrgCustomerPrereqs, orgSettingID) @@ -344,7 +285,7 @@ func fetchOrganizationCustomerByOrgSettingID(inv *entitlementInvocation, orgSett }, nil } -// reconcile runs the entitlement reconciler for the invocation's organization +// reconcile runs entitlement reconciliation for the invocation's organization. func (inv *entitlementInvocation) reconcile() error { if inv == nil || inv.client == nil || inv.client.EntitlementManager == nil { return nil From 333ecc5622807099d33de02ad479f01a77fefb82 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Wed, 18 Mar 2026 23:24:49 +0100 Subject: [PATCH 07/32] revert listener --- .../workflows/observability/observer_test.go | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/internal/workflows/observability/observer_test.go b/internal/workflows/observability/observer_test.go index 5e95c6f959..5b774435b7 100644 --- a/internal/workflows/observability/observer_test.go +++ b/internal/workflows/observability/observer_test.go @@ -80,18 +80,8 @@ func TestHandleEmitRecordsError(t *testing.T) { observer.handleEmitError(ctx, op, Fields{"k": "v"}, topic, errors.New("emit failed")) -<<<<<<< HEAD - waitForCondition(t, func() bool { - return testutil.ToFloat64(metrics.WorkflowEmitErrorsTotal.WithLabelValues(topic, string(op.Origin))) == before+1 - }, "metric to increment after emit error") -||||||| f6dede17f - waitForMetric(t, func() float64 { - return testutil.ToFloat64(metrics.WorkflowEmitErrorsTotal.WithLabelValues(topic, string(op.Origin))) - }, before+1) -======= after := testutil.ToFloat64(metrics.WorkflowEmitErrorsTotal.WithLabelValues(topic, string(op.Origin))) require.Equal(t, before+1, after) ->>>>>>> origin/main } func TestBeginListenerTopicAppliesSpec(t *testing.T) { @@ -156,44 +146,6 @@ func findLogEntry(t *testing.T, buf *bytes.Buffer, msg string) map[string]any { return nil } -<<<<<<< HEAD -func waitForCondition(t *testing.T, condition func() bool, msg string) { - t.Helper() - - timeout := 500 * time.Millisecond - interval := 10 * time.Millisecond - - deadline := time.Now().Add(timeout) - for time.Now().Before(deadline) { - if condition() { - return - } - - time.Sleep(interval) - } - - if !condition() { - t.Fatalf("timed out waiting for condition: %s", msg) - } -} - -||||||| f6dede17f -func waitForMetric(t *testing.T, read func() float64, want float64) { - t.Helper() - - deadline := time.Now().Add(500 * time.Millisecond) - for time.Now().Before(deadline) { - if got := read(); got == want { - return - } - time.Sleep(10 * time.Millisecond) - } - - t.Fatalf("timed out waiting for metric, got %v want %v", read(), want) -} - -======= ->>>>>>> origin/main func TestScopeSkipMarksSkippedAndLogsDebug(t *testing.T) { var buf bytes.Buffer logger := zerolog.New(&buf).Level(zerolog.DebugLevel) From a8800ed49187b60f7719cd777a2b171ca2b5c3e8 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Wed, 18 Mar 2026 23:28:35 +0100 Subject: [PATCH 08/32] fix bad merge --- internal/entdb/client.go | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/internal/entdb/client.go b/internal/entdb/client.go index 8f7fd70a40..4683d31df1 100644 --- a/internal/entdb/client.go +++ b/internal/entdb/client.go @@ -25,6 +25,9 @@ import ( "github.com/theopenlane/core/internal/ent/hooks" "github.com/theopenlane/core/internal/ent/interceptors" "github.com/theopenlane/core/internal/ent/privacy/utils" + "github.com/theopenlane/core/internal/workflows" + "github.com/theopenlane/core/internal/workflows/engine" + "github.com/theopenlane/core/pkg/gala" _ "github.com/jackc/pgx/v5/stdlib" // add pgx driver ) @@ -53,15 +56,19 @@ type client struct { // options for creating the ent client type Option func(*ent.Client) -// WithEventer adds the eventer hooks and listeners to the ent client -func WithEventer(eventer *hooks.Eventer) Option { +// WithWorkflows wires workflow-related hooks and optionally configures the workflow engine. +func WithWorkflows(workflowConfig *workflows.Config, galaRuntime *gala.Gala) Option { return func(c *ent.Client) { - eventer.Initialize(c) - hooks.RegisterGlobalHooks(c, eventer) + if workflowConfig != nil && workflowConfig.Enabled { + wfEngine, err := engine.NewWorkflowEngineWithConfig(c, galaRuntime, workflowConfig) + if err != nil { + log.Fatal().Err(err).Msg("failed to create workflow engine") + } - if err := hooks.RegisterListeners(eventer); err != nil { - log.Fatal().Err(err).Msg("failed registering listeners") + c.WorkflowEngine = wfEngine } + + hooks.RegisterGlobalHooks(c) } } @@ -403,7 +410,7 @@ func NewTestFixture() *testutils.TestFixture { } if testDBContainerExpiry == "" { - testDBContainerExpiry = "5" // default expiry of 5 minutes + testDBContainerExpiry = "10" // default expiry of 10 minutes } expiry, err := strconv.Atoi(testDBContainerExpiry) @@ -416,7 +423,8 @@ func NewTestFixture() *testutils.TestFixture { testutils.WithMaxConn(200)) //nolint:mnd } -// NewTestClient creates a entdb client that can be used for TEST purposes ONLY +// NewTestClient creates an entdb client that can be used for TEST purposes ONLY. +// clientOpts allows passing entdb options like WithWorkflows; pass nil if not needed. func NewTestClient(ctx context.Context, ctr *testutils.TestFixture, jobOpts []riverqueue.Option, clientOpts []Option, entOpts []ent.Option) (*ent.Client, error) { dbconf := entx.Config{ Debug: true, From 53e9eaf3acacb2f634e3c8030c87a0de3bd433d2 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Thu, 19 Mar 2026 00:08:51 +0100 Subject: [PATCH 09/32] fix tests --- .task/checksum/generate-ent-smart | 2 +- .task/checksum/generate-graphql-smart | 2 +- .task/checksum/generate-others-smart | 1 - .../ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- internal/ent/generated/edge_cleanup.go | 1386 +++++++++++++++++ .../checksum/.history_schema_checksum | 2 +- internal/graphapi/checksum/.schema_checksum | 2 +- internal/graphapi/organization_test.go | 16 + 9 files changed, 1408 insertions(+), 7 deletions(-) delete mode 100644 .task/checksum/generate-others-smart diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index f36776fc29..1a265c0ca5 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1 +1 @@ -34fd5ccd4c48ebfaefcf62f68dad8e4e +3d772cfdf1ca72046150d30e3275d9a2 diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index b683757ab5..89fa4406fa 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1 +1 @@ -39f5a434019f3b8eb66d93018f2182be +1df5c3c83065dc2eff72fb6860aa6fa diff --git a/.task/checksum/generate-others-smart b/.task/checksum/generate-others-smart deleted file mode 100644 index 2921334b22..0000000000 --- a/.task/checksum/generate-others-smart +++ /dev/null @@ -1 +0,0 @@ -7fa1b3f65058cecbab7f4df28b9bd785 diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index 72b2716791..13d0451d7f 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -9d51026de68cb8e832f1e6e9316dab5bd634de22cbe54cda048e3465705ac0fe \ No newline at end of file +3998eb6d527efc2c42e59734ca4def5a775b0bf11f723610c6f9eaf8ec5cb215 \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index 03c4bd33ce..b0b7d63f98 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -2391ce74439f22b98429ba2b96b7738034cc9ab22e44e6483eaadfdfb238b7c9 \ No newline at end of file +32a8d4707c7da27edf7c33d7fbf4017f1ca25ee3089d5a12bd54475e6a3380c0 \ No newline at end of file diff --git a/internal/ent/generated/edge_cleanup.go b/internal/ent/generated/edge_cleanup.go index fde1759b83..550e45b9b4 100644 --- a/internal/ent/generated/edge_cleanup.go +++ b/internal/ent/generated/edge_cleanup.go @@ -36,6 +36,7 @@ import ( "github.com/theopenlane/core/internal/ent/generated/file" "github.com/theopenlane/core/internal/ent/generated/filedownloadtoken" "github.com/theopenlane/core/internal/ent/generated/finding" + "github.com/theopenlane/core/internal/ent/generated/findingcontrol" "github.com/theopenlane/core/internal/ent/generated/group" "github.com/theopenlane/core/internal/ent/generated/groupmembership" "github.com/theopenlane/core/internal/ent/generated/groupsetting" @@ -161,6 +162,19 @@ func ContactEdgeCleanup(ctx context.Context, id string) error { func ControlEdgeCleanup(ctx context.Context, id string) error { ctx = entfga.WithDeleteTuplesFirst(privacy.DecisionContext(ctx, privacy.Allowf("cleanup control edge"))) + { + ids, err := FromContext(ctx).Subcontrol.Query().Where(subcontrol.HasControlWith(control.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying subcontrol ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := SubcontrolEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up subcontrol edges") + return err + } + } + } if exists, err := FromContext(ctx).Subcontrol.Query().Where((subcontrol.HasControlWith(control.ID(id)))).Exist(ctx); err == nil && exists { if subcontrolCount, err := FromContext(ctx).Subcontrol.Delete().Where(subcontrol.HasControlWith(control.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", subcontrolCount).Msg("error deleting subcontrol") @@ -168,6 +182,13 @@ func ControlEdgeCleanup(ctx context.Context, id string) error { } } + if exists, err := FromContext(ctx).FindingControl.Query().Where((findingcontrol.HasControlWith(control.ID(id)))).Exist(ctx); err == nil && exists { + if findingcontrolCount, err := FromContext(ctx).FindingControl.Delete().Where(findingcontrol.HasControlWith(control.ID(id))).Exec(ctx); err != nil { + logx.FromContext(ctx).Error().Err(err).Int("count", findingcontrolCount).Msg("error deleting findingcontrol") + return err + } + } + return nil } @@ -242,6 +263,19 @@ func DirectorySyncRunEdgeCleanup(ctx context.Context, id string) error { func DiscussionEdgeCleanup(ctx context.Context, id string) error { ctx = entfga.WithDeleteTuplesFirst(privacy.DecisionContext(ctx, privacy.Allowf("cleanup discussion edge"))) + { + ids, err := FromContext(ctx).Note.Query().Where(note.HasDiscussionWith(discussion.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying note ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NoteEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up note edges") + return err + } + } + } if exists, err := FromContext(ctx).Note.Query().Where((note.HasDiscussionWith(discussion.ID(id)))).Exist(ctx); err == nil && exists { if noteCount, err := FromContext(ctx).Note.Delete().Where(note.HasDiscussionWith(discussion.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", noteCount).Msg("error deleting note") @@ -333,6 +367,19 @@ func FindingControlEdgeCleanup(ctx context.Context, id string) error { func GroupEdgeCleanup(ctx context.Context, id string) error { ctx = entfga.WithDeleteTuplesFirst(privacy.DecisionContext(ctx, privacy.Allowf("cleanup group edge"))) + { + ids, err := FromContext(ctx).GroupSetting.Query().Where(groupsetting.HasGroupWith(group.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying groupsetting ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := GroupSettingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up groupsetting edges") + return err + } + } + } if exists, err := FromContext(ctx).GroupSetting.Query().Where((groupsetting.HasGroupWith(group.ID(id)))).Exist(ctx); err == nil && exists { if groupsettingCount, err := FromContext(ctx).GroupSetting.Delete().Where(groupsetting.HasGroupWith(group.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", groupsettingCount).Msg("error deleting groupsetting") @@ -437,6 +484,19 @@ func JobRunnerTokenEdgeCleanup(ctx context.Context, id string) error { func JobTemplateEdgeCleanup(ctx context.Context, id string) error { ctx = entfga.WithDeleteTuplesFirst(privacy.DecisionContext(ctx, privacy.Allowf("cleanup jobtemplate edge"))) + { + ids, err := FromContext(ctx).ScheduledJob.Query().Where(scheduledjob.HasJobTemplateWith(jobtemplate.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying scheduledjob ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ScheduledJobEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up scheduledjob edges") + return err + } + } + } if exists, err := FromContext(ctx).ScheduledJob.Query().Where((scheduledjob.HasJobTemplateWith(jobtemplate.ID(id)))).Exist(ctx); err == nil && exists { if scheduledjobCount, err := FromContext(ctx).ScheduledJob.Delete().Where(scheduledjob.HasJobTemplateWith(jobtemplate.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", scheduledjobCount).Msg("error deleting scheduledjob") @@ -468,6 +528,19 @@ func NarrativeEdgeCleanup(ctx context.Context, id string) error { func NoteEdgeCleanup(ctx context.Context, id string) error { ctx = entfga.WithDeleteTuplesFirst(privacy.DecisionContext(ctx, privacy.Allowf("cleanup note edge"))) + { + ids, err := FromContext(ctx).TrustCenterFAQ.Query().Where(trustcenterfaq.HasNoteWith(note.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterfaq ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterFAQEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterfaq edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterFAQ.Query().Where((trustcenterfaq.HasNoteWith(note.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterfaqCount, err := FromContext(ctx).TrustCenterFAQ.Delete().Where(trustcenterfaq.HasNoteWith(note.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterfaqCount).Msg("error deleting trustcenterfaq") @@ -556,6 +629,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrganizationSetting.Query().Where(organizationsetting.HasOrganizationWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying organizationsetting ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrganizationSettingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up organizationsetting edges") + return err + } + } + } if exists, err := FromContext(ctx).OrganizationSetting.Query().Where((organizationsetting.HasOrganizationWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if organizationsettingCount, err := FromContext(ctx).OrganizationSetting.Delete().Where(organizationsetting.HasOrganizationWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", organizationsettingCount).Msg("error deleting organizationsetting") @@ -563,6 +649,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).APIToken.Query().Where(apitoken.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying apitoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := APITokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up apitoken edges") + return err + } + } + } if exists, err := FromContext(ctx).APIToken.Query().Where((apitoken.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if apitokenCount, err := FromContext(ctx).APIToken.Delete().Where(apitoken.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", apitokenCount).Msg("error deleting apitoken") @@ -570,6 +669,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).EmailBranding.Query().Where(emailbranding.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying emailbranding ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := EmailBrandingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up emailbranding edges") + return err + } + } + } if exists, err := FromContext(ctx).EmailBranding.Query().Where((emailbranding.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if emailbrandingCount, err := FromContext(ctx).EmailBranding.Delete().Where(emailbranding.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", emailbrandingCount).Msg("error deleting emailbranding") @@ -577,6 +689,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).EmailTemplate.Query().Where(emailtemplate.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying emailtemplate ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := EmailTemplateEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up emailtemplate edges") + return err + } + } + } if exists, err := FromContext(ctx).EmailTemplate.Query().Where((emailtemplate.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if emailtemplateCount, err := FromContext(ctx).EmailTemplate.Delete().Where(emailtemplate.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", emailtemplateCount).Msg("error deleting emailtemplate") @@ -584,6 +709,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).IntegrationWebhook.Query().Where(integrationwebhook.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying integrationwebhook ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := IntegrationWebhookEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up integrationwebhook edges") + return err + } + } + } if exists, err := FromContext(ctx).IntegrationWebhook.Query().Where((integrationwebhook.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if integrationwebhookCount, err := FromContext(ctx).IntegrationWebhook.Delete().Where(integrationwebhook.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", integrationwebhookCount).Msg("error deleting integrationwebhook") @@ -591,6 +729,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).IntegrationRun.Query().Where(integrationrun.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying integrationrun ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := IntegrationRunEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up integrationrun edges") + return err + } + } + } if exists, err := FromContext(ctx).IntegrationRun.Query().Where((integrationrun.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if integrationrunCount, err := FromContext(ctx).IntegrationRun.Delete().Where(integrationrun.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", integrationrunCount).Msg("error deleting integrationrun") @@ -598,6 +749,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).NotificationPreference.Query().Where(notificationpreference.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying notificationpreference ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NotificationPreferenceEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up notificationpreference edges") + return err + } + } + } if exists, err := FromContext(ctx).NotificationPreference.Query().Where((notificationpreference.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if notificationpreferenceCount, err := FromContext(ctx).NotificationPreference.Delete().Where(notificationpreference.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", notificationpreferenceCount).Msg("error deleting notificationpreference") @@ -605,6 +769,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).NotificationTemplate.Query().Where(notificationtemplate.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying notificationtemplate ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NotificationTemplateEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up notificationtemplate edges") + return err + } + } + } if exists, err := FromContext(ctx).NotificationTemplate.Query().Where((notificationtemplate.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if notificationtemplateCount, err := FromContext(ctx).NotificationTemplate.Delete().Where(notificationtemplate.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", notificationtemplateCount).Msg("error deleting notificationtemplate") @@ -612,6 +789,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).File.Query().Where(file.HasOrganizationWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying file ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FileEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up file edges") + return err + } + } + } if exists, err := FromContext(ctx).File.Query().Where((file.HasOrganizationWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if fileCount, err := FromContext(ctx).File.Delete().Where(file.HasOrganizationWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", fileCount).Msg("error deleting file") @@ -619,6 +809,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Hush.Query().Where(hush.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying hush ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := HushEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up hush edges") + return err + } + } + } if exists, err := FromContext(ctx).Hush.Query().Where((hush.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if hushCount, err := FromContext(ctx).Hush.Delete().Where(hush.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", hushCount).Msg("error deleting hush") @@ -626,6 +829,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Group.Query().Where(group.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying group ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := GroupEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up group edges") + return err + } + } + } if exists, err := FromContext(ctx).Group.Query().Where((group.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if groupCount, err := FromContext(ctx).Group.Delete().Where(group.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", groupCount).Msg("error deleting group") @@ -633,6 +849,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Template.Query().Where(template.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying template ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TemplateEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up template edges") + return err + } + } + } if exists, err := FromContext(ctx).Template.Query().Where((template.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if templateCount, err := FromContext(ctx).Template.Delete().Where(template.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", templateCount).Msg("error deleting template") @@ -640,6 +869,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Integration.Query().Where(integration.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying integration ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := IntegrationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up integration edges") + return err + } + } + } if exists, err := FromContext(ctx).Integration.Query().Where((integration.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if integrationCount, err := FromContext(ctx).Integration.Delete().Where(integration.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", integrationCount).Msg("error deleting integration") @@ -647,6 +889,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DocumentData.Query().Where(documentdata.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying documentdata ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DocumentDataEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up documentdata edges") + return err + } + } + } if exists, err := FromContext(ctx).DocumentData.Query().Where((documentdata.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if documentdataCount, err := FromContext(ctx).DocumentData.Delete().Where(documentdata.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", documentdataCount).Msg("error deleting documentdata") @@ -654,6 +909,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrgSubscription.Query().Where(orgsubscription.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying orgsubscription ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrgSubscriptionEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up orgsubscription edges") + return err + } + } + } if exists, err := FromContext(ctx).OrgSubscription.Query().Where((orgsubscription.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if orgsubscriptionCount, err := FromContext(ctx).OrgSubscription.Delete().Where(orgsubscription.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", orgsubscriptionCount).Msg("error deleting orgsubscription") @@ -661,6 +929,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrgProduct.Query().Where(orgproduct.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying orgproduct ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrgProductEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up orgproduct edges") + return err + } + } + } if exists, err := FromContext(ctx).OrgProduct.Query().Where((orgproduct.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if orgproductCount, err := FromContext(ctx).OrgProduct.Delete().Where(orgproduct.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", orgproductCount).Msg("error deleting orgproduct") @@ -668,6 +949,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrgPrice.Query().Where(orgprice.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying orgprice ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrgPriceEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up orgprice edges") + return err + } + } + } if exists, err := FromContext(ctx).OrgPrice.Query().Where((orgprice.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if orgpriceCount, err := FromContext(ctx).OrgPrice.Delete().Where(orgprice.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", orgpriceCount).Msg("error deleting orgprice") @@ -675,6 +969,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).OrgModule.Query().Where(orgmodule.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying orgmodule ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := OrgModuleEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up orgmodule edges") + return err + } + } + } if exists, err := FromContext(ctx).OrgModule.Query().Where((orgmodule.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if orgmoduleCount, err := FromContext(ctx).OrgModule.Delete().Where(orgmodule.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", orgmoduleCount).Msg("error deleting orgmodule") @@ -682,6 +989,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Invite.Query().Where(invite.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying invite ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := InviteEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up invite edges") + return err + } + } + } if exists, err := FromContext(ctx).Invite.Query().Where((invite.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if inviteCount, err := FromContext(ctx).Invite.Delete().Where(invite.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", inviteCount).Msg("error deleting invite") @@ -689,6 +1009,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Subscriber.Query().Where(subscriber.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying subscriber ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := SubscriberEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up subscriber edges") + return err + } + } + } if exists, err := FromContext(ctx).Subscriber.Query().Where((subscriber.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if subscriberCount, err := FromContext(ctx).Subscriber.Delete().Where(subscriber.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", subscriberCount).Msg("error deleting subscriber") @@ -696,6 +1029,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Entity.Query().Where(entity.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying entity ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := EntityEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up entity edges") + return err + } + } + } if exists, err := FromContext(ctx).Entity.Query().Where((entity.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if entityCount, err := FromContext(ctx).Entity.Delete().Where(entity.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", entityCount).Msg("error deleting entity") @@ -703,6 +1049,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Platform.Query().Where(platform.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying platform ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := PlatformEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up platform edges") + return err + } + } + } if exists, err := FromContext(ctx).Platform.Query().Where((platform.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if platformCount, err := FromContext(ctx).Platform.Delete().Where(platform.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", platformCount).Msg("error deleting platform") @@ -710,6 +1069,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).IdentityHolder.Query().Where(identityholder.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying identityholder ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := IdentityHolderEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up identityholder edges") + return err + } + } + } if exists, err := FromContext(ctx).IdentityHolder.Query().Where((identityholder.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if identityholderCount, err := FromContext(ctx).IdentityHolder.Delete().Where(identityholder.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", identityholderCount).Msg("error deleting identityholder") @@ -717,6 +1089,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Campaign.Query().Where(campaign.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying campaign ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := CampaignEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up campaign edges") + return err + } + } + } if exists, err := FromContext(ctx).Campaign.Query().Where((campaign.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if campaignCount, err := FromContext(ctx).Campaign.Delete().Where(campaign.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", campaignCount).Msg("error deleting campaign") @@ -724,6 +1109,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).CampaignTarget.Query().Where(campaigntarget.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying campaigntarget ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := CampaignTargetEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up campaigntarget edges") + return err + } + } + } if exists, err := FromContext(ctx).CampaignTarget.Query().Where((campaigntarget.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if campaigntargetCount, err := FromContext(ctx).CampaignTarget.Delete().Where(campaigntarget.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", campaigntargetCount).Msg("error deleting campaigntarget") @@ -731,6 +1129,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).EntityType.Query().Where(entitytype.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying entitytype ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := EntityTypeEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up entitytype edges") + return err + } + } + } if exists, err := FromContext(ctx).EntityType.Query().Where((entitytype.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if entitytypeCount, err := FromContext(ctx).EntityType.Delete().Where(entitytype.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", entitytypeCount).Msg("error deleting entitytype") @@ -738,6 +1149,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Contact.Query().Where(contact.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying contact ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ContactEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up contact edges") + return err + } + } + } if exists, err := FromContext(ctx).Contact.Query().Where((contact.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if contactCount, err := FromContext(ctx).Contact.Delete().Where(contact.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", contactCount).Msg("error deleting contact") @@ -745,6 +1169,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Note.Query().Where(note.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying note ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NoteEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up note edges") + return err + } + } + } if exists, err := FromContext(ctx).Note.Query().Where((note.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if noteCount, err := FromContext(ctx).Note.Delete().Where(note.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", noteCount).Msg("error deleting note") @@ -752,6 +1189,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Task.Query().Where(task.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying task ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TaskEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up task edges") + return err + } + } + } if exists, err := FromContext(ctx).Task.Query().Where((task.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if taskCount, err := FromContext(ctx).Task.Delete().Where(task.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", taskCount).Msg("error deleting task") @@ -759,6 +1209,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Program.Query().Where(program.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying program ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ProgramEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up program edges") + return err + } + } + } if exists, err := FromContext(ctx).Program.Query().Where((program.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if programCount, err := FromContext(ctx).Program.Delete().Where(program.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", programCount).Msg("error deleting program") @@ -766,6 +1229,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).SystemDetail.Query().Where(systemdetail.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying systemdetail ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := SystemDetailEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up systemdetail edges") + return err + } + } + } if exists, err := FromContext(ctx).SystemDetail.Query().Where((systemdetail.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if systemdetailCount, err := FromContext(ctx).SystemDetail.Delete().Where(systemdetail.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", systemdetailCount).Msg("error deleting systemdetail") @@ -773,6 +1249,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Procedure.Query().Where(procedure.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying procedure ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ProcedureEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up procedure edges") + return err + } + } + } if exists, err := FromContext(ctx).Procedure.Query().Where((procedure.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if procedureCount, err := FromContext(ctx).Procedure.Delete().Where(procedure.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", procedureCount).Msg("error deleting procedure") @@ -780,6 +1269,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).InternalPolicy.Query().Where(internalpolicy.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying internalpolicy ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := InternalPolicyEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up internalpolicy edges") + return err + } + } + } if exists, err := FromContext(ctx).InternalPolicy.Query().Where((internalpolicy.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if internalpolicyCount, err := FromContext(ctx).InternalPolicy.Delete().Where(internalpolicy.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", internalpolicyCount).Msg("error deleting internalpolicy") @@ -787,6 +1289,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Risk.Query().Where(risk.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying risk ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := RiskEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up risk edges") + return err + } + } + } if exists, err := FromContext(ctx).Risk.Query().Where((risk.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if riskCount, err := FromContext(ctx).Risk.Delete().Where(risk.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", riskCount).Msg("error deleting risk") @@ -794,6 +1309,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ControlObjective.Query().Where(controlobjective.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying controlobjective ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ControlObjectiveEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up controlobjective edges") + return err + } + } + } if exists, err := FromContext(ctx).ControlObjective.Query().Where((controlobjective.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if controlobjectiveCount, err := FromContext(ctx).ControlObjective.Delete().Where(controlobjective.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", controlobjectiveCount).Msg("error deleting controlobjective") @@ -801,6 +1329,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Narrative.Query().Where(narrative.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying narrative ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NarrativeEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up narrative edges") + return err + } + } + } if exists, err := FromContext(ctx).Narrative.Query().Where((narrative.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if narrativeCount, err := FromContext(ctx).Narrative.Delete().Where(narrative.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", narrativeCount).Msg("error deleting narrative") @@ -808,6 +1349,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Control.Query().Where(control.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying control ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ControlEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up control edges") + return err + } + } + } if exists, err := FromContext(ctx).Control.Query().Where((control.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if controlCount, err := FromContext(ctx).Control.Delete().Where(control.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", controlCount).Msg("error deleting control") @@ -815,6 +1369,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Subcontrol.Query().Where(subcontrol.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying subcontrol ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := SubcontrolEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up subcontrol edges") + return err + } + } + } if exists, err := FromContext(ctx).Subcontrol.Query().Where((subcontrol.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if subcontrolCount, err := FromContext(ctx).Subcontrol.Delete().Where(subcontrol.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", subcontrolCount).Msg("error deleting subcontrol") @@ -822,6 +1389,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ControlImplementation.Query().Where(controlimplementation.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying controlimplementation ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ControlImplementationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up controlimplementation edges") + return err + } + } + } if exists, err := FromContext(ctx).ControlImplementation.Query().Where((controlimplementation.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if controlimplementationCount, err := FromContext(ctx).ControlImplementation.Delete().Where(controlimplementation.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", controlimplementationCount).Msg("error deleting controlimplementation") @@ -829,6 +1409,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).MappedControl.Query().Where(mappedcontrol.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying mappedcontrol ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := MappedControlEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up mappedcontrol edges") + return err + } + } + } if exists, err := FromContext(ctx).MappedControl.Query().Where((mappedcontrol.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if mappedcontrolCount, err := FromContext(ctx).MappedControl.Delete().Where(mappedcontrol.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", mappedcontrolCount).Msg("error deleting mappedcontrol") @@ -836,6 +1429,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Evidence.Query().Where(evidence.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying evidence ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := EvidenceEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up evidence edges") + return err + } + } + } if exists, err := FromContext(ctx).Evidence.Query().Where((evidence.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if evidenceCount, err := FromContext(ctx).Evidence.Delete().Where(evidence.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", evidenceCount).Msg("error deleting evidence") @@ -843,6 +1449,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Standard.Query().Where(standard.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying standard ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := StandardEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up standard edges") + return err + } + } + } if exists, err := FromContext(ctx).Standard.Query().Where((standard.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if standardCount, err := FromContext(ctx).Standard.Delete().Where(standard.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", standardCount).Msg("error deleting standard") @@ -850,6 +1469,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ActionPlan.Query().Where(actionplan.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying actionplan ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ActionPlanEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up actionplan edges") + return err + } + } + } if exists, err := FromContext(ctx).ActionPlan.Query().Where((actionplan.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if actionplanCount, err := FromContext(ctx).ActionPlan.Delete().Where(actionplan.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", actionplanCount).Msg("error deleting actionplan") @@ -857,6 +1489,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).CustomDomain.Query().Where(customdomain.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying customdomain ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := CustomDomainEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up customdomain edges") + return err + } + } + } if exists, err := FromContext(ctx).CustomDomain.Query().Where((customdomain.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if customdomainCount, err := FromContext(ctx).CustomDomain.Delete().Where(customdomain.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", customdomainCount).Msg("error deleting customdomain") @@ -864,6 +1509,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobRunner.Query().Where(jobrunner.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobrunner ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobRunnerEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobrunner edges") + return err + } + } + } if exists, err := FromContext(ctx).JobRunner.Query().Where((jobrunner.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobrunnerCount, err := FromContext(ctx).JobRunner.Delete().Where(jobrunner.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobrunnerCount).Msg("error deleting jobrunner") @@ -871,6 +1529,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobRunnerToken.Query().Where(jobrunnertoken.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobrunnertoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobRunnerTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobrunnertoken edges") + return err + } + } + } if exists, err := FromContext(ctx).JobRunnerToken.Query().Where((jobrunnertoken.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobrunnertokenCount, err := FromContext(ctx).JobRunnerToken.Delete().Where(jobrunnertoken.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobrunnertokenCount).Msg("error deleting jobrunnertoken") @@ -878,6 +1549,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobRunnerRegistrationToken.Query().Where(jobrunnerregistrationtoken.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobrunnerregistrationtoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobRunnerRegistrationTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobrunnerregistrationtoken edges") + return err + } + } + } if exists, err := FromContext(ctx).JobRunnerRegistrationToken.Query().Where((jobrunnerregistrationtoken.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobrunnerregistrationtokenCount, err := FromContext(ctx).JobRunnerRegistrationToken.Delete().Where(jobrunnerregistrationtoken.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobrunnerregistrationtokenCount).Msg("error deleting jobrunnerregistrationtoken") @@ -885,6 +1569,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DNSVerification.Query().Where(dnsverification.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying dnsverification ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DNSVerificationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up dnsverification edges") + return err + } + } + } if exists, err := FromContext(ctx).DNSVerification.Query().Where((dnsverification.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if dnsverificationCount, err := FromContext(ctx).DNSVerification.Delete().Where(dnsverification.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", dnsverificationCount).Msg("error deleting dnsverification") @@ -892,6 +1589,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobTemplate.Query().Where(jobtemplate.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobtemplate ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobTemplateEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobtemplate edges") + return err + } + } + } if exists, err := FromContext(ctx).JobTemplate.Query().Where((jobtemplate.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobtemplateCount, err := FromContext(ctx).JobTemplate.Delete().Where(jobtemplate.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobtemplateCount).Msg("error deleting jobtemplate") @@ -899,6 +1609,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ScheduledJob.Query().Where(scheduledjob.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying scheduledjob ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ScheduledJobEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up scheduledjob edges") + return err + } + } + } if exists, err := FromContext(ctx).ScheduledJob.Query().Where((scheduledjob.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if scheduledjobCount, err := FromContext(ctx).ScheduledJob.Delete().Where(scheduledjob.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", scheduledjobCount).Msg("error deleting scheduledjob") @@ -906,6 +1629,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).JobResult.Query().Where(jobresult.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying jobresult ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := JobResultEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up jobresult edges") + return err + } + } + } if exists, err := FromContext(ctx).JobResult.Query().Where((jobresult.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if jobresultCount, err := FromContext(ctx).JobResult.Delete().Where(jobresult.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", jobresultCount).Msg("error deleting jobresult") @@ -913,6 +1649,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).ScheduledJobRun.Query().Where(scheduledjobrun.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying scheduledjobrun ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ScheduledJobRunEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up scheduledjobrun edges") + return err + } + } + } if exists, err := FromContext(ctx).ScheduledJobRun.Query().Where((scheduledjobrun.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if scheduledjobrunCount, err := FromContext(ctx).ScheduledJobRun.Delete().Where(scheduledjobrun.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", scheduledjobrunCount).Msg("error deleting scheduledjobrun") @@ -920,6 +1669,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenter.Query().Where(trustcenter.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenter ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenter edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenter.Query().Where((trustcenter.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterCount, err := FromContext(ctx).TrustCenter.Delete().Where(trustcenter.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterCount).Msg("error deleting trustcenter") @@ -927,6 +1689,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Asset.Query().Where(asset.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying asset ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := AssetEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up asset edges") + return err + } + } + } if exists, err := FromContext(ctx).Asset.Query().Where((asset.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if assetCount, err := FromContext(ctx).Asset.Delete().Where(asset.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", assetCount).Msg("error deleting asset") @@ -934,6 +1709,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Scan.Query().Where(scan.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying scan ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ScanEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up scan edges") + return err + } + } + } if exists, err := FromContext(ctx).Scan.Query().Where((scan.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if scanCount, err := FromContext(ctx).Scan.Delete().Where(scan.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", scanCount).Msg("error deleting scan") @@ -941,6 +1729,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).SLADefinition.Query().Where(sladefinition.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying sladefinition ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := SLADefinitionEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up sladefinition edges") + return err + } + } + } if exists, err := FromContext(ctx).SLADefinition.Query().Where((sladefinition.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if sladefinitionCount, err := FromContext(ctx).SLADefinition.Delete().Where(sladefinition.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", sladefinitionCount).Msg("error deleting sladefinition") @@ -948,6 +1749,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Subprocessor.Query().Where(subprocessor.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying subprocessor ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := SubprocessorEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up subprocessor edges") + return err + } + } + } if exists, err := FromContext(ctx).Subprocessor.Query().Where((subprocessor.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if subprocessorCount, err := FromContext(ctx).Subprocessor.Delete().Where(subprocessor.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", subprocessorCount).Msg("error deleting subprocessor") @@ -955,6 +1769,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Export.Query().Where(export.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying export ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ExportEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up export edges") + return err + } + } + } if exists, err := FromContext(ctx).Export.Query().Where((export.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if exportCount, err := FromContext(ctx).Export.Delete().Where(export.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", exportCount).Msg("error deleting export") @@ -962,6 +1789,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterWatermarkConfig.Query().Where(trustcenterwatermarkconfig.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterwatermarkconfig ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterWatermarkConfigEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterwatermarkconfig edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterWatermarkConfig.Query().Where((trustcenterwatermarkconfig.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterwatermarkconfigCount, err := FromContext(ctx).TrustCenterWatermarkConfig.Delete().Where(trustcenterwatermarkconfig.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterwatermarkconfigCount).Msg("error deleting trustcenterwatermarkconfig") @@ -969,6 +1809,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Assessment.Query().Where(assessment.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying assessment ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := AssessmentEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up assessment edges") + return err + } + } + } if exists, err := FromContext(ctx).Assessment.Query().Where((assessment.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if assessmentCount, err := FromContext(ctx).Assessment.Delete().Where(assessment.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", assessmentCount).Msg("error deleting assessment") @@ -976,6 +1829,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).AssessmentResponse.Query().Where(assessmentresponse.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying assessmentresponse ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := AssessmentResponseEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up assessmentresponse edges") + return err + } + } + } if exists, err := FromContext(ctx).AssessmentResponse.Query().Where((assessmentresponse.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if assessmentresponseCount, err := FromContext(ctx).AssessmentResponse.Delete().Where(assessmentresponse.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", assessmentresponseCount).Msg("error deleting assessmentresponse") @@ -983,6 +1849,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).CustomTypeEnum.Query().Where(customtypeenum.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying customtypeenum ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := CustomTypeEnumEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up customtypeenum edges") + return err + } + } + } if exists, err := FromContext(ctx).CustomTypeEnum.Query().Where((customtypeenum.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if customtypeenumCount, err := FromContext(ctx).CustomTypeEnum.Delete().Where(customtypeenum.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", customtypeenumCount).Msg("error deleting customtypeenum") @@ -990,6 +1869,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TagDefinition.Query().Where(tagdefinition.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying tagdefinition ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TagDefinitionEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up tagdefinition edges") + return err + } + } + } if exists, err := FromContext(ctx).TagDefinition.Query().Where((tagdefinition.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if tagdefinitionCount, err := FromContext(ctx).TagDefinition.Delete().Where(tagdefinition.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", tagdefinitionCount).Msg("error deleting tagdefinition") @@ -997,6 +1889,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Remediation.Query().Where(remediation.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying remediation ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := RemediationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up remediation edges") + return err + } + } + } if exists, err := FromContext(ctx).Remediation.Query().Where((remediation.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if remediationCount, err := FromContext(ctx).Remediation.Delete().Where(remediation.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", remediationCount).Msg("error deleting remediation") @@ -1004,6 +1909,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Finding.Query().Where(finding.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying finding ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FindingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up finding edges") + return err + } + } + } if exists, err := FromContext(ctx).Finding.Query().Where((finding.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if findingCount, err := FromContext(ctx).Finding.Delete().Where(finding.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", findingCount).Msg("error deleting finding") @@ -1011,6 +1929,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Review.Query().Where(review.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying review ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := ReviewEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up review edges") + return err + } + } + } if exists, err := FromContext(ctx).Review.Query().Where((review.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if reviewCount, err := FromContext(ctx).Review.Delete().Where(review.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", reviewCount).Msg("error deleting review") @@ -1018,6 +1949,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Vulnerability.Query().Where(vulnerability.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying vulnerability ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := VulnerabilityEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up vulnerability edges") + return err + } + } + } if exists, err := FromContext(ctx).Vulnerability.Query().Where((vulnerability.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if vulnerabilityCount, err := FromContext(ctx).Vulnerability.Delete().Where(vulnerability.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", vulnerabilityCount).Msg("error deleting vulnerability") @@ -1025,6 +1969,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Notification.Query().Where(notification.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying notification ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NotificationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up notification edges") + return err + } + } + } if exists, err := FromContext(ctx).Notification.Query().Where((notification.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if notificationCount, err := FromContext(ctx).Notification.Delete().Where(notification.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", notificationCount).Msg("error deleting notification") @@ -1032,6 +1989,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowDefinition.Query().Where(workflowdefinition.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowdefinition ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowDefinitionEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowdefinition edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowDefinition.Query().Where((workflowdefinition.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowdefinitionCount, err := FromContext(ctx).WorkflowDefinition.Delete().Where(workflowdefinition.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowdefinitionCount).Msg("error deleting workflowdefinition") @@ -1039,6 +2009,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowInstance.Query().Where(workflowinstance.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowinstance ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowInstanceEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowinstance edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowInstance.Query().Where((workflowinstance.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowinstanceCount, err := FromContext(ctx).WorkflowInstance.Delete().Where(workflowinstance.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowinstanceCount).Msg("error deleting workflowinstance") @@ -1046,6 +2029,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowEvent.Query().Where(workflowevent.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowevent ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowEventEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowevent edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowEvent.Query().Where((workflowevent.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workfloweventCount, err := FromContext(ctx).WorkflowEvent.Delete().Where(workflowevent.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workfloweventCount).Msg("error deleting workflowevent") @@ -1053,6 +2049,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowAssignment.Query().Where(workflowassignment.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowassignment ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowAssignmentEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowassignment edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowAssignment.Query().Where((workflowassignment.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowassignmentCount, err := FromContext(ctx).WorkflowAssignment.Delete().Where(workflowassignment.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowassignmentCount).Msg("error deleting workflowassignment") @@ -1060,6 +2069,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowAssignmentTarget.Query().Where(workflowassignmenttarget.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowassignmenttarget ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowAssignmentTargetEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowassignmenttarget edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowAssignmentTarget.Query().Where((workflowassignmenttarget.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowassignmenttargetCount, err := FromContext(ctx).WorkflowAssignmentTarget.Delete().Where(workflowassignmenttarget.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowassignmenttargetCount).Msg("error deleting workflowassignmenttarget") @@ -1067,6 +2089,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowObjectRef.Query().Where(workflowobjectref.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowobjectref ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowObjectRefEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowobjectref edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowObjectRef.Query().Where((workflowobjectref.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowobjectrefCount, err := FromContext(ctx).WorkflowObjectRef.Delete().Where(workflowobjectref.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowobjectrefCount).Msg("error deleting workflowobjectref") @@ -1074,6 +2109,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).WorkflowProposal.Query().Where(workflowproposal.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying workflowproposal ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WorkflowProposalEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up workflowproposal edges") + return err + } + } + } if exists, err := FromContext(ctx).WorkflowProposal.Query().Where((workflowproposal.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if workflowproposalCount, err := FromContext(ctx).WorkflowProposal.Delete().Where(workflowproposal.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", workflowproposalCount).Msg("error deleting workflowproposal") @@ -1081,6 +2129,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DirectoryAccount.Query().Where(directoryaccount.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying directoryaccount ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DirectoryAccountEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up directoryaccount edges") + return err + } + } + } if exists, err := FromContext(ctx).DirectoryAccount.Query().Where((directoryaccount.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if directoryaccountCount, err := FromContext(ctx).DirectoryAccount.Delete().Where(directoryaccount.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", directoryaccountCount).Msg("error deleting directoryaccount") @@ -1088,6 +2149,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DirectoryGroup.Query().Where(directorygroup.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying directorygroup ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DirectoryGroupEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up directorygroup edges") + return err + } + } + } if exists, err := FromContext(ctx).DirectoryGroup.Query().Where((directorygroup.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if directorygroupCount, err := FromContext(ctx).DirectoryGroup.Delete().Where(directorygroup.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", directorygroupCount).Msg("error deleting directorygroup") @@ -1095,6 +2169,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DirectoryMembership.Query().Where(directorymembership.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying directorymembership ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DirectoryMembershipEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up directorymembership edges") + return err + } + } + } if exists, err := FromContext(ctx).DirectoryMembership.Query().Where((directorymembership.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if directorymembershipCount, err := FromContext(ctx).DirectoryMembership.Delete().Where(directorymembership.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", directorymembershipCount).Msg("error deleting directorymembership") @@ -1102,6 +2189,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).DirectorySyncRun.Query().Where(directorysyncrun.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying directorysyncrun ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DirectorySyncRunEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up directorysyncrun edges") + return err + } + } + } if exists, err := FromContext(ctx).DirectorySyncRun.Query().Where((directorysyncrun.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if directorysyncrunCount, err := FromContext(ctx).DirectorySyncRun.Delete().Where(directorysyncrun.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", directorysyncrunCount).Msg("error deleting directorysyncrun") @@ -1109,6 +2209,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Discussion.Query().Where(discussion.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying discussion ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DiscussionEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up discussion edges") + return err + } + } + } if exists, err := FromContext(ctx).Discussion.Query().Where((discussion.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if discussionCount, err := FromContext(ctx).Discussion.Delete().Where(discussion.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", discussionCount).Msg("error deleting discussion") @@ -1232,6 +2345,19 @@ func SubcontrolEdgeCleanup(ctx context.Context, id string) error { func SubprocessorEdgeCleanup(ctx context.Context, id string) error { ctx = entfga.WithDeleteTuplesFirst(privacy.DecisionContext(ctx, privacy.Allowf("cleanup subprocessor edge"))) + { + ids, err := FromContext(ctx).TrustCenterSubprocessor.Query().Where(trustcentersubprocessor.HasSubprocessorWith(subprocessor.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcentersubprocessor ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterSubprocessorEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcentersubprocessor edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterSubprocessor.Query().Where((trustcentersubprocessor.HasSubprocessorWith(subprocessor.ID(id)))).Exist(ctx); err == nil && exists { if trustcentersubprocessorCount, err := FromContext(ctx).TrustCenterSubprocessor.Delete().Where(trustcentersubprocessor.HasSubprocessorWith(subprocessor.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcentersubprocessorCount).Msg("error deleting trustcentersubprocessor") @@ -1275,6 +2401,19 @@ func TaskEdgeCleanup(ctx context.Context, id string) error { func TemplateEdgeCleanup(ctx context.Context, id string) error { ctx = entfga.WithDeleteTuplesFirst(privacy.DecisionContext(ctx, privacy.Allowf("cleanup template edge"))) + { + ids, err := FromContext(ctx).DocumentData.Query().Where(documentdata.HasTemplateWith(template.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying documentdata ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := DocumentDataEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up documentdata edges") + return err + } + } + } if exists, err := FromContext(ctx).DocumentData.Query().Where((documentdata.HasTemplateWith(template.ID(id)))).Exist(ctx); err == nil && exists { if documentdataCount, err := FromContext(ctx).DocumentData.Delete().Where(documentdata.HasTemplateWith(template.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", documentdataCount).Msg("error deleting documentdata") @@ -1316,6 +2455,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterWatermarkConfig.Query().Where(trustcenterwatermarkconfig.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterwatermarkconfig ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterWatermarkConfigEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterwatermarkconfig edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterWatermarkConfig.Query().Where((trustcenterwatermarkconfig.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterwatermarkconfigCount, err := FromContext(ctx).TrustCenterWatermarkConfig.Delete().Where(trustcenterwatermarkconfig.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterwatermarkconfigCount).Msg("error deleting trustcenterwatermarkconfig") @@ -1323,6 +2475,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterSubprocessor.Query().Where(trustcentersubprocessor.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcentersubprocessor ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterSubprocessorEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcentersubprocessor edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterSubprocessor.Query().Where((trustcentersubprocessor.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcentersubprocessorCount, err := FromContext(ctx).TrustCenterSubprocessor.Delete().Where(trustcentersubprocessor.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcentersubprocessorCount).Msg("error deleting trustcentersubprocessor") @@ -1330,6 +2495,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterDoc.Query().Where(trustcenterdoc.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterdoc ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterDocEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterdoc edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterDoc.Query().Where((trustcenterdoc.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterdocCount, err := FromContext(ctx).TrustCenterDoc.Delete().Where(trustcenterdoc.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterdocCount).Msg("error deleting trustcenterdoc") @@ -1337,6 +2515,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterCompliance.Query().Where(trustcentercompliance.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcentercompliance ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterComplianceEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcentercompliance edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterCompliance.Query().Where((trustcentercompliance.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcentercomplianceCount, err := FromContext(ctx).TrustCenterCompliance.Delete().Where(trustcentercompliance.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcentercomplianceCount).Msg("error deleting trustcentercompliance") @@ -1344,6 +2535,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Template.Query().Where(template.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying template ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TemplateEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up template edges") + return err + } + } + } if exists, err := FromContext(ctx).Template.Query().Where((template.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if templateCount, err := FromContext(ctx).Template.Delete().Where(template.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", templateCount).Msg("error deleting template") @@ -1351,6 +2555,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Note.Query().Where(note.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying note ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NoteEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up note edges") + return err + } + } + } if exists, err := FromContext(ctx).Note.Query().Where((note.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if noteCount, err := FromContext(ctx).Note.Delete().Where(note.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", noteCount).Msg("error deleting note") @@ -1358,6 +2575,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterEntity.Query().Where(trustcenterentity.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterentity ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterEntityEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterentity edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterEntity.Query().Where((trustcenterentity.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterentityCount, err := FromContext(ctx).TrustCenterEntity.Delete().Where(trustcenterentity.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterentityCount).Msg("error deleting trustcenterentity") @@ -1365,6 +2595,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterNDARequest.Query().Where(trustcenterndarequest.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterndarequest ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterNDARequestEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterndarequest edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterNDARequest.Query().Where((trustcenterndarequest.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterndarequestCount, err := FromContext(ctx).TrustCenterNDARequest.Delete().Where(trustcenterndarequest.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterndarequestCount).Msg("error deleting trustcenterndarequest") @@ -1372,6 +2615,19 @@ func TrustCenterEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TrustCenterFAQ.Query().Where(trustcenterfaq.HasTrustCenterWith(trustcenter.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying trustcenterfaq ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TrustCenterFAQEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up trustcenterfaq edges") + return err + } + } + } if exists, err := FromContext(ctx).TrustCenterFAQ.Query().Where((trustcenterfaq.HasTrustCenterWith(trustcenter.ID(id)))).Exist(ctx); err == nil && exists { if trustcenterfaqCount, err := FromContext(ctx).TrustCenterFAQ.Delete().Where(trustcenterfaq.HasTrustCenterWith(trustcenter.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", trustcenterfaqCount).Msg("error deleting trustcenterfaq") @@ -1391,6 +2647,19 @@ func TrustCenterComplianceEdgeCleanup(ctx context.Context, id string) error { func TrustCenterDocEdgeCleanup(ctx context.Context, id string) error { ctx = entfga.WithDeleteTuplesFirst(privacy.DecisionContext(ctx, privacy.Allowf("cleanup trustcenterdoc edge"))) + { + ids, err := FromContext(ctx).File.Query().Where(file.HasTrustCenterDocWith(trustcenterdoc.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying file ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FileEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up file edges") + return err + } + } + } if exists, err := FromContext(ctx).File.Query().Where((file.HasTrustCenterDocWith(trustcenterdoc.ID(id)))).Exist(ctx); err == nil && exists { if fileCount, err := FromContext(ctx).File.Delete().Where(file.HasTrustCenterDocWith(trustcenterdoc.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", fileCount).Msg("error deleting file") @@ -1398,6 +2667,19 @@ func TrustCenterDocEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).File.Query().Where(file.HasTrustCenterDocWith(trustcenterdoc.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying file ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FileEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up file edges") + return err + } + } + } if exists, err := FromContext(ctx).File.Query().Where((file.HasTrustCenterDocWith(trustcenterdoc.ID(id)))).Exist(ctx); err == nil && exists { if fileCount, err := FromContext(ctx).File.Delete().Where(file.HasTrustCenterDocWith(trustcenterdoc.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", fileCount).Msg("error deleting file") @@ -1447,6 +2729,19 @@ func TrustCenterWatermarkConfigEdgeCleanup(ctx context.Context, id string) error func UserEdgeCleanup(ctx context.Context, id string) error { ctx = entfga.WithDeleteTuplesFirst(privacy.DecisionContext(ctx, privacy.Allowf("cleanup user edge"))) + { + ids, err := FromContext(ctx).PersonalAccessToken.Query().Where(personalaccesstoken.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying personalaccesstoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := PersonalAccessTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up personalaccesstoken edges") + return err + } + } + } if exists, err := FromContext(ctx).PersonalAccessToken.Query().Where((personalaccesstoken.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if personalaccesstokenCount, err := FromContext(ctx).PersonalAccessToken.Delete().Where(personalaccesstoken.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", personalaccesstokenCount).Msg("error deleting personalaccesstoken") @@ -1454,6 +2749,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).TFASetting.Query().Where(tfasetting.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying tfasetting ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := TFASettingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up tfasetting edges") + return err + } + } + } if exists, err := FromContext(ctx).TFASetting.Query().Where((tfasetting.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if tfasettingCount, err := FromContext(ctx).TFASetting.Delete().Where(tfasetting.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", tfasettingCount).Msg("error deleting tfasetting") @@ -1461,6 +2769,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).UserSetting.Query().Where(usersetting.HasUserWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying usersetting ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := UserSettingEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up usersetting edges") + return err + } + } + } if exists, err := FromContext(ctx).UserSetting.Query().Where((usersetting.HasUserWith(user.ID(id)))).Exist(ctx); err == nil && exists { if usersettingCount, err := FromContext(ctx).UserSetting.Delete().Where(usersetting.HasUserWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", usersettingCount).Msg("error deleting usersetting") @@ -1468,6 +2789,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).EmailVerificationToken.Query().Where(emailverificationtoken.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying emailverificationtoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := EmailVerificationTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up emailverificationtoken edges") + return err + } + } + } if exists, err := FromContext(ctx).EmailVerificationToken.Query().Where((emailverificationtoken.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if emailverificationtokenCount, err := FromContext(ctx).EmailVerificationToken.Delete().Where(emailverificationtoken.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", emailverificationtokenCount).Msg("error deleting emailverificationtoken") @@ -1475,6 +2809,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).FileDownloadToken.Query().Where(filedownloadtoken.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying filedownloadtoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := FileDownloadTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up filedownloadtoken edges") + return err + } + } + } if exists, err := FromContext(ctx).FileDownloadToken.Query().Where((filedownloadtoken.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if filedownloadtokenCount, err := FromContext(ctx).FileDownloadToken.Delete().Where(filedownloadtoken.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", filedownloadtokenCount).Msg("error deleting filedownloadtoken") @@ -1482,6 +2829,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).PasswordResetToken.Query().Where(passwordresettoken.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying passwordresettoken ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := PasswordResetTokenEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up passwordresettoken edges") + return err + } + } + } if exists, err := FromContext(ctx).PasswordResetToken.Query().Where((passwordresettoken.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if passwordresettokenCount, err := FromContext(ctx).PasswordResetToken.Delete().Where(passwordresettoken.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", passwordresettokenCount).Msg("error deleting passwordresettoken") @@ -1489,6 +2849,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Webauthn.Query().Where(webauthn.HasOwnerWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying webauthn ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := WebauthnEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up webauthn edges") + return err + } + } + } if exists, err := FromContext(ctx).Webauthn.Query().Where((webauthn.HasOwnerWith(user.ID(id)))).Exist(ctx); err == nil && exists { if webauthnCount, err := FromContext(ctx).Webauthn.Delete().Where(webauthn.HasOwnerWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", webauthnCount).Msg("error deleting webauthn") @@ -1496,6 +2869,19 @@ func UserEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).Notification.Query().Where(notification.HasUserWith(user.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying notification ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := NotificationEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up notification edges") + return err + } + } + } if exists, err := FromContext(ctx).Notification.Query().Where((notification.HasUserWith(user.ID(id)))).Exist(ctx); err == nil && exists { if notificationCount, err := FromContext(ctx).Notification.Delete().Where(notification.HasUserWith(user.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", notificationCount).Msg("error deleting notification") diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index 34facc8bdd..1b3dbe7229 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1 +1 @@ -9200e242b8e8c74c4c11ea1b1db1d515cc5613ed3028e09d15bedbd8fcfa22a0 \ No newline at end of file +892778be319d6561a90c924e5d42348b4e0555f6035fcd100222513a2cd461f9 \ No newline at end of file diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index a751de9772..8b4549b947 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1 +1 @@ -1b8a5212abb0f9b10fb3936adc882c550cb3e277c0089cfff578326e9b6b7c93 \ No newline at end of file +d6826d69036dc37371b24f5adc9b2756399fcfa98276162e3e8679e62fa97d7d \ No newline at end of file diff --git a/internal/graphapi/organization_test.go b/internal/graphapi/organization_test.go index 0e1bceb134..91a2a5a4ea 100644 --- a/internal/graphapi/organization_test.go +++ b/internal/graphapi/organization_test.go @@ -4,6 +4,7 @@ import ( "context" "strings" "testing" + "time" "github.com/99designs/gqlgen/graphql" "github.com/brianvoe/gofakeit/v7" @@ -25,6 +26,21 @@ import ( "github.com/theopenlane/core/internal/graphapi/testclient" ) +func waitForCondition(t *testing.T, condition func() bool, msg string) { + t.Helper() + + deadline := time.Now().Add(5 * time.Second) + for time.Now().Before(deadline) { + if condition() { + return + } + + time.Sleep(100 * time.Millisecond) + } + + t.Fatalf("timed out waiting for condition: %s", msg) +} + func TestQueryOrganization(t *testing.T) { t.Parallel() From bfc7ed5eca1ab5eb243dc3a9f7667e89a85b0e0c Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Wed, 8 Apr 2026 21:57:15 +0100 Subject: [PATCH 10/32] task regenerate --- .task/checksum/generate-ent-smart | 8 +- .task/checksum/generate-graphql-smart | 8 +- .task/checksum/generate-openapi-smart | 2 +- .../ent/checksum/.history_schema_checksum | 8 +- internal/ent/checksum/.schema_checksum | 8 +- internal/ent/csvgenerated/csv_generated.go | 718 ++- internal/ent/generated/edge_cleanup.go | 26 + .../integration_mapping_generated.go | 4427 ++++++++--------- .../checksum/.history_schema_checksum | 8 +- internal/graphapi/checksum/.schema_checksum | 8 +- .../notificationtemplatehistory.graphql | 210 +- .../vendorscoringconfighistory.graphql | 122 +- internal/graphapi/query/integration.graphql | 212 +- internal/graphapi/query/platform.graphql | 1285 +++-- internal/graphapi/query/remediation.graphql | 740 ++- .../operations/ingest_generated.go | 8 +- 16 files changed, 3824 insertions(+), 3974 deletions(-) diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index 426ade49cb..16194bdeb1 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1,7 +1 @@ -<<<<<<< HEAD -3d772cfdf1ca72046150d30e3275d9a2 -||||||| bdf410139 -475fcb064d2003e3eb89c363752723e7 -======= -c624fa50f427be2982b702e4d2867226 ->>>>>>> origin/main +4e832773fab700f819595823f4c07ede diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index db01de12f9..5c03de1ad1 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1,7 +1 @@ -<<<<<<< HEAD -1df5c3c83065dc2eff72fb6860aa6fa -||||||| bdf410139 -d20c35f330cb56ab91bd27e976fcad68 -======= -ab4f10c1f302b58e8894331c2638d026 ->>>>>>> origin/main +15f007f28ecc9de21ff6b024d398fb38 diff --git a/.task/checksum/generate-openapi-smart b/.task/checksum/generate-openapi-smart index bc84951a08..fbad9c7a4e 100644 --- a/.task/checksum/generate-openapi-smart +++ b/.task/checksum/generate-openapi-smart @@ -1 +1 @@ -11bd8cdf78dd89d991c184f3915d031d +8995df9112e4edf302cd6122088691b diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index bcc40c9100..31daad74cf 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1,7 +1 @@ -<<<<<<< HEAD -3998eb6d527efc2c42e59734ca4def5a775b0bf11f723610c6f9eaf8ec5cb215 -||||||| bdf410139 -9d51026de68cb8e832f1e6e9316dab5bd634de22cbe54cda048e3465705ac0fe -======= -75681d38f4e677d8c892151fa80193880a759e3e7317a41c9a3186496e8b7f3d ->>>>>>> origin/main +d2c1c70a59ae6f79e264db189429f9612095b3cc001a6da23a3e41beddca3d37 \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index cc2cc399be..02f4fe2480 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1,7 +1 @@ -<<<<<<< HEAD -32a8d4707c7da27edf7c33d7fbf4017f1ca25ee3089d5a12bd54475e6a3380c0 -||||||| bdf410139 -2391ce74439f22b98429ba2b96b7738034cc9ab22e44e6483eaadfdfb238b7c9 -======= -1e26ae909c12e7c362dff0b1d9b2afbb1278c2dbfcac8aaec65b27d9da337f14 ->>>>>>> origin/main +3f445dcc596905fcfd600f42085e0392450c5acac938c1a66eaeef421d68f213 \ No newline at end of file diff --git a/internal/ent/csvgenerated/csv_generated.go b/internal/ent/csvgenerated/csv_generated.go index e7dfee7eb6..b85151d202 100644 --- a/internal/ent/csvgenerated/csv_generated.go +++ b/internal/ent/csvgenerated/csv_generated.go @@ -7,7 +7,6 @@ import ( "strings" "github.com/theopenlane/core/internal/ent/generated" - "github.com/theopenlane/core/internal/ent/generated/predicate" "github.com/theopenlane/core/internal/ent/generated/actionplan" "github.com/theopenlane/core/internal/ent/generated/asset" "github.com/theopenlane/core/internal/ent/generated/control" @@ -17,6 +16,7 @@ import ( "github.com/theopenlane/core/internal/ent/generated/identityholder" "github.com/theopenlane/core/internal/ent/generated/internalpolicy" "github.com/theopenlane/core/internal/ent/generated/platform" + "github.com/theopenlane/core/internal/ent/generated/predicate" "github.com/theopenlane/core/internal/ent/generated/procedure" "github.com/theopenlane/core/internal/ent/generated/risk" "github.com/theopenlane/core/internal/ent/generated/subcontrol" @@ -845,8 +845,7 @@ type CSVSchemaInfo struct { var CSVReferenceRegistry = map[string]CSVSchemaInfo{ "APIToken": { SchemaName: "APIToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "ActionPlan": { SchemaName: "ActionPlan", @@ -1000,8 +999,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Contact": { SchemaName: "Contact", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Control": { SchemaName: "Control", @@ -1074,28 +1072,23 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ControlImplementation": { SchemaName: "ControlImplementation", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "ControlObjective": { SchemaName: "ControlObjective", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "CustomDomain": { SchemaName: "CustomDomain", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "CustomTypeEnum": { SchemaName: "CustomTypeEnum", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DNSVerification": { SchemaName: "DNSVerification", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DirectoryAccount": { SchemaName: "DirectoryAccount", @@ -1112,38 +1105,31 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "DirectoryGroup": { SchemaName: "DirectoryGroup", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DirectoryMembership": { SchemaName: "DirectoryMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DirectorySyncRun": { SchemaName: "DirectorySyncRun", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Discussion": { SchemaName: "Discussion", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DocumentData": { SchemaName: "DocumentData", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "EmailBranding": { SchemaName: "EmailBranding", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "EmailTemplate": { SchemaName: "EmailTemplate", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Entity": { SchemaName: "Entity", @@ -1184,13 +1170,11 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "EntityType": { SchemaName: "EntityType", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Event": { SchemaName: "Event", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Evidence": { SchemaName: "Evidence", @@ -1207,43 +1191,35 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Export": { SchemaName: "Export", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "File": { SchemaName: "File", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Finding": { SchemaName: "Finding", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "FindingControl": { SchemaName: "FindingControl", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Group": { SchemaName: "Group", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "GroupMembership": { SchemaName: "GroupMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "GroupSetting": { SchemaName: "GroupSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Hush": { SchemaName: "Hush", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "IdentityHolder": { SchemaName: "IdentityHolder", @@ -1313,88 +1289,71 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Invite": { SchemaName: "Invite", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobResult": { SchemaName: "JobResult", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobRunner": { SchemaName: "JobRunner", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobRunnerRegistrationToken": { SchemaName: "JobRunnerRegistrationToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobRunnerToken": { SchemaName: "JobRunnerToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobTemplate": { SchemaName: "JobTemplate", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "MappableDomain": { SchemaName: "MappableDomain", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "MappedControl": { SchemaName: "MappedControl", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Narrative": { SchemaName: "Narrative", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Notification": { SchemaName: "Notification", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "NotificationPreference": { SchemaName: "NotificationPreference", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "NotificationTemplate": { SchemaName: "NotificationTemplate", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Onboarding": { SchemaName: "Onboarding", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "OrgMembership": { SchemaName: "OrgMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Organization": { SchemaName: "Organization", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "OrganizationSetting": { SchemaName: "OrganizationSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "PersonalAccessToken": { SchemaName: "PersonalAccessToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Platform": { SchemaName: "Platform", @@ -1557,8 +1516,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ProgramMembership": { SchemaName: "ProgramMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Remediation": { SchemaName: "Remediation", @@ -1665,8 +1623,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "SLADefinition": { SchemaName: "SLADefinition", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Scan": { SchemaName: "Scan", @@ -1744,13 +1701,11 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ScheduledJobRun": { SchemaName: "ScheduledJobRun", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Standard": { SchemaName: "Standard", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Subcontrol": { SchemaName: "Subcontrol", @@ -1823,28 +1778,23 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Subprocessor": { SchemaName: "Subprocessor", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Subscriber": { SchemaName: "Subscriber", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "SystemDetail": { SchemaName: "SystemDetail", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TFASetting": { SchemaName: "TFASetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TagDefinition": { SchemaName: "TagDefinition", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Task": { SchemaName: "Task", @@ -1877,63 +1827,51 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Template": { SchemaName: "Template", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenter": { SchemaName: "TrustCenter", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterCompliance": { SchemaName: "TrustCenterCompliance", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterDoc": { SchemaName: "TrustCenterDoc", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterEntity": { SchemaName: "TrustCenterEntity", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterFAQ": { SchemaName: "TrustCenterFAQ", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterNDARequest": { SchemaName: "TrustCenterNDARequest", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterSetting": { SchemaName: "TrustCenterSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterSubprocessor": { SchemaName: "TrustCenterSubprocessor", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterWatermarkConfig": { SchemaName: "TrustCenterWatermarkConfig", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "User": { SchemaName: "User", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "UserSetting": { SchemaName: "UserSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "VendorRiskScore": { SchemaName: "VendorRiskScore", @@ -1950,8 +1888,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "VendorScoringConfig": { SchemaName: "VendorScoringConfig", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Vulnerability": { SchemaName: "Vulnerability", @@ -1968,8 +1905,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "WorkflowDefinition": { SchemaName: "WorkflowDefinition", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, } @@ -2000,7 +1936,7 @@ func (APITokenCSVInput) CSVInputWrapper() {} // APITokenCSVUpdateInput wraps UpdateAPITokenInput with CSV reference columns for bulk updates. type APITokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateAPITokenInput } @@ -2009,10 +1945,10 @@ func (APITokenCSVUpdateInput) CSVInputWrapper() {} // ActionPlanCSVInput wraps CreateActionPlanInput with CSV reference columns. type ActionPlanCSVInput struct { - Input generated.CreateActionPlanInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + Input generated.CreateActionPlanInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks ActionPlanCSVInput for CSV header preprocessing. @@ -2021,11 +1957,11 @@ func (ActionPlanCSVInput) CSVInputWrapper() {} // ActionPlanCSVUpdateInput wraps UpdateActionPlanInput with CSV reference columns for bulk updates. type ActionPlanCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateActionPlanInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + ID string `csv:"ID"` + Input generated.UpdateActionPlanInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks ActionPlanCSVUpdateInput for CSV header preprocessing. @@ -2033,7 +1969,7 @@ func (ActionPlanCSVUpdateInput) CSVInputWrapper() {} // AssessmentCSVInput wraps CreateAssessmentInput with CSV reference columns. type AssessmentCSVInput struct { - Input generated.CreateAssessmentInput + Input generated.CreateAssessmentInput AssessmentTemplateRef string `csv:"AssessmentTemplateRef"` } @@ -2043,8 +1979,8 @@ func (AssessmentCSVInput) CSVInputWrapper() {} // AssessmentCSVUpdateInput wraps UpdateAssessmentInput with CSV reference columns for bulk updates. type AssessmentCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateAssessmentInput + ID string `csv:"ID"` + Input generated.UpdateAssessmentInput AssessmentTemplateRef string `csv:"AssessmentTemplateRef"` } @@ -2053,9 +1989,9 @@ func (AssessmentCSVUpdateInput) CSVInputWrapper() {} // AssessmentResponseCSVInput wraps CreateAssessmentResponseInput with CSV reference columns. type AssessmentResponseCSVInput struct { - Input generated.CreateAssessmentResponseInput + Input generated.CreateAssessmentResponseInput AssessmentIdentityHolderEmail string `csv:"AssessmentIdentityHolderEmail"` - AssessmentResponseEntityName string `csv:"AssessmentResponseEntityName"` + AssessmentResponseEntityName string `csv:"AssessmentResponseEntityName"` } // CSVInputWrapper marks AssessmentResponseCSVInput for CSV header preprocessing. @@ -2063,10 +1999,10 @@ func (AssessmentResponseCSVInput) CSVInputWrapper() {} // AssetCSVInput wraps CreateAssetInput with CSV reference columns. type AssetCSVInput struct { - Input generated.CreateAssetInput + Input generated.CreateAssetInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - SourcePlatformName string `csv:"SourcePlatformName"` + SourcePlatformName string `csv:"SourcePlatformName"` } // CSVInputWrapper marks AssetCSVInput for CSV header preprocessing. @@ -2075,11 +2011,11 @@ func (AssetCSVInput) CSVInputWrapper() {} // AssetCSVUpdateInput wraps UpdateAssetInput with CSV reference columns for bulk updates. type AssetCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateAssetInput + ID string `csv:"ID"` + Input generated.UpdateAssetInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - SourcePlatformName string `csv:"SourcePlatformName"` + SourcePlatformName string `csv:"SourcePlatformName"` } // CSVInputWrapper marks AssetCSVUpdateInput for CSV header preprocessing. @@ -2087,9 +2023,9 @@ func (AssetCSVUpdateInput) CSVInputWrapper() {} // CampaignCSVInput wraps CreateCampaignInput with CSV reference columns. type CampaignCSVInput struct { - Input generated.CreateCampaignInput - CampaignEntityName string `csv:"CampaignEntityName"` - CampaignTemplateRef string `csv:"CampaignTemplateRef"` + Input generated.CreateCampaignInput + CampaignEntityName string `csv:"CampaignEntityName"` + CampaignTemplateRef string `csv:"CampaignTemplateRef"` InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } @@ -2100,10 +2036,10 @@ func (CampaignCSVInput) CSVInputWrapper() {} // CampaignCSVUpdateInput wraps UpdateCampaignInput with CSV reference columns for bulk updates. type CampaignCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateCampaignInput - CampaignEntityName string `csv:"CampaignEntityName"` - CampaignTemplateRef string `csv:"CampaignTemplateRef"` + ID string `csv:"ID"` + Input generated.UpdateCampaignInput + CampaignEntityName string `csv:"CampaignEntityName"` + CampaignTemplateRef string `csv:"CampaignTemplateRef"` InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } @@ -2113,7 +2049,7 @@ func (CampaignCSVUpdateInput) CSVInputWrapper() {} // CampaignTargetCSVInput wraps CreateCampaignTargetInput with CSV reference columns. type CampaignTargetCSVInput struct { - Input generated.CreateCampaignTargetInput + Input generated.CreateCampaignTargetInput CampaignTargetGroupName string `csv:"CampaignTargetGroupName"` CampaignTargetUserEmail string `csv:"CampaignTargetUserEmail"` } @@ -2124,8 +2060,8 @@ func (CampaignTargetCSVInput) CSVInputWrapper() {} // CampaignTargetCSVUpdateInput wraps UpdateCampaignTargetInput with CSV reference columns for bulk updates. type CampaignTargetCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateCampaignTargetInput + ID string `csv:"ID"` + Input generated.UpdateCampaignTargetInput CampaignTargetGroupName string `csv:"CampaignTargetGroupName"` CampaignTargetUserEmail string `csv:"CampaignTargetUserEmail"` } @@ -2144,7 +2080,7 @@ func (ContactCSVInput) CSVInputWrapper() {} // ContactCSVUpdateInput wraps UpdateContactInput with CSV reference columns for bulk updates. type ContactCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateContactInput } @@ -2153,15 +2089,15 @@ func (ContactCSVUpdateInput) CSVInputWrapper() {} // ControlCSVInput wraps CreateControlInput with CSV reference columns. type ControlCSVInput struct { - Input generated.CreateControlInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + Input generated.CreateControlInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks ControlCSVInput for CSV header preprocessing. @@ -2170,16 +2106,16 @@ func (ControlCSVInput) CSVInputWrapper() {} // ControlCSVUpdateInput wraps UpdateControlInput with CSV reference columns for bulk updates. type ControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateControlInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + ID string `csv:"ID"` + Input generated.UpdateControlInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks ControlCSVUpdateInput for CSV header preprocessing. @@ -2196,7 +2132,7 @@ func (ControlImplementationCSVInput) CSVInputWrapper() {} // ControlImplementationCSVUpdateInput wraps UpdateControlImplementationInput with CSV reference columns for bulk updates. type ControlImplementationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateControlImplementationInput } @@ -2214,7 +2150,7 @@ func (ControlObjectiveCSVInput) CSVInputWrapper() {} // ControlObjectiveCSVUpdateInput wraps UpdateControlObjectiveInput with CSV reference columns for bulk updates. type ControlObjectiveCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateControlObjectiveInput } @@ -2232,7 +2168,7 @@ func (CustomDomainCSVInput) CSVInputWrapper() {} // CustomDomainCSVUpdateInput wraps UpdateCustomDomainInput with CSV reference columns for bulk updates. type CustomDomainCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateCustomDomainInput } @@ -2250,7 +2186,7 @@ func (CustomTypeEnumCSVInput) CSVInputWrapper() {} // CustomTypeEnumCSVUpdateInput wraps UpdateCustomTypeEnumInput with CSV reference columns for bulk updates. type CustomTypeEnumCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateCustomTypeEnumInput } @@ -2268,7 +2204,7 @@ func (DNSVerificationCSVInput) CSVInputWrapper() {} // DNSVerificationCSVUpdateInput wraps UpdateDNSVerificationInput with CSV reference columns for bulk updates. type DNSVerificationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDNSVerificationInput } @@ -2277,7 +2213,7 @@ func (DNSVerificationCSVUpdateInput) CSVInputWrapper() {} // DirectoryAccountCSVInput wraps CreateDirectoryAccountInput with CSV reference columns. type DirectoryAccountCSVInput struct { - Input generated.CreateDirectoryAccountInput + Input generated.CreateDirectoryAccountInput DirectoryAccountIdentityHolderEmail string `csv:"DirectoryAccountIdentityHolderEmail"` } @@ -2287,8 +2223,8 @@ func (DirectoryAccountCSVInput) CSVInputWrapper() {} // DirectoryAccountCSVUpdateInput wraps UpdateDirectoryAccountInput with CSV reference columns for bulk updates. type DirectoryAccountCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateDirectoryAccountInput + ID string `csv:"ID"` + Input generated.UpdateDirectoryAccountInput DirectoryAccountIdentityHolderEmail string `csv:"DirectoryAccountIdentityHolderEmail"` } @@ -2306,7 +2242,7 @@ func (DirectoryGroupCSVInput) CSVInputWrapper() {} // DirectoryGroupCSVUpdateInput wraps UpdateDirectoryGroupInput with CSV reference columns for bulk updates. type DirectoryGroupCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectoryGroupInput } @@ -2324,7 +2260,7 @@ func (DirectoryMembershipCSVInput) CSVInputWrapper() {} // DirectoryMembershipCSVUpdateInput wraps UpdateDirectoryMembershipInput with CSV reference columns for bulk updates. type DirectoryMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectoryMembershipInput } @@ -2342,7 +2278,7 @@ func (DirectorySyncRunCSVInput) CSVInputWrapper() {} // DirectorySyncRunCSVUpdateInput wraps UpdateDirectorySyncRunInput with CSV reference columns for bulk updates. type DirectorySyncRunCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectorySyncRunInput } @@ -2360,7 +2296,7 @@ func (DiscussionCSVInput) CSVInputWrapper() {} // DiscussionCSVUpdateInput wraps UpdateDiscussionInput with CSV reference columns for bulk updates. type DiscussionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDiscussionInput } @@ -2378,7 +2314,7 @@ func (DocumentDataCSVInput) CSVInputWrapper() {} // DocumentDataCSVUpdateInput wraps UpdateDocumentDataInput with CSV reference columns for bulk updates. type DocumentDataCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDocumentDataInput } @@ -2396,7 +2332,7 @@ func (EmailBrandingCSVInput) CSVInputWrapper() {} // EmailBrandingCSVUpdateInput wraps UpdateEmailBrandingInput with CSV reference columns for bulk updates. type EmailBrandingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEmailBrandingInput } @@ -2414,7 +2350,7 @@ func (EmailTemplateCSVInput) CSVInputWrapper() {} // EmailTemplateCSVUpdateInput wraps UpdateEmailTemplateInput with CSV reference columns for bulk updates. type EmailTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEmailTemplateInput } @@ -2423,11 +2359,11 @@ func (EmailTemplateCSVUpdateInput) CSVInputWrapper() {} // EntityCSVInput wraps CreateEntityInput with CSV reference columns. type EntityCSVInput struct { - Input generated.CreateEntityInput + Input generated.CreateEntityInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks EntityCSVInput for CSV header preprocessing. @@ -2436,12 +2372,12 @@ func (EntityCSVInput) CSVInputWrapper() {} // EntityCSVUpdateInput wraps UpdateEntityInput with CSV reference columns for bulk updates. type EntityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateEntityInput + ID string `csv:"ID"` + Input generated.UpdateEntityInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks EntityCSVUpdateInput for CSV header preprocessing. @@ -2458,7 +2394,7 @@ func (EntityTypeCSVInput) CSVInputWrapper() {} // EntityTypeCSVUpdateInput wraps UpdateEntityTypeInput with CSV reference columns for bulk updates. type EntityTypeCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEntityTypeInput } @@ -2476,7 +2412,7 @@ func (EventCSVInput) CSVInputWrapper() {} // EventCSVUpdateInput wraps UpdateEventInput with CSV reference columns for bulk updates. type EventCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEventInput } @@ -2485,7 +2421,7 @@ func (EventCSVUpdateInput) CSVInputWrapper() {} // EvidenceCSVInput wraps CreateEvidenceInput with CSV reference columns. type EvidenceCSVInput struct { - Input generated.CreateEvidenceInput + Input generated.CreateEvidenceInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -2495,8 +2431,8 @@ func (EvidenceCSVInput) CSVInputWrapper() {} // EvidenceCSVUpdateInput wraps UpdateEvidenceInput with CSV reference columns for bulk updates. type EvidenceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateEvidenceInput + ID string `csv:"ID"` + Input generated.UpdateEvidenceInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -2514,7 +2450,7 @@ func (ExportCSVInput) CSVInputWrapper() {} // ExportCSVUpdateInput wraps UpdateExportInput with CSV reference columns for bulk updates. type ExportCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateExportInput } @@ -2532,7 +2468,7 @@ func (FileCSVInput) CSVInputWrapper() {} // FileCSVUpdateInput wraps UpdateFileInput with CSV reference columns for bulk updates. type FileCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFileInput } @@ -2550,7 +2486,7 @@ func (FindingCSVInput) CSVInputWrapper() {} // FindingCSVUpdateInput wraps UpdateFindingInput with CSV reference columns for bulk updates. type FindingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFindingInput } @@ -2568,7 +2504,7 @@ func (FindingControlCSVInput) CSVInputWrapper() {} // FindingControlCSVUpdateInput wraps UpdateFindingControlInput with CSV reference columns for bulk updates. type FindingControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFindingControlInput } @@ -2586,7 +2522,7 @@ func (GroupCSVInput) CSVInputWrapper() {} // GroupCSVUpdateInput wraps UpdateGroupInput with CSV reference columns for bulk updates. type GroupCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupInput } @@ -2604,7 +2540,7 @@ func (GroupMembershipCSVInput) CSVInputWrapper() {} // GroupMembershipCSVUpdateInput wraps UpdateGroupMembershipInput with CSV reference columns for bulk updates. type GroupMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupMembershipInput } @@ -2622,7 +2558,7 @@ func (GroupSettingCSVInput) CSVInputWrapper() {} // GroupSettingCSVUpdateInput wraps UpdateGroupSettingInput with CSV reference columns for bulk updates. type GroupSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupSettingInput } @@ -2640,7 +2576,7 @@ func (HushCSVInput) CSVInputWrapper() {} // HushCSVUpdateInput wraps UpdateHushInput with CSV reference columns for bulk updates. type HushCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateHushInput } @@ -2649,11 +2585,11 @@ func (HushCSVUpdateInput) CSVInputWrapper() {} // IdentityHolderCSVInput wraps CreateIdentityHolderInput with CSV reference columns. type IdentityHolderCSVInput struct { - Input generated.CreateIdentityHolderInput - EmployerEntityName string `csv:"EmployerEntityName"` + Input generated.CreateIdentityHolderInput + EmployerEntityName string `csv:"EmployerEntityName"` IdentityHolderUserEmail string `csv:"IdentityHolderUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } // CSVInputWrapper marks IdentityHolderCSVInput for CSV header preprocessing. @@ -2662,12 +2598,12 @@ func (IdentityHolderCSVInput) CSVInputWrapper() {} // IdentityHolderCSVUpdateInput wraps UpdateIdentityHolderInput with CSV reference columns for bulk updates. type IdentityHolderCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateIdentityHolderInput - EmployerEntityName string `csv:"EmployerEntityName"` + ID string `csv:"ID"` + Input generated.UpdateIdentityHolderInput + EmployerEntityName string `csv:"EmployerEntityName"` IdentityHolderUserEmail string `csv:"IdentityHolderUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } // CSVInputWrapper marks IdentityHolderCSVUpdateInput for CSV header preprocessing. @@ -2675,10 +2611,10 @@ func (IdentityHolderCSVUpdateInput) CSVInputWrapper() {} // InternalPolicyCSVInput wraps CreateInternalPolicyInput with CSV reference columns. type InternalPolicyCSVInput struct { - Input generated.CreateInternalPolicyInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + Input generated.CreateInternalPolicyInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks InternalPolicyCSVInput for CSV header preprocessing. @@ -2687,11 +2623,11 @@ func (InternalPolicyCSVInput) CSVInputWrapper() {} // InternalPolicyCSVUpdateInput wraps UpdateInternalPolicyInput with CSV reference columns for bulk updates. type InternalPolicyCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateInternalPolicyInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + ID string `csv:"ID"` + Input generated.UpdateInternalPolicyInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks InternalPolicyCSVUpdateInput for CSV header preprocessing. @@ -2708,7 +2644,7 @@ func (InviteCSVInput) CSVInputWrapper() {} // InviteCSVUpdateInput wraps UpdateInviteInput with CSV reference columns for bulk updates. type InviteCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateInviteInput } @@ -2726,7 +2662,7 @@ func (JobResultCSVInput) CSVInputWrapper() {} // JobResultCSVUpdateInput wraps UpdateJobResultInput with CSV reference columns for bulk updates. type JobResultCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobResultInput } @@ -2744,7 +2680,7 @@ func (JobRunnerCSVInput) CSVInputWrapper() {} // JobRunnerCSVUpdateInput wraps UpdateJobRunnerInput with CSV reference columns for bulk updates. type JobRunnerCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerInput } @@ -2762,7 +2698,7 @@ func (JobRunnerRegistrationTokenCSVInput) CSVInputWrapper() {} // JobRunnerRegistrationTokenCSVUpdateInput wraps UpdateJobRunnerRegistrationTokenInput with CSV reference columns for bulk updates. type JobRunnerRegistrationTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerRegistrationTokenInput } @@ -2780,7 +2716,7 @@ func (JobRunnerTokenCSVInput) CSVInputWrapper() {} // JobRunnerTokenCSVUpdateInput wraps UpdateJobRunnerTokenInput with CSV reference columns for bulk updates. type JobRunnerTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerTokenInput } @@ -2798,7 +2734,7 @@ func (JobTemplateCSVInput) CSVInputWrapper() {} // JobTemplateCSVUpdateInput wraps UpdateJobTemplateInput with CSV reference columns for bulk updates. type JobTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobTemplateInput } @@ -2816,7 +2752,7 @@ func (MappableDomainCSVInput) CSVInputWrapper() {} // MappableDomainCSVUpdateInput wraps UpdateMappableDomainInput with CSV reference columns for bulk updates. type MappableDomainCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateMappableDomainInput } @@ -2834,7 +2770,7 @@ func (MappedControlCSVInput) CSVInputWrapper() {} // MappedControlCSVUpdateInput wraps UpdateMappedControlInput with CSV reference columns for bulk updates. type MappedControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateMappedControlInput } @@ -2852,7 +2788,7 @@ func (NarrativeCSVInput) CSVInputWrapper() {} // NarrativeCSVUpdateInput wraps UpdateNarrativeInput with CSV reference columns for bulk updates. type NarrativeCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNarrativeInput } @@ -2870,7 +2806,7 @@ func (NotificationCSVInput) CSVInputWrapper() {} // NotificationCSVUpdateInput wraps UpdateNotificationInput with CSV reference columns for bulk updates. type NotificationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationInput } @@ -2888,7 +2824,7 @@ func (NotificationPreferenceCSVInput) CSVInputWrapper() {} // NotificationPreferenceCSVUpdateInput wraps UpdateNotificationPreferenceInput with CSV reference columns for bulk updates. type NotificationPreferenceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationPreferenceInput } @@ -2906,7 +2842,7 @@ func (NotificationTemplateCSVInput) CSVInputWrapper() {} // NotificationTemplateCSVUpdateInput wraps UpdateNotificationTemplateInput with CSV reference columns for bulk updates. type NotificationTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationTemplateInput } @@ -2932,7 +2868,7 @@ func (OrgMembershipCSVInput) CSVInputWrapper() {} // OrgMembershipCSVUpdateInput wraps UpdateOrgMembershipInput with CSV reference columns for bulk updates. type OrgMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrgMembershipInput } @@ -2950,7 +2886,7 @@ func (OrganizationCSVInput) CSVInputWrapper() {} // OrganizationCSVUpdateInput wraps UpdateOrganizationInput with CSV reference columns for bulk updates. type OrganizationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrganizationInput } @@ -2968,7 +2904,7 @@ func (OrganizationSettingCSVInput) CSVInputWrapper() {} // OrganizationSettingCSVUpdateInput wraps UpdateOrganizationSettingInput with CSV reference columns for bulk updates. type OrganizationSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrganizationSettingInput } @@ -2986,7 +2922,7 @@ func (PersonalAccessTokenCSVInput) CSVInputWrapper() {} // PersonalAccessTokenCSVUpdateInput wraps UpdatePersonalAccessTokenInput with CSV reference columns for bulk updates. type PersonalAccessTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdatePersonalAccessTokenInput } @@ -2995,21 +2931,21 @@ func (PersonalAccessTokenCSVUpdateInput) CSVInputWrapper() {} // PlatformCSVInput wraps CreatePlatformInput with CSV reference columns. type PlatformCSVInput struct { - Input generated.CreatePlatformInput - BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` - BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` - OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` - PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` - SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` - SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` - SourceAssetNames []string `csv:"SourceAssetNames"` - SourceEntityNames []string `csv:"SourceEntityNames"` - SystemDetailNames []string `csv:"SystemDetailNames"` - TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` - TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` + Input generated.CreatePlatformInput + BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` + BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` + OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` + PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` + SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` + SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` + SourceAssetNames []string `csv:"SourceAssetNames"` + SourceEntityNames []string `csv:"SourceEntityNames"` + SystemDetailNames []string `csv:"SystemDetailNames"` + TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` + TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` } // CSVInputWrapper marks PlatformCSVInput for CSV header preprocessing. @@ -3018,22 +2954,22 @@ func (PlatformCSVInput) CSVInputWrapper() {} // PlatformCSVUpdateInput wraps UpdatePlatformInput with CSV reference columns for bulk updates. type PlatformCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdatePlatformInput - BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` - BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` - OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` - PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` - SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` - SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` - SourceAssetNames []string `csv:"SourceAssetNames"` - SourceEntityNames []string `csv:"SourceEntityNames"` - SystemDetailNames []string `csv:"SystemDetailNames"` - TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` - TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` + ID string `csv:"ID"` + Input generated.UpdatePlatformInput + BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` + BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` + OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` + PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` + SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` + SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` + SourceAssetNames []string `csv:"SourceAssetNames"` + SourceEntityNames []string `csv:"SourceEntityNames"` + SystemDetailNames []string `csv:"SystemDetailNames"` + TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` + TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` } // CSVInputWrapper marks PlatformCSVUpdateInput for CSV header preprocessing. @@ -3041,8 +2977,8 @@ func (PlatformCSVUpdateInput) CSVInputWrapper() {} // ProcedureCSVInput wraps CreateProcedureInput with CSV reference columns. type ProcedureCSVInput struct { - Input generated.CreateProcedureInput - ApproverGroupName string `csv:"ApproverGroupName"` + Input generated.CreateProcedureInput + ApproverGroupName string `csv:"ApproverGroupName"` DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } @@ -3052,9 +2988,9 @@ func (ProcedureCSVInput) CSVInputWrapper() {} // ProcedureCSVUpdateInput wraps UpdateProcedureInput with CSV reference columns for bulk updates. type ProcedureCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateProcedureInput - ApproverGroupName string `csv:"ApproverGroupName"` + ID string `csv:"ID"` + Input generated.UpdateProcedureInput + ApproverGroupName string `csv:"ApproverGroupName"` DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } @@ -3063,9 +2999,9 @@ func (ProcedureCSVUpdateInput) CSVInputWrapper() {} // ProgramCSVInput wraps CreateProgramInput with CSV reference columns. type ProgramCSVInput struct { - Input generated.CreateProgramInput - ControlRefCodes []string `csv:"ControlRefCodes"` - ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` + Input generated.CreateProgramInput + ControlRefCodes []string `csv:"ControlRefCodes"` + ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` } // CSVInputWrapper marks ProgramCSVInput for CSV header preprocessing. @@ -3074,10 +3010,10 @@ func (ProgramCSVInput) CSVInputWrapper() {} // ProgramCSVUpdateInput wraps UpdateProgramInput with CSV reference columns for bulk updates. type ProgramCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateProgramInput - ControlRefCodes []string `csv:"ControlRefCodes"` - ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` + ID string `csv:"ID"` + Input generated.UpdateProgramInput + ControlRefCodes []string `csv:"ControlRefCodes"` + ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` } // CSVInputWrapper marks ProgramCSVUpdateInput for CSV header preprocessing. @@ -3094,7 +3030,7 @@ func (ProgramMembershipCSVInput) CSVInputWrapper() {} // ProgramMembershipCSVUpdateInput wraps UpdateProgramMembershipInput with CSV reference columns for bulk updates. type ProgramMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateProgramMembershipInput } @@ -3103,8 +3039,8 @@ func (ProgramMembershipCSVUpdateInput) CSVInputWrapper() {} // RemediationCSVInput wraps CreateRemediationInput with CSV reference columns. type RemediationCSVInput struct { - Input generated.CreateRemediationInput - ControlRefCodes []string `csv:"ControlRefCodes"` + Input generated.CreateRemediationInput + ControlRefCodes []string `csv:"ControlRefCodes"` SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } @@ -3114,9 +3050,9 @@ func (RemediationCSVInput) CSVInputWrapper() {} // RemediationCSVUpdateInput wraps UpdateRemediationInput with CSV reference columns for bulk updates. type RemediationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateRemediationInput - ControlRefCodes []string `csv:"ControlRefCodes"` + ID string `csv:"ID"` + Input generated.UpdateRemediationInput + ControlRefCodes []string `csv:"ControlRefCodes"` SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } @@ -3125,7 +3061,7 @@ func (RemediationCSVUpdateInput) CSVInputWrapper() {} // ReviewCSVInput wraps CreateReviewInput with CSV reference columns. type ReviewCSVInput struct { - Input generated.CreateReviewInput + Input generated.CreateReviewInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3135,8 +3071,8 @@ func (ReviewCSVInput) CSVInputWrapper() {} // ReviewCSVUpdateInput wraps UpdateReviewInput with CSV reference columns for bulk updates. type ReviewCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateReviewInput + ID string `csv:"ID"` + Input generated.UpdateReviewInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3145,15 +3081,15 @@ func (ReviewCSVUpdateInput) CSVInputWrapper() {} // RiskCSVInput wraps CreateRiskInput with CSV reference columns. type RiskCSVInput struct { - Input generated.CreateRiskInput - ActionPlanNames []string `csv:"ActionPlanNames"` - AssetNames []string `csv:"AssetNames"` - ControlRefCodes []string `csv:"ControlRefCodes"` - EntityNames []string `csv:"EntityNames"` - PlatformNames []string `csv:"PlatformNames"` - RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` - StakeholderGroupName string `csv:"StakeholderGroupName"` - SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` + Input generated.CreateRiskInput + ActionPlanNames []string `csv:"ActionPlanNames"` + AssetNames []string `csv:"AssetNames"` + ControlRefCodes []string `csv:"ControlRefCodes"` + EntityNames []string `csv:"EntityNames"` + PlatformNames []string `csv:"PlatformNames"` + RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` + StakeholderGroupName string `csv:"StakeholderGroupName"` + SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } // CSVInputWrapper marks RiskCSVInput for CSV header preprocessing. @@ -3162,16 +3098,16 @@ func (RiskCSVInput) CSVInputWrapper() {} // RiskCSVUpdateInput wraps UpdateRiskInput with CSV reference columns for bulk updates. type RiskCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateRiskInput - ActionPlanNames []string `csv:"ActionPlanNames"` - AssetNames []string `csv:"AssetNames"` - ControlRefCodes []string `csv:"ControlRefCodes"` - EntityNames []string `csv:"EntityNames"` - PlatformNames []string `csv:"PlatformNames"` - RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` - StakeholderGroupName string `csv:"StakeholderGroupName"` - SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` + ID string `csv:"ID"` + Input generated.UpdateRiskInput + ActionPlanNames []string `csv:"ActionPlanNames"` + AssetNames []string `csv:"AssetNames"` + ControlRefCodes []string `csv:"ControlRefCodes"` + EntityNames []string `csv:"EntityNames"` + PlatformNames []string `csv:"PlatformNames"` + RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` + StakeholderGroupName string `csv:"StakeholderGroupName"` + SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } // CSVInputWrapper marks RiskCSVUpdateInput for CSV header preprocessing. @@ -3188,7 +3124,7 @@ func (SLADefinitionCSVInput) CSVInputWrapper() {} // SLADefinitionCSVUpdateInput wraps UpdateSLADefinitionInput with CSV reference columns for bulk updates. type SLADefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSLADefinitionInput } @@ -3197,14 +3133,14 @@ func (SLADefinitionCSVUpdateInput) CSVInputWrapper() {} // ScanCSVInput wraps CreateScanInput with CSV reference columns. type ScanCSVInput struct { - Input generated.CreateScanInput - AssignedToGroupName string `csv:"AssignedToGroupName"` - AssignedToUserEmail string `csv:"AssignedToUserEmail"` + Input generated.CreateScanInput + AssignedToGroupName string `csv:"AssignedToGroupName"` + AssignedToUserEmail string `csv:"AssignedToUserEmail"` GeneratedByPlatformName string `csv:"GeneratedByPlatformName"` - PerformedByGroupName string `csv:"PerformedByGroupName"` - PerformedByUserEmail string `csv:"PerformedByUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + PerformedByGroupName string `csv:"PerformedByGroupName"` + PerformedByUserEmail string `csv:"PerformedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks ScanCSVInput for CSV header preprocessing. @@ -3213,15 +3149,15 @@ func (ScanCSVInput) CSVInputWrapper() {} // ScanCSVUpdateInput wraps UpdateScanInput with CSV reference columns for bulk updates. type ScanCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateScanInput - AssignedToGroupName string `csv:"AssignedToGroupName"` - AssignedToUserEmail string `csv:"AssignedToUserEmail"` + ID string `csv:"ID"` + Input generated.UpdateScanInput + AssignedToGroupName string `csv:"AssignedToGroupName"` + AssignedToUserEmail string `csv:"AssignedToUserEmail"` GeneratedByPlatformName string `csv:"GeneratedByPlatformName"` - PerformedByGroupName string `csv:"PerformedByGroupName"` - PerformedByUserEmail string `csv:"PerformedByUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + PerformedByGroupName string `csv:"PerformedByGroupName"` + PerformedByUserEmail string `csv:"PerformedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks ScanCSVUpdateInput for CSV header preprocessing. @@ -3229,7 +3165,7 @@ func (ScanCSVUpdateInput) CSVInputWrapper() {} // ScheduledJobCSVInput wraps CreateScheduledJobInput with CSV reference columns. type ScheduledJobCSVInput struct { - Input generated.CreateScheduledJobInput + Input generated.CreateScheduledJobInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3239,8 +3175,8 @@ func (ScheduledJobCSVInput) CSVInputWrapper() {} // ScheduledJobCSVUpdateInput wraps UpdateScheduledJobInput with CSV reference columns for bulk updates. type ScheduledJobCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateScheduledJobInput + ID string `csv:"ID"` + Input generated.UpdateScheduledJobInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3258,7 +3194,7 @@ func (ScheduledJobRunCSVInput) CSVInputWrapper() {} // ScheduledJobRunCSVUpdateInput wraps UpdateScheduledJobRunInput with CSV reference columns for bulk updates. type ScheduledJobRunCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateScheduledJobRunInput } @@ -3276,7 +3212,7 @@ func (StandardCSVInput) CSVInputWrapper() {} // StandardCSVUpdateInput wraps UpdateStandardInput with CSV reference columns for bulk updates. type StandardCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateStandardInput } @@ -3285,15 +3221,15 @@ func (StandardCSVUpdateInput) CSVInputWrapper() {} // SubcontrolCSVInput wraps CreateSubcontrolInput with CSV reference columns. type SubcontrolCSVInput struct { - Input generated.CreateSubcontrolInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + Input generated.CreateSubcontrolInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks SubcontrolCSVInput for CSV header preprocessing. @@ -3302,16 +3238,16 @@ func (SubcontrolCSVInput) CSVInputWrapper() {} // SubcontrolCSVUpdateInput wraps UpdateSubcontrolInput with CSV reference columns for bulk updates. type SubcontrolCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateSubcontrolInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + ID string `csv:"ID"` + Input generated.UpdateSubcontrolInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks SubcontrolCSVUpdateInput for CSV header preprocessing. @@ -3328,7 +3264,7 @@ func (SubprocessorCSVInput) CSVInputWrapper() {} // SubprocessorCSVUpdateInput wraps UpdateSubprocessorInput with CSV reference columns for bulk updates. type SubprocessorCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSubprocessorInput } @@ -3346,7 +3282,7 @@ func (SubscriberCSVInput) CSVInputWrapper() {} // SubscriberCSVUpdateInput wraps UpdateSubscriberInput with CSV reference columns for bulk updates. type SubscriberCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSubscriberInput } @@ -3364,7 +3300,7 @@ func (SystemDetailCSVInput) CSVInputWrapper() {} // SystemDetailCSVUpdateInput wraps UpdateSystemDetailInput with CSV reference columns for bulk updates. type SystemDetailCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSystemDetailInput } @@ -3382,7 +3318,7 @@ func (TFASettingCSVInput) CSVInputWrapper() {} // TFASettingCSVUpdateInput wraps UpdateTFASettingInput with CSV reference columns for bulk updates. type TFASettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTFASettingInput } @@ -3400,7 +3336,7 @@ func (TagDefinitionCSVInput) CSVInputWrapper() {} // TagDefinitionCSVUpdateInput wraps UpdateTagDefinitionInput with CSV reference columns for bulk updates. type TagDefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTagDefinitionInput } @@ -3409,9 +3345,9 @@ func (TagDefinitionCSVUpdateInput) CSVInputWrapper() {} // TaskCSVInput wraps CreateTaskInput with CSV reference columns. type TaskCSVInput struct { - Input generated.CreateTaskInput - AssigneeEmail string `csv:"AssigneeEmail"` - AssignerEmail string `csv:"AssignerEmail"` + Input generated.CreateTaskInput + AssigneeEmail string `csv:"AssigneeEmail"` + AssignerEmail string `csv:"AssignerEmail"` ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3421,10 +3357,10 @@ func (TaskCSVInput) CSVInputWrapper() {} // TaskCSVUpdateInput wraps UpdateTaskInput with CSV reference columns for bulk updates. type TaskCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateTaskInput - AssigneeEmail string `csv:"AssigneeEmail"` - AssignerEmail string `csv:"AssignerEmail"` + ID string `csv:"ID"` + Input generated.UpdateTaskInput + AssigneeEmail string `csv:"AssigneeEmail"` + AssignerEmail string `csv:"AssignerEmail"` ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3442,7 +3378,7 @@ func (TemplateCSVInput) CSVInputWrapper() {} // TemplateCSVUpdateInput wraps UpdateTemplateInput with CSV reference columns for bulk updates. type TemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTemplateInput } @@ -3460,7 +3396,7 @@ func (TrustCenterCSVInput) CSVInputWrapper() {} // TrustCenterCSVUpdateInput wraps UpdateTrustCenterInput with CSV reference columns for bulk updates. type TrustCenterCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterInput } @@ -3478,7 +3414,7 @@ func (TrustCenterComplianceCSVInput) CSVInputWrapper() {} // TrustCenterComplianceCSVUpdateInput wraps UpdateTrustCenterComplianceInput with CSV reference columns for bulk updates. type TrustCenterComplianceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterComplianceInput } @@ -3496,7 +3432,7 @@ func (TrustCenterDocCSVInput) CSVInputWrapper() {} // TrustCenterDocCSVUpdateInput wraps UpdateTrustCenterDocInput with CSV reference columns for bulk updates. type TrustCenterDocCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterDocInput } @@ -3514,7 +3450,7 @@ func (TrustCenterEntityCSVInput) CSVInputWrapper() {} // TrustCenterEntityCSVUpdateInput wraps UpdateTrustCenterEntityInput with CSV reference columns for bulk updates. type TrustCenterEntityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterEntityInput } @@ -3532,7 +3468,7 @@ func (TrustCenterFAQCSVInput) CSVInputWrapper() {} // TrustCenterFAQCSVUpdateInput wraps UpdateTrustCenterFAQInput with CSV reference columns for bulk updates. type TrustCenterFAQCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterFAQInput } @@ -3550,7 +3486,7 @@ func (TrustCenterNDARequestCSVInput) CSVInputWrapper() {} // TrustCenterNDARequestCSVUpdateInput wraps UpdateTrustCenterNDARequestInput with CSV reference columns for bulk updates. type TrustCenterNDARequestCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterNDARequestInput } @@ -3568,7 +3504,7 @@ func (TrustCenterSettingCSVInput) CSVInputWrapper() {} // TrustCenterSettingCSVUpdateInput wraps UpdateTrustCenterSettingInput with CSV reference columns for bulk updates. type TrustCenterSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterSettingInput } @@ -3586,7 +3522,7 @@ func (TrustCenterSubprocessorCSVInput) CSVInputWrapper() {} // TrustCenterSubprocessorCSVUpdateInput wraps UpdateTrustCenterSubprocessorInput with CSV reference columns for bulk updates. type TrustCenterSubprocessorCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterSubprocessorInput } @@ -3604,7 +3540,7 @@ func (TrustCenterWatermarkConfigCSVInput) CSVInputWrapper() {} // TrustCenterWatermarkConfigCSVUpdateInput wraps UpdateTrustCenterWatermarkConfigInput with CSV reference columns for bulk updates. type TrustCenterWatermarkConfigCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterWatermarkConfigInput } @@ -3622,7 +3558,7 @@ func (UserCSVInput) CSVInputWrapper() {} // UserCSVUpdateInput wraps UpdateUserInput with CSV reference columns for bulk updates. type UserCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateUserInput } @@ -3640,7 +3576,7 @@ func (UserSettingCSVInput) CSVInputWrapper() {} // UserSettingCSVUpdateInput wraps UpdateUserSettingInput with CSV reference columns for bulk updates. type UserSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateUserSettingInput } @@ -3649,7 +3585,7 @@ func (UserSettingCSVUpdateInput) CSVInputWrapper() {} // VendorRiskScoreCSVInput wraps CreateVendorRiskScoreInput with CSV reference columns. type VendorRiskScoreCSVInput struct { - Input generated.CreateVendorRiskScoreInput + Input generated.CreateVendorRiskScoreInput VendorRiskScoreEntityName string `csv:"VendorRiskScoreEntityName"` } @@ -3659,8 +3595,8 @@ func (VendorRiskScoreCSVInput) CSVInputWrapper() {} // VendorRiskScoreCSVUpdateInput wraps UpdateVendorRiskScoreInput with CSV reference columns for bulk updates. type VendorRiskScoreCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateVendorRiskScoreInput + ID string `csv:"ID"` + Input generated.UpdateVendorRiskScoreInput VendorRiskScoreEntityName string `csv:"VendorRiskScoreEntityName"` } @@ -3678,7 +3614,7 @@ func (VendorScoringConfigCSVInput) CSVInputWrapper() {} // VendorScoringConfigCSVUpdateInput wraps UpdateVendorScoringConfigInput with CSV reference columns for bulk updates. type VendorScoringConfigCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateVendorScoringConfigInput } @@ -3687,7 +3623,7 @@ func (VendorScoringConfigCSVUpdateInput) CSVInputWrapper() {} // VulnerabilityCSVInput wraps CreateVulnerabilityInput with CSV reference columns. type VulnerabilityCSVInput struct { - Input generated.CreateVulnerabilityInput + Input generated.CreateVulnerabilityInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3697,8 +3633,8 @@ func (VulnerabilityCSVInput) CSVInputWrapper() {} // VulnerabilityCSVUpdateInput wraps UpdateVulnerabilityInput with CSV reference columns for bulk updates. type VulnerabilityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateVulnerabilityInput + ID string `csv:"ID"` + Input generated.UpdateVulnerabilityInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3716,7 +3652,7 @@ func (WorkflowDefinitionCSVInput) CSVInputWrapper() {} // WorkflowDefinitionCSVUpdateInput wraps UpdateWorkflowDefinitionInput with CSV reference columns for bulk updates. type WorkflowDefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateWorkflowDefinitionInput } diff --git a/internal/ent/generated/edge_cleanup.go b/internal/ent/generated/edge_cleanup.go index 3017a6bdef..5f4eeeedf1 100644 --- a/internal/ent/generated/edge_cleanup.go +++ b/internal/ent/generated/edge_cleanup.go @@ -2231,6 +2231,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).VendorScoringConfig.Query().Where(vendorscoringconfig.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying vendorscoringconfig ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := VendorScoringConfigEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up vendorscoringconfig edges") + return err + } + } + } if exists, err := FromContext(ctx).VendorScoringConfig.Query().Where((vendorscoringconfig.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if vendorscoringconfigCount, err := FromContext(ctx).VendorScoringConfig.Delete().Where(vendorscoringconfig.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", vendorscoringconfigCount).Msg("error deleting vendorscoringconfig") @@ -2238,6 +2251,19 @@ func OrganizationEdgeCleanup(ctx context.Context, id string) error { } } + { + ids, err := FromContext(ctx).VendorRiskScore.Query().Where(vendorriskscore.HasOwnerWith(organization.ID(id))).IDs(ctx) + if err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("error querying vendorriskscore ids for cleanup") + return err + } + for _, edgeID := range ids { + if err := VendorRiskScoreEdgeCleanup(ctx, edgeID); err != nil { + logx.FromContext(ctx).Error().Err(err).Str("id", edgeID).Msg("error cleaning up vendorriskscore edges") + return err + } + } + } if exists, err := FromContext(ctx).VendorRiskScore.Query().Where((vendorriskscore.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { if vendorriskscoreCount, err := FromContext(ctx).VendorRiskScore.Delete().Where(vendorriskscore.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { logx.FromContext(ctx).Error().Err(err).Int("count", vendorriskscoreCount).Msg("error deleting vendorriskscore") diff --git a/internal/ent/integrationgenerated/integration_mapping_generated.go b/internal/ent/integrationgenerated/integration_mapping_generated.go index 653d587495..3ab6a76075 100644 --- a/internal/ent/integrationgenerated/integration_mapping_generated.go +++ b/internal/ent/integrationgenerated/integration_mapping_generated.go @@ -6,25 +6,24 @@ import ( "github.com/theopenlane/core/pkg/gala" ) - // IntegrationMappingField describes an integration mapping target field type IntegrationMappingField struct { - InputKey string - GoField string - EntField string - Type string - Required bool + InputKey string + GoField string + EntField string + Type string + Required bool UpsertKey bool LookupKey bool } // IntegrationMappingSchema describes a schema with integration mapping fields type IntegrationMappingSchema struct { - Name string - Fields []IntegrationMappingField - AllowedKeys map[string]struct{} + Name string + Fields []IntegrationMappingField + AllowedKeys map[string]struct{} RequiredKeys []string - UpsertKeys []string + UpsertKeys []string StockPersist bool } @@ -33,45 +32,45 @@ type IntegrationIngestSource string const ( IntegrationIngestSourceOperation IntegrationIngestSource = "operation" - IntegrationIngestSourceWorkflow IntegrationIngestSource = "workflow" - IntegrationIngestSourceWebhook IntegrationIngestSource = "webhook" - IntegrationIngestSourceDirect IntegrationIngestSource = "direct" + IntegrationIngestSourceWorkflow IntegrationIngestSource = "workflow" + IntegrationIngestSourceWebhook IntegrationIngestSource = "webhook" + IntegrationIngestSourceDirect IntegrationIngestSource = "direct" ) // IntegrationIngestMetadata captures source-agnostic execution context for second-stage ingest handlers type IntegrationIngestMetadata struct { - IntegrationID string `json:"integrationId"` - DefinitionID string `json:"definitionId,omitempty"` - Operation string `json:"operation,omitempty"` - Variant string `json:"variant,omitempty"` - Source IntegrationIngestSource `json:"source,omitempty"` - RunID string `json:"runId,omitempty"` - Webhook string `json:"webhook,omitempty"` - WebhookEvent string `json:"webhookEvent,omitempty"` - DeliveryID string `json:"deliveryId,omitempty"` - WorkflowInstanceID string `json:"workflowInstanceId,omitempty"` - WorkflowActionKey string `json:"workflowActionKey,omitempty"` - WorkflowActionIndex int `json:"workflowActionIndex,omitempty"` - WorkflowObjectID string `json:"workflowObjectId,omitempty"` - WorkflowObjectType string `json:"workflowObjectType,omitempty"` + IntegrationID string `json:"integrationId"` + DefinitionID string `json:"definitionId,omitempty"` + Operation string `json:"operation,omitempty"` + Variant string `json:"variant,omitempty"` + Source IntegrationIngestSource `json:"source,omitempty"` + RunID string `json:"runId,omitempty"` + Webhook string `json:"webhook,omitempty"` + WebhookEvent string `json:"webhookEvent,omitempty"` + DeliveryID string `json:"deliveryId,omitempty"` + WorkflowInstanceID string `json:"workflowInstanceId,omitempty"` + WorkflowActionKey string `json:"workflowActionKey,omitempty"` + WorkflowActionIndex int `json:"workflowActionIndex,omitempty"` + WorkflowObjectID string `json:"workflowObjectId,omitempty"` + WorkflowObjectType string `json:"workflowObjectType,omitempty"` } const ( - IntegrationMappingSchemaAsset = "Asset" - IntegrationMappingSchemaContact = "Contact" - IntegrationMappingSchemaDirectoryAccount = "DirectoryAccount" - IntegrationMappingSchemaDirectoryGroup = "DirectoryGroup" + IntegrationMappingSchemaAsset = "Asset" + IntegrationMappingSchemaContact = "Contact" + IntegrationMappingSchemaDirectoryAccount = "DirectoryAccount" + IntegrationMappingSchemaDirectoryGroup = "DirectoryGroup" IntegrationMappingSchemaDirectoryMembership = "DirectoryMembership" - IntegrationMappingSchemaEntity = "Entity" - IntegrationMappingSchemaFinding = "Finding" - IntegrationMappingSchemaRisk = "Risk" - IntegrationMappingSchemaVulnerability = "Vulnerability" + IntegrationMappingSchemaEntity = "Entity" + IntegrationMappingSchemaFinding = "Finding" + IntegrationMappingSchemaRisk = "Risk" + IntegrationMappingSchemaVulnerability = "Vulnerability" ) // IntegrationIngestAssetRequested is the typed second-stage ingest contract for Asset records type IntegrationIngestAssetRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateAssetInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateAssetInput `json:"input"` } // IntegrationIngestAssetRequestedTopic is the typed Gala topic for Asset ingest requests @@ -81,8 +80,8 @@ var IntegrationIngestAssetRequestedTopic = gala.Topic[IntegrationIngestAssetRequ // IntegrationIngestContactRequested is the typed second-stage ingest contract for Contact records type IntegrationIngestContactRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateContactInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateContactInput `json:"input"` } // IntegrationIngestContactRequestedTopic is the typed Gala topic for Contact ingest requests @@ -92,8 +91,8 @@ var IntegrationIngestContactRequestedTopic = gala.Topic[IntegrationIngestContact // IntegrationIngestDirectoryAccountRequested is the typed second-stage ingest contract for DirectoryAccount records type IntegrationIngestDirectoryAccountRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryAccountInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryAccountInput `json:"input"` } // IntegrationIngestDirectoryAccountRequestedTopic is the typed Gala topic for DirectoryAccount ingest requests @@ -103,8 +102,8 @@ var IntegrationIngestDirectoryAccountRequestedTopic = gala.Topic[IntegrationInge // IntegrationIngestDirectoryGroupRequested is the typed second-stage ingest contract for DirectoryGroup records type IntegrationIngestDirectoryGroupRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryGroupInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryGroupInput `json:"input"` } // IntegrationIngestDirectoryGroupRequestedTopic is the typed Gala topic for DirectoryGroup ingest requests @@ -114,8 +113,8 @@ var IntegrationIngestDirectoryGroupRequestedTopic = gala.Topic[IntegrationIngest // IntegrationIngestDirectoryMembershipRequested is the typed second-stage ingest contract for DirectoryMembership records type IntegrationIngestDirectoryMembershipRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryMembershipInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryMembershipInput `json:"input"` } // IntegrationIngestDirectoryMembershipRequestedTopic is the typed Gala topic for DirectoryMembership ingest requests @@ -125,8 +124,8 @@ var IntegrationIngestDirectoryMembershipRequestedTopic = gala.Topic[IntegrationI // IntegrationIngestEntityRequested is the typed second-stage ingest contract for Entity records type IntegrationIngestEntityRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateEntityInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateEntityInput `json:"input"` } // IntegrationIngestEntityRequestedTopic is the typed Gala topic for Entity ingest requests @@ -136,8 +135,8 @@ var IntegrationIngestEntityRequestedTopic = gala.Topic[IntegrationIngestEntityRe // IntegrationIngestFindingRequested is the typed second-stage ingest contract for Finding records type IntegrationIngestFindingRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateFindingInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateFindingInput `json:"input"` } // IntegrationIngestFindingRequestedTopic is the typed Gala topic for Finding ingest requests @@ -148,7 +147,7 @@ var IntegrationIngestFindingRequestedTopic = gala.Topic[IntegrationIngestFinding // IntegrationIngestRiskRequested is the typed second-stage ingest contract for Risk records type IntegrationIngestRiskRequested struct { Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateRiskInput `json:"input"` + Input generated.CreateRiskInput `json:"input"` } // IntegrationIngestRiskRequestedTopic is the typed Gala topic for Risk ingest requests @@ -158,8 +157,8 @@ var IntegrationIngestRiskRequestedTopic = gala.Topic[IntegrationIngestRiskReques // IntegrationIngestVulnerabilityRequested is the typed second-stage ingest contract for Vulnerability records type IntegrationIngestVulnerabilityRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateVulnerabilityInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateVulnerabilityInput `json:"input"` } // IntegrationIngestVulnerabilityRequestedTopic is the typed Gala topic for Vulnerability ingest requests @@ -169,349 +168,349 @@ var IntegrationIngestVulnerabilityRequestedTopic = gala.Topic[IntegrationIngestV // Integration mapping keys for Asset. const ( - IntegrationMappingAssetAccessModelID = "accessModelID" - IntegrationMappingAssetAccessModelName = "accessModelName" - IntegrationMappingAssetAssetDataClassificationID = "assetDataClassificationID" + IntegrationMappingAssetAccessModelID = "accessModelID" + IntegrationMappingAssetAccessModelName = "accessModelName" + IntegrationMappingAssetAssetDataClassificationID = "assetDataClassificationID" IntegrationMappingAssetAssetDataClassificationName = "assetDataClassificationName" - IntegrationMappingAssetAssetSubtypeID = "assetSubtypeID" - IntegrationMappingAssetAssetSubtypeName = "assetSubtypeName" - IntegrationMappingAssetAssetType = "assetType" - IntegrationMappingAssetCategories = "categories" - IntegrationMappingAssetContainsPii = "containsPii" - IntegrationMappingAssetCostCenter = "costCenter" - IntegrationMappingAssetCriticalityID = "criticalityID" - IntegrationMappingAssetCriticalityName = "criticalityName" - IntegrationMappingAssetDescription = "description" - IntegrationMappingAssetDisplayName = "displayName" - IntegrationMappingAssetEncryptionStatusID = "encryptionStatusID" - IntegrationMappingAssetEncryptionStatusName = "encryptionStatusName" - IntegrationMappingAssetEnvironmentID = "environmentID" - IntegrationMappingAssetEnvironmentName = "environmentName" - IntegrationMappingAssetEstimatedMonthlyCost = "estimatedMonthlyCost" - IntegrationMappingAssetIdentifier = "identifier" - IntegrationMappingAssetIntegrationID = "integrationID" - IntegrationMappingAssetInternalNotes = "internalNotes" - IntegrationMappingAssetInternalOwner = "internalOwner" - IntegrationMappingAssetInternalOwnerGroupID = "internalOwnerGroupID" - IntegrationMappingAssetInternalOwnerUserID = "internalOwnerUserID" - IntegrationMappingAssetName = "name" - IntegrationMappingAssetObservedAt = "observedAt" - IntegrationMappingAssetOwnerID = "ownerID" - IntegrationMappingAssetPhysicalLocation = "physicalLocation" - IntegrationMappingAssetPurchaseDate = "purchaseDate" - IntegrationMappingAssetRegion = "region" - IntegrationMappingAssetScopeID = "scopeID" - IntegrationMappingAssetScopeName = "scopeName" - IntegrationMappingAssetSecurityTierID = "securityTierID" - IntegrationMappingAssetSecurityTierName = "securityTierName" - IntegrationMappingAssetSourceIdentifier = "sourceIdentifier" - IntegrationMappingAssetSourceType = "sourceType" - IntegrationMappingAssetSystemInternalID = "systemInternalID" - IntegrationMappingAssetTags = "tags" - IntegrationMappingAssetWebsite = "website" + IntegrationMappingAssetAssetSubtypeID = "assetSubtypeID" + IntegrationMappingAssetAssetSubtypeName = "assetSubtypeName" + IntegrationMappingAssetAssetType = "assetType" + IntegrationMappingAssetCategories = "categories" + IntegrationMappingAssetContainsPii = "containsPii" + IntegrationMappingAssetCostCenter = "costCenter" + IntegrationMappingAssetCriticalityID = "criticalityID" + IntegrationMappingAssetCriticalityName = "criticalityName" + IntegrationMappingAssetDescription = "description" + IntegrationMappingAssetDisplayName = "displayName" + IntegrationMappingAssetEncryptionStatusID = "encryptionStatusID" + IntegrationMappingAssetEncryptionStatusName = "encryptionStatusName" + IntegrationMappingAssetEnvironmentID = "environmentID" + IntegrationMappingAssetEnvironmentName = "environmentName" + IntegrationMappingAssetEstimatedMonthlyCost = "estimatedMonthlyCost" + IntegrationMappingAssetIdentifier = "identifier" + IntegrationMappingAssetIntegrationID = "integrationID" + IntegrationMappingAssetInternalNotes = "internalNotes" + IntegrationMappingAssetInternalOwner = "internalOwner" + IntegrationMappingAssetInternalOwnerGroupID = "internalOwnerGroupID" + IntegrationMappingAssetInternalOwnerUserID = "internalOwnerUserID" + IntegrationMappingAssetName = "name" + IntegrationMappingAssetObservedAt = "observedAt" + IntegrationMappingAssetOwnerID = "ownerID" + IntegrationMappingAssetPhysicalLocation = "physicalLocation" + IntegrationMappingAssetPurchaseDate = "purchaseDate" + IntegrationMappingAssetRegion = "region" + IntegrationMappingAssetScopeID = "scopeID" + IntegrationMappingAssetScopeName = "scopeName" + IntegrationMappingAssetSecurityTierID = "securityTierID" + IntegrationMappingAssetSecurityTierName = "securityTierName" + IntegrationMappingAssetSourceIdentifier = "sourceIdentifier" + IntegrationMappingAssetSourceType = "sourceType" + IntegrationMappingAssetSystemInternalID = "systemInternalID" + IntegrationMappingAssetTags = "tags" + IntegrationMappingAssetWebsite = "website" ) // Integration mapping keys for Contact. const ( - IntegrationMappingContactAddress = "address" - IntegrationMappingContactCompany = "company" - IntegrationMappingContactEmail = "email" - IntegrationMappingContactExternalID = "externalID" - IntegrationMappingContactFullName = "fullName" + IntegrationMappingContactAddress = "address" + IntegrationMappingContactCompany = "company" + IntegrationMappingContactEmail = "email" + IntegrationMappingContactExternalID = "externalID" + IntegrationMappingContactFullName = "fullName" IntegrationMappingContactIntegrationID = "integrationID" - IntegrationMappingContactObservedAt = "observedAt" - IntegrationMappingContactPhoneNumber = "phoneNumber" - IntegrationMappingContactStatus = "status" - IntegrationMappingContactTags = "tags" - IntegrationMappingContactTitle = "title" + IntegrationMappingContactObservedAt = "observedAt" + IntegrationMappingContactPhoneNumber = "phoneNumber" + IntegrationMappingContactStatus = "status" + IntegrationMappingContactTags = "tags" + IntegrationMappingContactTitle = "title" ) // Integration mapping keys for DirectoryAccount. const ( - IntegrationMappingDirectoryAccountAccountType = "accountType" - IntegrationMappingDirectoryAccountAddedAt = "addedAt" - IntegrationMappingDirectoryAccountAvatarRemoteURL = "avatarRemoteURL" - IntegrationMappingDirectoryAccountAvatarUpdatedAt = "avatarUpdatedAt" - IntegrationMappingDirectoryAccountCanonicalEmail = "canonicalEmail" - IntegrationMappingDirectoryAccountDepartment = "department" + IntegrationMappingDirectoryAccountAccountType = "accountType" + IntegrationMappingDirectoryAccountAddedAt = "addedAt" + IntegrationMappingDirectoryAccountAvatarRemoteURL = "avatarRemoteURL" + IntegrationMappingDirectoryAccountAvatarUpdatedAt = "avatarUpdatedAt" + IntegrationMappingDirectoryAccountCanonicalEmail = "canonicalEmail" + IntegrationMappingDirectoryAccountDepartment = "department" IntegrationMappingDirectoryAccountDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryAccountDirectoryName = "directoryName" - IntegrationMappingDirectoryAccountDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryAccountDisplayName = "displayName" - IntegrationMappingDirectoryAccountEnvironmentID = "environmentID" - IntegrationMappingDirectoryAccountEnvironmentName = "environmentName" - IntegrationMappingDirectoryAccountExternalID = "externalID" - IntegrationMappingDirectoryAccountFamilyName = "familyName" - IntegrationMappingDirectoryAccountFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryAccountGivenName = "givenName" - IntegrationMappingDirectoryAccountIdentityHolderID = "identityHolderID" - IntegrationMappingDirectoryAccountIntegrationID = "integrationID" - IntegrationMappingDirectoryAccountJobTitle = "jobTitle" - IntegrationMappingDirectoryAccountLastLoginAt = "lastLoginAt" - IntegrationMappingDirectoryAccountLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryAccountLastSeenIP = "lastSeenIP" - IntegrationMappingDirectoryAccountMetadata = "metadata" - IntegrationMappingDirectoryAccountMfaState = "mfaState" - IntegrationMappingDirectoryAccountObservedAt = "observedAt" - IntegrationMappingDirectoryAccountOrganizationUnit = "organizationUnit" - IntegrationMappingDirectoryAccountPlatformID = "platformID" - IntegrationMappingDirectoryAccountPrimarySource = "primarySource" - IntegrationMappingDirectoryAccountProfile = "profile" - IntegrationMappingDirectoryAccountProfileHash = "profileHash" - IntegrationMappingDirectoryAccountRemovedAt = "removedAt" - IntegrationMappingDirectoryAccountScopeID = "scopeID" - IntegrationMappingDirectoryAccountScopeName = "scopeName" - IntegrationMappingDirectoryAccountSecondaryKey = "secondaryKey" - IntegrationMappingDirectoryAccountSourceVersion = "sourceVersion" - IntegrationMappingDirectoryAccountStatus = "status" - IntegrationMappingDirectoryAccountTags = "tags" + IntegrationMappingDirectoryAccountDirectoryName = "directoryName" + IntegrationMappingDirectoryAccountDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryAccountDisplayName = "displayName" + IntegrationMappingDirectoryAccountEnvironmentID = "environmentID" + IntegrationMappingDirectoryAccountEnvironmentName = "environmentName" + IntegrationMappingDirectoryAccountExternalID = "externalID" + IntegrationMappingDirectoryAccountFamilyName = "familyName" + IntegrationMappingDirectoryAccountFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryAccountGivenName = "givenName" + IntegrationMappingDirectoryAccountIdentityHolderID = "identityHolderID" + IntegrationMappingDirectoryAccountIntegrationID = "integrationID" + IntegrationMappingDirectoryAccountJobTitle = "jobTitle" + IntegrationMappingDirectoryAccountLastLoginAt = "lastLoginAt" + IntegrationMappingDirectoryAccountLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryAccountLastSeenIP = "lastSeenIP" + IntegrationMappingDirectoryAccountMetadata = "metadata" + IntegrationMappingDirectoryAccountMfaState = "mfaState" + IntegrationMappingDirectoryAccountObservedAt = "observedAt" + IntegrationMappingDirectoryAccountOrganizationUnit = "organizationUnit" + IntegrationMappingDirectoryAccountPlatformID = "platformID" + IntegrationMappingDirectoryAccountPrimarySource = "primarySource" + IntegrationMappingDirectoryAccountProfile = "profile" + IntegrationMappingDirectoryAccountProfileHash = "profileHash" + IntegrationMappingDirectoryAccountRemovedAt = "removedAt" + IntegrationMappingDirectoryAccountScopeID = "scopeID" + IntegrationMappingDirectoryAccountScopeName = "scopeName" + IntegrationMappingDirectoryAccountSecondaryKey = "secondaryKey" + IntegrationMappingDirectoryAccountSourceVersion = "sourceVersion" + IntegrationMappingDirectoryAccountStatus = "status" + IntegrationMappingDirectoryAccountTags = "tags" ) // Integration mapping keys for DirectoryGroup. const ( - IntegrationMappingDirectoryGroupAddedAt = "addedAt" - IntegrationMappingDirectoryGroupClassification = "classification" - IntegrationMappingDirectoryGroupDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryGroupDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryGroupDisplayName = "displayName" - IntegrationMappingDirectoryGroupEmail = "email" - IntegrationMappingDirectoryGroupEnvironmentID = "environmentID" - IntegrationMappingDirectoryGroupEnvironmentName = "environmentName" - IntegrationMappingDirectoryGroupExternalID = "externalID" + IntegrationMappingDirectoryGroupAddedAt = "addedAt" + IntegrationMappingDirectoryGroupClassification = "classification" + IntegrationMappingDirectoryGroupDirectoryInstanceID = "directoryInstanceID" + IntegrationMappingDirectoryGroupDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryGroupDisplayName = "displayName" + IntegrationMappingDirectoryGroupEmail = "email" + IntegrationMappingDirectoryGroupEnvironmentID = "environmentID" + IntegrationMappingDirectoryGroupEnvironmentName = "environmentName" + IntegrationMappingDirectoryGroupExternalID = "externalID" IntegrationMappingDirectoryGroupExternalSharingAllowed = "externalSharingAllowed" - IntegrationMappingDirectoryGroupFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryGroupIntegrationID = "integrationID" - IntegrationMappingDirectoryGroupLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryGroupMemberCount = "memberCount" - IntegrationMappingDirectoryGroupMetadata = "metadata" - IntegrationMappingDirectoryGroupObservedAt = "observedAt" - IntegrationMappingDirectoryGroupPlatformID = "platformID" - IntegrationMappingDirectoryGroupProfile = "profile" - IntegrationMappingDirectoryGroupProfileHash = "profileHash" - IntegrationMappingDirectoryGroupRemovedAt = "removedAt" - IntegrationMappingDirectoryGroupScopeID = "scopeID" - IntegrationMappingDirectoryGroupScopeName = "scopeName" - IntegrationMappingDirectoryGroupSourceVersion = "sourceVersion" - IntegrationMappingDirectoryGroupStatus = "status" - IntegrationMappingDirectoryGroupTags = "tags" + IntegrationMappingDirectoryGroupFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryGroupIntegrationID = "integrationID" + IntegrationMappingDirectoryGroupLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryGroupMemberCount = "memberCount" + IntegrationMappingDirectoryGroupMetadata = "metadata" + IntegrationMappingDirectoryGroupObservedAt = "observedAt" + IntegrationMappingDirectoryGroupPlatformID = "platformID" + IntegrationMappingDirectoryGroupProfile = "profile" + IntegrationMappingDirectoryGroupProfileHash = "profileHash" + IntegrationMappingDirectoryGroupRemovedAt = "removedAt" + IntegrationMappingDirectoryGroupScopeID = "scopeID" + IntegrationMappingDirectoryGroupScopeName = "scopeName" + IntegrationMappingDirectoryGroupSourceVersion = "sourceVersion" + IntegrationMappingDirectoryGroupStatus = "status" + IntegrationMappingDirectoryGroupTags = "tags" ) // Integration mapping keys for DirectoryMembership. const ( - IntegrationMappingDirectoryMembershipAddedAt = "addedAt" - IntegrationMappingDirectoryMembershipDirectoryAccountID = "directoryAccountID" - IntegrationMappingDirectoryMembershipDirectoryGroupID = "directoryGroupID" + IntegrationMappingDirectoryMembershipAddedAt = "addedAt" + IntegrationMappingDirectoryMembershipDirectoryAccountID = "directoryAccountID" + IntegrationMappingDirectoryMembershipDirectoryGroupID = "directoryGroupID" IntegrationMappingDirectoryMembershipDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryMembershipDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryMembershipEnvironmentID = "environmentID" - IntegrationMappingDirectoryMembershipEnvironmentName = "environmentName" - IntegrationMappingDirectoryMembershipFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryMembershipIntegrationID = "integrationID" - IntegrationMappingDirectoryMembershipLastConfirmedRunID = "lastConfirmedRunID" - IntegrationMappingDirectoryMembershipLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryMembershipMetadata = "metadata" - IntegrationMappingDirectoryMembershipObservedAt = "observedAt" - IntegrationMappingDirectoryMembershipPlatformID = "platformID" - IntegrationMappingDirectoryMembershipRemovedAt = "removedAt" - IntegrationMappingDirectoryMembershipRole = "role" - IntegrationMappingDirectoryMembershipScopeID = "scopeID" - IntegrationMappingDirectoryMembershipScopeName = "scopeName" - IntegrationMappingDirectoryMembershipSource = "source" + IntegrationMappingDirectoryMembershipDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryMembershipEnvironmentID = "environmentID" + IntegrationMappingDirectoryMembershipEnvironmentName = "environmentName" + IntegrationMappingDirectoryMembershipFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryMembershipIntegrationID = "integrationID" + IntegrationMappingDirectoryMembershipLastConfirmedRunID = "lastConfirmedRunID" + IntegrationMappingDirectoryMembershipLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryMembershipMetadata = "metadata" + IntegrationMappingDirectoryMembershipObservedAt = "observedAt" + IntegrationMappingDirectoryMembershipPlatformID = "platformID" + IntegrationMappingDirectoryMembershipRemovedAt = "removedAt" + IntegrationMappingDirectoryMembershipRole = "role" + IntegrationMappingDirectoryMembershipScopeID = "scopeID" + IntegrationMappingDirectoryMembershipScopeName = "scopeName" + IntegrationMappingDirectoryMembershipSource = "source" ) // Integration mapping keys for Entity. const ( - IntegrationMappingEntityAnnualSpend = "annualSpend" - IntegrationMappingEntityApprovedForUse = "approvedForUse" - IntegrationMappingEntityAutoRenews = "autoRenews" - IntegrationMappingEntityBillingModel = "billingModel" - IntegrationMappingEntityContractEndDate = "contractEndDate" - IntegrationMappingEntityContractRenewalAt = "contractRenewalAt" - IntegrationMappingEntityContractStartDate = "contractStartDate" - IntegrationMappingEntityDisplayName = "displayName" - IntegrationMappingEntityDomains = "domains" - IntegrationMappingEntityEntityRelationshipStateID = "entityRelationshipStateID" - IntegrationMappingEntityEntityRelationshipStateName = "entityRelationshipStateName" - IntegrationMappingEntityEntitySecurityQuestionnaireStatusID = "entitySecurityQuestionnaireStatusID" + IntegrationMappingEntityAnnualSpend = "annualSpend" + IntegrationMappingEntityApprovedForUse = "approvedForUse" + IntegrationMappingEntityAutoRenews = "autoRenews" + IntegrationMappingEntityBillingModel = "billingModel" + IntegrationMappingEntityContractEndDate = "contractEndDate" + IntegrationMappingEntityContractRenewalAt = "contractRenewalAt" + IntegrationMappingEntityContractStartDate = "contractStartDate" + IntegrationMappingEntityDisplayName = "displayName" + IntegrationMappingEntityDomains = "domains" + IntegrationMappingEntityEntityRelationshipStateID = "entityRelationshipStateID" + IntegrationMappingEntityEntityRelationshipStateName = "entityRelationshipStateName" + IntegrationMappingEntityEntitySecurityQuestionnaireStatusID = "entitySecurityQuestionnaireStatusID" IntegrationMappingEntityEntitySecurityQuestionnaireStatusName = "entitySecurityQuestionnaireStatusName" - IntegrationMappingEntityEntitySourceTypeID = "entitySourceTypeID" - IntegrationMappingEntityEntitySourceTypeName = "entitySourceTypeName" - IntegrationMappingEntityEnvironmentID = "environmentID" - IntegrationMappingEntityEnvironmentName = "environmentName" - IntegrationMappingEntityExternalID = "externalID" - IntegrationMappingEntityHasSoc2 = "hasSoc2" - IntegrationMappingEntityInternalNotes = "internalNotes" - IntegrationMappingEntityInternalOwner = "internalOwner" - IntegrationMappingEntityInternalOwnerGroupID = "internalOwnerGroupID" - IntegrationMappingEntityInternalOwnerUserID = "internalOwnerUserID" - IntegrationMappingEntityLastReviewedAt = "lastReviewedAt" - IntegrationMappingEntityLinks = "links" - IntegrationMappingEntityMfaEnforced = "mfaEnforced" - IntegrationMappingEntityMfaSupported = "mfaSupported" - IntegrationMappingEntityName = "name" - IntegrationMappingEntityNextReviewAt = "nextReviewAt" - IntegrationMappingEntityObservedAt = "observedAt" - IntegrationMappingEntityOwnerID = "ownerID" - IntegrationMappingEntityProvidedServices = "providedServices" - IntegrationMappingEntityRenewalRisk = "renewalRisk" - IntegrationMappingEntityReviewFrequency = "reviewFrequency" - IntegrationMappingEntityReviewedBy = "reviewedBy" - IntegrationMappingEntityReviewedByGroupID = "reviewedByGroupID" - IntegrationMappingEntityReviewedByUserID = "reviewedByUserID" - IntegrationMappingEntityRiskRating = "riskRating" - IntegrationMappingEntityRiskScore = "riskScore" - IntegrationMappingEntityScopeID = "scopeID" - IntegrationMappingEntityScopeName = "scopeName" - IntegrationMappingEntitySoc2PeriodEnd = "soc2PeriodEnd" - IntegrationMappingEntitySpendCurrency = "spendCurrency" - IntegrationMappingEntitySsoEnforced = "ssoEnforced" - IntegrationMappingEntityStatus = "status" - IntegrationMappingEntityStatusPageURL = "statusPageURL" - IntegrationMappingEntitySystemInternalID = "systemInternalID" - IntegrationMappingEntityTags = "tags" - IntegrationMappingEntityTerminationNoticeDays = "terminationNoticeDays" - IntegrationMappingEntityTier = "tier" - IntegrationMappingEntityVendorMetadata = "vendorMetadata" + IntegrationMappingEntityEntitySourceTypeID = "entitySourceTypeID" + IntegrationMappingEntityEntitySourceTypeName = "entitySourceTypeName" + IntegrationMappingEntityEnvironmentID = "environmentID" + IntegrationMappingEntityEnvironmentName = "environmentName" + IntegrationMappingEntityExternalID = "externalID" + IntegrationMappingEntityHasSoc2 = "hasSoc2" + IntegrationMappingEntityInternalNotes = "internalNotes" + IntegrationMappingEntityInternalOwner = "internalOwner" + IntegrationMappingEntityInternalOwnerGroupID = "internalOwnerGroupID" + IntegrationMappingEntityInternalOwnerUserID = "internalOwnerUserID" + IntegrationMappingEntityLastReviewedAt = "lastReviewedAt" + IntegrationMappingEntityLinks = "links" + IntegrationMappingEntityMfaEnforced = "mfaEnforced" + IntegrationMappingEntityMfaSupported = "mfaSupported" + IntegrationMappingEntityName = "name" + IntegrationMappingEntityNextReviewAt = "nextReviewAt" + IntegrationMappingEntityObservedAt = "observedAt" + IntegrationMappingEntityOwnerID = "ownerID" + IntegrationMappingEntityProvidedServices = "providedServices" + IntegrationMappingEntityRenewalRisk = "renewalRisk" + IntegrationMappingEntityReviewFrequency = "reviewFrequency" + IntegrationMappingEntityReviewedBy = "reviewedBy" + IntegrationMappingEntityReviewedByGroupID = "reviewedByGroupID" + IntegrationMappingEntityReviewedByUserID = "reviewedByUserID" + IntegrationMappingEntityRiskRating = "riskRating" + IntegrationMappingEntityRiskScore = "riskScore" + IntegrationMappingEntityScopeID = "scopeID" + IntegrationMappingEntityScopeName = "scopeName" + IntegrationMappingEntitySoc2PeriodEnd = "soc2PeriodEnd" + IntegrationMappingEntitySpendCurrency = "spendCurrency" + IntegrationMappingEntitySsoEnforced = "ssoEnforced" + IntegrationMappingEntityStatus = "status" + IntegrationMappingEntityStatusPageURL = "statusPageURL" + IntegrationMappingEntitySystemInternalID = "systemInternalID" + IntegrationMappingEntityTags = "tags" + IntegrationMappingEntityTerminationNoticeDays = "terminationNoticeDays" + IntegrationMappingEntityTier = "tier" + IntegrationMappingEntityVendorMetadata = "vendorMetadata" ) // Integration mapping keys for Finding. const ( - IntegrationMappingFindingAssessmentID = "assessmentID" - IntegrationMappingFindingBlocksProduction = "blocksProduction" - IntegrationMappingFindingCategories = "categories" - IntegrationMappingFindingCategory = "category" - IntegrationMappingFindingDescription = "description" - IntegrationMappingFindingDisplayName = "displayName" - IntegrationMappingFindingEnvironmentID = "environmentID" - IntegrationMappingFindingEnvironmentName = "environmentName" - IntegrationMappingFindingEventTime = "eventTime" - IntegrationMappingFindingExploitability = "exploitability" - IntegrationMappingFindingExternalID = "externalID" - IntegrationMappingFindingExternalOwnerID = "externalOwnerID" - IntegrationMappingFindingExternalURI = "externalURI" - IntegrationMappingFindingFindingClass = "findingClass" - IntegrationMappingFindingFindingStatusID = "findingStatusID" - IntegrationMappingFindingFindingStatusName = "findingStatusName" - IntegrationMappingFindingImpact = "impact" - IntegrationMappingFindingInternalNotes = "internalNotes" - IntegrationMappingFindingMetadata = "metadata" - IntegrationMappingFindingNumericSeverity = "numericSeverity" - IntegrationMappingFindingOpen = "open" - IntegrationMappingFindingOwnerID = "ownerID" - IntegrationMappingFindingPriority = "priority" - IntegrationMappingFindingProduction = "production" - IntegrationMappingFindingPublic = "public" - IntegrationMappingFindingRawPayload = "rawPayload" - IntegrationMappingFindingRecommendation = "recommendation" + IntegrationMappingFindingAssessmentID = "assessmentID" + IntegrationMappingFindingBlocksProduction = "blocksProduction" + IntegrationMappingFindingCategories = "categories" + IntegrationMappingFindingCategory = "category" + IntegrationMappingFindingDescription = "description" + IntegrationMappingFindingDisplayName = "displayName" + IntegrationMappingFindingEnvironmentID = "environmentID" + IntegrationMappingFindingEnvironmentName = "environmentName" + IntegrationMappingFindingEventTime = "eventTime" + IntegrationMappingFindingExploitability = "exploitability" + IntegrationMappingFindingExternalID = "externalID" + IntegrationMappingFindingExternalOwnerID = "externalOwnerID" + IntegrationMappingFindingExternalURI = "externalURI" + IntegrationMappingFindingFindingClass = "findingClass" + IntegrationMappingFindingFindingStatusID = "findingStatusID" + IntegrationMappingFindingFindingStatusName = "findingStatusName" + IntegrationMappingFindingImpact = "impact" + IntegrationMappingFindingInternalNotes = "internalNotes" + IntegrationMappingFindingMetadata = "metadata" + IntegrationMappingFindingNumericSeverity = "numericSeverity" + IntegrationMappingFindingOpen = "open" + IntegrationMappingFindingOwnerID = "ownerID" + IntegrationMappingFindingPriority = "priority" + IntegrationMappingFindingProduction = "production" + IntegrationMappingFindingPublic = "public" + IntegrationMappingFindingRawPayload = "rawPayload" + IntegrationMappingFindingRecommendation = "recommendation" IntegrationMappingFindingRecommendedActions = "recommendedActions" - IntegrationMappingFindingReferences = "references" - IntegrationMappingFindingRemediationSLA = "remediationSLA" - IntegrationMappingFindingReportedAt = "reportedAt" - IntegrationMappingFindingResourceName = "resourceName" - IntegrationMappingFindingScopeID = "scopeID" - IntegrationMappingFindingScopeName = "scopeName" - IntegrationMappingFindingScore = "score" - IntegrationMappingFindingSeverity = "severity" - IntegrationMappingFindingSource = "source" - IntegrationMappingFindingSourceUpdatedAt = "sourceUpdatedAt" - IntegrationMappingFindingState = "state" - IntegrationMappingFindingStepsToReproduce = "stepsToReproduce" - IntegrationMappingFindingSystemInternalID = "systemInternalID" - IntegrationMappingFindingTags = "tags" - IntegrationMappingFindingTargetDetails = "targetDetails" - IntegrationMappingFindingTargets = "targets" - IntegrationMappingFindingValidated = "validated" - IntegrationMappingFindingVector = "vector" + IntegrationMappingFindingReferences = "references" + IntegrationMappingFindingRemediationSLA = "remediationSLA" + IntegrationMappingFindingReportedAt = "reportedAt" + IntegrationMappingFindingResourceName = "resourceName" + IntegrationMappingFindingScopeID = "scopeID" + IntegrationMappingFindingScopeName = "scopeName" + IntegrationMappingFindingScore = "score" + IntegrationMappingFindingSeverity = "severity" + IntegrationMappingFindingSource = "source" + IntegrationMappingFindingSourceUpdatedAt = "sourceUpdatedAt" + IntegrationMappingFindingState = "state" + IntegrationMappingFindingStepsToReproduce = "stepsToReproduce" + IntegrationMappingFindingSystemInternalID = "systemInternalID" + IntegrationMappingFindingTags = "tags" + IntegrationMappingFindingTargetDetails = "targetDetails" + IntegrationMappingFindingTargets = "targets" + IntegrationMappingFindingValidated = "validated" + IntegrationMappingFindingVector = "vector" ) // Integration mapping keys for Risk. const ( - IntegrationMappingRiskBusinessCosts = "businessCosts" + IntegrationMappingRiskBusinessCosts = "businessCosts" IntegrationMappingRiskBusinessCostsJSON = "businessCostsJSON" - IntegrationMappingRiskDetails = "details" - IntegrationMappingRiskDetailsJSON = "detailsJSON" - IntegrationMappingRiskEnvironmentID = "environmentID" - IntegrationMappingRiskEnvironmentName = "environmentName" - IntegrationMappingRiskExternalID = "externalID" - IntegrationMappingRiskExternalUUID = "externalUUID" - IntegrationMappingRiskImpact = "impact" - IntegrationMappingRiskIntegrationID = "integrationID" - IntegrationMappingRiskLastReviewedAt = "lastReviewedAt" - IntegrationMappingRiskLikelihood = "likelihood" - IntegrationMappingRiskMitigatedAt = "mitigatedAt" - IntegrationMappingRiskMitigation = "mitigation" - IntegrationMappingRiskMitigationJSON = "mitigationJSON" - IntegrationMappingRiskName = "name" - IntegrationMappingRiskNextReviewDueAt = "nextReviewDueAt" - IntegrationMappingRiskObservedAt = "observedAt" - IntegrationMappingRiskOwnerID = "ownerID" - IntegrationMappingRiskResidualScore = "residualScore" - IntegrationMappingRiskReviewFrequency = "reviewFrequency" - IntegrationMappingRiskReviewRequired = "reviewRequired" - IntegrationMappingRiskRiskCategoryID = "riskCategoryID" - IntegrationMappingRiskRiskCategoryName = "riskCategoryName" - IntegrationMappingRiskRiskDecision = "riskDecision" - IntegrationMappingRiskRiskKindID = "riskKindID" - IntegrationMappingRiskRiskKindName = "riskKindName" - IntegrationMappingRiskScopeID = "scopeID" - IntegrationMappingRiskScopeName = "scopeName" - IntegrationMappingRiskScore = "score" - IntegrationMappingRiskStatus = "status" - IntegrationMappingRiskTags = "tags" + IntegrationMappingRiskDetails = "details" + IntegrationMappingRiskDetailsJSON = "detailsJSON" + IntegrationMappingRiskEnvironmentID = "environmentID" + IntegrationMappingRiskEnvironmentName = "environmentName" + IntegrationMappingRiskExternalID = "externalID" + IntegrationMappingRiskExternalUUID = "externalUUID" + IntegrationMappingRiskImpact = "impact" + IntegrationMappingRiskIntegrationID = "integrationID" + IntegrationMappingRiskLastReviewedAt = "lastReviewedAt" + IntegrationMappingRiskLikelihood = "likelihood" + IntegrationMappingRiskMitigatedAt = "mitigatedAt" + IntegrationMappingRiskMitigation = "mitigation" + IntegrationMappingRiskMitigationJSON = "mitigationJSON" + IntegrationMappingRiskName = "name" + IntegrationMappingRiskNextReviewDueAt = "nextReviewDueAt" + IntegrationMappingRiskObservedAt = "observedAt" + IntegrationMappingRiskOwnerID = "ownerID" + IntegrationMappingRiskResidualScore = "residualScore" + IntegrationMappingRiskReviewFrequency = "reviewFrequency" + IntegrationMappingRiskReviewRequired = "reviewRequired" + IntegrationMappingRiskRiskCategoryID = "riskCategoryID" + IntegrationMappingRiskRiskCategoryName = "riskCategoryName" + IntegrationMappingRiskRiskDecision = "riskDecision" + IntegrationMappingRiskRiskKindID = "riskKindID" + IntegrationMappingRiskRiskKindName = "riskKindName" + IntegrationMappingRiskScopeID = "scopeID" + IntegrationMappingRiskScopeName = "scopeName" + IntegrationMappingRiskScore = "score" + IntegrationMappingRiskStatus = "status" + IntegrationMappingRiskTags = "tags" ) // Integration mapping keys for Vulnerability. const ( - IntegrationMappingVulnerabilityAutoDismissedAt = "autoDismissedAt" - IntegrationMappingVulnerabilityBlocking = "blocking" - IntegrationMappingVulnerabilityCategory = "category" - IntegrationMappingVulnerabilityCveID = "cveID" - IntegrationMappingVulnerabilityCweIds = "cweIds" - IntegrationMappingVulnerabilityDependencyScope = "dependencyScope" - IntegrationMappingVulnerabilityDescription = "description" - IntegrationMappingVulnerabilityDiscoveredAt = "discoveredAt" - IntegrationMappingVulnerabilityDismissedAt = "dismissedAt" - IntegrationMappingVulnerabilityDismissedComment = "dismissedComment" - IntegrationMappingVulnerabilityDismissedReason = "dismissedReason" - IntegrationMappingVulnerabilityDisplayName = "displayName" - IntegrationMappingVulnerabilityEnvironmentID = "environmentID" - IntegrationMappingVulnerabilityEnvironmentName = "environmentName" - IntegrationMappingVulnerabilityExploitability = "exploitability" - IntegrationMappingVulnerabilityExternalID = "externalID" - IntegrationMappingVulnerabilityExternalOwnerID = "externalOwnerID" - IntegrationMappingVulnerabilityExternalURI = "externalURI" - IntegrationMappingVulnerabilityFirstPatchedVersion = "firstPatchedVersion" - IntegrationMappingVulnerabilityFixedAt = "fixedAt" - IntegrationMappingVulnerabilityImpact = "impact" - IntegrationMappingVulnerabilityImpacts = "impacts" - IntegrationMappingVulnerabilityInternalNotes = "internalNotes" - IntegrationMappingVulnerabilityManifestPath = "manifestPath" - IntegrationMappingVulnerabilityMetadata = "metadata" - IntegrationMappingVulnerabilityOpen = "open" - IntegrationMappingVulnerabilityOwnerID = "ownerID" - IntegrationMappingVulnerabilityPackageEcosystem = "packageEcosystem" - IntegrationMappingVulnerabilityPackageName = "packageName" - IntegrationMappingVulnerabilityPriority = "priority" - IntegrationMappingVulnerabilityProduction = "production" - IntegrationMappingVulnerabilityPublic = "public" - IntegrationMappingVulnerabilityPublishedAt = "publishedAt" - IntegrationMappingVulnerabilityRawPayload = "rawPayload" - IntegrationMappingVulnerabilityReferences = "references" - IntegrationMappingVulnerabilityRemediationSLA = "remediationSLA" - IntegrationMappingVulnerabilityScopeID = "scopeID" - IntegrationMappingVulnerabilityScopeName = "scopeName" - IntegrationMappingVulnerabilityScore = "score" - IntegrationMappingVulnerabilitySeverity = "severity" - IntegrationMappingVulnerabilitySource = "source" - IntegrationMappingVulnerabilitySourceUpdatedAt = "sourceUpdatedAt" - IntegrationMappingVulnerabilitySummary = "summary" - IntegrationMappingVulnerabilitySystemInternalID = "systemInternalID" - IntegrationMappingVulnerabilityTags = "tags" - IntegrationMappingVulnerabilityValidated = "validated" - IntegrationMappingVulnerabilityVector = "vector" - IntegrationMappingVulnerabilityVulnerabilityStatusID = "vulnerabilityStatusID" + IntegrationMappingVulnerabilityAutoDismissedAt = "autoDismissedAt" + IntegrationMappingVulnerabilityBlocking = "blocking" + IntegrationMappingVulnerabilityCategory = "category" + IntegrationMappingVulnerabilityCveID = "cveID" + IntegrationMappingVulnerabilityCweIds = "cweIds" + IntegrationMappingVulnerabilityDependencyScope = "dependencyScope" + IntegrationMappingVulnerabilityDescription = "description" + IntegrationMappingVulnerabilityDiscoveredAt = "discoveredAt" + IntegrationMappingVulnerabilityDismissedAt = "dismissedAt" + IntegrationMappingVulnerabilityDismissedComment = "dismissedComment" + IntegrationMappingVulnerabilityDismissedReason = "dismissedReason" + IntegrationMappingVulnerabilityDisplayName = "displayName" + IntegrationMappingVulnerabilityEnvironmentID = "environmentID" + IntegrationMappingVulnerabilityEnvironmentName = "environmentName" + IntegrationMappingVulnerabilityExploitability = "exploitability" + IntegrationMappingVulnerabilityExternalID = "externalID" + IntegrationMappingVulnerabilityExternalOwnerID = "externalOwnerID" + IntegrationMappingVulnerabilityExternalURI = "externalURI" + IntegrationMappingVulnerabilityFirstPatchedVersion = "firstPatchedVersion" + IntegrationMappingVulnerabilityFixedAt = "fixedAt" + IntegrationMappingVulnerabilityImpact = "impact" + IntegrationMappingVulnerabilityImpacts = "impacts" + IntegrationMappingVulnerabilityInternalNotes = "internalNotes" + IntegrationMappingVulnerabilityManifestPath = "manifestPath" + IntegrationMappingVulnerabilityMetadata = "metadata" + IntegrationMappingVulnerabilityOpen = "open" + IntegrationMappingVulnerabilityOwnerID = "ownerID" + IntegrationMappingVulnerabilityPackageEcosystem = "packageEcosystem" + IntegrationMappingVulnerabilityPackageName = "packageName" + IntegrationMappingVulnerabilityPriority = "priority" + IntegrationMappingVulnerabilityProduction = "production" + IntegrationMappingVulnerabilityPublic = "public" + IntegrationMappingVulnerabilityPublishedAt = "publishedAt" + IntegrationMappingVulnerabilityRawPayload = "rawPayload" + IntegrationMappingVulnerabilityReferences = "references" + IntegrationMappingVulnerabilityRemediationSLA = "remediationSLA" + IntegrationMappingVulnerabilityScopeID = "scopeID" + IntegrationMappingVulnerabilityScopeName = "scopeName" + IntegrationMappingVulnerabilityScore = "score" + IntegrationMappingVulnerabilitySeverity = "severity" + IntegrationMappingVulnerabilitySource = "source" + IntegrationMappingVulnerabilitySourceUpdatedAt = "sourceUpdatedAt" + IntegrationMappingVulnerabilitySummary = "summary" + IntegrationMappingVulnerabilitySystemInternalID = "systemInternalID" + IntegrationMappingVulnerabilityTags = "tags" + IntegrationMappingVulnerabilityValidated = "validated" + IntegrationMappingVulnerabilityVector = "vector" + IntegrationMappingVulnerabilityVulnerabilityStatusID = "vulnerabilityStatusID" IntegrationMappingVulnerabilityVulnerabilityStatusName = "vulnerabilityStatusName" - IntegrationMappingVulnerabilityVulnerableVersionRange = "vulnerableVersionRange" + IntegrationMappingVulnerabilityVulnerableVersionRange = "vulnerableVersionRange" ) // IntegrationMappingSchemas maps schema names to their mapping metadata @@ -520,407 +519,407 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Asset", Fields: []IntegrationMappingField{ { - InputKey: "accessModelID", - GoField: "AccessModelID", - EntField: "access_model_id", - Type: "string", - Required: false, + InputKey: "accessModelID", + GoField: "AccessModelID", + EntField: "access_model_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "accessModelName", - GoField: "AccessModelName", - EntField: "access_model_name", - Type: "string", - Required: false, + InputKey: "accessModelName", + GoField: "AccessModelName", + EntField: "access_model_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetDataClassificationID", - GoField: "AssetDataClassificationID", - EntField: "asset_data_classification_id", - Type: "string", - Required: false, + InputKey: "assetDataClassificationID", + GoField: "AssetDataClassificationID", + EntField: "asset_data_classification_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetDataClassificationName", - GoField: "AssetDataClassificationName", - EntField: "asset_data_classification_name", - Type: "string", - Required: false, + InputKey: "assetDataClassificationName", + GoField: "AssetDataClassificationName", + EntField: "asset_data_classification_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetSubtypeID", - GoField: "AssetSubtypeID", - EntField: "asset_subtype_id", - Type: "string", - Required: false, + InputKey: "assetSubtypeID", + GoField: "AssetSubtypeID", + EntField: "asset_subtype_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetSubtypeName", - GoField: "AssetSubtypeName", - EntField: "asset_subtype_name", - Type: "string", - Required: false, + InputKey: "assetSubtypeName", + GoField: "AssetSubtypeName", + EntField: "asset_subtype_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetType", - GoField: "AssetType", - EntField: "asset_type", - Type: "string", - Required: true, + InputKey: "assetType", + GoField: "AssetType", + EntField: "asset_type", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "categories", - GoField: "Categories", - EntField: "categories", - Type: "json.RawMessage", - Required: false, + InputKey: "categories", + GoField: "Categories", + EntField: "categories", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "containsPii", - GoField: "ContainsPii", - EntField: "contains_pii", - Type: "bool", - Required: false, + InputKey: "containsPii", + GoField: "ContainsPii", + EntField: "contains_pii", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "costCenter", - GoField: "CostCenter", - EntField: "cost_center", - Type: "string", - Required: false, + InputKey: "costCenter", + GoField: "CostCenter", + EntField: "cost_center", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "criticalityID", - GoField: "CriticalityID", - EntField: "criticality_id", - Type: "string", - Required: false, + InputKey: "criticalityID", + GoField: "CriticalityID", + EntField: "criticality_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "criticalityName", - GoField: "CriticalityName", - EntField: "criticality_name", - Type: "string", - Required: false, + InputKey: "criticalityName", + GoField: "CriticalityName", + EntField: "criticality_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "encryptionStatusID", - GoField: "EncryptionStatusID", - EntField: "encryption_status_id", - Type: "string", - Required: false, + InputKey: "encryptionStatusID", + GoField: "EncryptionStatusID", + EntField: "encryption_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "encryptionStatusName", - GoField: "EncryptionStatusName", - EntField: "encryption_status_name", - Type: "string", - Required: false, + InputKey: "encryptionStatusName", + GoField: "EncryptionStatusName", + EntField: "encryption_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "estimatedMonthlyCost", - GoField: "EstimatedMonthlyCost", - EntField: "estimated_monthly_cost", - Type: "float64", - Required: false, + InputKey: "estimatedMonthlyCost", + GoField: "EstimatedMonthlyCost", + EntField: "estimated_monthly_cost", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "identifier", - GoField: "Identifier", - EntField: "identifier", - Type: "string", - Required: false, + InputKey: "identifier", + GoField: "Identifier", + EntField: "identifier", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwner", - GoField: "InternalOwner", - EntField: "internal_owner", - Type: "string", - Required: false, + InputKey: "internalOwner", + GoField: "InternalOwner", + EntField: "internal_owner", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerGroupID", - GoField: "InternalOwnerGroupID", - EntField: "internal_owner_group_id", - Type: "string", - Required: false, + InputKey: "internalOwnerGroupID", + GoField: "InternalOwnerGroupID", + EntField: "internal_owner_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerUserID", - GoField: "InternalOwnerUserID", - EntField: "internal_owner_user_id", - Type: "string", - Required: false, + InputKey: "internalOwnerUserID", + GoField: "InternalOwnerUserID", + EntField: "internal_owner_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: true, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "physicalLocation", - GoField: "PhysicalLocation", - EntField: "physical_location", - Type: "string", - Required: false, + InputKey: "physicalLocation", + GoField: "PhysicalLocation", + EntField: "physical_location", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "purchaseDate", - GoField: "PurchaseDate", - EntField: "purchase_date", - Type: "time.Time", - Required: false, + InputKey: "purchaseDate", + GoField: "PurchaseDate", + EntField: "purchase_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "region", - GoField: "Region", - EntField: "region", - Type: "string", - Required: false, + InputKey: "region", + GoField: "Region", + EntField: "region", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "securityTierID", - GoField: "SecurityTierID", - EntField: "security_tier_id", - Type: "string", - Required: false, + InputKey: "securityTierID", + GoField: "SecurityTierID", + EntField: "security_tier_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "securityTierName", - GoField: "SecurityTierName", - EntField: "security_tier_name", - Type: "string", - Required: false, + InputKey: "securityTierName", + GoField: "SecurityTierName", + EntField: "security_tier_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceIdentifier", - GoField: "SourceIdentifier", - EntField: "source_identifier", - Type: "string", - Required: false, + InputKey: "sourceIdentifier", + GoField: "SourceIdentifier", + EntField: "source_identifier", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "sourceType", - GoField: "SourceType", - EntField: "source_type", - Type: "string", - Required: true, + InputKey: "sourceType", + GoField: "SourceType", + EntField: "source_type", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "website", - GoField: "Website", - EntField: "website", - Type: "string", - Required: false, + InputKey: "website", + GoField: "Website", + EntField: "website", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "accessModelID": {}, - "accessModelName": {}, - "assetDataClassificationID": {}, + "accessModelID": {}, + "accessModelName": {}, + "assetDataClassificationID": {}, "assetDataClassificationName": {}, - "assetSubtypeID": {}, - "assetSubtypeName": {}, - "assetType": {}, - "categories": {}, - "containsPii": {}, - "costCenter": {}, - "criticalityID": {}, - "criticalityName": {}, - "description": {}, - "displayName": {}, - "encryptionStatusID": {}, - "encryptionStatusName": {}, - "environmentID": {}, - "environmentName": {}, - "estimatedMonthlyCost": {}, - "identifier": {}, - "integrationID": {}, - "internalNotes": {}, - "internalOwner": {}, - "internalOwnerGroupID": {}, - "internalOwnerUserID": {}, - "name": {}, - "observedAt": {}, - "ownerID": {}, - "physicalLocation": {}, - "purchaseDate": {}, - "region": {}, - "scopeID": {}, - "scopeName": {}, - "securityTierID": {}, - "securityTierName": {}, - "sourceIdentifier": {}, - "sourceType": {}, - "systemInternalID": {}, - "tags": {}, - "website": {}, + "assetSubtypeID": {}, + "assetSubtypeName": {}, + "assetType": {}, + "categories": {}, + "containsPii": {}, + "costCenter": {}, + "criticalityID": {}, + "criticalityName": {}, + "description": {}, + "displayName": {}, + "encryptionStatusID": {}, + "encryptionStatusName": {}, + "environmentID": {}, + "environmentName": {}, + "estimatedMonthlyCost": {}, + "identifier": {}, + "integrationID": {}, + "internalNotes": {}, + "internalOwner": {}, + "internalOwnerGroupID": {}, + "internalOwnerUserID": {}, + "name": {}, + "observedAt": {}, + "ownerID": {}, + "physicalLocation": {}, + "purchaseDate": {}, + "region": {}, + "scopeID": {}, + "scopeName": {}, + "securityTierID": {}, + "securityTierName": {}, + "sourceIdentifier": {}, + "sourceType": {}, + "systemInternalID": {}, + "tags": {}, + "website": {}, }, RequiredKeys: []string{ "assetType", @@ -936,117 +935,117 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Contact", Fields: []IntegrationMappingField{ { - InputKey: "address", - GoField: "Address", - EntField: "address", - Type: "string", - Required: false, + InputKey: "address", + GoField: "Address", + EntField: "address", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "company", - GoField: "Company", - EntField: "company", - Type: "string", - Required: false, + InputKey: "company", + GoField: "Company", + EntField: "company", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "email", - GoField: "Email", - EntField: "email", - Type: "string", - Required: false, + InputKey: "email", + GoField: "Email", + EntField: "email", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "fullName", - GoField: "FullName", - EntField: "full_name", - Type: "string", - Required: false, + InputKey: "fullName", + GoField: "FullName", + EntField: "full_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "phoneNumber", - GoField: "PhoneNumber", - EntField: "phone_number", - Type: "string", - Required: false, + InputKey: "phoneNumber", + GoField: "PhoneNumber", + EntField: "phone_number", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "title", - GoField: "Title", - EntField: "title", - Type: "string", - Required: false, + InputKey: "title", + GoField: "Title", + EntField: "title", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "address": {}, - "company": {}, - "email": {}, - "externalID": {}, - "fullName": {}, + "address": {}, + "company": {}, + "email": {}, + "externalID": {}, + "fullName": {}, "integrationID": {}, - "observedAt": {}, - "phoneNumber": {}, - "status": {}, - "tags": {}, - "title": {}, + "observedAt": {}, + "phoneNumber": {}, + "status": {}, + "tags": {}, + "title": {}, }, RequiredKeys: []string{ "status", @@ -1061,377 +1060,377 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryAccount", Fields: []IntegrationMappingField{ { - InputKey: "accountType", - GoField: "AccountType", - EntField: "account_type", - Type: "string", - Required: false, + InputKey: "accountType", + GoField: "AccountType", + EntField: "account_type", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "avatarRemoteURL", - GoField: "AvatarRemoteURL", - EntField: "avatar_remote_url", - Type: "string", - Required: false, + InputKey: "avatarRemoteURL", + GoField: "AvatarRemoteURL", + EntField: "avatar_remote_url", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "avatarUpdatedAt", - GoField: "AvatarUpdatedAt", - EntField: "avatar_updated_at", - Type: "time.Time", - Required: false, + InputKey: "avatarUpdatedAt", + GoField: "AvatarUpdatedAt", + EntField: "avatar_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "canonicalEmail", - GoField: "CanonicalEmail", - EntField: "canonical_email", - Type: "string", - Required: false, + InputKey: "canonicalEmail", + GoField: "CanonicalEmail", + EntField: "canonical_email", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "department", - GoField: "Department", - EntField: "department", - Type: "string", - Required: false, + InputKey: "department", + GoField: "Department", + EntField: "department", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryName", - GoField: "DirectoryName", - EntField: "directory_name", - Type: "string", - Required: false, + InputKey: "directoryName", + GoField: "DirectoryName", + EntField: "directory_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: false, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "familyName", - GoField: "FamilyName", - EntField: "family_name", - Type: "string", - Required: false, + InputKey: "familyName", + GoField: "FamilyName", + EntField: "family_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "givenName", - GoField: "GivenName", - EntField: "given_name", - Type: "string", - Required: false, + InputKey: "givenName", + GoField: "GivenName", + EntField: "given_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "identityHolderID", - GoField: "IdentityHolderID", - EntField: "identity_holder_id", - Type: "string", - Required: false, + InputKey: "identityHolderID", + GoField: "IdentityHolderID", + EntField: "identity_holder_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "jobTitle", - GoField: "JobTitle", - EntField: "job_title", - Type: "string", - Required: false, + InputKey: "jobTitle", + GoField: "JobTitle", + EntField: "job_title", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastLoginAt", - GoField: "LastLoginAt", - EntField: "last_login_at", - Type: "time.Time", - Required: false, + InputKey: "lastLoginAt", + GoField: "LastLoginAt", + EntField: "last_login_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenIP", - GoField: "LastSeenIP", - EntField: "last_seen_ip", - Type: "string", - Required: false, + InputKey: "lastSeenIP", + GoField: "LastSeenIP", + EntField: "last_seen_ip", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaState", - GoField: "MfaState", - EntField: "mfa_state", - Type: "string", - Required: true, + InputKey: "mfaState", + GoField: "MfaState", + EntField: "mfa_state", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "organizationUnit", - GoField: "OrganizationUnit", - EntField: "organization_unit", - Type: "string", - Required: false, + InputKey: "organizationUnit", + GoField: "OrganizationUnit", + EntField: "organization_unit", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "primarySource", - GoField: "PrimarySource", - EntField: "primary_source", - Type: "bool", - Required: true, + InputKey: "primarySource", + GoField: "PrimarySource", + EntField: "primary_source", + Type: "bool", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "profile", - GoField: "Profile", - EntField: "profile", - Type: "json.RawMessage", - Required: false, + InputKey: "profile", + GoField: "Profile", + EntField: "profile", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profileHash", - GoField: "ProfileHash", - EntField: "profile_hash", - Type: "string", - Required: true, + InputKey: "profileHash", + GoField: "ProfileHash", + EntField: "profile_hash", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "secondaryKey", - GoField: "SecondaryKey", - EntField: "secondary_key", - Type: "string", - Required: false, + InputKey: "secondaryKey", + GoField: "SecondaryKey", + EntField: "secondary_key", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceVersion", - GoField: "SourceVersion", - EntField: "source_version", - Type: "string", - Required: false, + InputKey: "sourceVersion", + GoField: "SourceVersion", + EntField: "source_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "accountType": {}, - "addedAt": {}, - "avatarRemoteURL": {}, - "avatarUpdatedAt": {}, - "canonicalEmail": {}, - "department": {}, + "accountType": {}, + "addedAt": {}, + "avatarRemoteURL": {}, + "avatarUpdatedAt": {}, + "canonicalEmail": {}, + "department": {}, "directoryInstanceID": {}, - "directoryName": {}, - "directorySyncRunID": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "familyName": {}, - "firstSeenAt": {}, - "givenName": {}, - "identityHolderID": {}, - "integrationID": {}, - "jobTitle": {}, - "lastLoginAt": {}, - "lastSeenAt": {}, - "lastSeenIP": {}, - "metadata": {}, - "mfaState": {}, - "observedAt": {}, - "organizationUnit": {}, - "platformID": {}, - "primarySource": {}, - "profile": {}, - "profileHash": {}, - "removedAt": {}, - "scopeID": {}, - "scopeName": {}, - "secondaryKey": {}, - "sourceVersion": {}, - "status": {}, - "tags": {}, + "directoryName": {}, + "directorySyncRunID": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "familyName": {}, + "firstSeenAt": {}, + "givenName": {}, + "identityHolderID": {}, + "integrationID": {}, + "jobTitle": {}, + "lastLoginAt": {}, + "lastSeenAt": {}, + "lastSeenIP": {}, + "metadata": {}, + "mfaState": {}, + "observedAt": {}, + "organizationUnit": {}, + "platformID": {}, + "primarySource": {}, + "profile": {}, + "profileHash": {}, + "removedAt": {}, + "scopeID": {}, + "scopeName": {}, + "secondaryKey": {}, + "sourceVersion": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "externalID", @@ -1453,257 +1452,257 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryGroup", Fields: []IntegrationMappingField{ { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "classification", - GoField: "Classification", - EntField: "classification", - Type: "string", - Required: true, + InputKey: "classification", + GoField: "Classification", + EntField: "classification", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: true, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "email", - GoField: "Email", - EntField: "email", - Type: "string", - Required: false, + InputKey: "email", + GoField: "Email", + EntField: "email", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: false, LookupKey: true, }, { - InputKey: "externalSharingAllowed", - GoField: "ExternalSharingAllowed", - EntField: "external_sharing_allowed", - Type: "bool", - Required: false, + InputKey: "externalSharingAllowed", + GoField: "ExternalSharingAllowed", + EntField: "external_sharing_allowed", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: true, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "memberCount", - GoField: "MemberCount", - EntField: "member_count", - Type: "int", - Required: false, + InputKey: "memberCount", + GoField: "MemberCount", + EntField: "member_count", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profile", - GoField: "Profile", - EntField: "profile", - Type: "json.RawMessage", - Required: false, + InputKey: "profile", + GoField: "Profile", + EntField: "profile", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profileHash", - GoField: "ProfileHash", - EntField: "profile_hash", - Type: "string", - Required: true, + InputKey: "profileHash", + GoField: "ProfileHash", + EntField: "profile_hash", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceVersion", - GoField: "SourceVersion", - EntField: "source_version", - Type: "string", - Required: false, + InputKey: "sourceVersion", + GoField: "SourceVersion", + EntField: "source_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "addedAt": {}, - "classification": {}, - "directoryInstanceID": {}, - "directorySyncRunID": {}, - "displayName": {}, - "email": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, + "addedAt": {}, + "classification": {}, + "directoryInstanceID": {}, + "directorySyncRunID": {}, + "displayName": {}, + "email": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, "externalSharingAllowed": {}, - "firstSeenAt": {}, - "integrationID": {}, - "lastSeenAt": {}, - "memberCount": {}, - "metadata": {}, - "observedAt": {}, - "platformID": {}, - "profile": {}, - "profileHash": {}, - "removedAt": {}, - "scopeID": {}, - "scopeName": {}, - "sourceVersion": {}, - "status": {}, - "tags": {}, + "firstSeenAt": {}, + "integrationID": {}, + "lastSeenAt": {}, + "memberCount": {}, + "metadata": {}, + "observedAt": {}, + "platformID": {}, + "profile": {}, + "profileHash": {}, + "removedAt": {}, + "scopeID": {}, + "scopeName": {}, + "sourceVersion": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "classification", @@ -1724,197 +1723,197 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryMembership", Fields: []IntegrationMappingField{ { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryAccountID", - GoField: "DirectoryAccountID", - EntField: "directory_account_id", - Type: "string", - Required: true, + InputKey: "directoryAccountID", + GoField: "DirectoryAccountID", + EntField: "directory_account_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "directoryGroupID", - GoField: "DirectoryGroupID", - EntField: "directory_group_id", - Type: "string", - Required: true, + InputKey: "directoryGroupID", + GoField: "DirectoryGroupID", + EntField: "directory_group_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: true, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: true, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "lastConfirmedRunID", - GoField: "LastConfirmedRunID", - EntField: "last_confirmed_run_id", - Type: "string", - Required: false, + InputKey: "lastConfirmedRunID", + GoField: "LastConfirmedRunID", + EntField: "last_confirmed_run_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "role", - GoField: "Role", - EntField: "role", - Type: "string", - Required: false, + InputKey: "role", + GoField: "Role", + EntField: "role", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "addedAt": {}, - "directoryAccountID": {}, - "directoryGroupID": {}, + "addedAt": {}, + "directoryAccountID": {}, + "directoryGroupID": {}, "directoryInstanceID": {}, - "directorySyncRunID": {}, - "environmentID": {}, - "environmentName": {}, - "firstSeenAt": {}, - "integrationID": {}, - "lastConfirmedRunID": {}, - "lastSeenAt": {}, - "metadata": {}, - "observedAt": {}, - "platformID": {}, - "removedAt": {}, - "role": {}, - "scopeID": {}, - "scopeName": {}, - "source": {}, + "directorySyncRunID": {}, + "environmentID": {}, + "environmentName": {}, + "firstSeenAt": {}, + "integrationID": {}, + "lastConfirmedRunID": {}, + "lastSeenAt": {}, + "metadata": {}, + "observedAt": {}, + "platformID": {}, + "removedAt": {}, + "role": {}, + "scopeID": {}, + "scopeName": {}, + "source": {}, }, RequiredKeys: []string{ "directoryAccountID", @@ -1935,520 +1934,519 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Entity", Fields: []IntegrationMappingField{ { - InputKey: "annualSpend", - GoField: "AnnualSpend", - EntField: "annual_spend", - Type: "float64", - Required: false, + InputKey: "annualSpend", + GoField: "AnnualSpend", + EntField: "annual_spend", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "approvedForUse", - GoField: "ApprovedForUse", - EntField: "approved_for_use", - Type: "bool", - Required: false, + InputKey: "approvedForUse", + GoField: "ApprovedForUse", + EntField: "approved_for_use", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "autoRenews", - GoField: "AutoRenews", - EntField: "auto_renews", - Type: "bool", - Required: false, + InputKey: "autoRenews", + GoField: "AutoRenews", + EntField: "auto_renews", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "billingModel", - GoField: "BillingModel", - EntField: "billing_model", - Type: "string", - Required: false, + InputKey: "billingModel", + GoField: "BillingModel", + EntField: "billing_model", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractEndDate", - GoField: "ContractEndDate", - EntField: "contract_end_date", - Type: "time.Time", - Required: false, + InputKey: "contractEndDate", + GoField: "ContractEndDate", + EntField: "contract_end_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractRenewalAt", - GoField: "ContractRenewalAt", - EntField: "contract_renewal_at", - Type: "time.Time", - Required: false, + InputKey: "contractRenewalAt", + GoField: "ContractRenewalAt", + EntField: "contract_renewal_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractStartDate", - GoField: "ContractStartDate", - EntField: "contract_start_date", - Type: "time.Time", - Required: false, + InputKey: "contractStartDate", + GoField: "ContractStartDate", + EntField: "contract_start_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "domains", - GoField: "Domains", - EntField: "domains", - Type: "json.RawMessage", - Required: false, + InputKey: "domains", + GoField: "Domains", + EntField: "domains", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entityRelationshipStateID", - GoField: "EntityRelationshipStateID", - EntField: "entity_relationship_state_id", - Type: "string", - Required: false, + InputKey: "entityRelationshipStateID", + GoField: "EntityRelationshipStateID", + EntField: "entity_relationship_state_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entityRelationshipStateName", - GoField: "EntityRelationshipStateName", - EntField: "entity_relationship_state_name", - Type: "string", - Required: false, + InputKey: "entityRelationshipStateName", + GoField: "EntityRelationshipStateName", + EntField: "entity_relationship_state_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySecurityQuestionnaireStatusID", - GoField: "EntitySecurityQuestionnaireStatusID", - EntField: "entity_security_questionnaire_status_id", - Type: "string", - Required: false, + InputKey: "entitySecurityQuestionnaireStatusID", + GoField: "EntitySecurityQuestionnaireStatusID", + EntField: "entity_security_questionnaire_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySecurityQuestionnaireStatusName", - GoField: "EntitySecurityQuestionnaireStatusName", - EntField: "entity_security_questionnaire_status_name", - Type: "string", - Required: false, + InputKey: "entitySecurityQuestionnaireStatusName", + GoField: "EntitySecurityQuestionnaireStatusName", + EntField: "entity_security_questionnaire_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySourceTypeID", - GoField: "EntitySourceTypeID", - EntField: "entity_source_type_id", - Type: "string", - Required: false, + InputKey: "entitySourceTypeID", + GoField: "EntitySourceTypeID", + EntField: "entity_source_type_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySourceTypeName", - GoField: "EntitySourceTypeName", - EntField: "entity_source_type_name", - Type: "string", - Required: false, + InputKey: "entitySourceTypeName", + GoField: "EntitySourceTypeName", + EntField: "entity_source_type_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "hasSoc2", - GoField: "HasSoc2", - EntField: "has_soc2", - Type: "bool", - Required: false, + InputKey: "hasSoc2", + GoField: "HasSoc2", + EntField: "has_soc2", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwner", - GoField: "InternalOwner", - EntField: "internal_owner", - Type: "string", - Required: false, + InputKey: "internalOwner", + GoField: "InternalOwner", + EntField: "internal_owner", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerGroupID", - GoField: "InternalOwnerGroupID", - EntField: "internal_owner_group_id", - Type: "string", - Required: false, + InputKey: "internalOwnerGroupID", + GoField: "InternalOwnerGroupID", + EntField: "internal_owner_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerUserID", - GoField: "InternalOwnerUserID", - EntField: "internal_owner_user_id", - Type: "string", - Required: false, + InputKey: "internalOwnerUserID", + GoField: "InternalOwnerUserID", + EntField: "internal_owner_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastReviewedAt", - GoField: "LastReviewedAt", - EntField: "last_reviewed_at", - Type: "time.Time", - Required: false, + InputKey: "lastReviewedAt", + GoField: "LastReviewedAt", + EntField: "last_reviewed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "links", - GoField: "Links", - EntField: "links", - Type: "json.RawMessage", - Required: false, + InputKey: "links", + GoField: "Links", + EntField: "links", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaEnforced", - GoField: "MfaEnforced", - EntField: "mfa_enforced", - Type: "bool", - Required: false, + InputKey: "mfaEnforced", + GoField: "MfaEnforced", + EntField: "mfa_enforced", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaSupported", - GoField: "MfaSupported", - EntField: "mfa_supported", - Type: "bool", - Required: false, + InputKey: "mfaSupported", + GoField: "MfaSupported", + EntField: "mfa_supported", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: false, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "nextReviewAt", - GoField: "NextReviewAt", - EntField: "next_review_at", - Type: "time.Time", - Required: false, + InputKey: "nextReviewAt", + GoField: "NextReviewAt", + EntField: "next_review_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "providedServices", - GoField: "ProvidedServices", - EntField: "provided_services", - Type: "json.RawMessage", - Required: false, + InputKey: "providedServices", + GoField: "ProvidedServices", + EntField: "provided_services", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "renewalRisk", - GoField: "RenewalRisk", - EntField: "renewal_risk", - Type: "string", - Required: false, + InputKey: "renewalRisk", + GoField: "RenewalRisk", + EntField: "renewal_risk", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewFrequency", - GoField: "ReviewFrequency", - EntField: "review_frequency", - Type: "string", - Required: false, + InputKey: "reviewFrequency", + GoField: "ReviewFrequency", + EntField: "review_frequency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedBy", - GoField: "ReviewedBy", - EntField: "reviewed_by", - Type: "string", - Required: false, + InputKey: "reviewedBy", + GoField: "ReviewedBy", + EntField: "reviewed_by", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedByGroupID", - GoField: "ReviewedByGroupID", - EntField: "reviewed_by_group_id", - Type: "string", - Required: false, + InputKey: "reviewedByGroupID", + GoField: "ReviewedByGroupID", + EntField: "reviewed_by_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedByUserID", - GoField: "ReviewedByUserID", - EntField: "reviewed_by_user_id", - Type: "string", - Required: false, + InputKey: "reviewedByUserID", + GoField: "ReviewedByUserID", + EntField: "reviewed_by_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskRating", - GoField: "RiskRating", - EntField: "risk_rating", - Type: "string", - Required: false, + InputKey: "riskRating", + GoField: "RiskRating", + EntField: "risk_rating", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskScore", - GoField: "RiskScore", - EntField: "risk_score", - Type: "int", - Required: false, + InputKey: "riskScore", + GoField: "RiskScore", + EntField: "risk_score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "soc2PeriodEnd", - GoField: "Soc2PeriodEnd", - EntField: "soc2_period_end", - Type: "time.Time", - Required: false, + InputKey: "soc2PeriodEnd", + GoField: "Soc2PeriodEnd", + EntField: "soc2_period_end", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "spendCurrency", - GoField: "SpendCurrency", - EntField: "spend_currency", - Type: "string", - Required: false, + InputKey: "spendCurrency", + GoField: "SpendCurrency", + EntField: "spend_currency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ssoEnforced", - GoField: "SsoEnforced", - EntField: "sso_enforced", - Type: "bool", - Required: false, + InputKey: "ssoEnforced", + GoField: "SsoEnforced", + EntField: "sso_enforced", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: false, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "statusPageURL", - GoField: "StatusPageURL", - EntField: "status_page_url", - Type: "string", - Required: false, + InputKey: "statusPageURL", + GoField: "StatusPageURL", + EntField: "status_page_url", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "terminationNoticeDays", - GoField: "TerminationNoticeDays", - EntField: "termination_notice_days", - Type: "int", - Required: false, + InputKey: "terminationNoticeDays", + GoField: "TerminationNoticeDays", + EntField: "termination_notice_days", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tier", - GoField: "Tier", - EntField: "tier", - Type: "string", - Required: false, + InputKey: "tier", + GoField: "Tier", + EntField: "tier", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vendorMetadata", - GoField: "VendorMetadata", - EntField: "vendor_metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "vendorMetadata", + GoField: "VendorMetadata", + EntField: "vendor_metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "annualSpend": {}, - "approvedForUse": {}, - "autoRenews": {}, - "billingModel": {}, - "contractEndDate": {}, - "contractRenewalAt": {}, - "contractStartDate": {}, - "displayName": {}, - "domains": {}, - "entityRelationshipStateID": {}, - "entityRelationshipStateName": {}, - "entitySecurityQuestionnaireStatusID": {}, + "annualSpend": {}, + "approvedForUse": {}, + "autoRenews": {}, + "billingModel": {}, + "contractEndDate": {}, + "contractRenewalAt": {}, + "contractStartDate": {}, + "displayName": {}, + "domains": {}, + "entityRelationshipStateID": {}, + "entityRelationshipStateName": {}, + "entitySecurityQuestionnaireStatusID": {}, "entitySecurityQuestionnaireStatusName": {}, - "entitySourceTypeID": {}, - "entitySourceTypeName": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "hasSoc2": {}, - "internalNotes": {}, - "internalOwner": {}, - "internalOwnerGroupID": {}, - "internalOwnerUserID": {}, - "lastReviewedAt": {}, - "links": {}, - "mfaEnforced": {}, - "mfaSupported": {}, - "name": {}, - "nextReviewAt": {}, - "observedAt": {}, - "ownerID": {}, - "providedServices": {}, - "renewalRisk": {}, - "reviewFrequency": {}, - "reviewedBy": {}, - "reviewedByGroupID": {}, - "reviewedByUserID": {}, - "riskRating": {}, - "riskScore": {}, - "scopeID": {}, - "scopeName": {}, - "soc2PeriodEnd": {}, - "spendCurrency": {}, - "ssoEnforced": {}, - "status": {}, - "statusPageURL": {}, - "systemInternalID": {}, - "tags": {}, - "terminationNoticeDays": {}, - "tier": {}, - "vendorMetadata": {}, - }, - RequiredKeys: []string{ + "entitySourceTypeID": {}, + "entitySourceTypeName": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "hasSoc2": {}, + "internalNotes": {}, + "internalOwner": {}, + "internalOwnerGroupID": {}, + "internalOwnerUserID": {}, + "lastReviewedAt": {}, + "links": {}, + "mfaEnforced": {}, + "mfaSupported": {}, + "name": {}, + "nextReviewAt": {}, + "observedAt": {}, + "ownerID": {}, + "providedServices": {}, + "renewalRisk": {}, + "reviewFrequency": {}, + "reviewedBy": {}, + "reviewedByGroupID": {}, + "reviewedByUserID": {}, + "riskRating": {}, + "riskScore": {}, + "scopeID": {}, + "scopeName": {}, + "soc2PeriodEnd": {}, + "spendCurrency": {}, + "ssoEnforced": {}, + "status": {}, + "statusPageURL": {}, + "systemInternalID": {}, + "tags": {}, + "terminationNoticeDays": {}, + "tier": {}, + "vendorMetadata": {}, }, + RequiredKeys: []string{}, UpsertKeys: []string{ "externalID", "name", @@ -2459,470 +2457,469 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Finding", Fields: []IntegrationMappingField{ { - InputKey: "assessmentID", - GoField: "AssessmentID", - EntField: "assessment_id", - Type: "string", - Required: false, + InputKey: "assessmentID", + GoField: "AssessmentID", + EntField: "assessment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "blocksProduction", - GoField: "BlocksProduction", - EntField: "blocks_production", - Type: "bool", - Required: false, + InputKey: "blocksProduction", + GoField: "BlocksProduction", + EntField: "blocks_production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "categories", - GoField: "Categories", - EntField: "categories", - Type: "json.RawMessage", - Required: false, + InputKey: "categories", + GoField: "Categories", + EntField: "categories", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "category", - GoField: "Category", - EntField: "category", - Type: "string", - Required: false, + InputKey: "category", + GoField: "Category", + EntField: "category", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "eventTime", - GoField: "EventTime", - EntField: "event_time", - Type: "time.Time", - Required: false, + InputKey: "eventTime", + GoField: "EventTime", + EntField: "event_time", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "exploitability", - GoField: "Exploitability", - EntField: "exploitability", - Type: "float64", - Required: false, + InputKey: "exploitability", + GoField: "Exploitability", + EntField: "exploitability", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalOwnerID", - GoField: "ExternalOwnerID", - EntField: "external_owner_id", - Type: "string", - Required: false, + InputKey: "externalOwnerID", + GoField: "ExternalOwnerID", + EntField: "external_owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalURI", - GoField: "ExternalURI", - EntField: "external_uri", - Type: "string", - Required: false, + InputKey: "externalURI", + GoField: "ExternalURI", + EntField: "external_uri", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingClass", - GoField: "FindingClass", - EntField: "finding_class", - Type: "string", - Required: false, + InputKey: "findingClass", + GoField: "FindingClass", + EntField: "finding_class", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingStatusID", - GoField: "FindingStatusID", - EntField: "finding_status_id", - Type: "string", - Required: false, + InputKey: "findingStatusID", + GoField: "FindingStatusID", + EntField: "finding_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingStatusName", - GoField: "FindingStatusName", - EntField: "finding_status_name", - Type: "string", - Required: false, + InputKey: "findingStatusName", + GoField: "FindingStatusName", + EntField: "finding_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "float64", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "numericSeverity", - GoField: "NumericSeverity", - EntField: "numeric_severity", - Type: "float64", - Required: false, + InputKey: "numericSeverity", + GoField: "NumericSeverity", + EntField: "numeric_severity", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "open", - GoField: "Open", - EntField: "open", - Type: "bool", - Required: false, + InputKey: "open", + GoField: "Open", + EntField: "open", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "priority", - GoField: "Priority", - EntField: "priority", - Type: "string", - Required: false, + InputKey: "priority", + GoField: "Priority", + EntField: "priority", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "production", - GoField: "Production", - EntField: "production", - Type: "bool", - Required: false, + InputKey: "production", + GoField: "Production", + EntField: "production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "public", - GoField: "Public", - EntField: "public", - Type: "bool", - Required: false, + InputKey: "public", + GoField: "Public", + EntField: "public", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "rawPayload", - GoField: "RawPayload", - EntField: "raw_payload", - Type: "json.RawMessage", - Required: false, + InputKey: "rawPayload", + GoField: "RawPayload", + EntField: "raw_payload", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "recommendation", - GoField: "Recommendation", - EntField: "recommendation", - Type: "string", - Required: false, + InputKey: "recommendation", + GoField: "Recommendation", + EntField: "recommendation", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "recommendedActions", - GoField: "RecommendedActions", - EntField: "recommended_actions", - Type: "string", - Required: false, + InputKey: "recommendedActions", + GoField: "RecommendedActions", + EntField: "recommended_actions", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "references", - GoField: "References", - EntField: "references", - Type: "json.RawMessage", - Required: false, + InputKey: "references", + GoField: "References", + EntField: "references", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "remediationSLA", - GoField: "RemediationSLA", - EntField: "remediation_sla", - Type: "int", - Required: false, + InputKey: "remediationSLA", + GoField: "RemediationSLA", + EntField: "remediation_sla", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reportedAt", - GoField: "ReportedAt", - EntField: "reported_at", - Type: "time.Time", - Required: false, + InputKey: "reportedAt", + GoField: "ReportedAt", + EntField: "reported_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "resourceName", - GoField: "ResourceName", - EntField: "resource_name", - Type: "string", - Required: false, + InputKey: "resourceName", + GoField: "ResourceName", + EntField: "resource_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "float64", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "severity", - GoField: "Severity", - EntField: "severity", - Type: "string", - Required: false, + InputKey: "severity", + GoField: "Severity", + EntField: "severity", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceUpdatedAt", - GoField: "SourceUpdatedAt", - EntField: "source_updated_at", - Type: "time.Time", - Required: false, + InputKey: "sourceUpdatedAt", + GoField: "SourceUpdatedAt", + EntField: "source_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "state", - GoField: "State", - EntField: "state", - Type: "string", - Required: false, + InputKey: "state", + GoField: "State", + EntField: "state", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "stepsToReproduce", - GoField: "StepsToReproduce", - EntField: "steps_to_reproduce", - Type: "json.RawMessage", - Required: false, + InputKey: "stepsToReproduce", + GoField: "StepsToReproduce", + EntField: "steps_to_reproduce", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "targetDetails", - GoField: "TargetDetails", - EntField: "target_details", - Type: "json.RawMessage", - Required: false, + InputKey: "targetDetails", + GoField: "TargetDetails", + EntField: "target_details", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "targets", - GoField: "Targets", - EntField: "targets", - Type: "json.RawMessage", - Required: false, + InputKey: "targets", + GoField: "Targets", + EntField: "targets", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "validated", - GoField: "Validated", - EntField: "validated", - Type: "bool", - Required: false, + InputKey: "validated", + GoField: "Validated", + EntField: "validated", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vector", - GoField: "Vector", - EntField: "vector", - Type: "string", - Required: false, + InputKey: "vector", + GoField: "Vector", + EntField: "vector", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "assessmentID": {}, - "blocksProduction": {}, - "categories": {}, - "category": {}, - "description": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "eventTime": {}, - "exploitability": {}, - "externalID": {}, - "externalOwnerID": {}, - "externalURI": {}, - "findingClass": {}, - "findingStatusID": {}, - "findingStatusName": {}, - "impact": {}, - "internalNotes": {}, - "metadata": {}, - "numericSeverity": {}, - "open": {}, - "ownerID": {}, - "priority": {}, - "production": {}, - "public": {}, - "rawPayload": {}, - "recommendation": {}, + "assessmentID": {}, + "blocksProduction": {}, + "categories": {}, + "category": {}, + "description": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "eventTime": {}, + "exploitability": {}, + "externalID": {}, + "externalOwnerID": {}, + "externalURI": {}, + "findingClass": {}, + "findingStatusID": {}, + "findingStatusName": {}, + "impact": {}, + "internalNotes": {}, + "metadata": {}, + "numericSeverity": {}, + "open": {}, + "ownerID": {}, + "priority": {}, + "production": {}, + "public": {}, + "rawPayload": {}, + "recommendation": {}, "recommendedActions": {}, - "references": {}, - "remediationSLA": {}, - "reportedAt": {}, - "resourceName": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "severity": {}, - "source": {}, - "sourceUpdatedAt": {}, - "state": {}, - "stepsToReproduce": {}, - "systemInternalID": {}, - "tags": {}, - "targetDetails": {}, - "targets": {}, - "validated": {}, - "vector": {}, - }, - RequiredKeys: []string{ + "references": {}, + "remediationSLA": {}, + "reportedAt": {}, + "resourceName": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "severity": {}, + "source": {}, + "sourceUpdatedAt": {}, + "state": {}, + "stepsToReproduce": {}, + "systemInternalID": {}, + "tags": {}, + "targetDetails": {}, + "targets": {}, + "validated": {}, + "vector": {}, }, + RequiredKeys: []string{}, UpsertKeys: []string{ "externalID", }, @@ -2932,327 +2929,327 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Risk", Fields: []IntegrationMappingField{ { - InputKey: "businessCosts", - GoField: "BusinessCosts", - EntField: "business_costs", - Type: "string", - Required: false, + InputKey: "businessCosts", + GoField: "BusinessCosts", + EntField: "business_costs", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "businessCostsJSON", - GoField: "BusinessCostsJSON", - EntField: "business_costs_json", - Type: "json.RawMessage", - Required: false, + InputKey: "businessCostsJSON", + GoField: "BusinessCostsJSON", + EntField: "business_costs_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "details", - GoField: "Details", - EntField: "details", - Type: "string", - Required: false, + InputKey: "details", + GoField: "Details", + EntField: "details", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "detailsJSON", - GoField: "DetailsJSON", - EntField: "details_json", - Type: "json.RawMessage", - Required: false, + InputKey: "detailsJSON", + GoField: "DetailsJSON", + EntField: "details_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalUUID", - GoField: "ExternalUUID", - EntField: "external_uuid", - Type: "string", - Required: false, + InputKey: "externalUUID", + GoField: "ExternalUUID", + EntField: "external_uuid", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "string", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastReviewedAt", - GoField: "LastReviewedAt", - EntField: "last_reviewed_at", - Type: "time.Time", - Required: false, + InputKey: "lastReviewedAt", + GoField: "LastReviewedAt", + EntField: "last_reviewed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "likelihood", - GoField: "Likelihood", - EntField: "likelihood", - Type: "string", - Required: false, + InputKey: "likelihood", + GoField: "Likelihood", + EntField: "likelihood", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigatedAt", - GoField: "MitigatedAt", - EntField: "mitigated_at", - Type: "time.Time", - Required: false, + InputKey: "mitigatedAt", + GoField: "MitigatedAt", + EntField: "mitigated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigation", - GoField: "Mitigation", - EntField: "mitigation", - Type: "string", - Required: false, + InputKey: "mitigation", + GoField: "Mitigation", + EntField: "mitigation", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigationJSON", - GoField: "MitigationJSON", - EntField: "mitigation_json", - Type: "json.RawMessage", - Required: false, + InputKey: "mitigationJSON", + GoField: "MitigationJSON", + EntField: "mitigation_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: true, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "nextReviewDueAt", - GoField: "NextReviewDueAt", - EntField: "next_review_due_at", - Type: "time.Time", - Required: false, + InputKey: "nextReviewDueAt", + GoField: "NextReviewDueAt", + EntField: "next_review_due_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "residualScore", - GoField: "ResidualScore", - EntField: "residual_score", - Type: "int", - Required: false, + InputKey: "residualScore", + GoField: "ResidualScore", + EntField: "residual_score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewFrequency", - GoField: "ReviewFrequency", - EntField: "review_frequency", - Type: "string", - Required: false, + InputKey: "reviewFrequency", + GoField: "ReviewFrequency", + EntField: "review_frequency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewRequired", - GoField: "ReviewRequired", - EntField: "review_required", - Type: "bool", - Required: false, + InputKey: "reviewRequired", + GoField: "ReviewRequired", + EntField: "review_required", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskCategoryID", - GoField: "RiskCategoryID", - EntField: "risk_category_id", - Type: "string", - Required: false, + InputKey: "riskCategoryID", + GoField: "RiskCategoryID", + EntField: "risk_category_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskCategoryName", - GoField: "RiskCategoryName", - EntField: "risk_category_name", - Type: "string", - Required: false, + InputKey: "riskCategoryName", + GoField: "RiskCategoryName", + EntField: "risk_category_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskDecision", - GoField: "RiskDecision", - EntField: "risk_decision", - Type: "string", - Required: false, + InputKey: "riskDecision", + GoField: "RiskDecision", + EntField: "risk_decision", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskKindID", - GoField: "RiskKindID", - EntField: "risk_kind_id", - Type: "string", - Required: false, + InputKey: "riskKindID", + GoField: "RiskKindID", + EntField: "risk_kind_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskKindName", - GoField: "RiskKindName", - EntField: "risk_kind_name", - Type: "string", - Required: false, + InputKey: "riskKindName", + GoField: "RiskKindName", + EntField: "risk_kind_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "int", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: false, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "businessCosts": {}, + "businessCosts": {}, "businessCostsJSON": {}, - "details": {}, - "detailsJSON": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "externalUUID": {}, - "impact": {}, - "integrationID": {}, - "lastReviewedAt": {}, - "likelihood": {}, - "mitigatedAt": {}, - "mitigation": {}, - "mitigationJSON": {}, - "name": {}, - "nextReviewDueAt": {}, - "observedAt": {}, - "ownerID": {}, - "residualScore": {}, - "reviewFrequency": {}, - "reviewRequired": {}, - "riskCategoryID": {}, - "riskCategoryName": {}, - "riskDecision": {}, - "riskKindID": {}, - "riskKindName": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "status": {}, - "tags": {}, + "details": {}, + "detailsJSON": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "externalUUID": {}, + "impact": {}, + "integrationID": {}, + "lastReviewedAt": {}, + "likelihood": {}, + "mitigatedAt": {}, + "mitigation": {}, + "mitigationJSON": {}, + "name": {}, + "nextReviewDueAt": {}, + "observedAt": {}, + "ownerID": {}, + "residualScore": {}, + "reviewFrequency": {}, + "reviewRequired": {}, + "riskCategoryID": {}, + "riskCategoryName": {}, + "riskDecision": {}, + "riskKindID": {}, + "riskKindName": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "name", @@ -3267,507 +3264,507 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Vulnerability", Fields: []IntegrationMappingField{ { - InputKey: "autoDismissedAt", - GoField: "AutoDismissedAt", - EntField: "auto_dismissed_at", - Type: "time.Time", - Required: false, + InputKey: "autoDismissedAt", + GoField: "AutoDismissedAt", + EntField: "auto_dismissed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "blocking", - GoField: "Blocking", - EntField: "blocking", - Type: "bool", - Required: false, + InputKey: "blocking", + GoField: "Blocking", + EntField: "blocking", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "category", - GoField: "Category", - EntField: "category", - Type: "string", - Required: false, + InputKey: "category", + GoField: "Category", + EntField: "category", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "cveID", - GoField: "CveID", - EntField: "cve_id", - Type: "string", - Required: false, + InputKey: "cveID", + GoField: "CveID", + EntField: "cve_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "cweIds", - GoField: "CweIds", - EntField: "cwe_ids", - Type: "json.RawMessage", - Required: false, + InputKey: "cweIds", + GoField: "CweIds", + EntField: "cwe_ids", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dependencyScope", - GoField: "DependencyScope", - EntField: "dependency_scope", - Type: "string", - Required: false, + InputKey: "dependencyScope", + GoField: "DependencyScope", + EntField: "dependency_scope", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "discoveredAt", - GoField: "DiscoveredAt", - EntField: "discovered_at", - Type: "time.Time", - Required: false, + InputKey: "discoveredAt", + GoField: "DiscoveredAt", + EntField: "discovered_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedAt", - GoField: "DismissedAt", - EntField: "dismissed_at", - Type: "time.Time", - Required: false, + InputKey: "dismissedAt", + GoField: "DismissedAt", + EntField: "dismissed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedComment", - GoField: "DismissedComment", - EntField: "dismissed_comment", - Type: "string", - Required: false, + InputKey: "dismissedComment", + GoField: "DismissedComment", + EntField: "dismissed_comment", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedReason", - GoField: "DismissedReason", - EntField: "dismissed_reason", - Type: "string", - Required: false, + InputKey: "dismissedReason", + GoField: "DismissedReason", + EntField: "dismissed_reason", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "exploitability", - GoField: "Exploitability", - EntField: "exploitability", - Type: "float64", - Required: false, + InputKey: "exploitability", + GoField: "Exploitability", + EntField: "exploitability", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalOwnerID", - GoField: "ExternalOwnerID", - EntField: "external_owner_id", - Type: "string", - Required: false, + InputKey: "externalOwnerID", + GoField: "ExternalOwnerID", + EntField: "external_owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalURI", - GoField: "ExternalURI", - EntField: "external_uri", - Type: "string", - Required: false, + InputKey: "externalURI", + GoField: "ExternalURI", + EntField: "external_uri", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstPatchedVersion", - GoField: "FirstPatchedVersion", - EntField: "first_patched_version", - Type: "string", - Required: false, + InputKey: "firstPatchedVersion", + GoField: "FirstPatchedVersion", + EntField: "first_patched_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "fixedAt", - GoField: "FixedAt", - EntField: "fixed_at", - Type: "time.Time", - Required: false, + InputKey: "fixedAt", + GoField: "FixedAt", + EntField: "fixed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "float64", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impacts", - GoField: "Impacts", - EntField: "impacts", - Type: "json.RawMessage", - Required: false, + InputKey: "impacts", + GoField: "Impacts", + EntField: "impacts", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "manifestPath", - GoField: "ManifestPath", - EntField: "manifest_path", - Type: "string", - Required: false, + InputKey: "manifestPath", + GoField: "ManifestPath", + EntField: "manifest_path", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "open", - GoField: "Open", - EntField: "open", - Type: "bool", - Required: false, + InputKey: "open", + GoField: "Open", + EntField: "open", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "packageEcosystem", - GoField: "PackageEcosystem", - EntField: "package_ecosystem", - Type: "string", - Required: false, + InputKey: "packageEcosystem", + GoField: "PackageEcosystem", + EntField: "package_ecosystem", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "packageName", - GoField: "PackageName", - EntField: "package_name", - Type: "string", - Required: false, + InputKey: "packageName", + GoField: "PackageName", + EntField: "package_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "priority", - GoField: "Priority", - EntField: "priority", - Type: "string", - Required: false, + InputKey: "priority", + GoField: "Priority", + EntField: "priority", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "production", - GoField: "Production", - EntField: "production", - Type: "bool", - Required: false, + InputKey: "production", + GoField: "Production", + EntField: "production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "public", - GoField: "Public", - EntField: "public", - Type: "bool", - Required: false, + InputKey: "public", + GoField: "Public", + EntField: "public", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "publishedAt", - GoField: "PublishedAt", - EntField: "published_at", - Type: "time.Time", - Required: false, + InputKey: "publishedAt", + GoField: "PublishedAt", + EntField: "published_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "rawPayload", - GoField: "RawPayload", - EntField: "raw_payload", - Type: "json.RawMessage", - Required: false, + InputKey: "rawPayload", + GoField: "RawPayload", + EntField: "raw_payload", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "references", - GoField: "References", - EntField: "references", - Type: "json.RawMessage", - Required: false, + InputKey: "references", + GoField: "References", + EntField: "references", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "remediationSLA", - GoField: "RemediationSLA", - EntField: "remediation_sla", - Type: "int", - Required: false, + InputKey: "remediationSLA", + GoField: "RemediationSLA", + EntField: "remediation_sla", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "float64", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "severity", - GoField: "Severity", - EntField: "severity", - Type: "string", - Required: false, + InputKey: "severity", + GoField: "Severity", + EntField: "severity", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceUpdatedAt", - GoField: "SourceUpdatedAt", - EntField: "source_updated_at", - Type: "time.Time", - Required: false, + InputKey: "sourceUpdatedAt", + GoField: "SourceUpdatedAt", + EntField: "source_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "summary", - GoField: "Summary", - EntField: "summary", - Type: "string", - Required: false, + InputKey: "summary", + GoField: "Summary", + EntField: "summary", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "validated", - GoField: "Validated", - EntField: "validated", - Type: "bool", - Required: false, + InputKey: "validated", + GoField: "Validated", + EntField: "validated", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vector", - GoField: "Vector", - EntField: "vector", - Type: "string", - Required: false, + InputKey: "vector", + GoField: "Vector", + EntField: "vector", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerabilityStatusID", - GoField: "VulnerabilityStatusID", - EntField: "vulnerability_status_id", - Type: "string", - Required: false, + InputKey: "vulnerabilityStatusID", + GoField: "VulnerabilityStatusID", + EntField: "vulnerability_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerabilityStatusName", - GoField: "VulnerabilityStatusName", - EntField: "vulnerability_status_name", - Type: "string", - Required: false, + InputKey: "vulnerabilityStatusName", + GoField: "VulnerabilityStatusName", + EntField: "vulnerability_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerableVersionRange", - GoField: "VulnerableVersionRange", - EntField: "vulnerable_version_range", - Type: "string", - Required: false, + InputKey: "vulnerableVersionRange", + GoField: "VulnerableVersionRange", + EntField: "vulnerable_version_range", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "autoDismissedAt": {}, - "blocking": {}, - "category": {}, - "cveID": {}, - "cweIds": {}, - "dependencyScope": {}, - "description": {}, - "discoveredAt": {}, - "dismissedAt": {}, - "dismissedComment": {}, - "dismissedReason": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "exploitability": {}, - "externalID": {}, - "externalOwnerID": {}, - "externalURI": {}, - "firstPatchedVersion": {}, - "fixedAt": {}, - "impact": {}, - "impacts": {}, - "internalNotes": {}, - "manifestPath": {}, - "metadata": {}, - "open": {}, - "ownerID": {}, - "packageEcosystem": {}, - "packageName": {}, - "priority": {}, - "production": {}, - "public": {}, - "publishedAt": {}, - "rawPayload": {}, - "references": {}, - "remediationSLA": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "severity": {}, - "source": {}, - "sourceUpdatedAt": {}, - "summary": {}, - "systemInternalID": {}, - "tags": {}, - "validated": {}, - "vector": {}, - "vulnerabilityStatusID": {}, + "autoDismissedAt": {}, + "blocking": {}, + "category": {}, + "cveID": {}, + "cweIds": {}, + "dependencyScope": {}, + "description": {}, + "discoveredAt": {}, + "dismissedAt": {}, + "dismissedComment": {}, + "dismissedReason": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "exploitability": {}, + "externalID": {}, + "externalOwnerID": {}, + "externalURI": {}, + "firstPatchedVersion": {}, + "fixedAt": {}, + "impact": {}, + "impacts": {}, + "internalNotes": {}, + "manifestPath": {}, + "metadata": {}, + "open": {}, + "ownerID": {}, + "packageEcosystem": {}, + "packageName": {}, + "priority": {}, + "production": {}, + "public": {}, + "publishedAt": {}, + "rawPayload": {}, + "references": {}, + "remediationSLA": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "severity": {}, + "source": {}, + "sourceUpdatedAt": {}, + "summary": {}, + "systemInternalID": {}, + "tags": {}, + "validated": {}, + "vector": {}, + "vulnerabilityStatusID": {}, "vulnerabilityStatusName": {}, - "vulnerableVersionRange": {}, + "vulnerableVersionRange": {}, }, RequiredKeys: []string{ "externalID", diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index 4056f033d4..550bd67655 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1,7 +1 @@ -<<<<<<< HEAD -892778be319d6561a90c924e5d42348b4e0555f6035fcd100222513a2cd461f9 -||||||| bdf410139 -9200e242b8e8c74c4c11ea1b1db1d515cc5613ed3028e09d15bedbd8fcfa22a0 -======= -4b7e0c8a2045c613368dd1c04ce2976a1a4d132fa088f2605de688e4aa3f3dd7 ->>>>>>> origin/main +85dd990f17040474402d65ea6c0710bef3e797c3abb442a7bab6a549187e784a \ No newline at end of file diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index d94da99b5b..dd9346a88c 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1,7 +1 @@ -<<<<<<< HEAD -d6826d69036dc37371b24f5adc9b2756399fcfa98276162e3e8679e62fa97d7d -||||||| bdf410139 -1b8a5212abb0f9b10fb3936adc882c550cb3e277c0089cfff578326e9b6b7c93 -======= -2663e47f6208e1d97ba8e1032842640253b907f3758bd4428ac5a18f0dc0ffaa ->>>>>>> origin/main +8dea0eed5782c535b4d0b2f58e0c39910d93089551afb8a765a64fe111664c65 \ No newline at end of file diff --git a/internal/graphapi/query/history/notificationtemplatehistory.graphql b/internal/graphapi/query/history/notificationtemplatehistory.graphql index 4b12f4e0d4..1bef948ff1 100644 --- a/internal/graphapi/query/history/notificationtemplatehistory.graphql +++ b/internal/graphapi/query/history/notificationtemplatehistory.graphql @@ -1,114 +1,100 @@ -query GetAllNotificationTemplateHistories($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [NotificationTemplateHistoryOrder!]) { - notificationTemplateHistories( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - active - blocks - bodyTemplate - channel - createdAt - createdBy - defaults - description - destinations - emailTemplateID - format - historyTime - id - integrationID - internalNotes - jsonconfig - key - locale - metadata - name - operation - ownerID - ref - revision - subjectTemplate - systemInternalID - systemOwned - templateContext - titleTemplate - topicPattern - uischema - updatedAt - updatedBy - version - workflowDefinitionID - } - } - } +query GetAllNotificationTemplateHistories ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [NotificationTemplateHistoryOrder!]) { + notificationTemplateHistories(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + active + blocks + bodyTemplate + channel + createdAt + createdBy + defaults + description + destinations + emailTemplateID + format + historyTime + id + integrationID + internalNotes + jsonconfig + key + locale + metadata + name + operation + ownerID + ref + revision + subjectTemplate + systemInternalID + systemOwned + templateContext + titleTemplate + topicPattern + uischema + updatedAt + updatedBy + version + workflowDefinitionID + } + } + } } - -query GetNotificationTemplateHistories($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [NotificationTemplateHistoryOrder!], $where: NotificationTemplateHistoryWhereInput) { - notificationTemplateHistories( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - where: $where - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - active - blocks - bodyTemplate - channel - createdAt - createdBy - defaults - description - destinations - emailTemplateID - format - historyTime - id - integrationID - internalNotes - jsonconfig - key - locale - metadata - name - operation - ownerID - ref - revision - subjectTemplate - systemInternalID - systemOwned - templateContext - titleTemplate - topicPattern - uischema - updatedAt - updatedBy - version - workflowDefinitionID - } - } - } +query GetNotificationTemplateHistories ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [NotificationTemplateHistoryOrder!], $where: NotificationTemplateHistoryWhereInput) { + notificationTemplateHistories(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy, where: $where) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + active + blocks + bodyTemplate + channel + createdAt + createdBy + defaults + description + destinations + emailTemplateID + format + historyTime + id + integrationID + internalNotes + jsonconfig + key + locale + metadata + name + operation + ownerID + ref + revision + subjectTemplate + systemInternalID + systemOwned + templateContext + titleTemplate + topicPattern + uischema + updatedAt + updatedBy + version + workflowDefinitionID + } + } + } } diff --git a/internal/graphapi/query/history/vendorscoringconfighistory.graphql b/internal/graphapi/query/history/vendorscoringconfighistory.graphql index 1c6d524953..f609a46b93 100644 --- a/internal/graphapi/query/history/vendorscoringconfighistory.graphql +++ b/internal/graphapi/query/history/vendorscoringconfighistory.graphql @@ -1,70 +1,56 @@ -query GetAllVendorScoringConfigHistories($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [VendorScoringConfigHistoryOrder!]) { - vendorScoringConfigHistories( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - createdAt - createdBy - historyTime - id - operation - ownerID - questions - ref - riskThresholds - scoringMode - tags - updatedAt - updatedBy - } - } - } +query GetAllVendorScoringConfigHistories ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [VendorScoringConfigHistoryOrder!]) { + vendorScoringConfigHistories(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + createdAt + createdBy + historyTime + id + operation + ownerID + questions + ref + riskThresholds + scoringMode + tags + updatedAt + updatedBy + } + } + } } - -query GetVendorScoringConfigHistories($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [VendorScoringConfigHistoryOrder!], $where: VendorScoringConfigHistoryWhereInput) { - vendorScoringConfigHistories( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - where: $where - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - createdAt - createdBy - historyTime - id - operation - ownerID - questions - ref - riskThresholds - scoringMode - tags - updatedAt - updatedBy - } - } - } +query GetVendorScoringConfigHistories ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [VendorScoringConfigHistoryOrder!], $where: VendorScoringConfigHistoryWhereInput) { + vendorScoringConfigHistories(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy, where: $where) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + createdAt + createdBy + historyTime + id + operation + ownerID + questions + ref + riskThresholds + scoringMode + tags + updatedAt + updatedBy + } + } + } } diff --git a/internal/graphapi/query/integration.graphql b/internal/graphapi/query/integration.graphql index 2015632e61..589b9e189f 100644 --- a/internal/graphapi/query/integration.graphql +++ b/internal/graphapi/query/integration.graphql @@ -1,114 +1,110 @@ -mutation DeleteIntegration($deleteIntegrationId: ID!) { - deleteIntegration(id: $deleteIntegrationId) { - deletedID - } +mutation DeleteIntegration ($deleteIntegrationId: ID!) { + deleteIntegration(id: $deleteIntegrationId) { + deletedID + } } - query GetAllIntegrations { - integrations { - edges { - node { - description - id - kind - name - ownerID - createdAt - createdBy - updatedAt - updatedBy - integrationType - metadata - } - } - } + integrations { + edges { + node { + description + id + kind + name + ownerID + createdAt + createdBy + updatedAt + updatedBy + integrationType + metadata + } + } + } } - -query GetIntegrationByID($integrationId: ID!) { - integration(id: $integrationId) { - createdAt - createdBy - definitionID - definitionSlug - definitionVersion - description - environmentID - environmentName - family - id - integrationType - internalNotes - kind - metadata - name - ownerID - platformID - primaryDirectory - providerMetadataSnapshot - scopeID - scopeName - status - systemInternalID - systemOwned - tags - updatedAt - updatedBy - } +query GetIntegrationByID ($integrationId: ID!) { + integration(id: $integrationId) { + createdAt + createdBy + definitionID + definitionSlug + definitionVersion + description + environmentID + environmentName + family + id + integrationType + internalNotes + kind + metadata + name + ownerID + platformID + primaryDirectory + providerMetadataSnapshot + scopeID + scopeName + status + systemInternalID + systemOwned + tags + updatedAt + updatedBy + } } - -query GetIntegrationByIDWithSecrets($integrationId: ID!) { - integration(id: $integrationId) { - description - id - kind - name - ownerID - secrets { - edges { - node { - id - name - kind - } - } - } - createdAt - createdBy - updatedAt - updatedBy - integrationType - metadata - } +query GetIntegrationByIDWithSecrets ($integrationId: ID!) { + integration(id: $integrationId) { + description + id + kind + name + ownerID + secrets { + edges { + node { + id + name + kind + } + } + } + createdAt + createdBy + updatedAt + updatedBy + integrationType + metadata + } } - -query GetIntegrations($where: IntegrationWhereInput) { - integrations(where: $where) { - edges { - node { - description - id - kind - name - ownerID - owner { - id - } - secrets { - edges { - node { - id - name - kind - } - } - } - createdAt - createdBy - updatedAt - updatedBy - integrationType - metadata - } - } - } +query GetIntegrations ($where: IntegrationWhereInput) { + integrations(where: $where) { + edges { + node { + description + id + kind + name + ownerID + owner { + id + } + secrets { + edges { + node { + id + name + kind + } + } + } + createdAt + createdBy + updatedAt + updatedBy + integrationType + metadata + } + } + } } diff --git a/internal/graphapi/query/platform.graphql b/internal/graphapi/query/platform.graphql index 685774350d..62fae77a55 100644 --- a/internal/graphapi/query/platform.graphql +++ b/internal/graphapi/query/platform.graphql @@ -1,666 +1,635 @@ -mutation CreateBulkCSVPlatform($input: Upload!) { - createBulkCSVPlatform(input: $input) { - platforms { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - } - } +mutation CreateBulkCSVPlatform ($input: Upload!) { + createBulkCSVPlatform(input: $input) { + platforms { + accessModelID + accessModelName + businessOwner + businessOwnerGroupID + businessOwnerUserID + businessPurpose + containsPii + costCenter + createdAt + createdBy + criticalityID + criticalityName + dataFlowSummary + description + displayID + encryptionStatusID + encryptionStatusName + environmentID + environmentName + estimatedMonthlyCost + externalReferenceID + externalUUID + id + internalOwner + internalOwnerGroupID + internalOwnerUserID + metadata + name + ownerID + physicalLocation + platformDataClassificationID + platformDataClassificationName + platformKindID + platformKindName + platformOwnerID + purchaseDate + region + scopeID + scopeName + scopeStatement + securityOwner + securityOwnerGroupID + securityOwnerUserID + securityTierID + securityTierName + sourceIdentifier + sourceType + status + tags + technicalOwner + technicalOwnerGroupID + technicalOwnerUserID + trustBoundaryDescription + updatedAt + updatedBy + workflowEligibleMarker + } + } } - -mutation CreateBulkPlatform($input: [CreatePlatformInput!]) { - createBulkPlatform(input: $input) { - platforms { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - architectureDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - dataFlowDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - trustBoundaryDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - } - } +mutation CreateBulkPlatform ($input: [CreatePlatformInput!]) { + createBulkPlatform(input: $input) { + platforms { + accessModelID + accessModelName + businessOwner + businessOwnerGroupID + businessOwnerUserID + businessPurpose + containsPii + costCenter + createdAt + createdBy + criticalityID + criticalityName + dataFlowSummary + description + displayID + encryptionStatusID + encryptionStatusName + environmentID + environmentName + estimatedMonthlyCost + externalReferenceID + externalUUID + id + internalOwner + internalOwnerGroupID + internalOwnerUserID + metadata + name + ownerID + physicalLocation + platformDataClassificationID + platformDataClassificationName + platformKindID + platformKindName + platformOwnerID + purchaseDate + region + scopeID + scopeName + scopeStatement + securityOwner + securityOwnerGroupID + securityOwnerUserID + securityTierID + securityTierName + sourceIdentifier + sourceType + status + tags + technicalOwner + technicalOwnerGroupID + technicalOwnerUserID + trustBoundaryDescription + updatedAt + updatedBy + workflowEligibleMarker + architectureDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + dataFlowDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + trustBoundaryDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + } + } } - -mutation CreatePlatform($input: CreatePlatformInput!, $architectureDiagrams: [Upload!], $dataFlowDiagrams: [Upload!], $trustBoundaryDiagrams: [Upload!]) { - createPlatform( - input: $input - architectureDiagrams: $architectureDiagrams - dataFlowDiagrams: $dataFlowDiagrams - trustBoundaryDiagrams: $trustBoundaryDiagrams - ) { - platform { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - sourceAssets { - edges { - node { - id - name - } - } - } - sourceEntities { - edges { - node { - id - name - } - } - } - outOfScopeAssets { - edges { - node { - id - name - } - } - } - outOfScopeVendors { - edges { - node { - id - name - } - } - } - architectureDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - dataFlowDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - trustBoundaryDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - } - } +mutation CreatePlatform ($input: CreatePlatformInput!, $architectureDiagrams: [Upload!], $dataFlowDiagrams: [Upload!], $trustBoundaryDiagrams: [Upload!]) { + createPlatform(input: $input, architectureDiagrams: $architectureDiagrams, dataFlowDiagrams: $dataFlowDiagrams, trustBoundaryDiagrams: $trustBoundaryDiagrams) { + platform { + accessModelID + accessModelName + businessOwner + businessOwnerGroupID + businessOwnerUserID + businessPurpose + containsPii + costCenter + createdAt + createdBy + criticalityID + criticalityName + dataFlowSummary + description + displayID + encryptionStatusID + encryptionStatusName + environmentID + environmentName + estimatedMonthlyCost + externalReferenceID + externalUUID + id + internalOwner + internalOwnerGroupID + internalOwnerUserID + metadata + name + ownerID + physicalLocation + platformDataClassificationID + platformDataClassificationName + platformKindID + platformKindName + platformOwnerID + purchaseDate + region + scopeID + scopeName + scopeStatement + securityOwner + securityOwnerGroupID + securityOwnerUserID + securityTierID + securityTierName + sourceIdentifier + sourceType + status + tags + technicalOwner + technicalOwnerGroupID + technicalOwnerUserID + trustBoundaryDescription + updatedAt + updatedBy + workflowEligibleMarker + sourceAssets { + edges { + node { + id + name + } + } + } + sourceEntities { + edges { + node { + id + name + } + } + } + outOfScopeAssets { + edges { + node { + id + name + } + } + } + outOfScopeVendors { + edges { + node { + id + name + } + } + } + architectureDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + dataFlowDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + trustBoundaryDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + } + } } - -mutation DeletePlatform($deletePlatformId: ID!) { - deletePlatform(id: $deletePlatformId) { - deletedID - } +mutation DeletePlatform ($deletePlatformId: ID!) { + deletePlatform(id: $deletePlatformId) { + deletedID + } } - -query GetAllPlatforms($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [PlatformOrder!]) { - platforms( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - identityHolders { - edges { - node { - id - fullName - email - displayID - } - } - } - } - } - } +query GetAllPlatforms ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [PlatformOrder!]) { + platforms(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + accessModelID + accessModelName + businessOwner + businessOwnerGroupID + businessOwnerUserID + businessPurpose + containsPii + costCenter + createdAt + createdBy + criticalityID + criticalityName + dataFlowSummary + description + displayID + encryptionStatusID + encryptionStatusName + environmentID + environmentName + estimatedMonthlyCost + externalReferenceID + externalUUID + id + internalOwner + internalOwnerGroupID + internalOwnerUserID + metadata + name + ownerID + physicalLocation + platformDataClassificationID + platformDataClassificationName + platformKindID + platformKindName + platformOwnerID + purchaseDate + region + scopeID + scopeName + scopeStatement + securityOwner + securityOwnerGroupID + securityOwnerUserID + securityTierID + securityTierName + sourceIdentifier + sourceType + status + tags + technicalOwner + technicalOwnerGroupID + technicalOwnerUserID + trustBoundaryDescription + updatedAt + updatedBy + workflowEligibleMarker + identityHolders { + edges { + node { + id + fullName + email + displayID + } + } + } + } + } + } } - -query GetPlatformByID($platformId: ID!) { - platform(id: $platformId) { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - } +query GetPlatformByID ($platformId: ID!) { + platform(id: $platformId) { + accessModelID + accessModelName + businessOwner + businessOwnerGroupID + businessOwnerUserID + businessPurpose + containsPii + costCenter + createdAt + createdBy + criticalityID + criticalityName + dataFlowSummary + description + displayID + encryptionStatusID + encryptionStatusName + environmentID + environmentName + estimatedMonthlyCost + externalReferenceID + externalUUID + id + internalOwner + internalOwnerGroupID + internalOwnerUserID + metadata + name + ownerID + physicalLocation + platformDataClassificationID + platformDataClassificationName + platformKindID + platformKindName + platformOwnerID + purchaseDate + region + scopeID + scopeName + scopeStatement + securityOwner + securityOwnerGroupID + securityOwnerUserID + securityTierID + securityTierName + sourceIdentifier + sourceType + status + tags + technicalOwner + technicalOwnerGroupID + technicalOwnerUserID + trustBoundaryDescription + updatedAt + updatedBy + workflowEligibleMarker + } } - -query GetPlatforms($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [PlatformOrder!], $where: PlatformWhereInput) { - platforms( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - where: $where - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - } - } - } +query GetPlatforms ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [PlatformOrder!], $where: PlatformWhereInput) { + platforms(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy, where: $where) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + accessModelID + accessModelName + businessOwner + businessOwnerGroupID + businessOwnerUserID + businessPurpose + containsPii + costCenter + createdAt + createdBy + criticalityID + criticalityName + dataFlowSummary + description + displayID + encryptionStatusID + encryptionStatusName + environmentID + environmentName + estimatedMonthlyCost + externalReferenceID + externalUUID + id + internalOwner + internalOwnerGroupID + internalOwnerUserID + metadata + name + ownerID + physicalLocation + platformDataClassificationID + platformDataClassificationName + platformKindID + platformKindName + platformOwnerID + purchaseDate + region + scopeID + scopeName + scopeStatement + securityOwner + securityOwnerGroupID + securityOwnerUserID + securityTierID + securityTierName + sourceIdentifier + sourceType + status + tags + technicalOwner + technicalOwnerGroupID + technicalOwnerUserID + trustBoundaryDescription + updatedAt + updatedBy + workflowEligibleMarker + } + } + } } - -mutation UpdatePlatform($updatePlatformId: ID!, $input: UpdatePlatformInput!, $architectureDiagrams: [Upload!], $dataFlowDiagrams: [Upload!], $trustBoundaryDiagrams: [Upload!]) { - updatePlatform( - id: $updatePlatformId - input: $input - architectureDiagrams: $architectureDiagrams - dataFlowDiagrams: $dataFlowDiagrams - trustBoundaryDiagrams: $trustBoundaryDiagrams - ) { - platform { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - assets { - edges { - node { - id - name - } - } - } - entities { - edges { - node { - id - name - } - } - } - sourceAssets { - edges { - node { - id - name - } - } - } - sourceEntities { - edges { - node { - id - name - } - } - } - outOfScopeAssets { - edges { - node { - id - name - } - } - } - outOfScopeVendors { - edges { - node { - id - name - } - } - } - architectureDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - dataFlowDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - trustBoundaryDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - } - } +mutation UpdatePlatform ($updatePlatformId: ID!, $input: UpdatePlatformInput!, $architectureDiagrams: [Upload!], $dataFlowDiagrams: [Upload!], $trustBoundaryDiagrams: [Upload!]) { + updatePlatform(id: $updatePlatformId, input: $input, architectureDiagrams: $architectureDiagrams, dataFlowDiagrams: $dataFlowDiagrams, trustBoundaryDiagrams: $trustBoundaryDiagrams) { + platform { + accessModelID + accessModelName + businessOwner + businessOwnerGroupID + businessOwnerUserID + businessPurpose + containsPii + costCenter + createdAt + createdBy + criticalityID + criticalityName + dataFlowSummary + description + displayID + encryptionStatusID + encryptionStatusName + environmentID + environmentName + estimatedMonthlyCost + externalReferenceID + externalUUID + id + internalOwner + internalOwnerGroupID + internalOwnerUserID + metadata + name + ownerID + physicalLocation + platformDataClassificationID + platformDataClassificationName + platformKindID + platformKindName + platformOwnerID + purchaseDate + region + scopeID + scopeName + scopeStatement + securityOwner + securityOwnerGroupID + securityOwnerUserID + securityTierID + securityTierName + sourceIdentifier + sourceType + status + tags + technicalOwner + technicalOwnerGroupID + technicalOwnerUserID + trustBoundaryDescription + updatedAt + updatedBy + workflowEligibleMarker + assets { + edges { + node { + id + name + } + } + } + entities { + edges { + node { + id + name + } + } + } + sourceAssets { + edges { + node { + id + name + } + } + } + sourceEntities { + edges { + node { + id + name + } + } + } + outOfScopeAssets { + edges { + node { + id + name + } + } + } + outOfScopeVendors { + edges { + node { + id + name + } + } + } + architectureDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + dataFlowDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + trustBoundaryDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + } + } } diff --git a/internal/graphapi/query/remediation.graphql b/internal/graphapi/query/remediation.graphql index 7b5919a623..ebddc78e84 100644 --- a/internal/graphapi/query/remediation.graphql +++ b/internal/graphapi/query/remediation.graphql @@ -1,387 +1,377 @@ -mutation CreateBulkCSVRemediation($input: Upload!) { - createBulkCSVRemediation(input: $input) { - remediations { - completedAt - createdAt - createdBy - displayID - dueAt - environmentID - environmentName - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - internalNotes - metadata - ownerID - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - scopeID - scopeName - source - state - status - summary - systemInternalID - systemOwned - tags - ticketReference - title - updatedAt - updatedBy - } - } +mutation CreateBulkCSVRemediation ($input: Upload!) { + createBulkCSVRemediation(input: $input) { + remediations { + completedAt + createdAt + createdBy + displayID + dueAt + environmentID + environmentName + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + internalNotes + metadata + ownerID + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + scopeID + scopeName + source + state + status + summary + systemInternalID + systemOwned + tags + ticketReference + title + updatedAt + updatedBy + } + } } - -mutation CreateBulkRemediation($input: [CreateRemediationInput!]) { - createBulkRemediation(input: $input) { - remediations { - completedAt - createdAt - createdBy - displayID - dueAt - environmentID - environmentName - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - internalNotes - metadata - ownerID - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - scopeID - scopeName - source - state - status - summary - systemInternalID - systemOwned - tags - ticketReference - title - updatedAt - updatedBy - } - } +mutation CreateBulkRemediation ($input: [CreateRemediationInput!]) { + createBulkRemediation(input: $input) { + remediations { + completedAt + createdAt + createdBy + displayID + dueAt + environmentID + environmentName + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + internalNotes + metadata + ownerID + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + scopeID + scopeName + source + state + status + summary + systemInternalID + systemOwned + tags + ticketReference + title + updatedAt + updatedBy + } + } } - -mutation CreateRemediation($input: CreateRemediationInput!) { - createRemediation(input: $input) { - remediation { - completedAt - createdAt - createdBy - displayID - dueAt - environmentID - environmentName - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - internalNotes - metadata - ownerID - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - scopeID - scopeName - source - state - status - summary - systemInternalID - systemOwned - tags - ticketReference - title - updatedAt - updatedBy - } - } +mutation CreateRemediation ($input: CreateRemediationInput!) { + createRemediation(input: $input) { + remediation { + completedAt + createdAt + createdBy + displayID + dueAt + environmentID + environmentName + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + internalNotes + metadata + ownerID + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + scopeID + scopeName + source + state + status + summary + systemInternalID + systemOwned + tags + ticketReference + title + updatedAt + updatedBy + } + } } - -mutation DeleteBulkRemediation($ids: [ID!]!) { - deleteBulkRemediation(ids: $ids) { - deletedIDs - } +mutation DeleteBulkRemediation ($ids: [ID!]!) { + deleteBulkRemediation(ids: $ids) { + deletedIDs + } } - -mutation DeleteRemediation($deleteRemediationId: ID!) { - deleteRemediation(id: $deleteRemediationId) { - deletedID - } +mutation DeleteRemediation ($deleteRemediationId: ID!) { + deleteRemediation(id: $deleteRemediationId) { + deletedID + } } - query GetAllRemediations { - remediations { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - completedAt - createdAt - createdBy - dueAt - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - metadata - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - source - state - summary - tags - ticketReference - title - updatedAt - updatedBy - } - } - } + remediations { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + completedAt + createdAt + createdBy + dueAt + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + metadata + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + source + state + summary + tags + ticketReference + title + updatedAt + updatedBy + } + } + } } - -query GetRemediationByID($remediationId: ID!) { - remediation(id: $remediationId) { - completedAt - createdAt - createdBy - displayID - dueAt - environmentID - environmentName - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - internalNotes - metadata - ownerID - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - scopeID - scopeName - source - state - status - summary - systemInternalID - systemOwned - tags - ticketReference - title - updatedAt - updatedBy - } +query GetRemediationByID ($remediationId: ID!) { + remediation(id: $remediationId) { + completedAt + createdAt + createdBy + displayID + dueAt + environmentID + environmentName + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + internalNotes + metadata + ownerID + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + scopeID + scopeName + source + state + status + summary + systemInternalID + systemOwned + tags + ticketReference + title + updatedAt + updatedBy + } } - -query GetRemediations($first: Int, $last: Int, $where: RemediationWhereInput) { - remediations(first: $first, last: $last, where: $where) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - completedAt - createdAt - createdBy - dueAt - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - metadata - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - source - state - summary - tags - ticketReference - title - updatedAt - updatedBy - } - } - } +query GetRemediations ($first: Int, $last: Int, $where: RemediationWhereInput) { + remediations(first: $first, last: $last, where: $where) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + completedAt + createdAt + createdBy + dueAt + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + metadata + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + source + state + summary + tags + ticketReference + title + updatedAt + updatedBy + } + } + } } - -mutation UpdateBulkCSVRemediation($input: Upload!) { - updateBulkCSVRemediation(input: $input) { - remediations { - completedAt - createdAt - createdBy - displayID - dueAt - environmentID - environmentName - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - internalNotes - metadata - ownerID - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - scopeID - scopeName - source - state - status - summary - systemInternalID - systemOwned - tags - ticketReference - title - updatedAt - updatedBy - } - updatedIDs - } +mutation UpdateBulkCSVRemediation ($input: Upload!) { + updateBulkCSVRemediation(input: $input) { + remediations { + completedAt + createdAt + createdBy + displayID + dueAt + environmentID + environmentName + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + internalNotes + metadata + ownerID + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + scopeID + scopeName + source + state + status + summary + systemInternalID + systemOwned + tags + ticketReference + title + updatedAt + updatedBy + } + updatedIDs + } } - -mutation UpdateBulkRemediation($ids: [ID!]!, $input: UpdateRemediationInput!) { - updateBulkRemediation(ids: $ids, input: $input) { - remediations { - completedAt - createdAt - createdBy - displayID - dueAt - environmentID - environmentName - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - internalNotes - metadata - ownerID - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - scopeID - scopeName - source - state - status - summary - systemInternalID - systemOwned - tags - ticketReference - title - updatedAt - updatedBy - } - updatedIDs - } +mutation UpdateBulkRemediation ($ids: [ID!]!, $input: UpdateRemediationInput!) { + updateBulkRemediation(ids: $ids, input: $input) { + remediations { + completedAt + createdAt + createdBy + displayID + dueAt + environmentID + environmentName + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + internalNotes + metadata + ownerID + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + scopeID + scopeName + source + state + status + summary + systemInternalID + systemOwned + tags + ticketReference + title + updatedAt + updatedBy + } + updatedIDs + } } - -mutation UpdateRemediation($updateRemediationId: ID!, $input: UpdateRemediationInput!) { - updateRemediation(id: $updateRemediationId, input: $input) { - remediation { - completedAt - createdAt - createdBy - displayID - dueAt - environmentID - environmentName - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - internalNotes - metadata - ownerID - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - scopeID - scopeName - source - state - status - summary - systemInternalID - systemOwned - tags - ticketReference - title - updatedAt - updatedBy - } - } +mutation UpdateRemediation ($updateRemediationId: ID!, $input: UpdateRemediationInput!) { + updateRemediation(id: $updateRemediationId, input: $input) { + remediation { + completedAt + createdAt + createdBy + displayID + dueAt + environmentID + environmentName + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + internalNotes + metadata + ownerID + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + scopeID + scopeName + source + state + status + summary + systemInternalID + systemOwned + tags + ticketReference + title + updatedAt + updatedBy + } + } } diff --git a/internal/integrations/operations/ingest_generated.go b/internal/integrations/operations/ingest_generated.go index 5ea0e459a1..f203dc38fd 100644 --- a/internal/integrations/operations/ingest_generated.go +++ b/internal/integrations/operations/ingest_generated.go @@ -338,11 +338,11 @@ func buildIngestMetadata(integration *ent.Integration, operationName string, rec } if options.WorkflowMeta != nil { - metadata.WorkflowInstanceID = options.WorkflowMeta.InstanceID - metadata.WorkflowActionKey = options.WorkflowMeta.ActionKey + metadata.WorkflowInstanceID = options.WorkflowMeta.InstanceID + metadata.WorkflowActionKey = options.WorkflowMeta.ActionKey metadata.WorkflowActionIndex = options.WorkflowMeta.ActionIndex - metadata.WorkflowObjectID = options.WorkflowMeta.ObjectID - metadata.WorkflowObjectType = string(options.WorkflowMeta.ObjectType) + metadata.WorkflowObjectID = options.WorkflowMeta.ObjectID + metadata.WorkflowObjectType = string(options.WorkflowMeta.ObjectType) } return metadata From 0ae5361612072b4da67e01395a4eeb6ec1d857fe Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Thu, 9 Apr 2026 01:12:45 +0100 Subject: [PATCH 11/32] add edge deletion for org --- internal/graphapi/organization.resolvers.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/internal/graphapi/organization.resolvers.go b/internal/graphapi/organization.resolvers.go index 996c079bb8..6dd6502019 100644 --- a/internal/graphapi/organization.resolvers.go +++ b/internal/graphapi/organization.resolvers.go @@ -9,12 +9,13 @@ import ( "context" "github.com/99designs/gqlgen/graphql" + "github.com/theopenlane/iam/auth" + "github.com/theopenlane/core/internal/ent/generated" "github.com/theopenlane/core/internal/ent/generated/organization" "github.com/theopenlane/core/internal/graphapi/common" "github.com/theopenlane/core/internal/graphapi/model" "github.com/theopenlane/core/pkg/logx" - "github.com/theopenlane/iam/auth" ) // CreateOrganization is the resolver for the createOrganization field. @@ -86,6 +87,12 @@ func (r *mutationResolver) DeleteOrganization(ctx context.Context, id string) (* return nil, parseRequestError(ctx, err, common.Action{Action: common.ActionDelete, Object: "organization"}) } + if err := generated.OrganizationEdgeCleanup(ctx, id); err != nil { + logx.FromContext(ctx).Error().Str("organization_id", id).Err(err).Msg("failed to cascade delete organization edges") + + return nil, common.NewCascadeDeleteError(ctx, err) + } + return &model.OrganizationDeletePayload{ DeletedID: id, }, nil From 93b64ddc40e5c4a396b0ff7d5c2587e0c84e33ad Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Thu, 9 Apr 2026 18:30:50 +0100 Subject: [PATCH 12/32] use custom enum skip --- .task/checksum/generate-ent-smart | 2 +- .task/checksum/generate-graphql-smart | 2 +- .../ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- .../generate/templates/ent/edge_cleanup.tmpl | 14 ++++++++++++ internal/ent/generated/edge_cleanup.go | 8 +++++++ internal/ent/generated/entity/entity.go | 2 ++ internal/ent/generated/entity_create.go | 4 ++++ internal/ent/generated/migrate/schema.go | 2 +- .../entityhistory/entityhistory.go | 2 ++ .../historygenerated/entityhistory_create.go | 4 ++++ .../ent/historygenerated/migrate/schema.go | 2 +- internal/ent/hooks/contextx/context.go | 22 +++++++++++++++++++ internal/ent/hooks/customenums.go | 7 ++++++ internal/ent/hooks/listeners_entitlements.go | 8 ++++++- internal/ent/schema/entity.go | 1 + .../checksum/.history_schema_checksum | 2 +- internal/graphapi/checksum/.schema_checksum | 2 +- internal/graphapi/organization.resolvers.go | 9 +------- 19 files changed, 80 insertions(+), 17 deletions(-) create mode 100644 internal/ent/hooks/contextx/context.go diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index 16194bdeb1..3e226843ee 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1 +1 @@ -4e832773fab700f819595823f4c07ede +b286426cd42efffc35fd62874b43a13d diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index 5c03de1ad1..6fd2822f85 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1 +1 @@ -15f007f28ecc9de21ff6b024d398fb38 +2bd49a9d27bc4e1969a0ad0ed956a7c4 diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index 31daad74cf..cf33052c35 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -d2c1c70a59ae6f79e264db189429f9612095b3cc001a6da23a3e41beddca3d37 \ No newline at end of file +c63f491a016290511cde97ac9c773253a95aff94149032fb09cd5a6bddf67099 \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index 02f4fe2480..efd6effda5 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -3f445dcc596905fcfd600f42085e0392450c5acac938c1a66eaeef421d68f213 \ No newline at end of file +6b50e89ce5a0173b0b25ea96ad05405952127100bd1dc2ad2b8b54d4cd9f7940 \ No newline at end of file diff --git a/internal/ent/generate/templates/ent/edge_cleanup.tmpl b/internal/ent/generate/templates/ent/edge_cleanup.tmpl index 2464fa5e9d..5af6fa619d 100644 --- a/internal/ent/generate/templates/ent/edge_cleanup.tmpl +++ b/internal/ent/generate/templates/ent/edge_cleanup.tmpl @@ -7,12 +7,26 @@ {{ $pkg := base $.Config.Package }} {{ template "header" $ }} +import ( + "github.com/theopenlane/core/internal/ent/hooks/contextx" +) + {{/* For each schema */}} {{- range $node := $.Nodes }} {{/* create an EdgeCleanup function accepting an ID */}} func {{ $node.Name }}EdgeCleanup(ctx context.Context, id string) error { ctx = entfga.WithDeleteTuplesFirst(privacy.DecisionContext(ctx, privacy.Allowf("cleanup {{ $node.Name | lower }} edge"))) + {{- if eq $node.Name "Organization" }} + ctx = contextx.WithSkipEnumInUseCheck(ctx) + if exists, err := FromContext(ctx).CustomTypeEnum.Query().Where((customtypeenum.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { + if customtypeenumCount, err := FromContext(ctx).CustomTypeEnum.Delete().Where(customtypeenum.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { + logx.FromContext(ctx).Error().Err(err).Int("count", customtypeenumCount).Msg("error deleting customtypeenum") + return err + } + } + {{- end }} + {{/* For each edge */}} {{- range $edge := $node.Edges }} {{/* if the edge has our custom annotation applied */}} diff --git a/internal/ent/generated/edge_cleanup.go b/internal/ent/generated/edge_cleanup.go index 5f4eeeedf1..fc8031c1e6 100644 --- a/internal/ent/generated/edge_cleanup.go +++ b/internal/ent/generated/edge_cleanup.go @@ -109,6 +109,7 @@ import ( "github.com/theopenlane/core/internal/ent/generated/workflowinstance" "github.com/theopenlane/core/internal/ent/generated/workflowobjectref" "github.com/theopenlane/core/internal/ent/generated/workflowproposal" + "github.com/theopenlane/core/internal/ent/hooks/contextx" "github.com/theopenlane/core/pkg/logx" "github.com/theopenlane/iam/entfga" ) @@ -623,6 +624,13 @@ func OrgSubscriptionEdgeCleanup(ctx context.Context, id string) error { func OrganizationEdgeCleanup(ctx context.Context, id string) error { ctx = entfga.WithDeleteTuplesFirst(privacy.DecisionContext(ctx, privacy.Allowf("cleanup organization edge"))) + ctx = contextx.WithSkipEnumInUseCheck(ctx) + if exists, err := FromContext(ctx).CustomTypeEnum.Query().Where((customtypeenum.HasOwnerWith(organization.ID(id)))).Exist(ctx); err == nil && exists { + if customtypeenumCount, err := FromContext(ctx).CustomTypeEnum.Delete().Where(customtypeenum.HasOwnerWith(organization.ID(id))).Exec(ctx); err != nil { + logx.FromContext(ctx).Error().Err(err).Int("count", customtypeenumCount).Msg("error deleting customtypeenum") + return err + } + } if exists, err := FromContext(ctx).Organization.Query().Where(organization.HasParentWith(organization.ID(id))).Exist(ctx); err == nil && exists { if organizationCount, err := FromContext(ctx).Organization.Delete().Where(organization.HasParentWith(organization.ID(id))).Exec(ctx); err != nil { diff --git a/internal/ent/generated/entity/entity.go b/internal/ent/generated/entity/entity.go index 129fe3de4f..43de6dbdd7 100644 --- a/internal/ent/generated/entity/entity.go +++ b/internal/ent/generated/entity/entity.go @@ -644,6 +644,8 @@ func StatusValidator(s enums.EntityStatus) error { } } +const DefaultTier enums.VendorTier = "LOW" + // TierValidator is a validator for the "tier" field enum values. It is called by the builders before save. func TierValidator(t enums.VendorTier) error { switch t.String() { diff --git a/internal/ent/generated/entity_create.go b/internal/ent/generated/entity_create.go index 93929e61e8..035be2d559 100644 --- a/internal/ent/generated/entity_create.go +++ b/internal/ent/generated/entity_create.go @@ -1398,6 +1398,10 @@ func (_c *EntityCreate) defaults() error { v := entity.DefaultLinks _c.mutation.SetLinks(v) } + if _, ok := _c.mutation.Tier(); !ok { + v := entity.DefaultTier + _c.mutation.SetTier(v) + } if _, ok := _c.mutation.ReviewFrequency(); !ok { v := entity.DefaultReviewFrequency _c.mutation.SetReviewFrequency(v) diff --git a/internal/ent/generated/migrate/schema.go b/internal/ent/generated/migrate/schema.go index 84afc42939..f11bcd4f0f 100644 --- a/internal/ent/generated/migrate/schema.go +++ b/internal/ent/generated/migrate/schema.go @@ -2187,7 +2187,7 @@ var ( {Name: "risk_rating", Type: field.TypeString, Nullable: true}, {Name: "risk_score", Type: field.TypeInt, Nullable: true}, {Name: "risk_score_coverage", Type: field.TypeInt, Nullable: true}, - {Name: "tier", Type: field.TypeEnum, Nullable: true, Enums: []string{"CRITICAL", "HIGH", "STANDARD", "LOW"}}, + {Name: "tier", Type: field.TypeEnum, Nullable: true, Enums: []string{"CRITICAL", "HIGH", "STANDARD", "LOW"}, Default: "LOW"}, {Name: "review_frequency", Type: field.TypeEnum, Nullable: true, Enums: []string{"YEARLY", "QUARTERLY", "BIANNUALLY", "MONTHLY", "NONE"}, Default: "YEARLY"}, {Name: "next_review_at", Type: field.TypeTime, Nullable: true}, {Name: "contract_renewal_at", Type: field.TypeTime, Nullable: true}, diff --git a/internal/ent/historygenerated/entityhistory/entityhistory.go b/internal/ent/historygenerated/entityhistory/entityhistory.go index d47175a6cf..95cf63c24b 100644 --- a/internal/ent/historygenerated/entityhistory/entityhistory.go +++ b/internal/ent/historygenerated/entityhistory/entityhistory.go @@ -304,6 +304,8 @@ func StatusValidator(s enums.EntityStatus) error { } } +const DefaultTier enums.VendorTier = "LOW" + // TierValidator is a validator for the "tier" field enum values. It is called by the builders before save. func TierValidator(t enums.VendorTier) error { switch t.String() { diff --git a/internal/ent/historygenerated/entityhistory_create.go b/internal/ent/historygenerated/entityhistory_create.go index 8eecb9eb61..3596c22c5b 100644 --- a/internal/ent/historygenerated/entityhistory_create.go +++ b/internal/ent/historygenerated/entityhistory_create.go @@ -1017,6 +1017,10 @@ func (_c *EntityHistoryCreate) defaults() error { v := entityhistory.DefaultLinks _c.mutation.SetLinks(v) } + if _, ok := _c.mutation.Tier(); !ok { + v := entityhistory.DefaultTier + _c.mutation.SetTier(v) + } if _, ok := _c.mutation.ReviewFrequency(); !ok { v := entityhistory.DefaultReviewFrequency _c.mutation.SetReviewFrequency(v) diff --git a/internal/ent/historygenerated/migrate/schema.go b/internal/ent/historygenerated/migrate/schema.go index 32eaf0baf2..98140a89f8 100644 --- a/internal/ent/historygenerated/migrate/schema.go +++ b/internal/ent/historygenerated/migrate/schema.go @@ -962,7 +962,7 @@ var ( {Name: "risk_rating", Type: field.TypeString, Nullable: true}, {Name: "risk_score", Type: field.TypeInt, Nullable: true}, {Name: "risk_score_coverage", Type: field.TypeInt, Nullable: true}, - {Name: "tier", Type: field.TypeEnum, Nullable: true, Enums: []string{"CRITICAL", "HIGH", "STANDARD", "LOW"}}, + {Name: "tier", Type: field.TypeEnum, Nullable: true, Enums: []string{"CRITICAL", "HIGH", "STANDARD", "LOW"}, Default: "LOW"}, {Name: "review_frequency", Type: field.TypeEnum, Nullable: true, Enums: []string{"YEARLY", "QUARTERLY", "BIANNUALLY", "MONTHLY", "NONE"}, Default: "YEARLY"}, {Name: "next_review_at", Type: field.TypeTime, Nullable: true}, {Name: "contract_renewal_at", Type: field.TypeTime, Nullable: true}, diff --git a/internal/ent/hooks/contextx/context.go b/internal/ent/hooks/contextx/context.go new file mode 100644 index 0000000000..08b5ec8540 --- /dev/null +++ b/internal/ent/hooks/contextx/context.go @@ -0,0 +1,22 @@ +package contextx + +import "context" + +// SkipCustomEnumDeleteKey is the context key used to skip the "in use" errors check during enum deletion. +// This is used during organization cascade deletion where the deletion order is handled by EdgeCleanup. +// else the custom deletion by default will check if the enum is being used by another other object. +// But with this, we can just skip the check because when the org itself is deleted, it cascades to delete the +// custom enums too +type SkipCustomEnumDeleteKey string + +const ( + // SkipCustomEnumInUseCheck is the context value that triggers skipping the "in use" check/error during enum deletion. + SkipCustomEnumInUseCheck SkipCustomEnumDeleteKey = "custom_enum_cascade_delete_operation" +) + +// WithSkipEnumInUseCheck returns a new context with the skip flag set for custom enums deletion. +// This should be used when deleting CustomTypeEnums as part of a cascade delete +// where the deletion order is handled by EdgeCleanup. +func WithSkipEnumInUseCheck(ctx context.Context) context.Context { + return context.WithValue(ctx, SkipCustomEnumInUseCheck, true) +} diff --git a/internal/ent/hooks/customenums.go b/internal/ent/hooks/customenums.go index 5ac867fa26..9c314cffe8 100644 --- a/internal/ent/hooks/customenums.go +++ b/internal/ent/hooks/customenums.go @@ -22,6 +22,7 @@ import ( "github.com/theopenlane/core/internal/ent/generated/migrate" "github.com/theopenlane/core/internal/ent/generated/predicate" "github.com/theopenlane/core/internal/ent/generated/privacy" + "github.com/theopenlane/core/internal/ent/hooks/contextx" "github.com/theopenlane/core/internal/ent/privacy/utils" "github.com/theopenlane/core/pkg/logx" ) @@ -249,6 +250,12 @@ func HookCustomTypeEnumDelete() ent.Hook { return next.Mutate(ctx, m) } + // skip the "in use" error/check when deleting via organization cascade + // the organization edge cleanup would deletion order properly via cascades + if ctx.Value(contextx.SkipCustomEnumInUseCheck) == true { + return next.Mutate(ctx, m) + } + client := m.Client() enums, err := client.CustomTypeEnum.Query(). Where(customtypeenum.IDIn(ids...)). diff --git a/internal/ent/hooks/listeners_entitlements.go b/internal/ent/hooks/listeners_entitlements.go index 31c925df70..d570f3be5f 100644 --- a/internal/ent/hooks/listeners_entitlements.go +++ b/internal/ent/hooks/listeners_entitlements.go @@ -9,7 +9,6 @@ import ( "entgo.io/ent" "github.com/rs/zerolog" "github.com/samber/lo" - "github.com/theopenlane/entx" "github.com/theopenlane/iam/auth" @@ -79,6 +78,13 @@ func handleOrganizationDeleteGala(ctx gala.HandlerContext, payload eventqueue.Mu return nil } + cleanupContext := entgen.NewContext(inv.Context(), inv.client) + if err := entgen.OrganizationEdgeCleanup(cleanupContext, inv.orgID); err != nil { + inv.Logger().Error().Err(err).Str("organization_id", inv.orgID). + Msg("failed to cascade delete organization edges") + return err + } + org, err := inv.client.Organization.Query().Where( organization.And( organization.ID(inv.orgID), diff --git a/internal/ent/schema/entity.go b/internal/ent/schema/entity.go index 6f88c1708b..26da2d61f8 100644 --- a/internal/ent/schema/entity.go +++ b/internal/ent/schema/entity.go @@ -241,6 +241,7 @@ func (Entity) Fields() []ent.Field { Comment("the vendor risk tier classification, used to determine the depth of TPRM assessment required"). GoType(enums.VendorTier("")). Optional(). + Default(enums.VendorRiskImpactLow.String()). Annotations( entgql.OrderField("tier"), ), diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index 550bd67655..4d068a22b2 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1 +1 @@ -85dd990f17040474402d65ea6c0710bef3e797c3abb442a7bab6a549187e784a \ No newline at end of file +7a88e0d89433c73b061b254509bf609ebd238eaaa2215826dd21db972392c3cc \ No newline at end of file diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index dd9346a88c..3d46c007c9 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1 +1 @@ -8dea0eed5782c535b4d0b2f58e0c39910d93089551afb8a765a64fe111664c65 \ No newline at end of file +0eae20c24c3c288024944ef8ccf0a4523bf49953579dc002849ed45116d7582e \ No newline at end of file diff --git a/internal/graphapi/organization.resolvers.go b/internal/graphapi/organization.resolvers.go index 6dd6502019..996c079bb8 100644 --- a/internal/graphapi/organization.resolvers.go +++ b/internal/graphapi/organization.resolvers.go @@ -9,13 +9,12 @@ import ( "context" "github.com/99designs/gqlgen/graphql" - "github.com/theopenlane/iam/auth" - "github.com/theopenlane/core/internal/ent/generated" "github.com/theopenlane/core/internal/ent/generated/organization" "github.com/theopenlane/core/internal/graphapi/common" "github.com/theopenlane/core/internal/graphapi/model" "github.com/theopenlane/core/pkg/logx" + "github.com/theopenlane/iam/auth" ) // CreateOrganization is the resolver for the createOrganization field. @@ -87,12 +86,6 @@ func (r *mutationResolver) DeleteOrganization(ctx context.Context, id string) (* return nil, parseRequestError(ctx, err, common.Action{Action: common.ActionDelete, Object: "organization"}) } - if err := generated.OrganizationEdgeCleanup(ctx, id); err != nil { - logx.FromContext(ctx).Error().Str("organization_id", id).Err(err).Msg("failed to cascade delete organization edges") - - return nil, common.NewCascadeDeleteError(ctx, err) - } - return &model.OrganizationDeletePayload{ DeletedID: id, }, nil From c1d9e299ac68f25dd0e99dab4797bd1c374719de Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Fri, 10 Apr 2026 02:17:25 +0100 Subject: [PATCH 13/32] enable entitlement for cascade deletion test --- .task/checksum/generate-openapi-smart | 2 +- internal/graphapi/organization_test.go | 2 + internal/graphapi/tools_test.go | 59 ++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/.task/checksum/generate-openapi-smart b/.task/checksum/generate-openapi-smart index fbad9c7a4e..92d125e371 100644 --- a/.task/checksum/generate-openapi-smart +++ b/.task/checksum/generate-openapi-smart @@ -1 +1 @@ -8995df9112e4edf302cd6122088691b +3e50b013cc461ceed5bc2151e7688130 diff --git a/internal/graphapi/organization_test.go b/internal/graphapi/organization_test.go index 811fa23864..598a7cbd2d 100644 --- a/internal/graphapi/organization_test.go +++ b/internal/graphapi/organization_test.go @@ -955,6 +955,8 @@ func TestMutationDeleteOrganization(t *testing.T) { } func TestMutationOrganizationCascadeDelete(t *testing.T) { + suite.enableGalaForTestSuite(t) + // create another user for this test // so it doesn't interfere with the other tests orgUser := suite.userBuilder(context.Background(), t) diff --git a/internal/graphapi/tools_test.go b/internal/graphapi/tools_test.go index 484ea8c36a..356f9e9cff 100644 --- a/internal/graphapi/tools_test.go +++ b/internal/graphapi/tools_test.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "flag" + "fmt" "net/http" "net/http/httptest" "os" @@ -17,6 +18,7 @@ import ( "github.com/mcuadros/go-defaults" "github.com/rs/zerolog" "github.com/rs/zerolog/log" + "github.com/samber/do/v2" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/stripe/stripe-go/v84" @@ -89,6 +91,7 @@ type GraphTestSuite struct { ofgaTF *fgatest.OpenFGATestFixture stripeMockBackend *mocks.MockStripeBackend cacheRefreshServer *httptest.Server + galaRuntime *gala.Gala } // client contains all the clients the test need to interact with @@ -261,6 +264,10 @@ func (suite *GraphTestSuite) SetupSuite(t *testing.T) { db, err := entdb.NewTestClient(ctx, suite.tf, jobOpts, nil, opts) requireNoError(t, err) + db.Use(hooks.EmitGalaEventHook(func() *gala.Gala { + return suite.galaRuntime + })) + c.objectStore, c.mockProvider, err = coreutils.MockStorageServiceWithValidationAndProvider(t, nil, validators.MimeTypeValidator) requireNoError(t, err) @@ -280,6 +287,14 @@ func (suite *GraphTestSuite) SetupSuite(t *testing.T) { } func (suite *GraphTestSuite) TearDownSuite(t *testing.T) { + if suite.galaRuntime != nil { + err := suite.galaRuntime.StopWorkers(context.Background()) + requireNoError(t, err) + + err = suite.galaRuntime.Close() + requireNoError(t, err) + } + // close the database connection err := suite.client.db.Close() requireNoError(t, err) @@ -297,6 +312,50 @@ func (suite *GraphTestSuite) TearDownSuite(t *testing.T) { } } +func (suite *GraphTestSuite) enableGalaForTestSuite(t *testing.T) { + t.Helper() + + if suite.galaRuntime != nil { + return + } + + runtime, err := gala.NewGala(context.Background(), gala.Config{ + Enabled: true, + ConnectionURI: suite.tf.URI, + QueueName: fmt.Sprintf("graphapi_test_%d", time.Now().UnixNano()), + WorkerCount: 1, + RunMigrations: true, + FetchCooldown: time.Millisecond, + FetchPollInterval: 10 * time.Millisecond, + }) + require.NoError(t, err) + + do.ProvideValue(runtime.Injector(), runtime) + do.ProvideValue(runtime.Injector(), suite.client.db) + + _, err = hooks.RegisterGalaEntitlementListeners(runtime.Registry()) + require.NoError(t, err) + + err = runtime.StartWorkers(context.Background()) + require.NoError(t, err) + + suite.galaRuntime = runtime + + t.Cleanup(func() { + if suite.galaRuntime == nil { + return + } + + err := suite.galaRuntime.StopWorkers(context.Background()) + require.NoError(t, err) + + err = suite.galaRuntime.Close() + require.NoError(t, err) + + suite.galaRuntime = nil + }) +} + // expectUpload sets up the mock object store to expect an upload and related operations func expectUpload(t *testing.T, mockProvider *mock_shared.MockProvider, expectedUploads []graphql.Upload) { assert.Assert(t, mockProvider != nil) From 259e5d4e2412b35b1aa511401115ad5275852165 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Fri, 10 Apr 2026 20:21:49 +0100 Subject: [PATCH 14/32] add pending_deletion_at --- .task/checksum/generate-ent-smart | 2 +- .task/checksum/generate-graphql-smart | 2 +- .task/checksum/generate-openapi-smart | 2 +- ...organization_settings_pending_deletion.sql | 7 + ...tion_settings_pending_deletion_history.sql | 7 + db/migrations-goose-postgres/atlas.sum | 4 +- ...organization_settings_pending_deletion.sql | 2 + ...tion_settings_pending_deletion_history.sql | 2 + db/migrations/atlas.sum | 4 +- go.sum | 5 + .../ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- internal/ent/csvgenerated/csv_generated.go | 718 ++- internal/ent/generated/entql.go | 6 + internal/ent/generated/gql_collection.go | 5 + internal/ent/generated/gql_where_input.go | 42 + .../ent/generated/history_from_mutation.go | 11 + internal/ent/generated/migrate/schema.go | 3 +- internal/ent/generated/mutation.go | 75 +- internal/ent/generated/organizationsetting.go | 16 + .../organizationsetting.go | 8 + .../generated/organizationsetting/where.go | 56 + .../generated/organizationsetting_create.go | 18 + .../generated/organizationsetting_update.go | 52 + internal/ent/historygenerated/entql.go | 6 + .../ent/historygenerated/gql_collection.go | 5 + .../ent/historygenerated/gql_where_input.go | 42 + .../ent/historygenerated/migrate/schema.go | 1 + internal/ent/historygenerated/mutation.go | 75 +- .../organizationsettinghistory.go | 18 +- .../organizationsettinghistory.go | 8 + .../organizationsettinghistory/where.go | 56 + .../organizationsettinghistory_create.go | 18 + .../organizationsettinghistory_update.go | 52 + .../integration_mapping_generated.go | 4427 ++++++++--------- internal/ent/schema/organizationsetting.go | 13 +- .../checksum/.history_schema_checksum | 2 +- internal/graphapi/checksum/.schema_checksum | 2 +- .../clientschema/checksum/.schema_checksum | 2 +- internal/graphapi/clientschema/schema.graphql | 17 + internal/graphapi/generated/ent.generated.go | 111 +- .../organizationsetting.generated.go | 8 + .../graphapi/generated/root_.generated.go | 25 + .../historygenerated/ent.generated.go | 105 +- .../historygenerated/root_.generated.go | 25 + .../checksum/.history_schema_checksum | 2 +- .../graphapi/historyschema/schema.graphql | 17 + .../notificationtemplatehistory.graphql | 210 +- .../vendorscoringconfighistory.graphql | 122 +- internal/graphapi/query/integration.graphql | 212 +- .../query/organizationsetting.graphql | 2 + internal/graphapi/query/platform.graphql | 1285 +++-- internal/graphapi/query/remediation.graphql | 740 ++- internal/graphapi/schema/ent.graphql | 17 + internal/graphapi/schemahistory/ent.graphql | 17 + .../testclient/checksum/.client_checksum | 2 +- internal/graphapi/testclient/graphclient.go | 16 + internal/graphapi/testclient/models.go | 19 +- .../operations/ingest_generated.go | 8 +- 59 files changed, 4784 insertions(+), 3954 deletions(-) create mode 100644 db/migrations-goose-postgres/20260410191615_organization_settings_pending_deletion.sql create mode 100644 db/migrations-goose-postgres/20260410191626_organization_settings_pending_deletion_history.sql create mode 100644 db/migrations/20260410191549_organization_settings_pending_deletion.sql create mode 100644 db/migrations/20260410191601_organization_settings_pending_deletion_history.sql diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index 0c3f5c56b7..39bec711e9 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1 +1 @@ -c624fa50f427be2982b702e4d2867226 +f654f5017c5bb30dda53b029921831f diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index a2a7a515ee..8d2e573649 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1 +1 @@ -ab4f10c1f302b58e8894331c2638d026 +375b1e6b642e42f8de8165de9185c1e6 diff --git a/.task/checksum/generate-openapi-smart b/.task/checksum/generate-openapi-smart index bc84951a08..92d125e371 100644 --- a/.task/checksum/generate-openapi-smart +++ b/.task/checksum/generate-openapi-smart @@ -1 +1 @@ -11bd8cdf78dd89d991c184f3915d031d +3e50b013cc461ceed5bc2151e7688130 diff --git a/db/migrations-goose-postgres/20260410191615_organization_settings_pending_deletion.sql b/db/migrations-goose-postgres/20260410191615_organization_settings_pending_deletion.sql new file mode 100644 index 0000000000..71d9dabd55 --- /dev/null +++ b/db/migrations-goose-postgres/20260410191615_organization_settings_pending_deletion.sql @@ -0,0 +1,7 @@ +-- +goose Up +-- modify "organization_settings" table +ALTER TABLE "organization_settings" ADD COLUMN "pending_deletion_at" timestamptz NULL; + +-- +goose Down +-- reverse: modify "organization_settings" table +ALTER TABLE "organization_settings" DROP COLUMN "pending_deletion_at"; diff --git a/db/migrations-goose-postgres/20260410191626_organization_settings_pending_deletion_history.sql b/db/migrations-goose-postgres/20260410191626_organization_settings_pending_deletion_history.sql new file mode 100644 index 0000000000..e5c73bf6ac --- /dev/null +++ b/db/migrations-goose-postgres/20260410191626_organization_settings_pending_deletion_history.sql @@ -0,0 +1,7 @@ +-- +goose Up +-- modify "organization_setting_history" table +ALTER TABLE "organization_setting_history" ADD COLUMN "pending_deletion_at" timestamptz NULL; + +-- +goose Down +-- reverse: modify "organization_setting_history" table +ALTER TABLE "organization_setting_history" DROP COLUMN "pending_deletion_at"; diff --git a/db/migrations-goose-postgres/atlas.sum b/db/migrations-goose-postgres/atlas.sum index 62751ab135..b0f5531a4e 100644 --- a/db/migrations-goose-postgres/atlas.sum +++ b/db/migrations-goose-postgres/atlas.sum @@ -1,4 +1,4 @@ -h1:naXeXzbYVaesdBDbBF5ZKaK2td5J9ZQUeUi7uno/Sc0= +h1:+ePPh56qGmoXtliNhNKNS7tFP84eeb5XyPLUHgcfBxY= 20251229183203_init.sql h1:g/05irCXoqKFObJV2PPLuvDRqma+da41VPsZ5fXQgfE= 20251229183205_init_history.sql h1:P/q2kAHb8zfNMOWzYkKtPbOwoh9GdJUQljSNAiPEjYI= 20251231045229_workflow.sql h1:uUPRLO4yw2y//fPGeqIXRrL+fiEN1TRGkF4wHiqPaPk= @@ -102,3 +102,5 @@ h1:naXeXzbYVaesdBDbBF5ZKaK2td5J9ZQUeUi7uno/Sc0= 20260407225000_vulnfieldupdates_history.sql h1:/O7u/7iOHrRnrE4jPQcJ65HIt3mrcT0yYtZHo+NPnDI= 20260408044535_risk_fields.sql h1:n9clyMuYmhF3bZdSetseLALyt7Fx5vE1dDfx8UelMpY= 20260408044538_risk_fields_history.sql h1:ncd06MV03ae12UQ362vQ/uRvBrv00/q3YdhlumzW3k0= +20260410191615_organization_settings_pending_deletion.sql h1:mpqXw4jpPJnPifIg8nxE4PAQnmcyUSM/fT8ZkjKis8A= +20260410191626_organization_settings_pending_deletion_history.sql h1:AEtey7I9DiTaYarGqr/OPqDm+0p7rL03DY84ujGYZxk= diff --git a/db/migrations/20260410191549_organization_settings_pending_deletion.sql b/db/migrations/20260410191549_organization_settings_pending_deletion.sql new file mode 100644 index 0000000000..11507c0723 --- /dev/null +++ b/db/migrations/20260410191549_organization_settings_pending_deletion.sql @@ -0,0 +1,2 @@ +-- Modify "organization_settings" table +ALTER TABLE "organization_settings" ADD COLUMN "pending_deletion_at" timestamptz NULL; diff --git a/db/migrations/20260410191601_organization_settings_pending_deletion_history.sql b/db/migrations/20260410191601_organization_settings_pending_deletion_history.sql new file mode 100644 index 0000000000..340a5b0ca5 --- /dev/null +++ b/db/migrations/20260410191601_organization_settings_pending_deletion_history.sql @@ -0,0 +1,2 @@ +-- Modify "organization_setting_history" table +ALTER TABLE "organization_setting_history" ADD COLUMN "pending_deletion_at" timestamptz NULL; diff --git a/db/migrations/atlas.sum b/db/migrations/atlas.sum index 2a756dfb37..7c2dea59ea 100644 --- a/db/migrations/atlas.sum +++ b/db/migrations/atlas.sum @@ -1,4 +1,4 @@ -h1:hVO5CSVqg580Ef6srZ8Q8jhacvxx8qx5OTonun4l5BQ= +h1:4lrgPuw5uG9xYVK8VpjAICbVps/XFMROizrAGCb9QpM= 20251229183159_init.sql h1:3uf/ftr28zW8YUD9qAaY2GESQHC7pYmkhlI6oDWUCKU= 20251229183201_init_history.sql h1:1tFSeCDWvZgb2Ctw80C/s3tqVPNLADQw9fSDACzL8WA= 20251231045221_workflow.sql h1:5bLq4cHh2kxUV7xajK5bq5McKKpr88HmufYauTdsgUw= @@ -102,3 +102,5 @@ h1:hVO5CSVqg580Ef6srZ8Q8jhacvxx8qx5OTonun4l5BQ= 20260407224954_vulnfieldupdates_history.sql h1:stWXvVqqGIZQ8vvERR2Ra5xlFbQYAwXvzJoCdLmPQqs= 20260408044529_risk_fields.sql h1:0h/AapJB1GGnRNx98qzkO4MHTKvkxBTDWfIV13VoFx0= 20260408044531_risk_fields_history.sql h1:LDW+Dm5eg6AX5/0dN4c2FW9GZnv6aTVJasHmXCsji+k= +20260410191549_organization_settings_pending_deletion.sql h1:oz7ntNP3Qo+bpxmPw8qJcMgGlJOpHrgbVkbDEQZzfYk= +20260410191601_organization_settings_pending_deletion_history.sql h1:jJ5XqBXD+zoyathRUCI8nQTpDrb0BEXM6C30euwPunE= diff --git a/go.sum b/go.sum index 64d92c9718..ae55b55de0 100644 --- a/go.sum +++ b/go.sum @@ -828,14 +828,19 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.6 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 h1:7iP2uCb7sGddAr30RRS6xjKy7AZ2JtTOPA3oolgVSw8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0/go.mod h1:c7hN3ddxs/z6q9xwvfLPk+UHlWRQyaeR1LdgfL/66l0= go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I= +go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.41.0 h1:ao6Oe+wSebTlQ1OEht7jlYTzQKE+pnx/iNywFvTbuuI= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.41.0/go.mod h1:u3T6vz0gh/NVzgDgiwkgLxpsSF6PaPmo2il0apGJbls= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.41.0 h1:inYW9ZhgqiDqh6BioM7DVHHzEGVq76Db5897WLGZ5Go= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.41.0/go.mod h1:Izur+Wt8gClgMJqO/cZ8wdeeMryJ/xxiOVgFSSfpDTY= go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM= +go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY= go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg= +go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg= go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw= +go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A= go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A= +go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0= go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index 3bd6867d32..e3199ac551 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -75681d38f4e677d8c892151fa80193880a759e3e7317a41c9a3186496e8b7f3d \ No newline at end of file +7176b539f6d046726d637abfee501821c89bebf3cbd5b21fd321fe9c0f620522 \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index 8bf13787e6..8a1d5d7fda 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -1e26ae909c12e7c362dff0b1d9b2afbb1278c2dbfcac8aaec65b27d9da337f14 \ No newline at end of file +0f22125c5b4702289f1a4ac2a2cb8f380b6cfa17a429ce79992b77ae333ccf37 \ No newline at end of file diff --git a/internal/ent/csvgenerated/csv_generated.go b/internal/ent/csvgenerated/csv_generated.go index e7dfee7eb6..b85151d202 100644 --- a/internal/ent/csvgenerated/csv_generated.go +++ b/internal/ent/csvgenerated/csv_generated.go @@ -7,7 +7,6 @@ import ( "strings" "github.com/theopenlane/core/internal/ent/generated" - "github.com/theopenlane/core/internal/ent/generated/predicate" "github.com/theopenlane/core/internal/ent/generated/actionplan" "github.com/theopenlane/core/internal/ent/generated/asset" "github.com/theopenlane/core/internal/ent/generated/control" @@ -17,6 +16,7 @@ import ( "github.com/theopenlane/core/internal/ent/generated/identityholder" "github.com/theopenlane/core/internal/ent/generated/internalpolicy" "github.com/theopenlane/core/internal/ent/generated/platform" + "github.com/theopenlane/core/internal/ent/generated/predicate" "github.com/theopenlane/core/internal/ent/generated/procedure" "github.com/theopenlane/core/internal/ent/generated/risk" "github.com/theopenlane/core/internal/ent/generated/subcontrol" @@ -845,8 +845,7 @@ type CSVSchemaInfo struct { var CSVReferenceRegistry = map[string]CSVSchemaInfo{ "APIToken": { SchemaName: "APIToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "ActionPlan": { SchemaName: "ActionPlan", @@ -1000,8 +999,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Contact": { SchemaName: "Contact", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Control": { SchemaName: "Control", @@ -1074,28 +1072,23 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ControlImplementation": { SchemaName: "ControlImplementation", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "ControlObjective": { SchemaName: "ControlObjective", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "CustomDomain": { SchemaName: "CustomDomain", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "CustomTypeEnum": { SchemaName: "CustomTypeEnum", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DNSVerification": { SchemaName: "DNSVerification", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DirectoryAccount": { SchemaName: "DirectoryAccount", @@ -1112,38 +1105,31 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "DirectoryGroup": { SchemaName: "DirectoryGroup", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DirectoryMembership": { SchemaName: "DirectoryMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DirectorySyncRun": { SchemaName: "DirectorySyncRun", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Discussion": { SchemaName: "Discussion", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DocumentData": { SchemaName: "DocumentData", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "EmailBranding": { SchemaName: "EmailBranding", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "EmailTemplate": { SchemaName: "EmailTemplate", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Entity": { SchemaName: "Entity", @@ -1184,13 +1170,11 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "EntityType": { SchemaName: "EntityType", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Event": { SchemaName: "Event", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Evidence": { SchemaName: "Evidence", @@ -1207,43 +1191,35 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Export": { SchemaName: "Export", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "File": { SchemaName: "File", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Finding": { SchemaName: "Finding", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "FindingControl": { SchemaName: "FindingControl", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Group": { SchemaName: "Group", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "GroupMembership": { SchemaName: "GroupMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "GroupSetting": { SchemaName: "GroupSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Hush": { SchemaName: "Hush", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "IdentityHolder": { SchemaName: "IdentityHolder", @@ -1313,88 +1289,71 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Invite": { SchemaName: "Invite", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobResult": { SchemaName: "JobResult", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobRunner": { SchemaName: "JobRunner", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobRunnerRegistrationToken": { SchemaName: "JobRunnerRegistrationToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobRunnerToken": { SchemaName: "JobRunnerToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobTemplate": { SchemaName: "JobTemplate", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "MappableDomain": { SchemaName: "MappableDomain", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "MappedControl": { SchemaName: "MappedControl", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Narrative": { SchemaName: "Narrative", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Notification": { SchemaName: "Notification", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "NotificationPreference": { SchemaName: "NotificationPreference", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "NotificationTemplate": { SchemaName: "NotificationTemplate", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Onboarding": { SchemaName: "Onboarding", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "OrgMembership": { SchemaName: "OrgMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Organization": { SchemaName: "Organization", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "OrganizationSetting": { SchemaName: "OrganizationSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "PersonalAccessToken": { SchemaName: "PersonalAccessToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Platform": { SchemaName: "Platform", @@ -1557,8 +1516,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ProgramMembership": { SchemaName: "ProgramMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Remediation": { SchemaName: "Remediation", @@ -1665,8 +1623,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "SLADefinition": { SchemaName: "SLADefinition", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Scan": { SchemaName: "Scan", @@ -1744,13 +1701,11 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ScheduledJobRun": { SchemaName: "ScheduledJobRun", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Standard": { SchemaName: "Standard", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Subcontrol": { SchemaName: "Subcontrol", @@ -1823,28 +1778,23 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Subprocessor": { SchemaName: "Subprocessor", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Subscriber": { SchemaName: "Subscriber", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "SystemDetail": { SchemaName: "SystemDetail", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TFASetting": { SchemaName: "TFASetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TagDefinition": { SchemaName: "TagDefinition", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Task": { SchemaName: "Task", @@ -1877,63 +1827,51 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Template": { SchemaName: "Template", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenter": { SchemaName: "TrustCenter", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterCompliance": { SchemaName: "TrustCenterCompliance", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterDoc": { SchemaName: "TrustCenterDoc", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterEntity": { SchemaName: "TrustCenterEntity", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterFAQ": { SchemaName: "TrustCenterFAQ", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterNDARequest": { SchemaName: "TrustCenterNDARequest", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterSetting": { SchemaName: "TrustCenterSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterSubprocessor": { SchemaName: "TrustCenterSubprocessor", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterWatermarkConfig": { SchemaName: "TrustCenterWatermarkConfig", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "User": { SchemaName: "User", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "UserSetting": { SchemaName: "UserSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "VendorRiskScore": { SchemaName: "VendorRiskScore", @@ -1950,8 +1888,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "VendorScoringConfig": { SchemaName: "VendorScoringConfig", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Vulnerability": { SchemaName: "Vulnerability", @@ -1968,8 +1905,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "WorkflowDefinition": { SchemaName: "WorkflowDefinition", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, } @@ -2000,7 +1936,7 @@ func (APITokenCSVInput) CSVInputWrapper() {} // APITokenCSVUpdateInput wraps UpdateAPITokenInput with CSV reference columns for bulk updates. type APITokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateAPITokenInput } @@ -2009,10 +1945,10 @@ func (APITokenCSVUpdateInput) CSVInputWrapper() {} // ActionPlanCSVInput wraps CreateActionPlanInput with CSV reference columns. type ActionPlanCSVInput struct { - Input generated.CreateActionPlanInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + Input generated.CreateActionPlanInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks ActionPlanCSVInput for CSV header preprocessing. @@ -2021,11 +1957,11 @@ func (ActionPlanCSVInput) CSVInputWrapper() {} // ActionPlanCSVUpdateInput wraps UpdateActionPlanInput with CSV reference columns for bulk updates. type ActionPlanCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateActionPlanInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + ID string `csv:"ID"` + Input generated.UpdateActionPlanInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks ActionPlanCSVUpdateInput for CSV header preprocessing. @@ -2033,7 +1969,7 @@ func (ActionPlanCSVUpdateInput) CSVInputWrapper() {} // AssessmentCSVInput wraps CreateAssessmentInput with CSV reference columns. type AssessmentCSVInput struct { - Input generated.CreateAssessmentInput + Input generated.CreateAssessmentInput AssessmentTemplateRef string `csv:"AssessmentTemplateRef"` } @@ -2043,8 +1979,8 @@ func (AssessmentCSVInput) CSVInputWrapper() {} // AssessmentCSVUpdateInput wraps UpdateAssessmentInput with CSV reference columns for bulk updates. type AssessmentCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateAssessmentInput + ID string `csv:"ID"` + Input generated.UpdateAssessmentInput AssessmentTemplateRef string `csv:"AssessmentTemplateRef"` } @@ -2053,9 +1989,9 @@ func (AssessmentCSVUpdateInput) CSVInputWrapper() {} // AssessmentResponseCSVInput wraps CreateAssessmentResponseInput with CSV reference columns. type AssessmentResponseCSVInput struct { - Input generated.CreateAssessmentResponseInput + Input generated.CreateAssessmentResponseInput AssessmentIdentityHolderEmail string `csv:"AssessmentIdentityHolderEmail"` - AssessmentResponseEntityName string `csv:"AssessmentResponseEntityName"` + AssessmentResponseEntityName string `csv:"AssessmentResponseEntityName"` } // CSVInputWrapper marks AssessmentResponseCSVInput for CSV header preprocessing. @@ -2063,10 +1999,10 @@ func (AssessmentResponseCSVInput) CSVInputWrapper() {} // AssetCSVInput wraps CreateAssetInput with CSV reference columns. type AssetCSVInput struct { - Input generated.CreateAssetInput + Input generated.CreateAssetInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - SourcePlatformName string `csv:"SourcePlatformName"` + SourcePlatformName string `csv:"SourcePlatformName"` } // CSVInputWrapper marks AssetCSVInput for CSV header preprocessing. @@ -2075,11 +2011,11 @@ func (AssetCSVInput) CSVInputWrapper() {} // AssetCSVUpdateInput wraps UpdateAssetInput with CSV reference columns for bulk updates. type AssetCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateAssetInput + ID string `csv:"ID"` + Input generated.UpdateAssetInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - SourcePlatformName string `csv:"SourcePlatformName"` + SourcePlatformName string `csv:"SourcePlatformName"` } // CSVInputWrapper marks AssetCSVUpdateInput for CSV header preprocessing. @@ -2087,9 +2023,9 @@ func (AssetCSVUpdateInput) CSVInputWrapper() {} // CampaignCSVInput wraps CreateCampaignInput with CSV reference columns. type CampaignCSVInput struct { - Input generated.CreateCampaignInput - CampaignEntityName string `csv:"CampaignEntityName"` - CampaignTemplateRef string `csv:"CampaignTemplateRef"` + Input generated.CreateCampaignInput + CampaignEntityName string `csv:"CampaignEntityName"` + CampaignTemplateRef string `csv:"CampaignTemplateRef"` InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } @@ -2100,10 +2036,10 @@ func (CampaignCSVInput) CSVInputWrapper() {} // CampaignCSVUpdateInput wraps UpdateCampaignInput with CSV reference columns for bulk updates. type CampaignCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateCampaignInput - CampaignEntityName string `csv:"CampaignEntityName"` - CampaignTemplateRef string `csv:"CampaignTemplateRef"` + ID string `csv:"ID"` + Input generated.UpdateCampaignInput + CampaignEntityName string `csv:"CampaignEntityName"` + CampaignTemplateRef string `csv:"CampaignTemplateRef"` InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } @@ -2113,7 +2049,7 @@ func (CampaignCSVUpdateInput) CSVInputWrapper() {} // CampaignTargetCSVInput wraps CreateCampaignTargetInput with CSV reference columns. type CampaignTargetCSVInput struct { - Input generated.CreateCampaignTargetInput + Input generated.CreateCampaignTargetInput CampaignTargetGroupName string `csv:"CampaignTargetGroupName"` CampaignTargetUserEmail string `csv:"CampaignTargetUserEmail"` } @@ -2124,8 +2060,8 @@ func (CampaignTargetCSVInput) CSVInputWrapper() {} // CampaignTargetCSVUpdateInput wraps UpdateCampaignTargetInput with CSV reference columns for bulk updates. type CampaignTargetCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateCampaignTargetInput + ID string `csv:"ID"` + Input generated.UpdateCampaignTargetInput CampaignTargetGroupName string `csv:"CampaignTargetGroupName"` CampaignTargetUserEmail string `csv:"CampaignTargetUserEmail"` } @@ -2144,7 +2080,7 @@ func (ContactCSVInput) CSVInputWrapper() {} // ContactCSVUpdateInput wraps UpdateContactInput with CSV reference columns for bulk updates. type ContactCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateContactInput } @@ -2153,15 +2089,15 @@ func (ContactCSVUpdateInput) CSVInputWrapper() {} // ControlCSVInput wraps CreateControlInput with CSV reference columns. type ControlCSVInput struct { - Input generated.CreateControlInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + Input generated.CreateControlInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks ControlCSVInput for CSV header preprocessing. @@ -2170,16 +2106,16 @@ func (ControlCSVInput) CSVInputWrapper() {} // ControlCSVUpdateInput wraps UpdateControlInput with CSV reference columns for bulk updates. type ControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateControlInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + ID string `csv:"ID"` + Input generated.UpdateControlInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks ControlCSVUpdateInput for CSV header preprocessing. @@ -2196,7 +2132,7 @@ func (ControlImplementationCSVInput) CSVInputWrapper() {} // ControlImplementationCSVUpdateInput wraps UpdateControlImplementationInput with CSV reference columns for bulk updates. type ControlImplementationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateControlImplementationInput } @@ -2214,7 +2150,7 @@ func (ControlObjectiveCSVInput) CSVInputWrapper() {} // ControlObjectiveCSVUpdateInput wraps UpdateControlObjectiveInput with CSV reference columns for bulk updates. type ControlObjectiveCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateControlObjectiveInput } @@ -2232,7 +2168,7 @@ func (CustomDomainCSVInput) CSVInputWrapper() {} // CustomDomainCSVUpdateInput wraps UpdateCustomDomainInput with CSV reference columns for bulk updates. type CustomDomainCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateCustomDomainInput } @@ -2250,7 +2186,7 @@ func (CustomTypeEnumCSVInput) CSVInputWrapper() {} // CustomTypeEnumCSVUpdateInput wraps UpdateCustomTypeEnumInput with CSV reference columns for bulk updates. type CustomTypeEnumCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateCustomTypeEnumInput } @@ -2268,7 +2204,7 @@ func (DNSVerificationCSVInput) CSVInputWrapper() {} // DNSVerificationCSVUpdateInput wraps UpdateDNSVerificationInput with CSV reference columns for bulk updates. type DNSVerificationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDNSVerificationInput } @@ -2277,7 +2213,7 @@ func (DNSVerificationCSVUpdateInput) CSVInputWrapper() {} // DirectoryAccountCSVInput wraps CreateDirectoryAccountInput with CSV reference columns. type DirectoryAccountCSVInput struct { - Input generated.CreateDirectoryAccountInput + Input generated.CreateDirectoryAccountInput DirectoryAccountIdentityHolderEmail string `csv:"DirectoryAccountIdentityHolderEmail"` } @@ -2287,8 +2223,8 @@ func (DirectoryAccountCSVInput) CSVInputWrapper() {} // DirectoryAccountCSVUpdateInput wraps UpdateDirectoryAccountInput with CSV reference columns for bulk updates. type DirectoryAccountCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateDirectoryAccountInput + ID string `csv:"ID"` + Input generated.UpdateDirectoryAccountInput DirectoryAccountIdentityHolderEmail string `csv:"DirectoryAccountIdentityHolderEmail"` } @@ -2306,7 +2242,7 @@ func (DirectoryGroupCSVInput) CSVInputWrapper() {} // DirectoryGroupCSVUpdateInput wraps UpdateDirectoryGroupInput with CSV reference columns for bulk updates. type DirectoryGroupCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectoryGroupInput } @@ -2324,7 +2260,7 @@ func (DirectoryMembershipCSVInput) CSVInputWrapper() {} // DirectoryMembershipCSVUpdateInput wraps UpdateDirectoryMembershipInput with CSV reference columns for bulk updates. type DirectoryMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectoryMembershipInput } @@ -2342,7 +2278,7 @@ func (DirectorySyncRunCSVInput) CSVInputWrapper() {} // DirectorySyncRunCSVUpdateInput wraps UpdateDirectorySyncRunInput with CSV reference columns for bulk updates. type DirectorySyncRunCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectorySyncRunInput } @@ -2360,7 +2296,7 @@ func (DiscussionCSVInput) CSVInputWrapper() {} // DiscussionCSVUpdateInput wraps UpdateDiscussionInput with CSV reference columns for bulk updates. type DiscussionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDiscussionInput } @@ -2378,7 +2314,7 @@ func (DocumentDataCSVInput) CSVInputWrapper() {} // DocumentDataCSVUpdateInput wraps UpdateDocumentDataInput with CSV reference columns for bulk updates. type DocumentDataCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDocumentDataInput } @@ -2396,7 +2332,7 @@ func (EmailBrandingCSVInput) CSVInputWrapper() {} // EmailBrandingCSVUpdateInput wraps UpdateEmailBrandingInput with CSV reference columns for bulk updates. type EmailBrandingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEmailBrandingInput } @@ -2414,7 +2350,7 @@ func (EmailTemplateCSVInput) CSVInputWrapper() {} // EmailTemplateCSVUpdateInput wraps UpdateEmailTemplateInput with CSV reference columns for bulk updates. type EmailTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEmailTemplateInput } @@ -2423,11 +2359,11 @@ func (EmailTemplateCSVUpdateInput) CSVInputWrapper() {} // EntityCSVInput wraps CreateEntityInput with CSV reference columns. type EntityCSVInput struct { - Input generated.CreateEntityInput + Input generated.CreateEntityInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks EntityCSVInput for CSV header preprocessing. @@ -2436,12 +2372,12 @@ func (EntityCSVInput) CSVInputWrapper() {} // EntityCSVUpdateInput wraps UpdateEntityInput with CSV reference columns for bulk updates. type EntityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateEntityInput + ID string `csv:"ID"` + Input generated.UpdateEntityInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks EntityCSVUpdateInput for CSV header preprocessing. @@ -2458,7 +2394,7 @@ func (EntityTypeCSVInput) CSVInputWrapper() {} // EntityTypeCSVUpdateInput wraps UpdateEntityTypeInput with CSV reference columns for bulk updates. type EntityTypeCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEntityTypeInput } @@ -2476,7 +2412,7 @@ func (EventCSVInput) CSVInputWrapper() {} // EventCSVUpdateInput wraps UpdateEventInput with CSV reference columns for bulk updates. type EventCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEventInput } @@ -2485,7 +2421,7 @@ func (EventCSVUpdateInput) CSVInputWrapper() {} // EvidenceCSVInput wraps CreateEvidenceInput with CSV reference columns. type EvidenceCSVInput struct { - Input generated.CreateEvidenceInput + Input generated.CreateEvidenceInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -2495,8 +2431,8 @@ func (EvidenceCSVInput) CSVInputWrapper() {} // EvidenceCSVUpdateInput wraps UpdateEvidenceInput with CSV reference columns for bulk updates. type EvidenceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateEvidenceInput + ID string `csv:"ID"` + Input generated.UpdateEvidenceInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -2514,7 +2450,7 @@ func (ExportCSVInput) CSVInputWrapper() {} // ExportCSVUpdateInput wraps UpdateExportInput with CSV reference columns for bulk updates. type ExportCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateExportInput } @@ -2532,7 +2468,7 @@ func (FileCSVInput) CSVInputWrapper() {} // FileCSVUpdateInput wraps UpdateFileInput with CSV reference columns for bulk updates. type FileCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFileInput } @@ -2550,7 +2486,7 @@ func (FindingCSVInput) CSVInputWrapper() {} // FindingCSVUpdateInput wraps UpdateFindingInput with CSV reference columns for bulk updates. type FindingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFindingInput } @@ -2568,7 +2504,7 @@ func (FindingControlCSVInput) CSVInputWrapper() {} // FindingControlCSVUpdateInput wraps UpdateFindingControlInput with CSV reference columns for bulk updates. type FindingControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFindingControlInput } @@ -2586,7 +2522,7 @@ func (GroupCSVInput) CSVInputWrapper() {} // GroupCSVUpdateInput wraps UpdateGroupInput with CSV reference columns for bulk updates. type GroupCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupInput } @@ -2604,7 +2540,7 @@ func (GroupMembershipCSVInput) CSVInputWrapper() {} // GroupMembershipCSVUpdateInput wraps UpdateGroupMembershipInput with CSV reference columns for bulk updates. type GroupMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupMembershipInput } @@ -2622,7 +2558,7 @@ func (GroupSettingCSVInput) CSVInputWrapper() {} // GroupSettingCSVUpdateInput wraps UpdateGroupSettingInput with CSV reference columns for bulk updates. type GroupSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupSettingInput } @@ -2640,7 +2576,7 @@ func (HushCSVInput) CSVInputWrapper() {} // HushCSVUpdateInput wraps UpdateHushInput with CSV reference columns for bulk updates. type HushCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateHushInput } @@ -2649,11 +2585,11 @@ func (HushCSVUpdateInput) CSVInputWrapper() {} // IdentityHolderCSVInput wraps CreateIdentityHolderInput with CSV reference columns. type IdentityHolderCSVInput struct { - Input generated.CreateIdentityHolderInput - EmployerEntityName string `csv:"EmployerEntityName"` + Input generated.CreateIdentityHolderInput + EmployerEntityName string `csv:"EmployerEntityName"` IdentityHolderUserEmail string `csv:"IdentityHolderUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } // CSVInputWrapper marks IdentityHolderCSVInput for CSV header preprocessing. @@ -2662,12 +2598,12 @@ func (IdentityHolderCSVInput) CSVInputWrapper() {} // IdentityHolderCSVUpdateInput wraps UpdateIdentityHolderInput with CSV reference columns for bulk updates. type IdentityHolderCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateIdentityHolderInput - EmployerEntityName string `csv:"EmployerEntityName"` + ID string `csv:"ID"` + Input generated.UpdateIdentityHolderInput + EmployerEntityName string `csv:"EmployerEntityName"` IdentityHolderUserEmail string `csv:"IdentityHolderUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } // CSVInputWrapper marks IdentityHolderCSVUpdateInput for CSV header preprocessing. @@ -2675,10 +2611,10 @@ func (IdentityHolderCSVUpdateInput) CSVInputWrapper() {} // InternalPolicyCSVInput wraps CreateInternalPolicyInput with CSV reference columns. type InternalPolicyCSVInput struct { - Input generated.CreateInternalPolicyInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + Input generated.CreateInternalPolicyInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks InternalPolicyCSVInput for CSV header preprocessing. @@ -2687,11 +2623,11 @@ func (InternalPolicyCSVInput) CSVInputWrapper() {} // InternalPolicyCSVUpdateInput wraps UpdateInternalPolicyInput with CSV reference columns for bulk updates. type InternalPolicyCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateInternalPolicyInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + ID string `csv:"ID"` + Input generated.UpdateInternalPolicyInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks InternalPolicyCSVUpdateInput for CSV header preprocessing. @@ -2708,7 +2644,7 @@ func (InviteCSVInput) CSVInputWrapper() {} // InviteCSVUpdateInput wraps UpdateInviteInput with CSV reference columns for bulk updates. type InviteCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateInviteInput } @@ -2726,7 +2662,7 @@ func (JobResultCSVInput) CSVInputWrapper() {} // JobResultCSVUpdateInput wraps UpdateJobResultInput with CSV reference columns for bulk updates. type JobResultCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobResultInput } @@ -2744,7 +2680,7 @@ func (JobRunnerCSVInput) CSVInputWrapper() {} // JobRunnerCSVUpdateInput wraps UpdateJobRunnerInput with CSV reference columns for bulk updates. type JobRunnerCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerInput } @@ -2762,7 +2698,7 @@ func (JobRunnerRegistrationTokenCSVInput) CSVInputWrapper() {} // JobRunnerRegistrationTokenCSVUpdateInput wraps UpdateJobRunnerRegistrationTokenInput with CSV reference columns for bulk updates. type JobRunnerRegistrationTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerRegistrationTokenInput } @@ -2780,7 +2716,7 @@ func (JobRunnerTokenCSVInput) CSVInputWrapper() {} // JobRunnerTokenCSVUpdateInput wraps UpdateJobRunnerTokenInput with CSV reference columns for bulk updates. type JobRunnerTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerTokenInput } @@ -2798,7 +2734,7 @@ func (JobTemplateCSVInput) CSVInputWrapper() {} // JobTemplateCSVUpdateInput wraps UpdateJobTemplateInput with CSV reference columns for bulk updates. type JobTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobTemplateInput } @@ -2816,7 +2752,7 @@ func (MappableDomainCSVInput) CSVInputWrapper() {} // MappableDomainCSVUpdateInput wraps UpdateMappableDomainInput with CSV reference columns for bulk updates. type MappableDomainCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateMappableDomainInput } @@ -2834,7 +2770,7 @@ func (MappedControlCSVInput) CSVInputWrapper() {} // MappedControlCSVUpdateInput wraps UpdateMappedControlInput with CSV reference columns for bulk updates. type MappedControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateMappedControlInput } @@ -2852,7 +2788,7 @@ func (NarrativeCSVInput) CSVInputWrapper() {} // NarrativeCSVUpdateInput wraps UpdateNarrativeInput with CSV reference columns for bulk updates. type NarrativeCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNarrativeInput } @@ -2870,7 +2806,7 @@ func (NotificationCSVInput) CSVInputWrapper() {} // NotificationCSVUpdateInput wraps UpdateNotificationInput with CSV reference columns for bulk updates. type NotificationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationInput } @@ -2888,7 +2824,7 @@ func (NotificationPreferenceCSVInput) CSVInputWrapper() {} // NotificationPreferenceCSVUpdateInput wraps UpdateNotificationPreferenceInput with CSV reference columns for bulk updates. type NotificationPreferenceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationPreferenceInput } @@ -2906,7 +2842,7 @@ func (NotificationTemplateCSVInput) CSVInputWrapper() {} // NotificationTemplateCSVUpdateInput wraps UpdateNotificationTemplateInput with CSV reference columns for bulk updates. type NotificationTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationTemplateInput } @@ -2932,7 +2868,7 @@ func (OrgMembershipCSVInput) CSVInputWrapper() {} // OrgMembershipCSVUpdateInput wraps UpdateOrgMembershipInput with CSV reference columns for bulk updates. type OrgMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrgMembershipInput } @@ -2950,7 +2886,7 @@ func (OrganizationCSVInput) CSVInputWrapper() {} // OrganizationCSVUpdateInput wraps UpdateOrganizationInput with CSV reference columns for bulk updates. type OrganizationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrganizationInput } @@ -2968,7 +2904,7 @@ func (OrganizationSettingCSVInput) CSVInputWrapper() {} // OrganizationSettingCSVUpdateInput wraps UpdateOrganizationSettingInput with CSV reference columns for bulk updates. type OrganizationSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrganizationSettingInput } @@ -2986,7 +2922,7 @@ func (PersonalAccessTokenCSVInput) CSVInputWrapper() {} // PersonalAccessTokenCSVUpdateInput wraps UpdatePersonalAccessTokenInput with CSV reference columns for bulk updates. type PersonalAccessTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdatePersonalAccessTokenInput } @@ -2995,21 +2931,21 @@ func (PersonalAccessTokenCSVUpdateInput) CSVInputWrapper() {} // PlatformCSVInput wraps CreatePlatformInput with CSV reference columns. type PlatformCSVInput struct { - Input generated.CreatePlatformInput - BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` - BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` - OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` - PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` - SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` - SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` - SourceAssetNames []string `csv:"SourceAssetNames"` - SourceEntityNames []string `csv:"SourceEntityNames"` - SystemDetailNames []string `csv:"SystemDetailNames"` - TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` - TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` + Input generated.CreatePlatformInput + BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` + BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` + OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` + PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` + SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` + SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` + SourceAssetNames []string `csv:"SourceAssetNames"` + SourceEntityNames []string `csv:"SourceEntityNames"` + SystemDetailNames []string `csv:"SystemDetailNames"` + TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` + TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` } // CSVInputWrapper marks PlatformCSVInput for CSV header preprocessing. @@ -3018,22 +2954,22 @@ func (PlatformCSVInput) CSVInputWrapper() {} // PlatformCSVUpdateInput wraps UpdatePlatformInput with CSV reference columns for bulk updates. type PlatformCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdatePlatformInput - BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` - BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` - OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` - PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` - SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` - SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` - SourceAssetNames []string `csv:"SourceAssetNames"` - SourceEntityNames []string `csv:"SourceEntityNames"` - SystemDetailNames []string `csv:"SystemDetailNames"` - TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` - TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` + ID string `csv:"ID"` + Input generated.UpdatePlatformInput + BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` + BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` + OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` + PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` + SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` + SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` + SourceAssetNames []string `csv:"SourceAssetNames"` + SourceEntityNames []string `csv:"SourceEntityNames"` + SystemDetailNames []string `csv:"SystemDetailNames"` + TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` + TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` } // CSVInputWrapper marks PlatformCSVUpdateInput for CSV header preprocessing. @@ -3041,8 +2977,8 @@ func (PlatformCSVUpdateInput) CSVInputWrapper() {} // ProcedureCSVInput wraps CreateProcedureInput with CSV reference columns. type ProcedureCSVInput struct { - Input generated.CreateProcedureInput - ApproverGroupName string `csv:"ApproverGroupName"` + Input generated.CreateProcedureInput + ApproverGroupName string `csv:"ApproverGroupName"` DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } @@ -3052,9 +2988,9 @@ func (ProcedureCSVInput) CSVInputWrapper() {} // ProcedureCSVUpdateInput wraps UpdateProcedureInput with CSV reference columns for bulk updates. type ProcedureCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateProcedureInput - ApproverGroupName string `csv:"ApproverGroupName"` + ID string `csv:"ID"` + Input generated.UpdateProcedureInput + ApproverGroupName string `csv:"ApproverGroupName"` DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } @@ -3063,9 +2999,9 @@ func (ProcedureCSVUpdateInput) CSVInputWrapper() {} // ProgramCSVInput wraps CreateProgramInput with CSV reference columns. type ProgramCSVInput struct { - Input generated.CreateProgramInput - ControlRefCodes []string `csv:"ControlRefCodes"` - ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` + Input generated.CreateProgramInput + ControlRefCodes []string `csv:"ControlRefCodes"` + ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` } // CSVInputWrapper marks ProgramCSVInput for CSV header preprocessing. @@ -3074,10 +3010,10 @@ func (ProgramCSVInput) CSVInputWrapper() {} // ProgramCSVUpdateInput wraps UpdateProgramInput with CSV reference columns for bulk updates. type ProgramCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateProgramInput - ControlRefCodes []string `csv:"ControlRefCodes"` - ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` + ID string `csv:"ID"` + Input generated.UpdateProgramInput + ControlRefCodes []string `csv:"ControlRefCodes"` + ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` } // CSVInputWrapper marks ProgramCSVUpdateInput for CSV header preprocessing. @@ -3094,7 +3030,7 @@ func (ProgramMembershipCSVInput) CSVInputWrapper() {} // ProgramMembershipCSVUpdateInput wraps UpdateProgramMembershipInput with CSV reference columns for bulk updates. type ProgramMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateProgramMembershipInput } @@ -3103,8 +3039,8 @@ func (ProgramMembershipCSVUpdateInput) CSVInputWrapper() {} // RemediationCSVInput wraps CreateRemediationInput with CSV reference columns. type RemediationCSVInput struct { - Input generated.CreateRemediationInput - ControlRefCodes []string `csv:"ControlRefCodes"` + Input generated.CreateRemediationInput + ControlRefCodes []string `csv:"ControlRefCodes"` SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } @@ -3114,9 +3050,9 @@ func (RemediationCSVInput) CSVInputWrapper() {} // RemediationCSVUpdateInput wraps UpdateRemediationInput with CSV reference columns for bulk updates. type RemediationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateRemediationInput - ControlRefCodes []string `csv:"ControlRefCodes"` + ID string `csv:"ID"` + Input generated.UpdateRemediationInput + ControlRefCodes []string `csv:"ControlRefCodes"` SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } @@ -3125,7 +3061,7 @@ func (RemediationCSVUpdateInput) CSVInputWrapper() {} // ReviewCSVInput wraps CreateReviewInput with CSV reference columns. type ReviewCSVInput struct { - Input generated.CreateReviewInput + Input generated.CreateReviewInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3135,8 +3071,8 @@ func (ReviewCSVInput) CSVInputWrapper() {} // ReviewCSVUpdateInput wraps UpdateReviewInput with CSV reference columns for bulk updates. type ReviewCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateReviewInput + ID string `csv:"ID"` + Input generated.UpdateReviewInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3145,15 +3081,15 @@ func (ReviewCSVUpdateInput) CSVInputWrapper() {} // RiskCSVInput wraps CreateRiskInput with CSV reference columns. type RiskCSVInput struct { - Input generated.CreateRiskInput - ActionPlanNames []string `csv:"ActionPlanNames"` - AssetNames []string `csv:"AssetNames"` - ControlRefCodes []string `csv:"ControlRefCodes"` - EntityNames []string `csv:"EntityNames"` - PlatformNames []string `csv:"PlatformNames"` - RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` - StakeholderGroupName string `csv:"StakeholderGroupName"` - SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` + Input generated.CreateRiskInput + ActionPlanNames []string `csv:"ActionPlanNames"` + AssetNames []string `csv:"AssetNames"` + ControlRefCodes []string `csv:"ControlRefCodes"` + EntityNames []string `csv:"EntityNames"` + PlatformNames []string `csv:"PlatformNames"` + RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` + StakeholderGroupName string `csv:"StakeholderGroupName"` + SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } // CSVInputWrapper marks RiskCSVInput for CSV header preprocessing. @@ -3162,16 +3098,16 @@ func (RiskCSVInput) CSVInputWrapper() {} // RiskCSVUpdateInput wraps UpdateRiskInput with CSV reference columns for bulk updates. type RiskCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateRiskInput - ActionPlanNames []string `csv:"ActionPlanNames"` - AssetNames []string `csv:"AssetNames"` - ControlRefCodes []string `csv:"ControlRefCodes"` - EntityNames []string `csv:"EntityNames"` - PlatformNames []string `csv:"PlatformNames"` - RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` - StakeholderGroupName string `csv:"StakeholderGroupName"` - SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` + ID string `csv:"ID"` + Input generated.UpdateRiskInput + ActionPlanNames []string `csv:"ActionPlanNames"` + AssetNames []string `csv:"AssetNames"` + ControlRefCodes []string `csv:"ControlRefCodes"` + EntityNames []string `csv:"EntityNames"` + PlatformNames []string `csv:"PlatformNames"` + RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` + StakeholderGroupName string `csv:"StakeholderGroupName"` + SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } // CSVInputWrapper marks RiskCSVUpdateInput for CSV header preprocessing. @@ -3188,7 +3124,7 @@ func (SLADefinitionCSVInput) CSVInputWrapper() {} // SLADefinitionCSVUpdateInput wraps UpdateSLADefinitionInput with CSV reference columns for bulk updates. type SLADefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSLADefinitionInput } @@ -3197,14 +3133,14 @@ func (SLADefinitionCSVUpdateInput) CSVInputWrapper() {} // ScanCSVInput wraps CreateScanInput with CSV reference columns. type ScanCSVInput struct { - Input generated.CreateScanInput - AssignedToGroupName string `csv:"AssignedToGroupName"` - AssignedToUserEmail string `csv:"AssignedToUserEmail"` + Input generated.CreateScanInput + AssignedToGroupName string `csv:"AssignedToGroupName"` + AssignedToUserEmail string `csv:"AssignedToUserEmail"` GeneratedByPlatformName string `csv:"GeneratedByPlatformName"` - PerformedByGroupName string `csv:"PerformedByGroupName"` - PerformedByUserEmail string `csv:"PerformedByUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + PerformedByGroupName string `csv:"PerformedByGroupName"` + PerformedByUserEmail string `csv:"PerformedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks ScanCSVInput for CSV header preprocessing. @@ -3213,15 +3149,15 @@ func (ScanCSVInput) CSVInputWrapper() {} // ScanCSVUpdateInput wraps UpdateScanInput with CSV reference columns for bulk updates. type ScanCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateScanInput - AssignedToGroupName string `csv:"AssignedToGroupName"` - AssignedToUserEmail string `csv:"AssignedToUserEmail"` + ID string `csv:"ID"` + Input generated.UpdateScanInput + AssignedToGroupName string `csv:"AssignedToGroupName"` + AssignedToUserEmail string `csv:"AssignedToUserEmail"` GeneratedByPlatformName string `csv:"GeneratedByPlatformName"` - PerformedByGroupName string `csv:"PerformedByGroupName"` - PerformedByUserEmail string `csv:"PerformedByUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + PerformedByGroupName string `csv:"PerformedByGroupName"` + PerformedByUserEmail string `csv:"PerformedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks ScanCSVUpdateInput for CSV header preprocessing. @@ -3229,7 +3165,7 @@ func (ScanCSVUpdateInput) CSVInputWrapper() {} // ScheduledJobCSVInput wraps CreateScheduledJobInput with CSV reference columns. type ScheduledJobCSVInput struct { - Input generated.CreateScheduledJobInput + Input generated.CreateScheduledJobInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3239,8 +3175,8 @@ func (ScheduledJobCSVInput) CSVInputWrapper() {} // ScheduledJobCSVUpdateInput wraps UpdateScheduledJobInput with CSV reference columns for bulk updates. type ScheduledJobCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateScheduledJobInput + ID string `csv:"ID"` + Input generated.UpdateScheduledJobInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3258,7 +3194,7 @@ func (ScheduledJobRunCSVInput) CSVInputWrapper() {} // ScheduledJobRunCSVUpdateInput wraps UpdateScheduledJobRunInput with CSV reference columns for bulk updates. type ScheduledJobRunCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateScheduledJobRunInput } @@ -3276,7 +3212,7 @@ func (StandardCSVInput) CSVInputWrapper() {} // StandardCSVUpdateInput wraps UpdateStandardInput with CSV reference columns for bulk updates. type StandardCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateStandardInput } @@ -3285,15 +3221,15 @@ func (StandardCSVUpdateInput) CSVInputWrapper() {} // SubcontrolCSVInput wraps CreateSubcontrolInput with CSV reference columns. type SubcontrolCSVInput struct { - Input generated.CreateSubcontrolInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + Input generated.CreateSubcontrolInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks SubcontrolCSVInput for CSV header preprocessing. @@ -3302,16 +3238,16 @@ func (SubcontrolCSVInput) CSVInputWrapper() {} // SubcontrolCSVUpdateInput wraps UpdateSubcontrolInput with CSV reference columns for bulk updates. type SubcontrolCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateSubcontrolInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + ID string `csv:"ID"` + Input generated.UpdateSubcontrolInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks SubcontrolCSVUpdateInput for CSV header preprocessing. @@ -3328,7 +3264,7 @@ func (SubprocessorCSVInput) CSVInputWrapper() {} // SubprocessorCSVUpdateInput wraps UpdateSubprocessorInput with CSV reference columns for bulk updates. type SubprocessorCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSubprocessorInput } @@ -3346,7 +3282,7 @@ func (SubscriberCSVInput) CSVInputWrapper() {} // SubscriberCSVUpdateInput wraps UpdateSubscriberInput with CSV reference columns for bulk updates. type SubscriberCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSubscriberInput } @@ -3364,7 +3300,7 @@ func (SystemDetailCSVInput) CSVInputWrapper() {} // SystemDetailCSVUpdateInput wraps UpdateSystemDetailInput with CSV reference columns for bulk updates. type SystemDetailCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSystemDetailInput } @@ -3382,7 +3318,7 @@ func (TFASettingCSVInput) CSVInputWrapper() {} // TFASettingCSVUpdateInput wraps UpdateTFASettingInput with CSV reference columns for bulk updates. type TFASettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTFASettingInput } @@ -3400,7 +3336,7 @@ func (TagDefinitionCSVInput) CSVInputWrapper() {} // TagDefinitionCSVUpdateInput wraps UpdateTagDefinitionInput with CSV reference columns for bulk updates. type TagDefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTagDefinitionInput } @@ -3409,9 +3345,9 @@ func (TagDefinitionCSVUpdateInput) CSVInputWrapper() {} // TaskCSVInput wraps CreateTaskInput with CSV reference columns. type TaskCSVInput struct { - Input generated.CreateTaskInput - AssigneeEmail string `csv:"AssigneeEmail"` - AssignerEmail string `csv:"AssignerEmail"` + Input generated.CreateTaskInput + AssigneeEmail string `csv:"AssigneeEmail"` + AssignerEmail string `csv:"AssignerEmail"` ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3421,10 +3357,10 @@ func (TaskCSVInput) CSVInputWrapper() {} // TaskCSVUpdateInput wraps UpdateTaskInput with CSV reference columns for bulk updates. type TaskCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateTaskInput - AssigneeEmail string `csv:"AssigneeEmail"` - AssignerEmail string `csv:"AssignerEmail"` + ID string `csv:"ID"` + Input generated.UpdateTaskInput + AssigneeEmail string `csv:"AssigneeEmail"` + AssignerEmail string `csv:"AssignerEmail"` ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3442,7 +3378,7 @@ func (TemplateCSVInput) CSVInputWrapper() {} // TemplateCSVUpdateInput wraps UpdateTemplateInput with CSV reference columns for bulk updates. type TemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTemplateInput } @@ -3460,7 +3396,7 @@ func (TrustCenterCSVInput) CSVInputWrapper() {} // TrustCenterCSVUpdateInput wraps UpdateTrustCenterInput with CSV reference columns for bulk updates. type TrustCenterCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterInput } @@ -3478,7 +3414,7 @@ func (TrustCenterComplianceCSVInput) CSVInputWrapper() {} // TrustCenterComplianceCSVUpdateInput wraps UpdateTrustCenterComplianceInput with CSV reference columns for bulk updates. type TrustCenterComplianceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterComplianceInput } @@ -3496,7 +3432,7 @@ func (TrustCenterDocCSVInput) CSVInputWrapper() {} // TrustCenterDocCSVUpdateInput wraps UpdateTrustCenterDocInput with CSV reference columns for bulk updates. type TrustCenterDocCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterDocInput } @@ -3514,7 +3450,7 @@ func (TrustCenterEntityCSVInput) CSVInputWrapper() {} // TrustCenterEntityCSVUpdateInput wraps UpdateTrustCenterEntityInput with CSV reference columns for bulk updates. type TrustCenterEntityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterEntityInput } @@ -3532,7 +3468,7 @@ func (TrustCenterFAQCSVInput) CSVInputWrapper() {} // TrustCenterFAQCSVUpdateInput wraps UpdateTrustCenterFAQInput with CSV reference columns for bulk updates. type TrustCenterFAQCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterFAQInput } @@ -3550,7 +3486,7 @@ func (TrustCenterNDARequestCSVInput) CSVInputWrapper() {} // TrustCenterNDARequestCSVUpdateInput wraps UpdateTrustCenterNDARequestInput with CSV reference columns for bulk updates. type TrustCenterNDARequestCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterNDARequestInput } @@ -3568,7 +3504,7 @@ func (TrustCenterSettingCSVInput) CSVInputWrapper() {} // TrustCenterSettingCSVUpdateInput wraps UpdateTrustCenterSettingInput with CSV reference columns for bulk updates. type TrustCenterSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterSettingInput } @@ -3586,7 +3522,7 @@ func (TrustCenterSubprocessorCSVInput) CSVInputWrapper() {} // TrustCenterSubprocessorCSVUpdateInput wraps UpdateTrustCenterSubprocessorInput with CSV reference columns for bulk updates. type TrustCenterSubprocessorCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterSubprocessorInput } @@ -3604,7 +3540,7 @@ func (TrustCenterWatermarkConfigCSVInput) CSVInputWrapper() {} // TrustCenterWatermarkConfigCSVUpdateInput wraps UpdateTrustCenterWatermarkConfigInput with CSV reference columns for bulk updates. type TrustCenterWatermarkConfigCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterWatermarkConfigInput } @@ -3622,7 +3558,7 @@ func (UserCSVInput) CSVInputWrapper() {} // UserCSVUpdateInput wraps UpdateUserInput with CSV reference columns for bulk updates. type UserCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateUserInput } @@ -3640,7 +3576,7 @@ func (UserSettingCSVInput) CSVInputWrapper() {} // UserSettingCSVUpdateInput wraps UpdateUserSettingInput with CSV reference columns for bulk updates. type UserSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateUserSettingInput } @@ -3649,7 +3585,7 @@ func (UserSettingCSVUpdateInput) CSVInputWrapper() {} // VendorRiskScoreCSVInput wraps CreateVendorRiskScoreInput with CSV reference columns. type VendorRiskScoreCSVInput struct { - Input generated.CreateVendorRiskScoreInput + Input generated.CreateVendorRiskScoreInput VendorRiskScoreEntityName string `csv:"VendorRiskScoreEntityName"` } @@ -3659,8 +3595,8 @@ func (VendorRiskScoreCSVInput) CSVInputWrapper() {} // VendorRiskScoreCSVUpdateInput wraps UpdateVendorRiskScoreInput with CSV reference columns for bulk updates. type VendorRiskScoreCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateVendorRiskScoreInput + ID string `csv:"ID"` + Input generated.UpdateVendorRiskScoreInput VendorRiskScoreEntityName string `csv:"VendorRiskScoreEntityName"` } @@ -3678,7 +3614,7 @@ func (VendorScoringConfigCSVInput) CSVInputWrapper() {} // VendorScoringConfigCSVUpdateInput wraps UpdateVendorScoringConfigInput with CSV reference columns for bulk updates. type VendorScoringConfigCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateVendorScoringConfigInput } @@ -3687,7 +3623,7 @@ func (VendorScoringConfigCSVUpdateInput) CSVInputWrapper() {} // VulnerabilityCSVInput wraps CreateVulnerabilityInput with CSV reference columns. type VulnerabilityCSVInput struct { - Input generated.CreateVulnerabilityInput + Input generated.CreateVulnerabilityInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3697,8 +3633,8 @@ func (VulnerabilityCSVInput) CSVInputWrapper() {} // VulnerabilityCSVUpdateInput wraps UpdateVulnerabilityInput with CSV reference columns for bulk updates. type VulnerabilityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateVulnerabilityInput + ID string `csv:"ID"` + Input generated.UpdateVulnerabilityInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3716,7 +3652,7 @@ func (WorkflowDefinitionCSVInput) CSVInputWrapper() {} // WorkflowDefinitionCSVUpdateInput wraps UpdateWorkflowDefinitionInput with CSV reference columns for bulk updates. type WorkflowDefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateWorkflowDefinitionInput } diff --git a/internal/ent/generated/entql.go b/internal/ent/generated/entql.go index a960bae9cf..63b0401c1e 100644 --- a/internal/ent/generated/entql.go +++ b/internal/ent/generated/entql.go @@ -2329,6 +2329,7 @@ var schemaGraph = func() *sqlgraph.Schema { organizationsetting.FieldMultifactorAuthEnforced: {Type: field.TypeBool, Column: organizationsetting.FieldMultifactorAuthEnforced}, organizationsetting.FieldComplianceWebhookToken: {Type: field.TypeString, Column: organizationsetting.FieldComplianceWebhookToken}, organizationsetting.FieldPaymentMethodAdded: {Type: field.TypeBool, Column: organizationsetting.FieldPaymentMethodAdded}, + organizationsetting.FieldPendingDeletionAt: {Type: field.TypeTime, Column: organizationsetting.FieldPendingDeletionAt}, }, } graph.Nodes[63] = &sqlgraph.Node{ @@ -36487,6 +36488,11 @@ func (f *OrganizationSettingFilter) WherePaymentMethodAdded(p entql.BoolP) { f.Where(p.Field(organizationsetting.FieldPaymentMethodAdded)) } +// WherePendingDeletionAt applies the entql time.Time predicate on the pending_deletion_at field. +func (f *OrganizationSettingFilter) WherePendingDeletionAt(p entql.TimeP) { + f.Where(p.Field(organizationsetting.FieldPendingDeletionAt)) +} + // WhereHasOrganization applies a predicate to check if query has an edge organization. func (f *OrganizationSettingFilter) WhereHasOrganization() { f.Where(entql.HasEdge("organization")) diff --git a/internal/ent/generated/gql_collection.go b/internal/ent/generated/gql_collection.go index 572d1c2fbb..990a24632b 100644 --- a/internal/ent/generated/gql_collection.go +++ b/internal/ent/generated/gql_collection.go @@ -53602,6 +53602,11 @@ func (_q *OrganizationSettingQuery) collectField(ctx context.Context, oneNode bo selectedFields = append(selectedFields, organizationsetting.FieldPaymentMethodAdded) fieldSeen[organizationsetting.FieldPaymentMethodAdded] = struct{}{} } + case "pendingDeletionAt": + if _, ok := fieldSeen[organizationsetting.FieldPendingDeletionAt]; !ok { + selectedFields = append(selectedFields, organizationsetting.FieldPendingDeletionAt) + fieldSeen[organizationsetting.FieldPendingDeletionAt] = struct{}{} + } case "id": case "__typename": default: diff --git a/internal/ent/generated/gql_where_input.go b/internal/ent/generated/gql_where_input.go index f48aa32aa2..920fa3c257 100644 --- a/internal/ent/generated/gql_where_input.go +++ b/internal/ent/generated/gql_where_input.go @@ -71763,6 +71763,18 @@ type OrganizationSettingWhereInput struct { ComplianceWebhookTokenEqualFold *string `json:"complianceWebhookTokenEqualFold,omitempty"` ComplianceWebhookTokenContainsFold *string `json:"complianceWebhookTokenContainsFold,omitempty"` + // "pending_deletion_at" field predicates. + PendingDeletionAt *models.DateTime `json:"pendingDeletionAt,omitempty"` + PendingDeletionAtNEQ *models.DateTime `json:"pendingDeletionAtNEQ,omitempty"` + PendingDeletionAtIn []models.DateTime `json:"pendingDeletionAtIn,omitempty"` + PendingDeletionAtNotIn []models.DateTime `json:"pendingDeletionAtNotIn,omitempty"` + PendingDeletionAtGT *models.DateTime `json:"pendingDeletionAtGT,omitempty"` + PendingDeletionAtGTE *models.DateTime `json:"pendingDeletionAtGTE,omitempty"` + PendingDeletionAtLT *models.DateTime `json:"pendingDeletionAtLT,omitempty"` + PendingDeletionAtLTE *models.DateTime `json:"pendingDeletionAtLTE,omitempty"` + PendingDeletionAtIsNil bool `json:"pendingDeletionAtIsNil,omitempty"` + PendingDeletionAtNotNil bool `json:"pendingDeletionAtNotNil,omitempty"` + // "tags" JSON-string-array predicates. TagsHas *string `json:"tagsHas,omitempty"` @@ -72740,6 +72752,36 @@ func (i *OrganizationSettingWhereInput) P() (predicate.OrganizationSetting, erro if i.ComplianceWebhookTokenContainsFold != nil { predicates = append(predicates, organizationsetting.ComplianceWebhookTokenContainsFold(*i.ComplianceWebhookTokenContainsFold)) } + if i.PendingDeletionAt != nil { + predicates = append(predicates, organizationsetting.PendingDeletionAtEQ(*i.PendingDeletionAt)) + } + if i.PendingDeletionAtNEQ != nil { + predicates = append(predicates, organizationsetting.PendingDeletionAtNEQ(*i.PendingDeletionAtNEQ)) + } + if len(i.PendingDeletionAtIn) > 0 { + predicates = append(predicates, organizationsetting.PendingDeletionAtIn(i.PendingDeletionAtIn...)) + } + if len(i.PendingDeletionAtNotIn) > 0 { + predicates = append(predicates, organizationsetting.PendingDeletionAtNotIn(i.PendingDeletionAtNotIn...)) + } + if i.PendingDeletionAtGT != nil { + predicates = append(predicates, organizationsetting.PendingDeletionAtGT(*i.PendingDeletionAtGT)) + } + if i.PendingDeletionAtGTE != nil { + predicates = append(predicates, organizationsetting.PendingDeletionAtGTE(*i.PendingDeletionAtGTE)) + } + if i.PendingDeletionAtLT != nil { + predicates = append(predicates, organizationsetting.PendingDeletionAtLT(*i.PendingDeletionAtLT)) + } + if i.PendingDeletionAtLTE != nil { + predicates = append(predicates, organizationsetting.PendingDeletionAtLTE(*i.PendingDeletionAtLTE)) + } + if i.PendingDeletionAtIsNil { + predicates = append(predicates, organizationsetting.PendingDeletionAtIsNil()) + } + if i.PendingDeletionAtNotNil { + predicates = append(predicates, organizationsetting.PendingDeletionAtNotNil()) + } if i.TagsHas != nil { v := *i.TagsHas diff --git a/internal/ent/generated/history_from_mutation.go b/internal/ent/generated/history_from_mutation.go index 164a6d0ee7..2fe9b0b75d 100644 --- a/internal/ent/generated/history_from_mutation.go +++ b/internal/ent/generated/history_from_mutation.go @@ -15524,6 +15524,10 @@ func (m *OrganizationSettingMutation) CreateHistoryFromCreate(ctx context.Contex create = create.SetPaymentMethodAdded(paymentMethodAdded) } + if pendingDeletionAt, exists := m.PendingDeletionAt(); exists { + create = create.SetNillablePendingDeletionAt(&pendingDeletionAt) + } + _, err := create.Save(ctx) return err @@ -15747,6 +15751,12 @@ func (m *OrganizationSettingMutation) CreateHistoryFromUpdate(ctx context.Contex create = create.SetPaymentMethodAdded(organizationsetting.PaymentMethodAdded) } + if pendingDeletionAt, exists := m.PendingDeletionAt(); exists { + create = create.SetNillablePendingDeletionAt(&pendingDeletionAt) + } else { + create = create.SetNillablePendingDeletionAt(organizationsetting.PendingDeletionAt) + } + if _, err := create.Save(ctx); err != nil { return err } @@ -15814,6 +15824,7 @@ func (m *OrganizationSettingMutation) CreateHistoryFromDelete(ctx context.Contex SetMultifactorAuthEnforced(organizationsetting.MultifactorAuthEnforced). SetComplianceWebhookToken(organizationsetting.ComplianceWebhookToken). SetPaymentMethodAdded(organizationsetting.PaymentMethodAdded). + SetNillablePendingDeletionAt(organizationsetting.PendingDeletionAt). Save(ctx) if err != nil { return err diff --git a/internal/ent/generated/migrate/schema.go b/internal/ent/generated/migrate/schema.go index 84afc42939..ad6d4c6e31 100644 --- a/internal/ent/generated/migrate/schema.go +++ b/internal/ent/generated/migrate/schema.go @@ -5321,6 +5321,7 @@ var ( {Name: "multifactor_auth_enforced", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "compliance_webhook_token", Type: field.TypeString, Unique: true, Nullable: true}, {Name: "payment_method_added", Type: field.TypeBool, Default: false}, + {Name: "pending_deletion_at", Type: field.TypeTime, Nullable: true}, {Name: "organization_id", Type: field.TypeString, Unique: true, Nullable: true}, } // OrganizationSettingsTable holds the schema information for the "organization_settings" table. @@ -5331,7 +5332,7 @@ var ( ForeignKeys: []*schema.ForeignKey{ { Symbol: "organization_settings_organizations_setting", - Columns: []*schema.Column{OrganizationSettingsColumns[32]}, + Columns: []*schema.Column{OrganizationSettingsColumns[33]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, diff --git a/internal/ent/generated/mutation.go b/internal/ent/generated/mutation.go index b785064a16..d23d474bcc 100644 --- a/internal/ent/generated/mutation.go +++ b/internal/ent/generated/mutation.go @@ -165463,6 +165463,7 @@ type OrganizationSettingMutation struct { multifactor_auth_enforced *bool compliance_webhook_token *string payment_method_added *bool + pending_deletion_at *models.DateTime clearedFields map[string]struct{} organization *string clearedorganization bool @@ -167142,6 +167143,55 @@ func (m *OrganizationSettingMutation) ResetPaymentMethodAdded() { m.payment_method_added = nil } +// SetPendingDeletionAt sets the "pending_deletion_at" field. +func (m *OrganizationSettingMutation) SetPendingDeletionAt(mt models.DateTime) { + m.pending_deletion_at = &mt +} + +// PendingDeletionAt returns the value of the "pending_deletion_at" field in the mutation. +func (m *OrganizationSettingMutation) PendingDeletionAt() (r models.DateTime, exists bool) { + v := m.pending_deletion_at + if v == nil { + return + } + return *v, true +} + +// OldPendingDeletionAt returns the old "pending_deletion_at" field's value of the OrganizationSetting entity. +// If the OrganizationSetting object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *OrganizationSettingMutation) OldPendingDeletionAt(ctx context.Context) (v *models.DateTime, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldPendingDeletionAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldPendingDeletionAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldPendingDeletionAt: %w", err) + } + return oldValue.PendingDeletionAt, nil +} + +// ClearPendingDeletionAt clears the value of the "pending_deletion_at" field. +func (m *OrganizationSettingMutation) ClearPendingDeletionAt() { + m.pending_deletion_at = nil + m.clearedFields[organizationsetting.FieldPendingDeletionAt] = struct{}{} +} + +// PendingDeletionAtCleared returns if the "pending_deletion_at" field was cleared in this mutation. +func (m *OrganizationSettingMutation) PendingDeletionAtCleared() bool { + _, ok := m.clearedFields[organizationsetting.FieldPendingDeletionAt] + return ok +} + +// ResetPendingDeletionAt resets all changes to the "pending_deletion_at" field. +func (m *OrganizationSettingMutation) ResetPendingDeletionAt() { + m.pending_deletion_at = nil + delete(m.clearedFields, organizationsetting.FieldPendingDeletionAt) +} + // ClearOrganization clears the "organization" edge to the Organization entity. func (m *OrganizationSettingMutation) ClearOrganization() { m.clearedorganization = true @@ -167257,7 +167307,7 @@ func (m *OrganizationSettingMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *OrganizationSettingMutation) Fields() []string { - fields := make([]string, 0, 32) + fields := make([]string, 0, 33) if m.created_at != nil { fields = append(fields, organizationsetting.FieldCreatedAt) } @@ -167354,6 +167404,9 @@ func (m *OrganizationSettingMutation) Fields() []string { if m.payment_method_added != nil { fields = append(fields, organizationsetting.FieldPaymentMethodAdded) } + if m.pending_deletion_at != nil { + fields = append(fields, organizationsetting.FieldPendingDeletionAt) + } return fields } @@ -167426,6 +167479,8 @@ func (m *OrganizationSettingMutation) Field(name string) (ent.Value, bool) { return m.ComplianceWebhookToken() case organizationsetting.FieldPaymentMethodAdded: return m.PaymentMethodAdded() + case organizationsetting.FieldPendingDeletionAt: + return m.PendingDeletionAt() } return nil, false } @@ -167499,6 +167554,8 @@ func (m *OrganizationSettingMutation) OldField(ctx context.Context, name string) return m.OldComplianceWebhookToken(ctx) case organizationsetting.FieldPaymentMethodAdded: return m.OldPaymentMethodAdded(ctx) + case organizationsetting.FieldPendingDeletionAt: + return m.OldPendingDeletionAt(ctx) } return nil, fmt.Errorf("unknown OrganizationSetting field %s", name) } @@ -167732,6 +167789,13 @@ func (m *OrganizationSettingMutation) SetField(name string, value ent.Value) err } m.SetPaymentMethodAdded(v) return nil + case organizationsetting.FieldPendingDeletionAt: + v, ok := value.(models.DateTime) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetPendingDeletionAt(v) + return nil } return fmt.Errorf("unknown OrganizationSetting field %s", name) } @@ -167846,6 +167910,9 @@ func (m *OrganizationSettingMutation) ClearedFields() []string { if m.FieldCleared(organizationsetting.FieldComplianceWebhookToken) { fields = append(fields, organizationsetting.FieldComplianceWebhookToken) } + if m.FieldCleared(organizationsetting.FieldPendingDeletionAt) { + fields = append(fields, organizationsetting.FieldPendingDeletionAt) + } return fields } @@ -167944,6 +168011,9 @@ func (m *OrganizationSettingMutation) ClearField(name string) error { case organizationsetting.FieldComplianceWebhookToken: m.ClearComplianceWebhookToken() return nil + case organizationsetting.FieldPendingDeletionAt: + m.ClearPendingDeletionAt() + return nil } return fmt.Errorf("unknown OrganizationSetting nullable field %s", name) } @@ -168048,6 +168118,9 @@ func (m *OrganizationSettingMutation) ResetField(name string) error { case organizationsetting.FieldPaymentMethodAdded: m.ResetPaymentMethodAdded() return nil + case organizationsetting.FieldPendingDeletionAt: + m.ResetPendingDeletionAt() + return nil } return fmt.Errorf("unknown OrganizationSetting field %s", name) } diff --git a/internal/ent/generated/organizationsetting.go b/internal/ent/generated/organizationsetting.go index 9d42879cd8..e0d13911a3 100644 --- a/internal/ent/generated/organizationsetting.go +++ b/internal/ent/generated/organizationsetting.go @@ -85,6 +85,8 @@ type OrganizationSetting struct { ComplianceWebhookToken string `json:"compliance_webhook_token,omitempty"` // whether or not a payment method has been added to the account PaymentMethodAdded bool `json:"payment_method_added,omitempty"` + // when will this organization be deleted? usually this is after org has not added a payment method afte n period + PendingDeletionAt *models.DateTime `json:"pending_deletion_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the OrganizationSettingQuery when eager-loading is set. Edges OrganizationSettingEdges `json:"edges"` @@ -131,6 +133,8 @@ func (*OrganizationSetting) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) for i := range columns { switch columns[i] { + case organizationsetting.FieldPendingDeletionAt: + values[i] = &sql.NullScanner{S: new(models.DateTime)} case organizationsetting.FieldTags, organizationsetting.FieldDomains, organizationsetting.FieldBillingAddress, organizationsetting.FieldAllowedEmailDomains: values[i] = new([]byte) case organizationsetting.FieldBillingNotificationsEnabled, organizationsetting.FieldAllowMatchingDomainsAutojoin, organizationsetting.FieldIdentityProviderAuthTested, organizationsetting.FieldIdentityProviderLoginEnforced, organizationsetting.FieldMultifactorAuthEnforced, organizationsetting.FieldPaymentMethodAdded: @@ -362,6 +366,13 @@ func (_m *OrganizationSetting) assignValues(columns []string, values []any) erro } else if value.Valid { _m.PaymentMethodAdded = value.Bool } + case organizationsetting.FieldPendingDeletionAt: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field pending_deletion_at", values[i]) + } else if value.Valid { + _m.PendingDeletionAt = new(models.DateTime) + *_m.PendingDeletionAt = *value.S.(*models.DateTime) + } default: _m.selectValues.Set(columns[i], values[i]) } @@ -507,6 +518,11 @@ func (_m *OrganizationSetting) String() string { builder.WriteString(", ") builder.WriteString("payment_method_added=") builder.WriteString(fmt.Sprintf("%v", _m.PaymentMethodAdded)) + builder.WriteString(", ") + if v := _m.PendingDeletionAt; v != nil { + builder.WriteString("pending_deletion_at=") + builder.WriteString(fmt.Sprintf("%v", *v)) + } builder.WriteByte(')') return builder.String() } diff --git a/internal/ent/generated/organizationsetting/organizationsetting.go b/internal/ent/generated/organizationsetting/organizationsetting.go index 2cee101781..0bbc5822fb 100644 --- a/internal/ent/generated/organizationsetting/organizationsetting.go +++ b/internal/ent/generated/organizationsetting/organizationsetting.go @@ -82,6 +82,8 @@ const ( FieldComplianceWebhookToken = "compliance_webhook_token" // FieldPaymentMethodAdded holds the string denoting the payment_method_added field in the database. FieldPaymentMethodAdded = "payment_method_added" + // FieldPendingDeletionAt holds the string denoting the pending_deletion_at field in the database. + FieldPendingDeletionAt = "pending_deletion_at" // EdgeOrganization holds the string denoting the organization edge name in mutations. EdgeOrganization = "organization" // EdgeFiles holds the string denoting the files edge name in mutations. @@ -137,6 +139,7 @@ var Columns = []string{ FieldMultifactorAuthEnforced, FieldComplianceWebhookToken, FieldPaymentMethodAdded, + FieldPendingDeletionAt, } var ( @@ -372,6 +375,11 @@ func ByPaymentMethodAdded(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldPaymentMethodAdded, opts...).ToFunc() } +// ByPendingDeletionAt orders the results by the pending_deletion_at field. +func ByPendingDeletionAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldPendingDeletionAt, opts...).ToFunc() +} + // ByOrganizationField orders the results by organization field. func ByOrganizationField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { diff --git a/internal/ent/generated/organizationsetting/where.go b/internal/ent/generated/organizationsetting/where.go index 38540295f8..4882bd5a73 100644 --- a/internal/ent/generated/organizationsetting/where.go +++ b/internal/ent/generated/organizationsetting/where.go @@ -8,6 +8,7 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "github.com/theopenlane/core/common/enums" + "github.com/theopenlane/core/common/models" "github.com/theopenlane/core/internal/ent/generated/predicate" "github.com/theopenlane/core/internal/ent/generated/internal" @@ -198,6 +199,11 @@ func PaymentMethodAdded(v bool) predicate.OrganizationSetting { return predicate.OrganizationSetting(sql.FieldEQ(FieldPaymentMethodAdded, v)) } +// PendingDeletionAt applies equality check predicate on the "pending_deletion_at" field. It's identical to PendingDeletionAtEQ. +func PendingDeletionAt(v models.DateTime) predicate.OrganizationSetting { + return predicate.OrganizationSetting(sql.FieldEQ(FieldPendingDeletionAt, v)) +} + // CreatedAtEQ applies the EQ predicate on the "created_at" field. func CreatedAtEQ(v time.Time) predicate.OrganizationSetting { return predicate.OrganizationSetting(sql.FieldEQ(FieldCreatedAt, v)) @@ -1823,6 +1829,56 @@ func PaymentMethodAddedNEQ(v bool) predicate.OrganizationSetting { return predicate.OrganizationSetting(sql.FieldNEQ(FieldPaymentMethodAdded, v)) } +// PendingDeletionAtEQ applies the EQ predicate on the "pending_deletion_at" field. +func PendingDeletionAtEQ(v models.DateTime) predicate.OrganizationSetting { + return predicate.OrganizationSetting(sql.FieldEQ(FieldPendingDeletionAt, v)) +} + +// PendingDeletionAtNEQ applies the NEQ predicate on the "pending_deletion_at" field. +func PendingDeletionAtNEQ(v models.DateTime) predicate.OrganizationSetting { + return predicate.OrganizationSetting(sql.FieldNEQ(FieldPendingDeletionAt, v)) +} + +// PendingDeletionAtIn applies the In predicate on the "pending_deletion_at" field. +func PendingDeletionAtIn(vs ...models.DateTime) predicate.OrganizationSetting { + return predicate.OrganizationSetting(sql.FieldIn(FieldPendingDeletionAt, vs...)) +} + +// PendingDeletionAtNotIn applies the NotIn predicate on the "pending_deletion_at" field. +func PendingDeletionAtNotIn(vs ...models.DateTime) predicate.OrganizationSetting { + return predicate.OrganizationSetting(sql.FieldNotIn(FieldPendingDeletionAt, vs...)) +} + +// PendingDeletionAtGT applies the GT predicate on the "pending_deletion_at" field. +func PendingDeletionAtGT(v models.DateTime) predicate.OrganizationSetting { + return predicate.OrganizationSetting(sql.FieldGT(FieldPendingDeletionAt, v)) +} + +// PendingDeletionAtGTE applies the GTE predicate on the "pending_deletion_at" field. +func PendingDeletionAtGTE(v models.DateTime) predicate.OrganizationSetting { + return predicate.OrganizationSetting(sql.FieldGTE(FieldPendingDeletionAt, v)) +} + +// PendingDeletionAtLT applies the LT predicate on the "pending_deletion_at" field. +func PendingDeletionAtLT(v models.DateTime) predicate.OrganizationSetting { + return predicate.OrganizationSetting(sql.FieldLT(FieldPendingDeletionAt, v)) +} + +// PendingDeletionAtLTE applies the LTE predicate on the "pending_deletion_at" field. +func PendingDeletionAtLTE(v models.DateTime) predicate.OrganizationSetting { + return predicate.OrganizationSetting(sql.FieldLTE(FieldPendingDeletionAt, v)) +} + +// PendingDeletionAtIsNil applies the IsNil predicate on the "pending_deletion_at" field. +func PendingDeletionAtIsNil() predicate.OrganizationSetting { + return predicate.OrganizationSetting(sql.FieldIsNull(FieldPendingDeletionAt)) +} + +// PendingDeletionAtNotNil applies the NotNil predicate on the "pending_deletion_at" field. +func PendingDeletionAtNotNil() predicate.OrganizationSetting { + return predicate.OrganizationSetting(sql.FieldNotNull(FieldPendingDeletionAt)) +} + // HasOrganization applies the HasEdge predicate on the "organization" edge. func HasOrganization() predicate.OrganizationSetting { return predicate.OrganizationSetting(func(s *sql.Selector) { diff --git a/internal/ent/generated/organizationsetting_create.go b/internal/ent/generated/organizationsetting_create.go index 9d81f6d859..005fccea74 100644 --- a/internal/ent/generated/organizationsetting_create.go +++ b/internal/ent/generated/organizationsetting_create.go @@ -448,6 +448,20 @@ func (_c *OrganizationSettingCreate) SetNillablePaymentMethodAdded(v *bool) *Org return _c } +// SetPendingDeletionAt sets the "pending_deletion_at" field. +func (_c *OrganizationSettingCreate) SetPendingDeletionAt(v models.DateTime) *OrganizationSettingCreate { + _c.mutation.SetPendingDeletionAt(v) + return _c +} + +// SetNillablePendingDeletionAt sets the "pending_deletion_at" field if the given value is not nil. +func (_c *OrganizationSettingCreate) SetNillablePendingDeletionAt(v *models.DateTime) *OrganizationSettingCreate { + if v != nil { + _c.SetPendingDeletionAt(*v) + } + return _c +} + // SetID sets the "id" field. func (_c *OrganizationSettingCreate) SetID(v string) *OrganizationSettingCreate { _c.mutation.SetID(v) @@ -795,6 +809,10 @@ func (_c *OrganizationSettingCreate) createSpec() (*OrganizationSetting, *sqlgra _spec.SetField(organizationsetting.FieldPaymentMethodAdded, field.TypeBool, value) _node.PaymentMethodAdded = value } + if value, ok := _c.mutation.PendingDeletionAt(); ok { + _spec.SetField(organizationsetting.FieldPendingDeletionAt, field.TypeTime, value) + _node.PendingDeletionAt = &value + } if nodes := _c.mutation.OrganizationIDs(); len(nodes) > 0 { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2O, diff --git a/internal/ent/generated/organizationsetting_update.go b/internal/ent/generated/organizationsetting_update.go index e621ac0e1a..692b728712 100644 --- a/internal/ent/generated/organizationsetting_update.go +++ b/internal/ent/generated/organizationsetting_update.go @@ -598,6 +598,26 @@ func (_u *OrganizationSettingUpdate) SetNillablePaymentMethodAdded(v *bool) *Org return _u } +// SetPendingDeletionAt sets the "pending_deletion_at" field. +func (_u *OrganizationSettingUpdate) SetPendingDeletionAt(v models.DateTime) *OrganizationSettingUpdate { + _u.mutation.SetPendingDeletionAt(v) + return _u +} + +// SetNillablePendingDeletionAt sets the "pending_deletion_at" field if the given value is not nil. +func (_u *OrganizationSettingUpdate) SetNillablePendingDeletionAt(v *models.DateTime) *OrganizationSettingUpdate { + if v != nil { + _u.SetPendingDeletionAt(*v) + } + return _u +} + +// ClearPendingDeletionAt clears the value of the "pending_deletion_at" field. +func (_u *OrganizationSettingUpdate) ClearPendingDeletionAt() *OrganizationSettingUpdate { + _u.mutation.ClearPendingDeletionAt() + return _u +} + // SetOrganization sets the "organization" edge to the Organization entity. func (_u *OrganizationSettingUpdate) SetOrganization(v *Organization) *OrganizationSettingUpdate { return _u.SetOrganizationID(v.ID) @@ -933,6 +953,12 @@ func (_u *OrganizationSettingUpdate) sqlSave(ctx context.Context) (_node int, er if value, ok := _u.mutation.PaymentMethodAdded(); ok { _spec.SetField(organizationsetting.FieldPaymentMethodAdded, field.TypeBool, value) } + if value, ok := _u.mutation.PendingDeletionAt(); ok { + _spec.SetField(organizationsetting.FieldPendingDeletionAt, field.TypeTime, value) + } + if _u.mutation.PendingDeletionAtCleared() { + _spec.ClearField(organizationsetting.FieldPendingDeletionAt, field.TypeTime) + } if _u.mutation.OrganizationCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2O, @@ -1598,6 +1624,26 @@ func (_u *OrganizationSettingUpdateOne) SetNillablePaymentMethodAdded(v *bool) * return _u } +// SetPendingDeletionAt sets the "pending_deletion_at" field. +func (_u *OrganizationSettingUpdateOne) SetPendingDeletionAt(v models.DateTime) *OrganizationSettingUpdateOne { + _u.mutation.SetPendingDeletionAt(v) + return _u +} + +// SetNillablePendingDeletionAt sets the "pending_deletion_at" field if the given value is not nil. +func (_u *OrganizationSettingUpdateOne) SetNillablePendingDeletionAt(v *models.DateTime) *OrganizationSettingUpdateOne { + if v != nil { + _u.SetPendingDeletionAt(*v) + } + return _u +} + +// ClearPendingDeletionAt clears the value of the "pending_deletion_at" field. +func (_u *OrganizationSettingUpdateOne) ClearPendingDeletionAt() *OrganizationSettingUpdateOne { + _u.mutation.ClearPendingDeletionAt() + return _u +} + // SetOrganization sets the "organization" edge to the Organization entity. func (_u *OrganizationSettingUpdateOne) SetOrganization(v *Organization) *OrganizationSettingUpdateOne { return _u.SetOrganizationID(v.ID) @@ -1963,6 +2009,12 @@ func (_u *OrganizationSettingUpdateOne) sqlSave(ctx context.Context) (_node *Org if value, ok := _u.mutation.PaymentMethodAdded(); ok { _spec.SetField(organizationsetting.FieldPaymentMethodAdded, field.TypeBool, value) } + if value, ok := _u.mutation.PendingDeletionAt(); ok { + _spec.SetField(organizationsetting.FieldPendingDeletionAt, field.TypeTime, value) + } + if _u.mutation.PendingDeletionAtCleared() { + _spec.ClearField(organizationsetting.FieldPendingDeletionAt, field.TypeTime) + } if _u.mutation.OrganizationCleared() { edge := &sqlgraph.EdgeSpec{ Rel: sqlgraph.O2O, diff --git a/internal/ent/historygenerated/entql.go b/internal/ent/historygenerated/entql.go index 76d48252e1..1a97e6f606 100644 --- a/internal/ent/historygenerated/entql.go +++ b/internal/ent/historygenerated/entql.go @@ -1860,6 +1860,7 @@ var schemaGraph = func() *sqlgraph.Schema { organizationsettinghistory.FieldMultifactorAuthEnforced: {Type: field.TypeBool, Column: organizationsettinghistory.FieldMultifactorAuthEnforced}, organizationsettinghistory.FieldComplianceWebhookToken: {Type: field.TypeString, Column: organizationsettinghistory.FieldComplianceWebhookToken}, organizationsettinghistory.FieldPaymentMethodAdded: {Type: field.TypeBool, Column: organizationsettinghistory.FieldPaymentMethodAdded}, + organizationsettinghistory.FieldPendingDeletionAt: {Type: field.TypeTime, Column: organizationsettinghistory.FieldPendingDeletionAt}, }, } graph.Nodes[43] = &sqlgraph.Node{ @@ -11065,6 +11066,11 @@ func (f *OrganizationSettingHistoryFilter) WherePaymentMethodAdded(p entql.BoolP f.Where(p.Field(organizationsettinghistory.FieldPaymentMethodAdded)) } +// WherePendingDeletionAt applies the entql time.Time predicate on the pending_deletion_at field. +func (f *OrganizationSettingHistoryFilter) WherePendingDeletionAt(p entql.TimeP) { + f.Where(p.Field(organizationsettinghistory.FieldPendingDeletionAt)) +} + // addPredicate implements the predicateAdder interface. func (_q *PlatformHistoryQuery) addPredicate(pred func(s *sql.Selector)) { _q.predicates = append(_q.predicates, pred) diff --git a/internal/ent/historygenerated/gql_collection.go b/internal/ent/historygenerated/gql_collection.go index e297f2e7b2..390973ad54 100644 --- a/internal/ent/historygenerated/gql_collection.go +++ b/internal/ent/historygenerated/gql_collection.go @@ -9274,6 +9274,11 @@ func (_q *OrganizationSettingHistoryQuery) collectField(ctx context.Context, one selectedFields = append(selectedFields, organizationsettinghistory.FieldPaymentMethodAdded) fieldSeen[organizationsettinghistory.FieldPaymentMethodAdded] = struct{}{} } + case "pendingDeletionAt": + if _, ok := fieldSeen[organizationsettinghistory.FieldPendingDeletionAt]; !ok { + selectedFields = append(selectedFields, organizationsettinghistory.FieldPendingDeletionAt) + fieldSeen[organizationsettinghistory.FieldPendingDeletionAt] = struct{}{} + } case "id": case "__typename": default: diff --git a/internal/ent/historygenerated/gql_where_input.go b/internal/ent/historygenerated/gql_where_input.go index b3c4defc2a..bcbdf4c222 100644 --- a/internal/ent/historygenerated/gql_where_input.go +++ b/internal/ent/historygenerated/gql_where_input.go @@ -54216,6 +54216,18 @@ type OrganizationSettingHistoryWhereInput struct { ComplianceWebhookTokenEqualFold *string `json:"complianceWebhookTokenEqualFold,omitempty"` ComplianceWebhookTokenContainsFold *string `json:"complianceWebhookTokenContainsFold,omitempty"` + // "pending_deletion_at" field predicates. + PendingDeletionAt *models.DateTime `json:"pendingDeletionAt,omitempty"` + PendingDeletionAtNEQ *models.DateTime `json:"pendingDeletionAtNEQ,omitempty"` + PendingDeletionAtIn []models.DateTime `json:"pendingDeletionAtIn,omitempty"` + PendingDeletionAtNotIn []models.DateTime `json:"pendingDeletionAtNotIn,omitempty"` + PendingDeletionAtGT *models.DateTime `json:"pendingDeletionAtGT,omitempty"` + PendingDeletionAtGTE *models.DateTime `json:"pendingDeletionAtGTE,omitempty"` + PendingDeletionAtLT *models.DateTime `json:"pendingDeletionAtLT,omitempty"` + PendingDeletionAtLTE *models.DateTime `json:"pendingDeletionAtLTE,omitempty"` + PendingDeletionAtIsNil bool `json:"pendingDeletionAtIsNil,omitempty"` + PendingDeletionAtNotNil bool `json:"pendingDeletionAtNotNil,omitempty"` + // "tags" JSON-string-array predicates. TagsHas *string `json:"tagsHas,omitempty"` @@ -55266,6 +55278,36 @@ func (i *OrganizationSettingHistoryWhereInput) P() (predicate.OrganizationSettin if i.ComplianceWebhookTokenContainsFold != nil { predicates = append(predicates, organizationsettinghistory.ComplianceWebhookTokenContainsFold(*i.ComplianceWebhookTokenContainsFold)) } + if i.PendingDeletionAt != nil { + predicates = append(predicates, organizationsettinghistory.PendingDeletionAtEQ(*i.PendingDeletionAt)) + } + if i.PendingDeletionAtNEQ != nil { + predicates = append(predicates, organizationsettinghistory.PendingDeletionAtNEQ(*i.PendingDeletionAtNEQ)) + } + if len(i.PendingDeletionAtIn) > 0 { + predicates = append(predicates, organizationsettinghistory.PendingDeletionAtIn(i.PendingDeletionAtIn...)) + } + if len(i.PendingDeletionAtNotIn) > 0 { + predicates = append(predicates, organizationsettinghistory.PendingDeletionAtNotIn(i.PendingDeletionAtNotIn...)) + } + if i.PendingDeletionAtGT != nil { + predicates = append(predicates, organizationsettinghistory.PendingDeletionAtGT(*i.PendingDeletionAtGT)) + } + if i.PendingDeletionAtGTE != nil { + predicates = append(predicates, organizationsettinghistory.PendingDeletionAtGTE(*i.PendingDeletionAtGTE)) + } + if i.PendingDeletionAtLT != nil { + predicates = append(predicates, organizationsettinghistory.PendingDeletionAtLT(*i.PendingDeletionAtLT)) + } + if i.PendingDeletionAtLTE != nil { + predicates = append(predicates, organizationsettinghistory.PendingDeletionAtLTE(*i.PendingDeletionAtLTE)) + } + if i.PendingDeletionAtIsNil { + predicates = append(predicates, organizationsettinghistory.PendingDeletionAtIsNil()) + } + if i.PendingDeletionAtNotNil { + predicates = append(predicates, organizationsettinghistory.PendingDeletionAtNotNil()) + } if i.TagsHas != nil { v := *i.TagsHas diff --git a/internal/ent/historygenerated/migrate/schema.go b/internal/ent/historygenerated/migrate/schema.go index 32eaf0baf2..56cf635c01 100644 --- a/internal/ent/historygenerated/migrate/schema.go +++ b/internal/ent/historygenerated/migrate/schema.go @@ -1937,6 +1937,7 @@ var ( {Name: "multifactor_auth_enforced", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "compliance_webhook_token", Type: field.TypeString, Nullable: true}, {Name: "payment_method_added", Type: field.TypeBool, Default: false}, + {Name: "pending_deletion_at", Type: field.TypeTime, Nullable: true}, } // OrganizationSettingHistoryTable holds the schema information for the "organization_setting_history" table. OrganizationSettingHistoryTable = &schema.Table{ diff --git a/internal/ent/historygenerated/mutation.go b/internal/ent/historygenerated/mutation.go index 363a6401b2..84ff5d198f 100644 --- a/internal/ent/historygenerated/mutation.go +++ b/internal/ent/historygenerated/mutation.go @@ -95616,6 +95616,7 @@ type OrganizationSettingHistoryMutation struct { multifactor_auth_enforced *bool compliance_webhook_token *string payment_method_added *bool + pending_deletion_at *models.DateTime clearedFields map[string]struct{} done bool oldValue func(context.Context) (*OrganizationSettingHistory, error) @@ -97411,6 +97412,55 @@ func (m *OrganizationSettingHistoryMutation) ResetPaymentMethodAdded() { m.payment_method_added = nil } +// SetPendingDeletionAt sets the "pending_deletion_at" field. +func (m *OrganizationSettingHistoryMutation) SetPendingDeletionAt(mt models.DateTime) { + m.pending_deletion_at = &mt +} + +// PendingDeletionAt returns the value of the "pending_deletion_at" field in the mutation. +func (m *OrganizationSettingHistoryMutation) PendingDeletionAt() (r models.DateTime, exists bool) { + v := m.pending_deletion_at + if v == nil { + return + } + return *v, true +} + +// OldPendingDeletionAt returns the old "pending_deletion_at" field's value of the OrganizationSettingHistory entity. +// If the OrganizationSettingHistory object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *OrganizationSettingHistoryMutation) OldPendingDeletionAt(ctx context.Context) (v *models.DateTime, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldPendingDeletionAt is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldPendingDeletionAt requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldPendingDeletionAt: %w", err) + } + return oldValue.PendingDeletionAt, nil +} + +// ClearPendingDeletionAt clears the value of the "pending_deletion_at" field. +func (m *OrganizationSettingHistoryMutation) ClearPendingDeletionAt() { + m.pending_deletion_at = nil + m.clearedFields[organizationsettinghistory.FieldPendingDeletionAt] = struct{}{} +} + +// PendingDeletionAtCleared returns if the "pending_deletion_at" field was cleared in this mutation. +func (m *OrganizationSettingHistoryMutation) PendingDeletionAtCleared() bool { + _, ok := m.clearedFields[organizationsettinghistory.FieldPendingDeletionAt] + return ok +} + +// ResetPendingDeletionAt resets all changes to the "pending_deletion_at" field. +func (m *OrganizationSettingHistoryMutation) ResetPendingDeletionAt() { + m.pending_deletion_at = nil + delete(m.clearedFields, organizationsettinghistory.FieldPendingDeletionAt) +} + // Where appends a list predicates to the OrganizationSettingHistoryMutation builder. func (m *OrganizationSettingHistoryMutation) Where(ps ...predicate.OrganizationSettingHistory) { m.predicates = append(m.predicates, ps...) @@ -97445,7 +97495,7 @@ func (m *OrganizationSettingHistoryMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *OrganizationSettingHistoryMutation) Fields() []string { - fields := make([]string, 0, 35) + fields := make([]string, 0, 36) if m.history_time != nil { fields = append(fields, organizationsettinghistory.FieldHistoryTime) } @@ -97551,6 +97601,9 @@ func (m *OrganizationSettingHistoryMutation) Fields() []string { if m.payment_method_added != nil { fields = append(fields, organizationsettinghistory.FieldPaymentMethodAdded) } + if m.pending_deletion_at != nil { + fields = append(fields, organizationsettinghistory.FieldPendingDeletionAt) + } return fields } @@ -97629,6 +97682,8 @@ func (m *OrganizationSettingHistoryMutation) Field(name string) (ent.Value, bool return m.ComplianceWebhookToken() case organizationsettinghistory.FieldPaymentMethodAdded: return m.PaymentMethodAdded() + case organizationsettinghistory.FieldPendingDeletionAt: + return m.PendingDeletionAt() } return nil, false } @@ -97708,6 +97763,8 @@ func (m *OrganizationSettingHistoryMutation) OldField(ctx context.Context, name return m.OldComplianceWebhookToken(ctx) case organizationsettinghistory.FieldPaymentMethodAdded: return m.OldPaymentMethodAdded(ctx) + case organizationsettinghistory.FieldPendingDeletionAt: + return m.OldPendingDeletionAt(ctx) } return nil, fmt.Errorf("unknown OrganizationSettingHistory field %s", name) } @@ -97962,6 +98019,13 @@ func (m *OrganizationSettingHistoryMutation) SetField(name string, value ent.Val } m.SetPaymentMethodAdded(v) return nil + case organizationsettinghistory.FieldPendingDeletionAt: + v, ok := value.(models.DateTime) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetPendingDeletionAt(v) + return nil } return fmt.Errorf("unknown OrganizationSettingHistory field %s", name) } @@ -98079,6 +98143,9 @@ func (m *OrganizationSettingHistoryMutation) ClearedFields() []string { if m.FieldCleared(organizationsettinghistory.FieldComplianceWebhookToken) { fields = append(fields, organizationsettinghistory.FieldComplianceWebhookToken) } + if m.FieldCleared(organizationsettinghistory.FieldPendingDeletionAt) { + fields = append(fields, organizationsettinghistory.FieldPendingDeletionAt) + } return fields } @@ -98180,6 +98247,9 @@ func (m *OrganizationSettingHistoryMutation) ClearField(name string) error { case organizationsettinghistory.FieldComplianceWebhookToken: m.ClearComplianceWebhookToken() return nil + case organizationsettinghistory.FieldPendingDeletionAt: + m.ClearPendingDeletionAt() + return nil } return fmt.Errorf("unknown OrganizationSettingHistory nullable field %s", name) } @@ -98293,6 +98363,9 @@ func (m *OrganizationSettingHistoryMutation) ResetField(name string) error { case organizationsettinghistory.FieldPaymentMethodAdded: m.ResetPaymentMethodAdded() return nil + case organizationsettinghistory.FieldPendingDeletionAt: + m.ResetPendingDeletionAt() + return nil } return fmt.Errorf("unknown OrganizationSettingHistory field %s", name) } diff --git a/internal/ent/historygenerated/organizationsettinghistory.go b/internal/ent/historygenerated/organizationsettinghistory.go index 881ff2fe4c..6d84008df4 100644 --- a/internal/ent/historygenerated/organizationsettinghistory.go +++ b/internal/ent/historygenerated/organizationsettinghistory.go @@ -93,7 +93,9 @@ type OrganizationSettingHistory struct { ComplianceWebhookToken string `json:"compliance_webhook_token,omitempty"` // whether or not a payment method has been added to the account PaymentMethodAdded bool `json:"payment_method_added,omitempty"` - selectValues sql.SelectValues + // when will this organization be deleted? usually this is after org has not added a payment method afte n period + PendingDeletionAt *models.DateTime `json:"pending_deletion_at,omitempty"` + selectValues sql.SelectValues } // scanValues returns the types for scanning values from sql.Rows. @@ -101,6 +103,8 @@ func (*OrganizationSettingHistory) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) for i := range columns { switch columns[i] { + case organizationsettinghistory.FieldPendingDeletionAt: + values[i] = &sql.NullScanner{S: new(models.DateTime)} case organizationsettinghistory.FieldTags, organizationsettinghistory.FieldDomains, organizationsettinghistory.FieldBillingAddress, organizationsettinghistory.FieldAllowedEmailDomains: values[i] = new([]byte) case organizationsettinghistory.FieldOperation: @@ -352,6 +356,13 @@ func (_m *OrganizationSettingHistory) assignValues(columns []string, values []an } else if value.Valid { _m.PaymentMethodAdded = value.Bool } + case organizationsettinghistory.FieldPendingDeletionAt: + if value, ok := values[i].(*sql.NullScanner); !ok { + return fmt.Errorf("unexpected type %T for field pending_deletion_at", values[i]) + } else if value.Valid { + _m.PendingDeletionAt = new(models.DateTime) + *_m.PendingDeletionAt = *value.S.(*models.DateTime) + } default: _m.selectValues.Set(columns[i], values[i]) } @@ -496,6 +507,11 @@ func (_m *OrganizationSettingHistory) String() string { builder.WriteString(", ") builder.WriteString("payment_method_added=") builder.WriteString(fmt.Sprintf("%v", _m.PaymentMethodAdded)) + builder.WriteString(", ") + if v := _m.PendingDeletionAt; v != nil { + builder.WriteString("pending_deletion_at=") + builder.WriteString(fmt.Sprintf("%v", *v)) + } builder.WriteByte(')') return builder.String() } diff --git a/internal/ent/historygenerated/organizationsettinghistory/organizationsettinghistory.go b/internal/ent/historygenerated/organizationsettinghistory/organizationsettinghistory.go index 45f9a08b68..001ad7cb65 100644 --- a/internal/ent/historygenerated/organizationsettinghistory/organizationsettinghistory.go +++ b/internal/ent/historygenerated/organizationsettinghistory/organizationsettinghistory.go @@ -90,6 +90,8 @@ const ( FieldComplianceWebhookToken = "compliance_webhook_token" // FieldPaymentMethodAdded holds the string denoting the payment_method_added field in the database. FieldPaymentMethodAdded = "payment_method_added" + // FieldPendingDeletionAt holds the string denoting the pending_deletion_at field in the database. + FieldPendingDeletionAt = "pending_deletion_at" // Table holds the table name of the organizationsettinghistory in the database. Table = "organization_setting_history" ) @@ -132,6 +134,7 @@ var Columns = []string{ FieldMultifactorAuthEnforced, FieldComplianceWebhookToken, FieldPaymentMethodAdded, + FieldPendingDeletionAt, } // ValidColumn reports if the column name is valid (part of the table columns). @@ -378,6 +381,11 @@ func ByPaymentMethodAdded(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldPaymentMethodAdded, opts...).ToFunc() } +// ByPendingDeletionAt orders the results by the pending_deletion_at field. +func ByPendingDeletionAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldPendingDeletionAt, opts...).ToFunc() +} + var ( // history.OpType must implement graphql.Marshaler. _ graphql.Marshaler = (*history.OpType)(nil) diff --git a/internal/ent/historygenerated/organizationsettinghistory/where.go b/internal/ent/historygenerated/organizationsettinghistory/where.go index 9cc8e61d73..660887d8b1 100644 --- a/internal/ent/historygenerated/organizationsettinghistory/where.go +++ b/internal/ent/historygenerated/organizationsettinghistory/where.go @@ -9,6 +9,7 @@ import ( "entgo.io/ent/dialect/sql" "github.com/theopenlane/core/common/enums" + "github.com/theopenlane/core/common/models" "github.com/theopenlane/core/internal/ent/historygenerated/predicate" "github.com/theopenlane/entx/history" ) @@ -208,6 +209,11 @@ func PaymentMethodAdded(v bool) predicate.OrganizationSettingHistory { return predicate.OrganizationSettingHistory(sql.FieldEQ(FieldPaymentMethodAdded, v)) } +// PendingDeletionAt applies equality check predicate on the "pending_deletion_at" field. It's identical to PendingDeletionAtEQ. +func PendingDeletionAt(v models.DateTime) predicate.OrganizationSettingHistory { + return predicate.OrganizationSettingHistory(sql.FieldEQ(FieldPendingDeletionAt, v)) +} + // HistoryTimeEQ applies the EQ predicate on the "history_time" field. func HistoryTimeEQ(v time.Time) predicate.OrganizationSettingHistory { return predicate.OrganizationSettingHistory(sql.FieldEQ(FieldHistoryTime, v)) @@ -1968,6 +1974,56 @@ func PaymentMethodAddedNEQ(v bool) predicate.OrganizationSettingHistory { return predicate.OrganizationSettingHistory(sql.FieldNEQ(FieldPaymentMethodAdded, v)) } +// PendingDeletionAtEQ applies the EQ predicate on the "pending_deletion_at" field. +func PendingDeletionAtEQ(v models.DateTime) predicate.OrganizationSettingHistory { + return predicate.OrganizationSettingHistory(sql.FieldEQ(FieldPendingDeletionAt, v)) +} + +// PendingDeletionAtNEQ applies the NEQ predicate on the "pending_deletion_at" field. +func PendingDeletionAtNEQ(v models.DateTime) predicate.OrganizationSettingHistory { + return predicate.OrganizationSettingHistory(sql.FieldNEQ(FieldPendingDeletionAt, v)) +} + +// PendingDeletionAtIn applies the In predicate on the "pending_deletion_at" field. +func PendingDeletionAtIn(vs ...models.DateTime) predicate.OrganizationSettingHistory { + return predicate.OrganizationSettingHistory(sql.FieldIn(FieldPendingDeletionAt, vs...)) +} + +// PendingDeletionAtNotIn applies the NotIn predicate on the "pending_deletion_at" field. +func PendingDeletionAtNotIn(vs ...models.DateTime) predicate.OrganizationSettingHistory { + return predicate.OrganizationSettingHistory(sql.FieldNotIn(FieldPendingDeletionAt, vs...)) +} + +// PendingDeletionAtGT applies the GT predicate on the "pending_deletion_at" field. +func PendingDeletionAtGT(v models.DateTime) predicate.OrganizationSettingHistory { + return predicate.OrganizationSettingHistory(sql.FieldGT(FieldPendingDeletionAt, v)) +} + +// PendingDeletionAtGTE applies the GTE predicate on the "pending_deletion_at" field. +func PendingDeletionAtGTE(v models.DateTime) predicate.OrganizationSettingHistory { + return predicate.OrganizationSettingHistory(sql.FieldGTE(FieldPendingDeletionAt, v)) +} + +// PendingDeletionAtLT applies the LT predicate on the "pending_deletion_at" field. +func PendingDeletionAtLT(v models.DateTime) predicate.OrganizationSettingHistory { + return predicate.OrganizationSettingHistory(sql.FieldLT(FieldPendingDeletionAt, v)) +} + +// PendingDeletionAtLTE applies the LTE predicate on the "pending_deletion_at" field. +func PendingDeletionAtLTE(v models.DateTime) predicate.OrganizationSettingHistory { + return predicate.OrganizationSettingHistory(sql.FieldLTE(FieldPendingDeletionAt, v)) +} + +// PendingDeletionAtIsNil applies the IsNil predicate on the "pending_deletion_at" field. +func PendingDeletionAtIsNil() predicate.OrganizationSettingHistory { + return predicate.OrganizationSettingHistory(sql.FieldIsNull(FieldPendingDeletionAt)) +} + +// PendingDeletionAtNotNil applies the NotNil predicate on the "pending_deletion_at" field. +func PendingDeletionAtNotNil() predicate.OrganizationSettingHistory { + return predicate.OrganizationSettingHistory(sql.FieldNotNull(FieldPendingDeletionAt)) +} + // And groups predicates with the AND operator between them. func And(predicates ...predicate.OrganizationSettingHistory) predicate.OrganizationSettingHistory { return predicate.OrganizationSettingHistory(sql.AndPredicates(predicates...)) diff --git a/internal/ent/historygenerated/organizationsettinghistory_create.go b/internal/ent/historygenerated/organizationsettinghistory_create.go index 03e9dc3d84..4c84d5a475 100644 --- a/internal/ent/historygenerated/organizationsettinghistory_create.go +++ b/internal/ent/historygenerated/organizationsettinghistory_create.go @@ -483,6 +483,20 @@ func (_c *OrganizationSettingHistoryCreate) SetNillablePaymentMethodAdded(v *boo return _c } +// SetPendingDeletionAt sets the "pending_deletion_at" field. +func (_c *OrganizationSettingHistoryCreate) SetPendingDeletionAt(v models.DateTime) *OrganizationSettingHistoryCreate { + _c.mutation.SetPendingDeletionAt(v) + return _c +} + +// SetNillablePendingDeletionAt sets the "pending_deletion_at" field if the given value is not nil. +func (_c *OrganizationSettingHistoryCreate) SetNillablePendingDeletionAt(v *models.DateTime) *OrganizationSettingHistoryCreate { + if v != nil { + _c.SetPendingDeletionAt(*v) + } + return _c +} + // SetID sets the "id" field. func (_c *OrganizationSettingHistoryCreate) SetID(v string) *OrganizationSettingHistoryCreate { _c.mutation.SetID(v) @@ -819,6 +833,10 @@ func (_c *OrganizationSettingHistoryCreate) createSpec() (*OrganizationSettingHi _spec.SetField(organizationsettinghistory.FieldPaymentMethodAdded, field.TypeBool, value) _node.PaymentMethodAdded = value } + if value, ok := _c.mutation.PendingDeletionAt(); ok { + _spec.SetField(organizationsettinghistory.FieldPendingDeletionAt, field.TypeTime, value) + _node.PendingDeletionAt = &value + } return _node, _spec } diff --git a/internal/ent/historygenerated/organizationsettinghistory_update.go b/internal/ent/historygenerated/organizationsettinghistory_update.go index 587ab1385c..83f7f34ab7 100644 --- a/internal/ent/historygenerated/organizationsettinghistory_update.go +++ b/internal/ent/historygenerated/organizationsettinghistory_update.go @@ -598,6 +598,26 @@ func (_u *OrganizationSettingHistoryUpdate) SetNillablePaymentMethodAdded(v *boo return _u } +// SetPendingDeletionAt sets the "pending_deletion_at" field. +func (_u *OrganizationSettingHistoryUpdate) SetPendingDeletionAt(v models.DateTime) *OrganizationSettingHistoryUpdate { + _u.mutation.SetPendingDeletionAt(v) + return _u +} + +// SetNillablePendingDeletionAt sets the "pending_deletion_at" field if the given value is not nil. +func (_u *OrganizationSettingHistoryUpdate) SetNillablePendingDeletionAt(v *models.DateTime) *OrganizationSettingHistoryUpdate { + if v != nil { + _u.SetPendingDeletionAt(*v) + } + return _u +} + +// ClearPendingDeletionAt clears the value of the "pending_deletion_at" field. +func (_u *OrganizationSettingHistoryUpdate) ClearPendingDeletionAt() *OrganizationSettingHistoryUpdate { + _u.mutation.ClearPendingDeletionAt() + return _u +} + // Mutation returns the OrganizationSettingHistoryMutation object of the builder. func (_u *OrganizationSettingHistoryUpdate) Mutation() *OrganizationSettingHistoryMutation { return _u.mutation @@ -870,6 +890,12 @@ func (_u *OrganizationSettingHistoryUpdate) sqlSave(ctx context.Context) (_node if value, ok := _u.mutation.PaymentMethodAdded(); ok { _spec.SetField(organizationsettinghistory.FieldPaymentMethodAdded, field.TypeBool, value) } + if value, ok := _u.mutation.PendingDeletionAt(); ok { + _spec.SetField(organizationsettinghistory.FieldPendingDeletionAt, field.TypeTime, value) + } + if _u.mutation.PendingDeletionAtCleared() { + _spec.ClearField(organizationsettinghistory.FieldPendingDeletionAt, field.TypeTime) + } _spec.Node.Schema = _u.schemaConfig.OrganizationSettingHistory ctx = internal.NewSchemaConfigContext(ctx, _u.schemaConfig) _spec.AddModifiers(_u.modifiers...) @@ -1456,6 +1482,26 @@ func (_u *OrganizationSettingHistoryUpdateOne) SetNillablePaymentMethodAdded(v * return _u } +// SetPendingDeletionAt sets the "pending_deletion_at" field. +func (_u *OrganizationSettingHistoryUpdateOne) SetPendingDeletionAt(v models.DateTime) *OrganizationSettingHistoryUpdateOne { + _u.mutation.SetPendingDeletionAt(v) + return _u +} + +// SetNillablePendingDeletionAt sets the "pending_deletion_at" field if the given value is not nil. +func (_u *OrganizationSettingHistoryUpdateOne) SetNillablePendingDeletionAt(v *models.DateTime) *OrganizationSettingHistoryUpdateOne { + if v != nil { + _u.SetPendingDeletionAt(*v) + } + return _u +} + +// ClearPendingDeletionAt clears the value of the "pending_deletion_at" field. +func (_u *OrganizationSettingHistoryUpdateOne) ClearPendingDeletionAt() *OrganizationSettingHistoryUpdateOne { + _u.mutation.ClearPendingDeletionAt() + return _u +} + // Mutation returns the OrganizationSettingHistoryMutation object of the builder. func (_u *OrganizationSettingHistoryUpdateOne) Mutation() *OrganizationSettingHistoryMutation { return _u.mutation @@ -1758,6 +1804,12 @@ func (_u *OrganizationSettingHistoryUpdateOne) sqlSave(ctx context.Context) (_no if value, ok := _u.mutation.PaymentMethodAdded(); ok { _spec.SetField(organizationsettinghistory.FieldPaymentMethodAdded, field.TypeBool, value) } + if value, ok := _u.mutation.PendingDeletionAt(); ok { + _spec.SetField(organizationsettinghistory.FieldPendingDeletionAt, field.TypeTime, value) + } + if _u.mutation.PendingDeletionAtCleared() { + _spec.ClearField(organizationsettinghistory.FieldPendingDeletionAt, field.TypeTime) + } _spec.Node.Schema = _u.schemaConfig.OrganizationSettingHistory ctx = internal.NewSchemaConfigContext(ctx, _u.schemaConfig) _spec.AddModifiers(_u.modifiers...) diff --git a/internal/ent/integrationgenerated/integration_mapping_generated.go b/internal/ent/integrationgenerated/integration_mapping_generated.go index 653d587495..3ab6a76075 100644 --- a/internal/ent/integrationgenerated/integration_mapping_generated.go +++ b/internal/ent/integrationgenerated/integration_mapping_generated.go @@ -6,25 +6,24 @@ import ( "github.com/theopenlane/core/pkg/gala" ) - // IntegrationMappingField describes an integration mapping target field type IntegrationMappingField struct { - InputKey string - GoField string - EntField string - Type string - Required bool + InputKey string + GoField string + EntField string + Type string + Required bool UpsertKey bool LookupKey bool } // IntegrationMappingSchema describes a schema with integration mapping fields type IntegrationMappingSchema struct { - Name string - Fields []IntegrationMappingField - AllowedKeys map[string]struct{} + Name string + Fields []IntegrationMappingField + AllowedKeys map[string]struct{} RequiredKeys []string - UpsertKeys []string + UpsertKeys []string StockPersist bool } @@ -33,45 +32,45 @@ type IntegrationIngestSource string const ( IntegrationIngestSourceOperation IntegrationIngestSource = "operation" - IntegrationIngestSourceWorkflow IntegrationIngestSource = "workflow" - IntegrationIngestSourceWebhook IntegrationIngestSource = "webhook" - IntegrationIngestSourceDirect IntegrationIngestSource = "direct" + IntegrationIngestSourceWorkflow IntegrationIngestSource = "workflow" + IntegrationIngestSourceWebhook IntegrationIngestSource = "webhook" + IntegrationIngestSourceDirect IntegrationIngestSource = "direct" ) // IntegrationIngestMetadata captures source-agnostic execution context for second-stage ingest handlers type IntegrationIngestMetadata struct { - IntegrationID string `json:"integrationId"` - DefinitionID string `json:"definitionId,omitempty"` - Operation string `json:"operation,omitempty"` - Variant string `json:"variant,omitempty"` - Source IntegrationIngestSource `json:"source,omitempty"` - RunID string `json:"runId,omitempty"` - Webhook string `json:"webhook,omitempty"` - WebhookEvent string `json:"webhookEvent,omitempty"` - DeliveryID string `json:"deliveryId,omitempty"` - WorkflowInstanceID string `json:"workflowInstanceId,omitempty"` - WorkflowActionKey string `json:"workflowActionKey,omitempty"` - WorkflowActionIndex int `json:"workflowActionIndex,omitempty"` - WorkflowObjectID string `json:"workflowObjectId,omitempty"` - WorkflowObjectType string `json:"workflowObjectType,omitempty"` + IntegrationID string `json:"integrationId"` + DefinitionID string `json:"definitionId,omitempty"` + Operation string `json:"operation,omitempty"` + Variant string `json:"variant,omitempty"` + Source IntegrationIngestSource `json:"source,omitempty"` + RunID string `json:"runId,omitempty"` + Webhook string `json:"webhook,omitempty"` + WebhookEvent string `json:"webhookEvent,omitempty"` + DeliveryID string `json:"deliveryId,omitempty"` + WorkflowInstanceID string `json:"workflowInstanceId,omitempty"` + WorkflowActionKey string `json:"workflowActionKey,omitempty"` + WorkflowActionIndex int `json:"workflowActionIndex,omitempty"` + WorkflowObjectID string `json:"workflowObjectId,omitempty"` + WorkflowObjectType string `json:"workflowObjectType,omitempty"` } const ( - IntegrationMappingSchemaAsset = "Asset" - IntegrationMappingSchemaContact = "Contact" - IntegrationMappingSchemaDirectoryAccount = "DirectoryAccount" - IntegrationMappingSchemaDirectoryGroup = "DirectoryGroup" + IntegrationMappingSchemaAsset = "Asset" + IntegrationMappingSchemaContact = "Contact" + IntegrationMappingSchemaDirectoryAccount = "DirectoryAccount" + IntegrationMappingSchemaDirectoryGroup = "DirectoryGroup" IntegrationMappingSchemaDirectoryMembership = "DirectoryMembership" - IntegrationMappingSchemaEntity = "Entity" - IntegrationMappingSchemaFinding = "Finding" - IntegrationMappingSchemaRisk = "Risk" - IntegrationMappingSchemaVulnerability = "Vulnerability" + IntegrationMappingSchemaEntity = "Entity" + IntegrationMappingSchemaFinding = "Finding" + IntegrationMappingSchemaRisk = "Risk" + IntegrationMappingSchemaVulnerability = "Vulnerability" ) // IntegrationIngestAssetRequested is the typed second-stage ingest contract for Asset records type IntegrationIngestAssetRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateAssetInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateAssetInput `json:"input"` } // IntegrationIngestAssetRequestedTopic is the typed Gala topic for Asset ingest requests @@ -81,8 +80,8 @@ var IntegrationIngestAssetRequestedTopic = gala.Topic[IntegrationIngestAssetRequ // IntegrationIngestContactRequested is the typed second-stage ingest contract for Contact records type IntegrationIngestContactRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateContactInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateContactInput `json:"input"` } // IntegrationIngestContactRequestedTopic is the typed Gala topic for Contact ingest requests @@ -92,8 +91,8 @@ var IntegrationIngestContactRequestedTopic = gala.Topic[IntegrationIngestContact // IntegrationIngestDirectoryAccountRequested is the typed second-stage ingest contract for DirectoryAccount records type IntegrationIngestDirectoryAccountRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryAccountInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryAccountInput `json:"input"` } // IntegrationIngestDirectoryAccountRequestedTopic is the typed Gala topic for DirectoryAccount ingest requests @@ -103,8 +102,8 @@ var IntegrationIngestDirectoryAccountRequestedTopic = gala.Topic[IntegrationInge // IntegrationIngestDirectoryGroupRequested is the typed second-stage ingest contract for DirectoryGroup records type IntegrationIngestDirectoryGroupRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryGroupInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryGroupInput `json:"input"` } // IntegrationIngestDirectoryGroupRequestedTopic is the typed Gala topic for DirectoryGroup ingest requests @@ -114,8 +113,8 @@ var IntegrationIngestDirectoryGroupRequestedTopic = gala.Topic[IntegrationIngest // IntegrationIngestDirectoryMembershipRequested is the typed second-stage ingest contract for DirectoryMembership records type IntegrationIngestDirectoryMembershipRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryMembershipInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryMembershipInput `json:"input"` } // IntegrationIngestDirectoryMembershipRequestedTopic is the typed Gala topic for DirectoryMembership ingest requests @@ -125,8 +124,8 @@ var IntegrationIngestDirectoryMembershipRequestedTopic = gala.Topic[IntegrationI // IntegrationIngestEntityRequested is the typed second-stage ingest contract for Entity records type IntegrationIngestEntityRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateEntityInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateEntityInput `json:"input"` } // IntegrationIngestEntityRequestedTopic is the typed Gala topic for Entity ingest requests @@ -136,8 +135,8 @@ var IntegrationIngestEntityRequestedTopic = gala.Topic[IntegrationIngestEntityRe // IntegrationIngestFindingRequested is the typed second-stage ingest contract for Finding records type IntegrationIngestFindingRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateFindingInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateFindingInput `json:"input"` } // IntegrationIngestFindingRequestedTopic is the typed Gala topic for Finding ingest requests @@ -148,7 +147,7 @@ var IntegrationIngestFindingRequestedTopic = gala.Topic[IntegrationIngestFinding // IntegrationIngestRiskRequested is the typed second-stage ingest contract for Risk records type IntegrationIngestRiskRequested struct { Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateRiskInput `json:"input"` + Input generated.CreateRiskInput `json:"input"` } // IntegrationIngestRiskRequestedTopic is the typed Gala topic for Risk ingest requests @@ -158,8 +157,8 @@ var IntegrationIngestRiskRequestedTopic = gala.Topic[IntegrationIngestRiskReques // IntegrationIngestVulnerabilityRequested is the typed second-stage ingest contract for Vulnerability records type IntegrationIngestVulnerabilityRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateVulnerabilityInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateVulnerabilityInput `json:"input"` } // IntegrationIngestVulnerabilityRequestedTopic is the typed Gala topic for Vulnerability ingest requests @@ -169,349 +168,349 @@ var IntegrationIngestVulnerabilityRequestedTopic = gala.Topic[IntegrationIngestV // Integration mapping keys for Asset. const ( - IntegrationMappingAssetAccessModelID = "accessModelID" - IntegrationMappingAssetAccessModelName = "accessModelName" - IntegrationMappingAssetAssetDataClassificationID = "assetDataClassificationID" + IntegrationMappingAssetAccessModelID = "accessModelID" + IntegrationMappingAssetAccessModelName = "accessModelName" + IntegrationMappingAssetAssetDataClassificationID = "assetDataClassificationID" IntegrationMappingAssetAssetDataClassificationName = "assetDataClassificationName" - IntegrationMappingAssetAssetSubtypeID = "assetSubtypeID" - IntegrationMappingAssetAssetSubtypeName = "assetSubtypeName" - IntegrationMappingAssetAssetType = "assetType" - IntegrationMappingAssetCategories = "categories" - IntegrationMappingAssetContainsPii = "containsPii" - IntegrationMappingAssetCostCenter = "costCenter" - IntegrationMappingAssetCriticalityID = "criticalityID" - IntegrationMappingAssetCriticalityName = "criticalityName" - IntegrationMappingAssetDescription = "description" - IntegrationMappingAssetDisplayName = "displayName" - IntegrationMappingAssetEncryptionStatusID = "encryptionStatusID" - IntegrationMappingAssetEncryptionStatusName = "encryptionStatusName" - IntegrationMappingAssetEnvironmentID = "environmentID" - IntegrationMappingAssetEnvironmentName = "environmentName" - IntegrationMappingAssetEstimatedMonthlyCost = "estimatedMonthlyCost" - IntegrationMappingAssetIdentifier = "identifier" - IntegrationMappingAssetIntegrationID = "integrationID" - IntegrationMappingAssetInternalNotes = "internalNotes" - IntegrationMappingAssetInternalOwner = "internalOwner" - IntegrationMappingAssetInternalOwnerGroupID = "internalOwnerGroupID" - IntegrationMappingAssetInternalOwnerUserID = "internalOwnerUserID" - IntegrationMappingAssetName = "name" - IntegrationMappingAssetObservedAt = "observedAt" - IntegrationMappingAssetOwnerID = "ownerID" - IntegrationMappingAssetPhysicalLocation = "physicalLocation" - IntegrationMappingAssetPurchaseDate = "purchaseDate" - IntegrationMappingAssetRegion = "region" - IntegrationMappingAssetScopeID = "scopeID" - IntegrationMappingAssetScopeName = "scopeName" - IntegrationMappingAssetSecurityTierID = "securityTierID" - IntegrationMappingAssetSecurityTierName = "securityTierName" - IntegrationMappingAssetSourceIdentifier = "sourceIdentifier" - IntegrationMappingAssetSourceType = "sourceType" - IntegrationMappingAssetSystemInternalID = "systemInternalID" - IntegrationMappingAssetTags = "tags" - IntegrationMappingAssetWebsite = "website" + IntegrationMappingAssetAssetSubtypeID = "assetSubtypeID" + IntegrationMappingAssetAssetSubtypeName = "assetSubtypeName" + IntegrationMappingAssetAssetType = "assetType" + IntegrationMappingAssetCategories = "categories" + IntegrationMappingAssetContainsPii = "containsPii" + IntegrationMappingAssetCostCenter = "costCenter" + IntegrationMappingAssetCriticalityID = "criticalityID" + IntegrationMappingAssetCriticalityName = "criticalityName" + IntegrationMappingAssetDescription = "description" + IntegrationMappingAssetDisplayName = "displayName" + IntegrationMappingAssetEncryptionStatusID = "encryptionStatusID" + IntegrationMappingAssetEncryptionStatusName = "encryptionStatusName" + IntegrationMappingAssetEnvironmentID = "environmentID" + IntegrationMappingAssetEnvironmentName = "environmentName" + IntegrationMappingAssetEstimatedMonthlyCost = "estimatedMonthlyCost" + IntegrationMappingAssetIdentifier = "identifier" + IntegrationMappingAssetIntegrationID = "integrationID" + IntegrationMappingAssetInternalNotes = "internalNotes" + IntegrationMappingAssetInternalOwner = "internalOwner" + IntegrationMappingAssetInternalOwnerGroupID = "internalOwnerGroupID" + IntegrationMappingAssetInternalOwnerUserID = "internalOwnerUserID" + IntegrationMappingAssetName = "name" + IntegrationMappingAssetObservedAt = "observedAt" + IntegrationMappingAssetOwnerID = "ownerID" + IntegrationMappingAssetPhysicalLocation = "physicalLocation" + IntegrationMappingAssetPurchaseDate = "purchaseDate" + IntegrationMappingAssetRegion = "region" + IntegrationMappingAssetScopeID = "scopeID" + IntegrationMappingAssetScopeName = "scopeName" + IntegrationMappingAssetSecurityTierID = "securityTierID" + IntegrationMappingAssetSecurityTierName = "securityTierName" + IntegrationMappingAssetSourceIdentifier = "sourceIdentifier" + IntegrationMappingAssetSourceType = "sourceType" + IntegrationMappingAssetSystemInternalID = "systemInternalID" + IntegrationMappingAssetTags = "tags" + IntegrationMappingAssetWebsite = "website" ) // Integration mapping keys for Contact. const ( - IntegrationMappingContactAddress = "address" - IntegrationMappingContactCompany = "company" - IntegrationMappingContactEmail = "email" - IntegrationMappingContactExternalID = "externalID" - IntegrationMappingContactFullName = "fullName" + IntegrationMappingContactAddress = "address" + IntegrationMappingContactCompany = "company" + IntegrationMappingContactEmail = "email" + IntegrationMappingContactExternalID = "externalID" + IntegrationMappingContactFullName = "fullName" IntegrationMappingContactIntegrationID = "integrationID" - IntegrationMappingContactObservedAt = "observedAt" - IntegrationMappingContactPhoneNumber = "phoneNumber" - IntegrationMappingContactStatus = "status" - IntegrationMappingContactTags = "tags" - IntegrationMappingContactTitle = "title" + IntegrationMappingContactObservedAt = "observedAt" + IntegrationMappingContactPhoneNumber = "phoneNumber" + IntegrationMappingContactStatus = "status" + IntegrationMappingContactTags = "tags" + IntegrationMappingContactTitle = "title" ) // Integration mapping keys for DirectoryAccount. const ( - IntegrationMappingDirectoryAccountAccountType = "accountType" - IntegrationMappingDirectoryAccountAddedAt = "addedAt" - IntegrationMappingDirectoryAccountAvatarRemoteURL = "avatarRemoteURL" - IntegrationMappingDirectoryAccountAvatarUpdatedAt = "avatarUpdatedAt" - IntegrationMappingDirectoryAccountCanonicalEmail = "canonicalEmail" - IntegrationMappingDirectoryAccountDepartment = "department" + IntegrationMappingDirectoryAccountAccountType = "accountType" + IntegrationMappingDirectoryAccountAddedAt = "addedAt" + IntegrationMappingDirectoryAccountAvatarRemoteURL = "avatarRemoteURL" + IntegrationMappingDirectoryAccountAvatarUpdatedAt = "avatarUpdatedAt" + IntegrationMappingDirectoryAccountCanonicalEmail = "canonicalEmail" + IntegrationMappingDirectoryAccountDepartment = "department" IntegrationMappingDirectoryAccountDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryAccountDirectoryName = "directoryName" - IntegrationMappingDirectoryAccountDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryAccountDisplayName = "displayName" - IntegrationMappingDirectoryAccountEnvironmentID = "environmentID" - IntegrationMappingDirectoryAccountEnvironmentName = "environmentName" - IntegrationMappingDirectoryAccountExternalID = "externalID" - IntegrationMappingDirectoryAccountFamilyName = "familyName" - IntegrationMappingDirectoryAccountFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryAccountGivenName = "givenName" - IntegrationMappingDirectoryAccountIdentityHolderID = "identityHolderID" - IntegrationMappingDirectoryAccountIntegrationID = "integrationID" - IntegrationMappingDirectoryAccountJobTitle = "jobTitle" - IntegrationMappingDirectoryAccountLastLoginAt = "lastLoginAt" - IntegrationMappingDirectoryAccountLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryAccountLastSeenIP = "lastSeenIP" - IntegrationMappingDirectoryAccountMetadata = "metadata" - IntegrationMappingDirectoryAccountMfaState = "mfaState" - IntegrationMappingDirectoryAccountObservedAt = "observedAt" - IntegrationMappingDirectoryAccountOrganizationUnit = "organizationUnit" - IntegrationMappingDirectoryAccountPlatformID = "platformID" - IntegrationMappingDirectoryAccountPrimarySource = "primarySource" - IntegrationMappingDirectoryAccountProfile = "profile" - IntegrationMappingDirectoryAccountProfileHash = "profileHash" - IntegrationMappingDirectoryAccountRemovedAt = "removedAt" - IntegrationMappingDirectoryAccountScopeID = "scopeID" - IntegrationMappingDirectoryAccountScopeName = "scopeName" - IntegrationMappingDirectoryAccountSecondaryKey = "secondaryKey" - IntegrationMappingDirectoryAccountSourceVersion = "sourceVersion" - IntegrationMappingDirectoryAccountStatus = "status" - IntegrationMappingDirectoryAccountTags = "tags" + IntegrationMappingDirectoryAccountDirectoryName = "directoryName" + IntegrationMappingDirectoryAccountDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryAccountDisplayName = "displayName" + IntegrationMappingDirectoryAccountEnvironmentID = "environmentID" + IntegrationMappingDirectoryAccountEnvironmentName = "environmentName" + IntegrationMappingDirectoryAccountExternalID = "externalID" + IntegrationMappingDirectoryAccountFamilyName = "familyName" + IntegrationMappingDirectoryAccountFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryAccountGivenName = "givenName" + IntegrationMappingDirectoryAccountIdentityHolderID = "identityHolderID" + IntegrationMappingDirectoryAccountIntegrationID = "integrationID" + IntegrationMappingDirectoryAccountJobTitle = "jobTitle" + IntegrationMappingDirectoryAccountLastLoginAt = "lastLoginAt" + IntegrationMappingDirectoryAccountLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryAccountLastSeenIP = "lastSeenIP" + IntegrationMappingDirectoryAccountMetadata = "metadata" + IntegrationMappingDirectoryAccountMfaState = "mfaState" + IntegrationMappingDirectoryAccountObservedAt = "observedAt" + IntegrationMappingDirectoryAccountOrganizationUnit = "organizationUnit" + IntegrationMappingDirectoryAccountPlatformID = "platformID" + IntegrationMappingDirectoryAccountPrimarySource = "primarySource" + IntegrationMappingDirectoryAccountProfile = "profile" + IntegrationMappingDirectoryAccountProfileHash = "profileHash" + IntegrationMappingDirectoryAccountRemovedAt = "removedAt" + IntegrationMappingDirectoryAccountScopeID = "scopeID" + IntegrationMappingDirectoryAccountScopeName = "scopeName" + IntegrationMappingDirectoryAccountSecondaryKey = "secondaryKey" + IntegrationMappingDirectoryAccountSourceVersion = "sourceVersion" + IntegrationMappingDirectoryAccountStatus = "status" + IntegrationMappingDirectoryAccountTags = "tags" ) // Integration mapping keys for DirectoryGroup. const ( - IntegrationMappingDirectoryGroupAddedAt = "addedAt" - IntegrationMappingDirectoryGroupClassification = "classification" - IntegrationMappingDirectoryGroupDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryGroupDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryGroupDisplayName = "displayName" - IntegrationMappingDirectoryGroupEmail = "email" - IntegrationMappingDirectoryGroupEnvironmentID = "environmentID" - IntegrationMappingDirectoryGroupEnvironmentName = "environmentName" - IntegrationMappingDirectoryGroupExternalID = "externalID" + IntegrationMappingDirectoryGroupAddedAt = "addedAt" + IntegrationMappingDirectoryGroupClassification = "classification" + IntegrationMappingDirectoryGroupDirectoryInstanceID = "directoryInstanceID" + IntegrationMappingDirectoryGroupDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryGroupDisplayName = "displayName" + IntegrationMappingDirectoryGroupEmail = "email" + IntegrationMappingDirectoryGroupEnvironmentID = "environmentID" + IntegrationMappingDirectoryGroupEnvironmentName = "environmentName" + IntegrationMappingDirectoryGroupExternalID = "externalID" IntegrationMappingDirectoryGroupExternalSharingAllowed = "externalSharingAllowed" - IntegrationMappingDirectoryGroupFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryGroupIntegrationID = "integrationID" - IntegrationMappingDirectoryGroupLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryGroupMemberCount = "memberCount" - IntegrationMappingDirectoryGroupMetadata = "metadata" - IntegrationMappingDirectoryGroupObservedAt = "observedAt" - IntegrationMappingDirectoryGroupPlatformID = "platformID" - IntegrationMappingDirectoryGroupProfile = "profile" - IntegrationMappingDirectoryGroupProfileHash = "profileHash" - IntegrationMappingDirectoryGroupRemovedAt = "removedAt" - IntegrationMappingDirectoryGroupScopeID = "scopeID" - IntegrationMappingDirectoryGroupScopeName = "scopeName" - IntegrationMappingDirectoryGroupSourceVersion = "sourceVersion" - IntegrationMappingDirectoryGroupStatus = "status" - IntegrationMappingDirectoryGroupTags = "tags" + IntegrationMappingDirectoryGroupFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryGroupIntegrationID = "integrationID" + IntegrationMappingDirectoryGroupLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryGroupMemberCount = "memberCount" + IntegrationMappingDirectoryGroupMetadata = "metadata" + IntegrationMappingDirectoryGroupObservedAt = "observedAt" + IntegrationMappingDirectoryGroupPlatformID = "platformID" + IntegrationMappingDirectoryGroupProfile = "profile" + IntegrationMappingDirectoryGroupProfileHash = "profileHash" + IntegrationMappingDirectoryGroupRemovedAt = "removedAt" + IntegrationMappingDirectoryGroupScopeID = "scopeID" + IntegrationMappingDirectoryGroupScopeName = "scopeName" + IntegrationMappingDirectoryGroupSourceVersion = "sourceVersion" + IntegrationMappingDirectoryGroupStatus = "status" + IntegrationMappingDirectoryGroupTags = "tags" ) // Integration mapping keys for DirectoryMembership. const ( - IntegrationMappingDirectoryMembershipAddedAt = "addedAt" - IntegrationMappingDirectoryMembershipDirectoryAccountID = "directoryAccountID" - IntegrationMappingDirectoryMembershipDirectoryGroupID = "directoryGroupID" + IntegrationMappingDirectoryMembershipAddedAt = "addedAt" + IntegrationMappingDirectoryMembershipDirectoryAccountID = "directoryAccountID" + IntegrationMappingDirectoryMembershipDirectoryGroupID = "directoryGroupID" IntegrationMappingDirectoryMembershipDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryMembershipDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryMembershipEnvironmentID = "environmentID" - IntegrationMappingDirectoryMembershipEnvironmentName = "environmentName" - IntegrationMappingDirectoryMembershipFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryMembershipIntegrationID = "integrationID" - IntegrationMappingDirectoryMembershipLastConfirmedRunID = "lastConfirmedRunID" - IntegrationMappingDirectoryMembershipLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryMembershipMetadata = "metadata" - IntegrationMappingDirectoryMembershipObservedAt = "observedAt" - IntegrationMappingDirectoryMembershipPlatformID = "platformID" - IntegrationMappingDirectoryMembershipRemovedAt = "removedAt" - IntegrationMappingDirectoryMembershipRole = "role" - IntegrationMappingDirectoryMembershipScopeID = "scopeID" - IntegrationMappingDirectoryMembershipScopeName = "scopeName" - IntegrationMappingDirectoryMembershipSource = "source" + IntegrationMappingDirectoryMembershipDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryMembershipEnvironmentID = "environmentID" + IntegrationMappingDirectoryMembershipEnvironmentName = "environmentName" + IntegrationMappingDirectoryMembershipFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryMembershipIntegrationID = "integrationID" + IntegrationMappingDirectoryMembershipLastConfirmedRunID = "lastConfirmedRunID" + IntegrationMappingDirectoryMembershipLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryMembershipMetadata = "metadata" + IntegrationMappingDirectoryMembershipObservedAt = "observedAt" + IntegrationMappingDirectoryMembershipPlatformID = "platformID" + IntegrationMappingDirectoryMembershipRemovedAt = "removedAt" + IntegrationMappingDirectoryMembershipRole = "role" + IntegrationMappingDirectoryMembershipScopeID = "scopeID" + IntegrationMappingDirectoryMembershipScopeName = "scopeName" + IntegrationMappingDirectoryMembershipSource = "source" ) // Integration mapping keys for Entity. const ( - IntegrationMappingEntityAnnualSpend = "annualSpend" - IntegrationMappingEntityApprovedForUse = "approvedForUse" - IntegrationMappingEntityAutoRenews = "autoRenews" - IntegrationMappingEntityBillingModel = "billingModel" - IntegrationMappingEntityContractEndDate = "contractEndDate" - IntegrationMappingEntityContractRenewalAt = "contractRenewalAt" - IntegrationMappingEntityContractStartDate = "contractStartDate" - IntegrationMappingEntityDisplayName = "displayName" - IntegrationMappingEntityDomains = "domains" - IntegrationMappingEntityEntityRelationshipStateID = "entityRelationshipStateID" - IntegrationMappingEntityEntityRelationshipStateName = "entityRelationshipStateName" - IntegrationMappingEntityEntitySecurityQuestionnaireStatusID = "entitySecurityQuestionnaireStatusID" + IntegrationMappingEntityAnnualSpend = "annualSpend" + IntegrationMappingEntityApprovedForUse = "approvedForUse" + IntegrationMappingEntityAutoRenews = "autoRenews" + IntegrationMappingEntityBillingModel = "billingModel" + IntegrationMappingEntityContractEndDate = "contractEndDate" + IntegrationMappingEntityContractRenewalAt = "contractRenewalAt" + IntegrationMappingEntityContractStartDate = "contractStartDate" + IntegrationMappingEntityDisplayName = "displayName" + IntegrationMappingEntityDomains = "domains" + IntegrationMappingEntityEntityRelationshipStateID = "entityRelationshipStateID" + IntegrationMappingEntityEntityRelationshipStateName = "entityRelationshipStateName" + IntegrationMappingEntityEntitySecurityQuestionnaireStatusID = "entitySecurityQuestionnaireStatusID" IntegrationMappingEntityEntitySecurityQuestionnaireStatusName = "entitySecurityQuestionnaireStatusName" - IntegrationMappingEntityEntitySourceTypeID = "entitySourceTypeID" - IntegrationMappingEntityEntitySourceTypeName = "entitySourceTypeName" - IntegrationMappingEntityEnvironmentID = "environmentID" - IntegrationMappingEntityEnvironmentName = "environmentName" - IntegrationMappingEntityExternalID = "externalID" - IntegrationMappingEntityHasSoc2 = "hasSoc2" - IntegrationMappingEntityInternalNotes = "internalNotes" - IntegrationMappingEntityInternalOwner = "internalOwner" - IntegrationMappingEntityInternalOwnerGroupID = "internalOwnerGroupID" - IntegrationMappingEntityInternalOwnerUserID = "internalOwnerUserID" - IntegrationMappingEntityLastReviewedAt = "lastReviewedAt" - IntegrationMappingEntityLinks = "links" - IntegrationMappingEntityMfaEnforced = "mfaEnforced" - IntegrationMappingEntityMfaSupported = "mfaSupported" - IntegrationMappingEntityName = "name" - IntegrationMappingEntityNextReviewAt = "nextReviewAt" - IntegrationMappingEntityObservedAt = "observedAt" - IntegrationMappingEntityOwnerID = "ownerID" - IntegrationMappingEntityProvidedServices = "providedServices" - IntegrationMappingEntityRenewalRisk = "renewalRisk" - IntegrationMappingEntityReviewFrequency = "reviewFrequency" - IntegrationMappingEntityReviewedBy = "reviewedBy" - IntegrationMappingEntityReviewedByGroupID = "reviewedByGroupID" - IntegrationMappingEntityReviewedByUserID = "reviewedByUserID" - IntegrationMappingEntityRiskRating = "riskRating" - IntegrationMappingEntityRiskScore = "riskScore" - IntegrationMappingEntityScopeID = "scopeID" - IntegrationMappingEntityScopeName = "scopeName" - IntegrationMappingEntitySoc2PeriodEnd = "soc2PeriodEnd" - IntegrationMappingEntitySpendCurrency = "spendCurrency" - IntegrationMappingEntitySsoEnforced = "ssoEnforced" - IntegrationMappingEntityStatus = "status" - IntegrationMappingEntityStatusPageURL = "statusPageURL" - IntegrationMappingEntitySystemInternalID = "systemInternalID" - IntegrationMappingEntityTags = "tags" - IntegrationMappingEntityTerminationNoticeDays = "terminationNoticeDays" - IntegrationMappingEntityTier = "tier" - IntegrationMappingEntityVendorMetadata = "vendorMetadata" + IntegrationMappingEntityEntitySourceTypeID = "entitySourceTypeID" + IntegrationMappingEntityEntitySourceTypeName = "entitySourceTypeName" + IntegrationMappingEntityEnvironmentID = "environmentID" + IntegrationMappingEntityEnvironmentName = "environmentName" + IntegrationMappingEntityExternalID = "externalID" + IntegrationMappingEntityHasSoc2 = "hasSoc2" + IntegrationMappingEntityInternalNotes = "internalNotes" + IntegrationMappingEntityInternalOwner = "internalOwner" + IntegrationMappingEntityInternalOwnerGroupID = "internalOwnerGroupID" + IntegrationMappingEntityInternalOwnerUserID = "internalOwnerUserID" + IntegrationMappingEntityLastReviewedAt = "lastReviewedAt" + IntegrationMappingEntityLinks = "links" + IntegrationMappingEntityMfaEnforced = "mfaEnforced" + IntegrationMappingEntityMfaSupported = "mfaSupported" + IntegrationMappingEntityName = "name" + IntegrationMappingEntityNextReviewAt = "nextReviewAt" + IntegrationMappingEntityObservedAt = "observedAt" + IntegrationMappingEntityOwnerID = "ownerID" + IntegrationMappingEntityProvidedServices = "providedServices" + IntegrationMappingEntityRenewalRisk = "renewalRisk" + IntegrationMappingEntityReviewFrequency = "reviewFrequency" + IntegrationMappingEntityReviewedBy = "reviewedBy" + IntegrationMappingEntityReviewedByGroupID = "reviewedByGroupID" + IntegrationMappingEntityReviewedByUserID = "reviewedByUserID" + IntegrationMappingEntityRiskRating = "riskRating" + IntegrationMappingEntityRiskScore = "riskScore" + IntegrationMappingEntityScopeID = "scopeID" + IntegrationMappingEntityScopeName = "scopeName" + IntegrationMappingEntitySoc2PeriodEnd = "soc2PeriodEnd" + IntegrationMappingEntitySpendCurrency = "spendCurrency" + IntegrationMappingEntitySsoEnforced = "ssoEnforced" + IntegrationMappingEntityStatus = "status" + IntegrationMappingEntityStatusPageURL = "statusPageURL" + IntegrationMappingEntitySystemInternalID = "systemInternalID" + IntegrationMappingEntityTags = "tags" + IntegrationMappingEntityTerminationNoticeDays = "terminationNoticeDays" + IntegrationMappingEntityTier = "tier" + IntegrationMappingEntityVendorMetadata = "vendorMetadata" ) // Integration mapping keys for Finding. const ( - IntegrationMappingFindingAssessmentID = "assessmentID" - IntegrationMappingFindingBlocksProduction = "blocksProduction" - IntegrationMappingFindingCategories = "categories" - IntegrationMappingFindingCategory = "category" - IntegrationMappingFindingDescription = "description" - IntegrationMappingFindingDisplayName = "displayName" - IntegrationMappingFindingEnvironmentID = "environmentID" - IntegrationMappingFindingEnvironmentName = "environmentName" - IntegrationMappingFindingEventTime = "eventTime" - IntegrationMappingFindingExploitability = "exploitability" - IntegrationMappingFindingExternalID = "externalID" - IntegrationMappingFindingExternalOwnerID = "externalOwnerID" - IntegrationMappingFindingExternalURI = "externalURI" - IntegrationMappingFindingFindingClass = "findingClass" - IntegrationMappingFindingFindingStatusID = "findingStatusID" - IntegrationMappingFindingFindingStatusName = "findingStatusName" - IntegrationMappingFindingImpact = "impact" - IntegrationMappingFindingInternalNotes = "internalNotes" - IntegrationMappingFindingMetadata = "metadata" - IntegrationMappingFindingNumericSeverity = "numericSeverity" - IntegrationMappingFindingOpen = "open" - IntegrationMappingFindingOwnerID = "ownerID" - IntegrationMappingFindingPriority = "priority" - IntegrationMappingFindingProduction = "production" - IntegrationMappingFindingPublic = "public" - IntegrationMappingFindingRawPayload = "rawPayload" - IntegrationMappingFindingRecommendation = "recommendation" + IntegrationMappingFindingAssessmentID = "assessmentID" + IntegrationMappingFindingBlocksProduction = "blocksProduction" + IntegrationMappingFindingCategories = "categories" + IntegrationMappingFindingCategory = "category" + IntegrationMappingFindingDescription = "description" + IntegrationMappingFindingDisplayName = "displayName" + IntegrationMappingFindingEnvironmentID = "environmentID" + IntegrationMappingFindingEnvironmentName = "environmentName" + IntegrationMappingFindingEventTime = "eventTime" + IntegrationMappingFindingExploitability = "exploitability" + IntegrationMappingFindingExternalID = "externalID" + IntegrationMappingFindingExternalOwnerID = "externalOwnerID" + IntegrationMappingFindingExternalURI = "externalURI" + IntegrationMappingFindingFindingClass = "findingClass" + IntegrationMappingFindingFindingStatusID = "findingStatusID" + IntegrationMappingFindingFindingStatusName = "findingStatusName" + IntegrationMappingFindingImpact = "impact" + IntegrationMappingFindingInternalNotes = "internalNotes" + IntegrationMappingFindingMetadata = "metadata" + IntegrationMappingFindingNumericSeverity = "numericSeverity" + IntegrationMappingFindingOpen = "open" + IntegrationMappingFindingOwnerID = "ownerID" + IntegrationMappingFindingPriority = "priority" + IntegrationMappingFindingProduction = "production" + IntegrationMappingFindingPublic = "public" + IntegrationMappingFindingRawPayload = "rawPayload" + IntegrationMappingFindingRecommendation = "recommendation" IntegrationMappingFindingRecommendedActions = "recommendedActions" - IntegrationMappingFindingReferences = "references" - IntegrationMappingFindingRemediationSLA = "remediationSLA" - IntegrationMappingFindingReportedAt = "reportedAt" - IntegrationMappingFindingResourceName = "resourceName" - IntegrationMappingFindingScopeID = "scopeID" - IntegrationMappingFindingScopeName = "scopeName" - IntegrationMappingFindingScore = "score" - IntegrationMappingFindingSeverity = "severity" - IntegrationMappingFindingSource = "source" - IntegrationMappingFindingSourceUpdatedAt = "sourceUpdatedAt" - IntegrationMappingFindingState = "state" - IntegrationMappingFindingStepsToReproduce = "stepsToReproduce" - IntegrationMappingFindingSystemInternalID = "systemInternalID" - IntegrationMappingFindingTags = "tags" - IntegrationMappingFindingTargetDetails = "targetDetails" - IntegrationMappingFindingTargets = "targets" - IntegrationMappingFindingValidated = "validated" - IntegrationMappingFindingVector = "vector" + IntegrationMappingFindingReferences = "references" + IntegrationMappingFindingRemediationSLA = "remediationSLA" + IntegrationMappingFindingReportedAt = "reportedAt" + IntegrationMappingFindingResourceName = "resourceName" + IntegrationMappingFindingScopeID = "scopeID" + IntegrationMappingFindingScopeName = "scopeName" + IntegrationMappingFindingScore = "score" + IntegrationMappingFindingSeverity = "severity" + IntegrationMappingFindingSource = "source" + IntegrationMappingFindingSourceUpdatedAt = "sourceUpdatedAt" + IntegrationMappingFindingState = "state" + IntegrationMappingFindingStepsToReproduce = "stepsToReproduce" + IntegrationMappingFindingSystemInternalID = "systemInternalID" + IntegrationMappingFindingTags = "tags" + IntegrationMappingFindingTargetDetails = "targetDetails" + IntegrationMappingFindingTargets = "targets" + IntegrationMappingFindingValidated = "validated" + IntegrationMappingFindingVector = "vector" ) // Integration mapping keys for Risk. const ( - IntegrationMappingRiskBusinessCosts = "businessCosts" + IntegrationMappingRiskBusinessCosts = "businessCosts" IntegrationMappingRiskBusinessCostsJSON = "businessCostsJSON" - IntegrationMappingRiskDetails = "details" - IntegrationMappingRiskDetailsJSON = "detailsJSON" - IntegrationMappingRiskEnvironmentID = "environmentID" - IntegrationMappingRiskEnvironmentName = "environmentName" - IntegrationMappingRiskExternalID = "externalID" - IntegrationMappingRiskExternalUUID = "externalUUID" - IntegrationMappingRiskImpact = "impact" - IntegrationMappingRiskIntegrationID = "integrationID" - IntegrationMappingRiskLastReviewedAt = "lastReviewedAt" - IntegrationMappingRiskLikelihood = "likelihood" - IntegrationMappingRiskMitigatedAt = "mitigatedAt" - IntegrationMappingRiskMitigation = "mitigation" - IntegrationMappingRiskMitigationJSON = "mitigationJSON" - IntegrationMappingRiskName = "name" - IntegrationMappingRiskNextReviewDueAt = "nextReviewDueAt" - IntegrationMappingRiskObservedAt = "observedAt" - IntegrationMappingRiskOwnerID = "ownerID" - IntegrationMappingRiskResidualScore = "residualScore" - IntegrationMappingRiskReviewFrequency = "reviewFrequency" - IntegrationMappingRiskReviewRequired = "reviewRequired" - IntegrationMappingRiskRiskCategoryID = "riskCategoryID" - IntegrationMappingRiskRiskCategoryName = "riskCategoryName" - IntegrationMappingRiskRiskDecision = "riskDecision" - IntegrationMappingRiskRiskKindID = "riskKindID" - IntegrationMappingRiskRiskKindName = "riskKindName" - IntegrationMappingRiskScopeID = "scopeID" - IntegrationMappingRiskScopeName = "scopeName" - IntegrationMappingRiskScore = "score" - IntegrationMappingRiskStatus = "status" - IntegrationMappingRiskTags = "tags" + IntegrationMappingRiskDetails = "details" + IntegrationMappingRiskDetailsJSON = "detailsJSON" + IntegrationMappingRiskEnvironmentID = "environmentID" + IntegrationMappingRiskEnvironmentName = "environmentName" + IntegrationMappingRiskExternalID = "externalID" + IntegrationMappingRiskExternalUUID = "externalUUID" + IntegrationMappingRiskImpact = "impact" + IntegrationMappingRiskIntegrationID = "integrationID" + IntegrationMappingRiskLastReviewedAt = "lastReviewedAt" + IntegrationMappingRiskLikelihood = "likelihood" + IntegrationMappingRiskMitigatedAt = "mitigatedAt" + IntegrationMappingRiskMitigation = "mitigation" + IntegrationMappingRiskMitigationJSON = "mitigationJSON" + IntegrationMappingRiskName = "name" + IntegrationMappingRiskNextReviewDueAt = "nextReviewDueAt" + IntegrationMappingRiskObservedAt = "observedAt" + IntegrationMappingRiskOwnerID = "ownerID" + IntegrationMappingRiskResidualScore = "residualScore" + IntegrationMappingRiskReviewFrequency = "reviewFrequency" + IntegrationMappingRiskReviewRequired = "reviewRequired" + IntegrationMappingRiskRiskCategoryID = "riskCategoryID" + IntegrationMappingRiskRiskCategoryName = "riskCategoryName" + IntegrationMappingRiskRiskDecision = "riskDecision" + IntegrationMappingRiskRiskKindID = "riskKindID" + IntegrationMappingRiskRiskKindName = "riskKindName" + IntegrationMappingRiskScopeID = "scopeID" + IntegrationMappingRiskScopeName = "scopeName" + IntegrationMappingRiskScore = "score" + IntegrationMappingRiskStatus = "status" + IntegrationMappingRiskTags = "tags" ) // Integration mapping keys for Vulnerability. const ( - IntegrationMappingVulnerabilityAutoDismissedAt = "autoDismissedAt" - IntegrationMappingVulnerabilityBlocking = "blocking" - IntegrationMappingVulnerabilityCategory = "category" - IntegrationMappingVulnerabilityCveID = "cveID" - IntegrationMappingVulnerabilityCweIds = "cweIds" - IntegrationMappingVulnerabilityDependencyScope = "dependencyScope" - IntegrationMappingVulnerabilityDescription = "description" - IntegrationMappingVulnerabilityDiscoveredAt = "discoveredAt" - IntegrationMappingVulnerabilityDismissedAt = "dismissedAt" - IntegrationMappingVulnerabilityDismissedComment = "dismissedComment" - IntegrationMappingVulnerabilityDismissedReason = "dismissedReason" - IntegrationMappingVulnerabilityDisplayName = "displayName" - IntegrationMappingVulnerabilityEnvironmentID = "environmentID" - IntegrationMappingVulnerabilityEnvironmentName = "environmentName" - IntegrationMappingVulnerabilityExploitability = "exploitability" - IntegrationMappingVulnerabilityExternalID = "externalID" - IntegrationMappingVulnerabilityExternalOwnerID = "externalOwnerID" - IntegrationMappingVulnerabilityExternalURI = "externalURI" - IntegrationMappingVulnerabilityFirstPatchedVersion = "firstPatchedVersion" - IntegrationMappingVulnerabilityFixedAt = "fixedAt" - IntegrationMappingVulnerabilityImpact = "impact" - IntegrationMappingVulnerabilityImpacts = "impacts" - IntegrationMappingVulnerabilityInternalNotes = "internalNotes" - IntegrationMappingVulnerabilityManifestPath = "manifestPath" - IntegrationMappingVulnerabilityMetadata = "metadata" - IntegrationMappingVulnerabilityOpen = "open" - IntegrationMappingVulnerabilityOwnerID = "ownerID" - IntegrationMappingVulnerabilityPackageEcosystem = "packageEcosystem" - IntegrationMappingVulnerabilityPackageName = "packageName" - IntegrationMappingVulnerabilityPriority = "priority" - IntegrationMappingVulnerabilityProduction = "production" - IntegrationMappingVulnerabilityPublic = "public" - IntegrationMappingVulnerabilityPublishedAt = "publishedAt" - IntegrationMappingVulnerabilityRawPayload = "rawPayload" - IntegrationMappingVulnerabilityReferences = "references" - IntegrationMappingVulnerabilityRemediationSLA = "remediationSLA" - IntegrationMappingVulnerabilityScopeID = "scopeID" - IntegrationMappingVulnerabilityScopeName = "scopeName" - IntegrationMappingVulnerabilityScore = "score" - IntegrationMappingVulnerabilitySeverity = "severity" - IntegrationMappingVulnerabilitySource = "source" - IntegrationMappingVulnerabilitySourceUpdatedAt = "sourceUpdatedAt" - IntegrationMappingVulnerabilitySummary = "summary" - IntegrationMappingVulnerabilitySystemInternalID = "systemInternalID" - IntegrationMappingVulnerabilityTags = "tags" - IntegrationMappingVulnerabilityValidated = "validated" - IntegrationMappingVulnerabilityVector = "vector" - IntegrationMappingVulnerabilityVulnerabilityStatusID = "vulnerabilityStatusID" + IntegrationMappingVulnerabilityAutoDismissedAt = "autoDismissedAt" + IntegrationMappingVulnerabilityBlocking = "blocking" + IntegrationMappingVulnerabilityCategory = "category" + IntegrationMappingVulnerabilityCveID = "cveID" + IntegrationMappingVulnerabilityCweIds = "cweIds" + IntegrationMappingVulnerabilityDependencyScope = "dependencyScope" + IntegrationMappingVulnerabilityDescription = "description" + IntegrationMappingVulnerabilityDiscoveredAt = "discoveredAt" + IntegrationMappingVulnerabilityDismissedAt = "dismissedAt" + IntegrationMappingVulnerabilityDismissedComment = "dismissedComment" + IntegrationMappingVulnerabilityDismissedReason = "dismissedReason" + IntegrationMappingVulnerabilityDisplayName = "displayName" + IntegrationMappingVulnerabilityEnvironmentID = "environmentID" + IntegrationMappingVulnerabilityEnvironmentName = "environmentName" + IntegrationMappingVulnerabilityExploitability = "exploitability" + IntegrationMappingVulnerabilityExternalID = "externalID" + IntegrationMappingVulnerabilityExternalOwnerID = "externalOwnerID" + IntegrationMappingVulnerabilityExternalURI = "externalURI" + IntegrationMappingVulnerabilityFirstPatchedVersion = "firstPatchedVersion" + IntegrationMappingVulnerabilityFixedAt = "fixedAt" + IntegrationMappingVulnerabilityImpact = "impact" + IntegrationMappingVulnerabilityImpacts = "impacts" + IntegrationMappingVulnerabilityInternalNotes = "internalNotes" + IntegrationMappingVulnerabilityManifestPath = "manifestPath" + IntegrationMappingVulnerabilityMetadata = "metadata" + IntegrationMappingVulnerabilityOpen = "open" + IntegrationMappingVulnerabilityOwnerID = "ownerID" + IntegrationMappingVulnerabilityPackageEcosystem = "packageEcosystem" + IntegrationMappingVulnerabilityPackageName = "packageName" + IntegrationMappingVulnerabilityPriority = "priority" + IntegrationMappingVulnerabilityProduction = "production" + IntegrationMappingVulnerabilityPublic = "public" + IntegrationMappingVulnerabilityPublishedAt = "publishedAt" + IntegrationMappingVulnerabilityRawPayload = "rawPayload" + IntegrationMappingVulnerabilityReferences = "references" + IntegrationMappingVulnerabilityRemediationSLA = "remediationSLA" + IntegrationMappingVulnerabilityScopeID = "scopeID" + IntegrationMappingVulnerabilityScopeName = "scopeName" + IntegrationMappingVulnerabilityScore = "score" + IntegrationMappingVulnerabilitySeverity = "severity" + IntegrationMappingVulnerabilitySource = "source" + IntegrationMappingVulnerabilitySourceUpdatedAt = "sourceUpdatedAt" + IntegrationMappingVulnerabilitySummary = "summary" + IntegrationMappingVulnerabilitySystemInternalID = "systemInternalID" + IntegrationMappingVulnerabilityTags = "tags" + IntegrationMappingVulnerabilityValidated = "validated" + IntegrationMappingVulnerabilityVector = "vector" + IntegrationMappingVulnerabilityVulnerabilityStatusID = "vulnerabilityStatusID" IntegrationMappingVulnerabilityVulnerabilityStatusName = "vulnerabilityStatusName" - IntegrationMappingVulnerabilityVulnerableVersionRange = "vulnerableVersionRange" + IntegrationMappingVulnerabilityVulnerableVersionRange = "vulnerableVersionRange" ) // IntegrationMappingSchemas maps schema names to their mapping metadata @@ -520,407 +519,407 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Asset", Fields: []IntegrationMappingField{ { - InputKey: "accessModelID", - GoField: "AccessModelID", - EntField: "access_model_id", - Type: "string", - Required: false, + InputKey: "accessModelID", + GoField: "AccessModelID", + EntField: "access_model_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "accessModelName", - GoField: "AccessModelName", - EntField: "access_model_name", - Type: "string", - Required: false, + InputKey: "accessModelName", + GoField: "AccessModelName", + EntField: "access_model_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetDataClassificationID", - GoField: "AssetDataClassificationID", - EntField: "asset_data_classification_id", - Type: "string", - Required: false, + InputKey: "assetDataClassificationID", + GoField: "AssetDataClassificationID", + EntField: "asset_data_classification_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetDataClassificationName", - GoField: "AssetDataClassificationName", - EntField: "asset_data_classification_name", - Type: "string", - Required: false, + InputKey: "assetDataClassificationName", + GoField: "AssetDataClassificationName", + EntField: "asset_data_classification_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetSubtypeID", - GoField: "AssetSubtypeID", - EntField: "asset_subtype_id", - Type: "string", - Required: false, + InputKey: "assetSubtypeID", + GoField: "AssetSubtypeID", + EntField: "asset_subtype_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetSubtypeName", - GoField: "AssetSubtypeName", - EntField: "asset_subtype_name", - Type: "string", - Required: false, + InputKey: "assetSubtypeName", + GoField: "AssetSubtypeName", + EntField: "asset_subtype_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetType", - GoField: "AssetType", - EntField: "asset_type", - Type: "string", - Required: true, + InputKey: "assetType", + GoField: "AssetType", + EntField: "asset_type", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "categories", - GoField: "Categories", - EntField: "categories", - Type: "json.RawMessage", - Required: false, + InputKey: "categories", + GoField: "Categories", + EntField: "categories", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "containsPii", - GoField: "ContainsPii", - EntField: "contains_pii", - Type: "bool", - Required: false, + InputKey: "containsPii", + GoField: "ContainsPii", + EntField: "contains_pii", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "costCenter", - GoField: "CostCenter", - EntField: "cost_center", - Type: "string", - Required: false, + InputKey: "costCenter", + GoField: "CostCenter", + EntField: "cost_center", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "criticalityID", - GoField: "CriticalityID", - EntField: "criticality_id", - Type: "string", - Required: false, + InputKey: "criticalityID", + GoField: "CriticalityID", + EntField: "criticality_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "criticalityName", - GoField: "CriticalityName", - EntField: "criticality_name", - Type: "string", - Required: false, + InputKey: "criticalityName", + GoField: "CriticalityName", + EntField: "criticality_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "encryptionStatusID", - GoField: "EncryptionStatusID", - EntField: "encryption_status_id", - Type: "string", - Required: false, + InputKey: "encryptionStatusID", + GoField: "EncryptionStatusID", + EntField: "encryption_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "encryptionStatusName", - GoField: "EncryptionStatusName", - EntField: "encryption_status_name", - Type: "string", - Required: false, + InputKey: "encryptionStatusName", + GoField: "EncryptionStatusName", + EntField: "encryption_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "estimatedMonthlyCost", - GoField: "EstimatedMonthlyCost", - EntField: "estimated_monthly_cost", - Type: "float64", - Required: false, + InputKey: "estimatedMonthlyCost", + GoField: "EstimatedMonthlyCost", + EntField: "estimated_monthly_cost", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "identifier", - GoField: "Identifier", - EntField: "identifier", - Type: "string", - Required: false, + InputKey: "identifier", + GoField: "Identifier", + EntField: "identifier", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwner", - GoField: "InternalOwner", - EntField: "internal_owner", - Type: "string", - Required: false, + InputKey: "internalOwner", + GoField: "InternalOwner", + EntField: "internal_owner", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerGroupID", - GoField: "InternalOwnerGroupID", - EntField: "internal_owner_group_id", - Type: "string", - Required: false, + InputKey: "internalOwnerGroupID", + GoField: "InternalOwnerGroupID", + EntField: "internal_owner_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerUserID", - GoField: "InternalOwnerUserID", - EntField: "internal_owner_user_id", - Type: "string", - Required: false, + InputKey: "internalOwnerUserID", + GoField: "InternalOwnerUserID", + EntField: "internal_owner_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: true, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "physicalLocation", - GoField: "PhysicalLocation", - EntField: "physical_location", - Type: "string", - Required: false, + InputKey: "physicalLocation", + GoField: "PhysicalLocation", + EntField: "physical_location", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "purchaseDate", - GoField: "PurchaseDate", - EntField: "purchase_date", - Type: "time.Time", - Required: false, + InputKey: "purchaseDate", + GoField: "PurchaseDate", + EntField: "purchase_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "region", - GoField: "Region", - EntField: "region", - Type: "string", - Required: false, + InputKey: "region", + GoField: "Region", + EntField: "region", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "securityTierID", - GoField: "SecurityTierID", - EntField: "security_tier_id", - Type: "string", - Required: false, + InputKey: "securityTierID", + GoField: "SecurityTierID", + EntField: "security_tier_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "securityTierName", - GoField: "SecurityTierName", - EntField: "security_tier_name", - Type: "string", - Required: false, + InputKey: "securityTierName", + GoField: "SecurityTierName", + EntField: "security_tier_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceIdentifier", - GoField: "SourceIdentifier", - EntField: "source_identifier", - Type: "string", - Required: false, + InputKey: "sourceIdentifier", + GoField: "SourceIdentifier", + EntField: "source_identifier", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "sourceType", - GoField: "SourceType", - EntField: "source_type", - Type: "string", - Required: true, + InputKey: "sourceType", + GoField: "SourceType", + EntField: "source_type", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "website", - GoField: "Website", - EntField: "website", - Type: "string", - Required: false, + InputKey: "website", + GoField: "Website", + EntField: "website", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "accessModelID": {}, - "accessModelName": {}, - "assetDataClassificationID": {}, + "accessModelID": {}, + "accessModelName": {}, + "assetDataClassificationID": {}, "assetDataClassificationName": {}, - "assetSubtypeID": {}, - "assetSubtypeName": {}, - "assetType": {}, - "categories": {}, - "containsPii": {}, - "costCenter": {}, - "criticalityID": {}, - "criticalityName": {}, - "description": {}, - "displayName": {}, - "encryptionStatusID": {}, - "encryptionStatusName": {}, - "environmentID": {}, - "environmentName": {}, - "estimatedMonthlyCost": {}, - "identifier": {}, - "integrationID": {}, - "internalNotes": {}, - "internalOwner": {}, - "internalOwnerGroupID": {}, - "internalOwnerUserID": {}, - "name": {}, - "observedAt": {}, - "ownerID": {}, - "physicalLocation": {}, - "purchaseDate": {}, - "region": {}, - "scopeID": {}, - "scopeName": {}, - "securityTierID": {}, - "securityTierName": {}, - "sourceIdentifier": {}, - "sourceType": {}, - "systemInternalID": {}, - "tags": {}, - "website": {}, + "assetSubtypeID": {}, + "assetSubtypeName": {}, + "assetType": {}, + "categories": {}, + "containsPii": {}, + "costCenter": {}, + "criticalityID": {}, + "criticalityName": {}, + "description": {}, + "displayName": {}, + "encryptionStatusID": {}, + "encryptionStatusName": {}, + "environmentID": {}, + "environmentName": {}, + "estimatedMonthlyCost": {}, + "identifier": {}, + "integrationID": {}, + "internalNotes": {}, + "internalOwner": {}, + "internalOwnerGroupID": {}, + "internalOwnerUserID": {}, + "name": {}, + "observedAt": {}, + "ownerID": {}, + "physicalLocation": {}, + "purchaseDate": {}, + "region": {}, + "scopeID": {}, + "scopeName": {}, + "securityTierID": {}, + "securityTierName": {}, + "sourceIdentifier": {}, + "sourceType": {}, + "systemInternalID": {}, + "tags": {}, + "website": {}, }, RequiredKeys: []string{ "assetType", @@ -936,117 +935,117 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Contact", Fields: []IntegrationMappingField{ { - InputKey: "address", - GoField: "Address", - EntField: "address", - Type: "string", - Required: false, + InputKey: "address", + GoField: "Address", + EntField: "address", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "company", - GoField: "Company", - EntField: "company", - Type: "string", - Required: false, + InputKey: "company", + GoField: "Company", + EntField: "company", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "email", - GoField: "Email", - EntField: "email", - Type: "string", - Required: false, + InputKey: "email", + GoField: "Email", + EntField: "email", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "fullName", - GoField: "FullName", - EntField: "full_name", - Type: "string", - Required: false, + InputKey: "fullName", + GoField: "FullName", + EntField: "full_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "phoneNumber", - GoField: "PhoneNumber", - EntField: "phone_number", - Type: "string", - Required: false, + InputKey: "phoneNumber", + GoField: "PhoneNumber", + EntField: "phone_number", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "title", - GoField: "Title", - EntField: "title", - Type: "string", - Required: false, + InputKey: "title", + GoField: "Title", + EntField: "title", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "address": {}, - "company": {}, - "email": {}, - "externalID": {}, - "fullName": {}, + "address": {}, + "company": {}, + "email": {}, + "externalID": {}, + "fullName": {}, "integrationID": {}, - "observedAt": {}, - "phoneNumber": {}, - "status": {}, - "tags": {}, - "title": {}, + "observedAt": {}, + "phoneNumber": {}, + "status": {}, + "tags": {}, + "title": {}, }, RequiredKeys: []string{ "status", @@ -1061,377 +1060,377 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryAccount", Fields: []IntegrationMappingField{ { - InputKey: "accountType", - GoField: "AccountType", - EntField: "account_type", - Type: "string", - Required: false, + InputKey: "accountType", + GoField: "AccountType", + EntField: "account_type", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "avatarRemoteURL", - GoField: "AvatarRemoteURL", - EntField: "avatar_remote_url", - Type: "string", - Required: false, + InputKey: "avatarRemoteURL", + GoField: "AvatarRemoteURL", + EntField: "avatar_remote_url", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "avatarUpdatedAt", - GoField: "AvatarUpdatedAt", - EntField: "avatar_updated_at", - Type: "time.Time", - Required: false, + InputKey: "avatarUpdatedAt", + GoField: "AvatarUpdatedAt", + EntField: "avatar_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "canonicalEmail", - GoField: "CanonicalEmail", - EntField: "canonical_email", - Type: "string", - Required: false, + InputKey: "canonicalEmail", + GoField: "CanonicalEmail", + EntField: "canonical_email", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "department", - GoField: "Department", - EntField: "department", - Type: "string", - Required: false, + InputKey: "department", + GoField: "Department", + EntField: "department", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryName", - GoField: "DirectoryName", - EntField: "directory_name", - Type: "string", - Required: false, + InputKey: "directoryName", + GoField: "DirectoryName", + EntField: "directory_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: false, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "familyName", - GoField: "FamilyName", - EntField: "family_name", - Type: "string", - Required: false, + InputKey: "familyName", + GoField: "FamilyName", + EntField: "family_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "givenName", - GoField: "GivenName", - EntField: "given_name", - Type: "string", - Required: false, + InputKey: "givenName", + GoField: "GivenName", + EntField: "given_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "identityHolderID", - GoField: "IdentityHolderID", - EntField: "identity_holder_id", - Type: "string", - Required: false, + InputKey: "identityHolderID", + GoField: "IdentityHolderID", + EntField: "identity_holder_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "jobTitle", - GoField: "JobTitle", - EntField: "job_title", - Type: "string", - Required: false, + InputKey: "jobTitle", + GoField: "JobTitle", + EntField: "job_title", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastLoginAt", - GoField: "LastLoginAt", - EntField: "last_login_at", - Type: "time.Time", - Required: false, + InputKey: "lastLoginAt", + GoField: "LastLoginAt", + EntField: "last_login_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenIP", - GoField: "LastSeenIP", - EntField: "last_seen_ip", - Type: "string", - Required: false, + InputKey: "lastSeenIP", + GoField: "LastSeenIP", + EntField: "last_seen_ip", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaState", - GoField: "MfaState", - EntField: "mfa_state", - Type: "string", - Required: true, + InputKey: "mfaState", + GoField: "MfaState", + EntField: "mfa_state", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "organizationUnit", - GoField: "OrganizationUnit", - EntField: "organization_unit", - Type: "string", - Required: false, + InputKey: "organizationUnit", + GoField: "OrganizationUnit", + EntField: "organization_unit", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "primarySource", - GoField: "PrimarySource", - EntField: "primary_source", - Type: "bool", - Required: true, + InputKey: "primarySource", + GoField: "PrimarySource", + EntField: "primary_source", + Type: "bool", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "profile", - GoField: "Profile", - EntField: "profile", - Type: "json.RawMessage", - Required: false, + InputKey: "profile", + GoField: "Profile", + EntField: "profile", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profileHash", - GoField: "ProfileHash", - EntField: "profile_hash", - Type: "string", - Required: true, + InputKey: "profileHash", + GoField: "ProfileHash", + EntField: "profile_hash", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "secondaryKey", - GoField: "SecondaryKey", - EntField: "secondary_key", - Type: "string", - Required: false, + InputKey: "secondaryKey", + GoField: "SecondaryKey", + EntField: "secondary_key", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceVersion", - GoField: "SourceVersion", - EntField: "source_version", - Type: "string", - Required: false, + InputKey: "sourceVersion", + GoField: "SourceVersion", + EntField: "source_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "accountType": {}, - "addedAt": {}, - "avatarRemoteURL": {}, - "avatarUpdatedAt": {}, - "canonicalEmail": {}, - "department": {}, + "accountType": {}, + "addedAt": {}, + "avatarRemoteURL": {}, + "avatarUpdatedAt": {}, + "canonicalEmail": {}, + "department": {}, "directoryInstanceID": {}, - "directoryName": {}, - "directorySyncRunID": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "familyName": {}, - "firstSeenAt": {}, - "givenName": {}, - "identityHolderID": {}, - "integrationID": {}, - "jobTitle": {}, - "lastLoginAt": {}, - "lastSeenAt": {}, - "lastSeenIP": {}, - "metadata": {}, - "mfaState": {}, - "observedAt": {}, - "organizationUnit": {}, - "platformID": {}, - "primarySource": {}, - "profile": {}, - "profileHash": {}, - "removedAt": {}, - "scopeID": {}, - "scopeName": {}, - "secondaryKey": {}, - "sourceVersion": {}, - "status": {}, - "tags": {}, + "directoryName": {}, + "directorySyncRunID": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "familyName": {}, + "firstSeenAt": {}, + "givenName": {}, + "identityHolderID": {}, + "integrationID": {}, + "jobTitle": {}, + "lastLoginAt": {}, + "lastSeenAt": {}, + "lastSeenIP": {}, + "metadata": {}, + "mfaState": {}, + "observedAt": {}, + "organizationUnit": {}, + "platformID": {}, + "primarySource": {}, + "profile": {}, + "profileHash": {}, + "removedAt": {}, + "scopeID": {}, + "scopeName": {}, + "secondaryKey": {}, + "sourceVersion": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "externalID", @@ -1453,257 +1452,257 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryGroup", Fields: []IntegrationMappingField{ { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "classification", - GoField: "Classification", - EntField: "classification", - Type: "string", - Required: true, + InputKey: "classification", + GoField: "Classification", + EntField: "classification", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: true, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "email", - GoField: "Email", - EntField: "email", - Type: "string", - Required: false, + InputKey: "email", + GoField: "Email", + EntField: "email", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: false, LookupKey: true, }, { - InputKey: "externalSharingAllowed", - GoField: "ExternalSharingAllowed", - EntField: "external_sharing_allowed", - Type: "bool", - Required: false, + InputKey: "externalSharingAllowed", + GoField: "ExternalSharingAllowed", + EntField: "external_sharing_allowed", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: true, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "memberCount", - GoField: "MemberCount", - EntField: "member_count", - Type: "int", - Required: false, + InputKey: "memberCount", + GoField: "MemberCount", + EntField: "member_count", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profile", - GoField: "Profile", - EntField: "profile", - Type: "json.RawMessage", - Required: false, + InputKey: "profile", + GoField: "Profile", + EntField: "profile", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profileHash", - GoField: "ProfileHash", - EntField: "profile_hash", - Type: "string", - Required: true, + InputKey: "profileHash", + GoField: "ProfileHash", + EntField: "profile_hash", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceVersion", - GoField: "SourceVersion", - EntField: "source_version", - Type: "string", - Required: false, + InputKey: "sourceVersion", + GoField: "SourceVersion", + EntField: "source_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "addedAt": {}, - "classification": {}, - "directoryInstanceID": {}, - "directorySyncRunID": {}, - "displayName": {}, - "email": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, + "addedAt": {}, + "classification": {}, + "directoryInstanceID": {}, + "directorySyncRunID": {}, + "displayName": {}, + "email": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, "externalSharingAllowed": {}, - "firstSeenAt": {}, - "integrationID": {}, - "lastSeenAt": {}, - "memberCount": {}, - "metadata": {}, - "observedAt": {}, - "platformID": {}, - "profile": {}, - "profileHash": {}, - "removedAt": {}, - "scopeID": {}, - "scopeName": {}, - "sourceVersion": {}, - "status": {}, - "tags": {}, + "firstSeenAt": {}, + "integrationID": {}, + "lastSeenAt": {}, + "memberCount": {}, + "metadata": {}, + "observedAt": {}, + "platformID": {}, + "profile": {}, + "profileHash": {}, + "removedAt": {}, + "scopeID": {}, + "scopeName": {}, + "sourceVersion": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "classification", @@ -1724,197 +1723,197 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryMembership", Fields: []IntegrationMappingField{ { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryAccountID", - GoField: "DirectoryAccountID", - EntField: "directory_account_id", - Type: "string", - Required: true, + InputKey: "directoryAccountID", + GoField: "DirectoryAccountID", + EntField: "directory_account_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "directoryGroupID", - GoField: "DirectoryGroupID", - EntField: "directory_group_id", - Type: "string", - Required: true, + InputKey: "directoryGroupID", + GoField: "DirectoryGroupID", + EntField: "directory_group_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: true, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: true, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "lastConfirmedRunID", - GoField: "LastConfirmedRunID", - EntField: "last_confirmed_run_id", - Type: "string", - Required: false, + InputKey: "lastConfirmedRunID", + GoField: "LastConfirmedRunID", + EntField: "last_confirmed_run_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "role", - GoField: "Role", - EntField: "role", - Type: "string", - Required: false, + InputKey: "role", + GoField: "Role", + EntField: "role", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "addedAt": {}, - "directoryAccountID": {}, - "directoryGroupID": {}, + "addedAt": {}, + "directoryAccountID": {}, + "directoryGroupID": {}, "directoryInstanceID": {}, - "directorySyncRunID": {}, - "environmentID": {}, - "environmentName": {}, - "firstSeenAt": {}, - "integrationID": {}, - "lastConfirmedRunID": {}, - "lastSeenAt": {}, - "metadata": {}, - "observedAt": {}, - "platformID": {}, - "removedAt": {}, - "role": {}, - "scopeID": {}, - "scopeName": {}, - "source": {}, + "directorySyncRunID": {}, + "environmentID": {}, + "environmentName": {}, + "firstSeenAt": {}, + "integrationID": {}, + "lastConfirmedRunID": {}, + "lastSeenAt": {}, + "metadata": {}, + "observedAt": {}, + "platformID": {}, + "removedAt": {}, + "role": {}, + "scopeID": {}, + "scopeName": {}, + "source": {}, }, RequiredKeys: []string{ "directoryAccountID", @@ -1935,520 +1934,519 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Entity", Fields: []IntegrationMappingField{ { - InputKey: "annualSpend", - GoField: "AnnualSpend", - EntField: "annual_spend", - Type: "float64", - Required: false, + InputKey: "annualSpend", + GoField: "AnnualSpend", + EntField: "annual_spend", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "approvedForUse", - GoField: "ApprovedForUse", - EntField: "approved_for_use", - Type: "bool", - Required: false, + InputKey: "approvedForUse", + GoField: "ApprovedForUse", + EntField: "approved_for_use", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "autoRenews", - GoField: "AutoRenews", - EntField: "auto_renews", - Type: "bool", - Required: false, + InputKey: "autoRenews", + GoField: "AutoRenews", + EntField: "auto_renews", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "billingModel", - GoField: "BillingModel", - EntField: "billing_model", - Type: "string", - Required: false, + InputKey: "billingModel", + GoField: "BillingModel", + EntField: "billing_model", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractEndDate", - GoField: "ContractEndDate", - EntField: "contract_end_date", - Type: "time.Time", - Required: false, + InputKey: "contractEndDate", + GoField: "ContractEndDate", + EntField: "contract_end_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractRenewalAt", - GoField: "ContractRenewalAt", - EntField: "contract_renewal_at", - Type: "time.Time", - Required: false, + InputKey: "contractRenewalAt", + GoField: "ContractRenewalAt", + EntField: "contract_renewal_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractStartDate", - GoField: "ContractStartDate", - EntField: "contract_start_date", - Type: "time.Time", - Required: false, + InputKey: "contractStartDate", + GoField: "ContractStartDate", + EntField: "contract_start_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "domains", - GoField: "Domains", - EntField: "domains", - Type: "json.RawMessage", - Required: false, + InputKey: "domains", + GoField: "Domains", + EntField: "domains", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entityRelationshipStateID", - GoField: "EntityRelationshipStateID", - EntField: "entity_relationship_state_id", - Type: "string", - Required: false, + InputKey: "entityRelationshipStateID", + GoField: "EntityRelationshipStateID", + EntField: "entity_relationship_state_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entityRelationshipStateName", - GoField: "EntityRelationshipStateName", - EntField: "entity_relationship_state_name", - Type: "string", - Required: false, + InputKey: "entityRelationshipStateName", + GoField: "EntityRelationshipStateName", + EntField: "entity_relationship_state_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySecurityQuestionnaireStatusID", - GoField: "EntitySecurityQuestionnaireStatusID", - EntField: "entity_security_questionnaire_status_id", - Type: "string", - Required: false, + InputKey: "entitySecurityQuestionnaireStatusID", + GoField: "EntitySecurityQuestionnaireStatusID", + EntField: "entity_security_questionnaire_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySecurityQuestionnaireStatusName", - GoField: "EntitySecurityQuestionnaireStatusName", - EntField: "entity_security_questionnaire_status_name", - Type: "string", - Required: false, + InputKey: "entitySecurityQuestionnaireStatusName", + GoField: "EntitySecurityQuestionnaireStatusName", + EntField: "entity_security_questionnaire_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySourceTypeID", - GoField: "EntitySourceTypeID", - EntField: "entity_source_type_id", - Type: "string", - Required: false, + InputKey: "entitySourceTypeID", + GoField: "EntitySourceTypeID", + EntField: "entity_source_type_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySourceTypeName", - GoField: "EntitySourceTypeName", - EntField: "entity_source_type_name", - Type: "string", - Required: false, + InputKey: "entitySourceTypeName", + GoField: "EntitySourceTypeName", + EntField: "entity_source_type_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "hasSoc2", - GoField: "HasSoc2", - EntField: "has_soc2", - Type: "bool", - Required: false, + InputKey: "hasSoc2", + GoField: "HasSoc2", + EntField: "has_soc2", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwner", - GoField: "InternalOwner", - EntField: "internal_owner", - Type: "string", - Required: false, + InputKey: "internalOwner", + GoField: "InternalOwner", + EntField: "internal_owner", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerGroupID", - GoField: "InternalOwnerGroupID", - EntField: "internal_owner_group_id", - Type: "string", - Required: false, + InputKey: "internalOwnerGroupID", + GoField: "InternalOwnerGroupID", + EntField: "internal_owner_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerUserID", - GoField: "InternalOwnerUserID", - EntField: "internal_owner_user_id", - Type: "string", - Required: false, + InputKey: "internalOwnerUserID", + GoField: "InternalOwnerUserID", + EntField: "internal_owner_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastReviewedAt", - GoField: "LastReviewedAt", - EntField: "last_reviewed_at", - Type: "time.Time", - Required: false, + InputKey: "lastReviewedAt", + GoField: "LastReviewedAt", + EntField: "last_reviewed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "links", - GoField: "Links", - EntField: "links", - Type: "json.RawMessage", - Required: false, + InputKey: "links", + GoField: "Links", + EntField: "links", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaEnforced", - GoField: "MfaEnforced", - EntField: "mfa_enforced", - Type: "bool", - Required: false, + InputKey: "mfaEnforced", + GoField: "MfaEnforced", + EntField: "mfa_enforced", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaSupported", - GoField: "MfaSupported", - EntField: "mfa_supported", - Type: "bool", - Required: false, + InputKey: "mfaSupported", + GoField: "MfaSupported", + EntField: "mfa_supported", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: false, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "nextReviewAt", - GoField: "NextReviewAt", - EntField: "next_review_at", - Type: "time.Time", - Required: false, + InputKey: "nextReviewAt", + GoField: "NextReviewAt", + EntField: "next_review_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "providedServices", - GoField: "ProvidedServices", - EntField: "provided_services", - Type: "json.RawMessage", - Required: false, + InputKey: "providedServices", + GoField: "ProvidedServices", + EntField: "provided_services", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "renewalRisk", - GoField: "RenewalRisk", - EntField: "renewal_risk", - Type: "string", - Required: false, + InputKey: "renewalRisk", + GoField: "RenewalRisk", + EntField: "renewal_risk", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewFrequency", - GoField: "ReviewFrequency", - EntField: "review_frequency", - Type: "string", - Required: false, + InputKey: "reviewFrequency", + GoField: "ReviewFrequency", + EntField: "review_frequency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedBy", - GoField: "ReviewedBy", - EntField: "reviewed_by", - Type: "string", - Required: false, + InputKey: "reviewedBy", + GoField: "ReviewedBy", + EntField: "reviewed_by", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedByGroupID", - GoField: "ReviewedByGroupID", - EntField: "reviewed_by_group_id", - Type: "string", - Required: false, + InputKey: "reviewedByGroupID", + GoField: "ReviewedByGroupID", + EntField: "reviewed_by_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedByUserID", - GoField: "ReviewedByUserID", - EntField: "reviewed_by_user_id", - Type: "string", - Required: false, + InputKey: "reviewedByUserID", + GoField: "ReviewedByUserID", + EntField: "reviewed_by_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskRating", - GoField: "RiskRating", - EntField: "risk_rating", - Type: "string", - Required: false, + InputKey: "riskRating", + GoField: "RiskRating", + EntField: "risk_rating", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskScore", - GoField: "RiskScore", - EntField: "risk_score", - Type: "int", - Required: false, + InputKey: "riskScore", + GoField: "RiskScore", + EntField: "risk_score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "soc2PeriodEnd", - GoField: "Soc2PeriodEnd", - EntField: "soc2_period_end", - Type: "time.Time", - Required: false, + InputKey: "soc2PeriodEnd", + GoField: "Soc2PeriodEnd", + EntField: "soc2_period_end", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "spendCurrency", - GoField: "SpendCurrency", - EntField: "spend_currency", - Type: "string", - Required: false, + InputKey: "spendCurrency", + GoField: "SpendCurrency", + EntField: "spend_currency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ssoEnforced", - GoField: "SsoEnforced", - EntField: "sso_enforced", - Type: "bool", - Required: false, + InputKey: "ssoEnforced", + GoField: "SsoEnforced", + EntField: "sso_enforced", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: false, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "statusPageURL", - GoField: "StatusPageURL", - EntField: "status_page_url", - Type: "string", - Required: false, + InputKey: "statusPageURL", + GoField: "StatusPageURL", + EntField: "status_page_url", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "terminationNoticeDays", - GoField: "TerminationNoticeDays", - EntField: "termination_notice_days", - Type: "int", - Required: false, + InputKey: "terminationNoticeDays", + GoField: "TerminationNoticeDays", + EntField: "termination_notice_days", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tier", - GoField: "Tier", - EntField: "tier", - Type: "string", - Required: false, + InputKey: "tier", + GoField: "Tier", + EntField: "tier", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vendorMetadata", - GoField: "VendorMetadata", - EntField: "vendor_metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "vendorMetadata", + GoField: "VendorMetadata", + EntField: "vendor_metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "annualSpend": {}, - "approvedForUse": {}, - "autoRenews": {}, - "billingModel": {}, - "contractEndDate": {}, - "contractRenewalAt": {}, - "contractStartDate": {}, - "displayName": {}, - "domains": {}, - "entityRelationshipStateID": {}, - "entityRelationshipStateName": {}, - "entitySecurityQuestionnaireStatusID": {}, + "annualSpend": {}, + "approvedForUse": {}, + "autoRenews": {}, + "billingModel": {}, + "contractEndDate": {}, + "contractRenewalAt": {}, + "contractStartDate": {}, + "displayName": {}, + "domains": {}, + "entityRelationshipStateID": {}, + "entityRelationshipStateName": {}, + "entitySecurityQuestionnaireStatusID": {}, "entitySecurityQuestionnaireStatusName": {}, - "entitySourceTypeID": {}, - "entitySourceTypeName": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "hasSoc2": {}, - "internalNotes": {}, - "internalOwner": {}, - "internalOwnerGroupID": {}, - "internalOwnerUserID": {}, - "lastReviewedAt": {}, - "links": {}, - "mfaEnforced": {}, - "mfaSupported": {}, - "name": {}, - "nextReviewAt": {}, - "observedAt": {}, - "ownerID": {}, - "providedServices": {}, - "renewalRisk": {}, - "reviewFrequency": {}, - "reviewedBy": {}, - "reviewedByGroupID": {}, - "reviewedByUserID": {}, - "riskRating": {}, - "riskScore": {}, - "scopeID": {}, - "scopeName": {}, - "soc2PeriodEnd": {}, - "spendCurrency": {}, - "ssoEnforced": {}, - "status": {}, - "statusPageURL": {}, - "systemInternalID": {}, - "tags": {}, - "terminationNoticeDays": {}, - "tier": {}, - "vendorMetadata": {}, - }, - RequiredKeys: []string{ + "entitySourceTypeID": {}, + "entitySourceTypeName": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "hasSoc2": {}, + "internalNotes": {}, + "internalOwner": {}, + "internalOwnerGroupID": {}, + "internalOwnerUserID": {}, + "lastReviewedAt": {}, + "links": {}, + "mfaEnforced": {}, + "mfaSupported": {}, + "name": {}, + "nextReviewAt": {}, + "observedAt": {}, + "ownerID": {}, + "providedServices": {}, + "renewalRisk": {}, + "reviewFrequency": {}, + "reviewedBy": {}, + "reviewedByGroupID": {}, + "reviewedByUserID": {}, + "riskRating": {}, + "riskScore": {}, + "scopeID": {}, + "scopeName": {}, + "soc2PeriodEnd": {}, + "spendCurrency": {}, + "ssoEnforced": {}, + "status": {}, + "statusPageURL": {}, + "systemInternalID": {}, + "tags": {}, + "terminationNoticeDays": {}, + "tier": {}, + "vendorMetadata": {}, }, + RequiredKeys: []string{}, UpsertKeys: []string{ "externalID", "name", @@ -2459,470 +2457,469 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Finding", Fields: []IntegrationMappingField{ { - InputKey: "assessmentID", - GoField: "AssessmentID", - EntField: "assessment_id", - Type: "string", - Required: false, + InputKey: "assessmentID", + GoField: "AssessmentID", + EntField: "assessment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "blocksProduction", - GoField: "BlocksProduction", - EntField: "blocks_production", - Type: "bool", - Required: false, + InputKey: "blocksProduction", + GoField: "BlocksProduction", + EntField: "blocks_production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "categories", - GoField: "Categories", - EntField: "categories", - Type: "json.RawMessage", - Required: false, + InputKey: "categories", + GoField: "Categories", + EntField: "categories", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "category", - GoField: "Category", - EntField: "category", - Type: "string", - Required: false, + InputKey: "category", + GoField: "Category", + EntField: "category", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "eventTime", - GoField: "EventTime", - EntField: "event_time", - Type: "time.Time", - Required: false, + InputKey: "eventTime", + GoField: "EventTime", + EntField: "event_time", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "exploitability", - GoField: "Exploitability", - EntField: "exploitability", - Type: "float64", - Required: false, + InputKey: "exploitability", + GoField: "Exploitability", + EntField: "exploitability", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalOwnerID", - GoField: "ExternalOwnerID", - EntField: "external_owner_id", - Type: "string", - Required: false, + InputKey: "externalOwnerID", + GoField: "ExternalOwnerID", + EntField: "external_owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalURI", - GoField: "ExternalURI", - EntField: "external_uri", - Type: "string", - Required: false, + InputKey: "externalURI", + GoField: "ExternalURI", + EntField: "external_uri", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingClass", - GoField: "FindingClass", - EntField: "finding_class", - Type: "string", - Required: false, + InputKey: "findingClass", + GoField: "FindingClass", + EntField: "finding_class", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingStatusID", - GoField: "FindingStatusID", - EntField: "finding_status_id", - Type: "string", - Required: false, + InputKey: "findingStatusID", + GoField: "FindingStatusID", + EntField: "finding_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingStatusName", - GoField: "FindingStatusName", - EntField: "finding_status_name", - Type: "string", - Required: false, + InputKey: "findingStatusName", + GoField: "FindingStatusName", + EntField: "finding_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "float64", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "numericSeverity", - GoField: "NumericSeverity", - EntField: "numeric_severity", - Type: "float64", - Required: false, + InputKey: "numericSeverity", + GoField: "NumericSeverity", + EntField: "numeric_severity", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "open", - GoField: "Open", - EntField: "open", - Type: "bool", - Required: false, + InputKey: "open", + GoField: "Open", + EntField: "open", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "priority", - GoField: "Priority", - EntField: "priority", - Type: "string", - Required: false, + InputKey: "priority", + GoField: "Priority", + EntField: "priority", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "production", - GoField: "Production", - EntField: "production", - Type: "bool", - Required: false, + InputKey: "production", + GoField: "Production", + EntField: "production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "public", - GoField: "Public", - EntField: "public", - Type: "bool", - Required: false, + InputKey: "public", + GoField: "Public", + EntField: "public", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "rawPayload", - GoField: "RawPayload", - EntField: "raw_payload", - Type: "json.RawMessage", - Required: false, + InputKey: "rawPayload", + GoField: "RawPayload", + EntField: "raw_payload", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "recommendation", - GoField: "Recommendation", - EntField: "recommendation", - Type: "string", - Required: false, + InputKey: "recommendation", + GoField: "Recommendation", + EntField: "recommendation", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "recommendedActions", - GoField: "RecommendedActions", - EntField: "recommended_actions", - Type: "string", - Required: false, + InputKey: "recommendedActions", + GoField: "RecommendedActions", + EntField: "recommended_actions", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "references", - GoField: "References", - EntField: "references", - Type: "json.RawMessage", - Required: false, + InputKey: "references", + GoField: "References", + EntField: "references", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "remediationSLA", - GoField: "RemediationSLA", - EntField: "remediation_sla", - Type: "int", - Required: false, + InputKey: "remediationSLA", + GoField: "RemediationSLA", + EntField: "remediation_sla", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reportedAt", - GoField: "ReportedAt", - EntField: "reported_at", - Type: "time.Time", - Required: false, + InputKey: "reportedAt", + GoField: "ReportedAt", + EntField: "reported_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "resourceName", - GoField: "ResourceName", - EntField: "resource_name", - Type: "string", - Required: false, + InputKey: "resourceName", + GoField: "ResourceName", + EntField: "resource_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "float64", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "severity", - GoField: "Severity", - EntField: "severity", - Type: "string", - Required: false, + InputKey: "severity", + GoField: "Severity", + EntField: "severity", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceUpdatedAt", - GoField: "SourceUpdatedAt", - EntField: "source_updated_at", - Type: "time.Time", - Required: false, + InputKey: "sourceUpdatedAt", + GoField: "SourceUpdatedAt", + EntField: "source_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "state", - GoField: "State", - EntField: "state", - Type: "string", - Required: false, + InputKey: "state", + GoField: "State", + EntField: "state", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "stepsToReproduce", - GoField: "StepsToReproduce", - EntField: "steps_to_reproduce", - Type: "json.RawMessage", - Required: false, + InputKey: "stepsToReproduce", + GoField: "StepsToReproduce", + EntField: "steps_to_reproduce", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "targetDetails", - GoField: "TargetDetails", - EntField: "target_details", - Type: "json.RawMessage", - Required: false, + InputKey: "targetDetails", + GoField: "TargetDetails", + EntField: "target_details", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "targets", - GoField: "Targets", - EntField: "targets", - Type: "json.RawMessage", - Required: false, + InputKey: "targets", + GoField: "Targets", + EntField: "targets", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "validated", - GoField: "Validated", - EntField: "validated", - Type: "bool", - Required: false, + InputKey: "validated", + GoField: "Validated", + EntField: "validated", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vector", - GoField: "Vector", - EntField: "vector", - Type: "string", - Required: false, + InputKey: "vector", + GoField: "Vector", + EntField: "vector", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "assessmentID": {}, - "blocksProduction": {}, - "categories": {}, - "category": {}, - "description": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "eventTime": {}, - "exploitability": {}, - "externalID": {}, - "externalOwnerID": {}, - "externalURI": {}, - "findingClass": {}, - "findingStatusID": {}, - "findingStatusName": {}, - "impact": {}, - "internalNotes": {}, - "metadata": {}, - "numericSeverity": {}, - "open": {}, - "ownerID": {}, - "priority": {}, - "production": {}, - "public": {}, - "rawPayload": {}, - "recommendation": {}, + "assessmentID": {}, + "blocksProduction": {}, + "categories": {}, + "category": {}, + "description": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "eventTime": {}, + "exploitability": {}, + "externalID": {}, + "externalOwnerID": {}, + "externalURI": {}, + "findingClass": {}, + "findingStatusID": {}, + "findingStatusName": {}, + "impact": {}, + "internalNotes": {}, + "metadata": {}, + "numericSeverity": {}, + "open": {}, + "ownerID": {}, + "priority": {}, + "production": {}, + "public": {}, + "rawPayload": {}, + "recommendation": {}, "recommendedActions": {}, - "references": {}, - "remediationSLA": {}, - "reportedAt": {}, - "resourceName": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "severity": {}, - "source": {}, - "sourceUpdatedAt": {}, - "state": {}, - "stepsToReproduce": {}, - "systemInternalID": {}, - "tags": {}, - "targetDetails": {}, - "targets": {}, - "validated": {}, - "vector": {}, - }, - RequiredKeys: []string{ + "references": {}, + "remediationSLA": {}, + "reportedAt": {}, + "resourceName": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "severity": {}, + "source": {}, + "sourceUpdatedAt": {}, + "state": {}, + "stepsToReproduce": {}, + "systemInternalID": {}, + "tags": {}, + "targetDetails": {}, + "targets": {}, + "validated": {}, + "vector": {}, }, + RequiredKeys: []string{}, UpsertKeys: []string{ "externalID", }, @@ -2932,327 +2929,327 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Risk", Fields: []IntegrationMappingField{ { - InputKey: "businessCosts", - GoField: "BusinessCosts", - EntField: "business_costs", - Type: "string", - Required: false, + InputKey: "businessCosts", + GoField: "BusinessCosts", + EntField: "business_costs", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "businessCostsJSON", - GoField: "BusinessCostsJSON", - EntField: "business_costs_json", - Type: "json.RawMessage", - Required: false, + InputKey: "businessCostsJSON", + GoField: "BusinessCostsJSON", + EntField: "business_costs_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "details", - GoField: "Details", - EntField: "details", - Type: "string", - Required: false, + InputKey: "details", + GoField: "Details", + EntField: "details", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "detailsJSON", - GoField: "DetailsJSON", - EntField: "details_json", - Type: "json.RawMessage", - Required: false, + InputKey: "detailsJSON", + GoField: "DetailsJSON", + EntField: "details_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalUUID", - GoField: "ExternalUUID", - EntField: "external_uuid", - Type: "string", - Required: false, + InputKey: "externalUUID", + GoField: "ExternalUUID", + EntField: "external_uuid", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "string", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastReviewedAt", - GoField: "LastReviewedAt", - EntField: "last_reviewed_at", - Type: "time.Time", - Required: false, + InputKey: "lastReviewedAt", + GoField: "LastReviewedAt", + EntField: "last_reviewed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "likelihood", - GoField: "Likelihood", - EntField: "likelihood", - Type: "string", - Required: false, + InputKey: "likelihood", + GoField: "Likelihood", + EntField: "likelihood", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigatedAt", - GoField: "MitigatedAt", - EntField: "mitigated_at", - Type: "time.Time", - Required: false, + InputKey: "mitigatedAt", + GoField: "MitigatedAt", + EntField: "mitigated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigation", - GoField: "Mitigation", - EntField: "mitigation", - Type: "string", - Required: false, + InputKey: "mitigation", + GoField: "Mitigation", + EntField: "mitigation", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigationJSON", - GoField: "MitigationJSON", - EntField: "mitigation_json", - Type: "json.RawMessage", - Required: false, + InputKey: "mitigationJSON", + GoField: "MitigationJSON", + EntField: "mitigation_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: true, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "nextReviewDueAt", - GoField: "NextReviewDueAt", - EntField: "next_review_due_at", - Type: "time.Time", - Required: false, + InputKey: "nextReviewDueAt", + GoField: "NextReviewDueAt", + EntField: "next_review_due_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "residualScore", - GoField: "ResidualScore", - EntField: "residual_score", - Type: "int", - Required: false, + InputKey: "residualScore", + GoField: "ResidualScore", + EntField: "residual_score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewFrequency", - GoField: "ReviewFrequency", - EntField: "review_frequency", - Type: "string", - Required: false, + InputKey: "reviewFrequency", + GoField: "ReviewFrequency", + EntField: "review_frequency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewRequired", - GoField: "ReviewRequired", - EntField: "review_required", - Type: "bool", - Required: false, + InputKey: "reviewRequired", + GoField: "ReviewRequired", + EntField: "review_required", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskCategoryID", - GoField: "RiskCategoryID", - EntField: "risk_category_id", - Type: "string", - Required: false, + InputKey: "riskCategoryID", + GoField: "RiskCategoryID", + EntField: "risk_category_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskCategoryName", - GoField: "RiskCategoryName", - EntField: "risk_category_name", - Type: "string", - Required: false, + InputKey: "riskCategoryName", + GoField: "RiskCategoryName", + EntField: "risk_category_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskDecision", - GoField: "RiskDecision", - EntField: "risk_decision", - Type: "string", - Required: false, + InputKey: "riskDecision", + GoField: "RiskDecision", + EntField: "risk_decision", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskKindID", - GoField: "RiskKindID", - EntField: "risk_kind_id", - Type: "string", - Required: false, + InputKey: "riskKindID", + GoField: "RiskKindID", + EntField: "risk_kind_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskKindName", - GoField: "RiskKindName", - EntField: "risk_kind_name", - Type: "string", - Required: false, + InputKey: "riskKindName", + GoField: "RiskKindName", + EntField: "risk_kind_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "int", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: false, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "businessCosts": {}, + "businessCosts": {}, "businessCostsJSON": {}, - "details": {}, - "detailsJSON": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "externalUUID": {}, - "impact": {}, - "integrationID": {}, - "lastReviewedAt": {}, - "likelihood": {}, - "mitigatedAt": {}, - "mitigation": {}, - "mitigationJSON": {}, - "name": {}, - "nextReviewDueAt": {}, - "observedAt": {}, - "ownerID": {}, - "residualScore": {}, - "reviewFrequency": {}, - "reviewRequired": {}, - "riskCategoryID": {}, - "riskCategoryName": {}, - "riskDecision": {}, - "riskKindID": {}, - "riskKindName": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "status": {}, - "tags": {}, + "details": {}, + "detailsJSON": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "externalUUID": {}, + "impact": {}, + "integrationID": {}, + "lastReviewedAt": {}, + "likelihood": {}, + "mitigatedAt": {}, + "mitigation": {}, + "mitigationJSON": {}, + "name": {}, + "nextReviewDueAt": {}, + "observedAt": {}, + "ownerID": {}, + "residualScore": {}, + "reviewFrequency": {}, + "reviewRequired": {}, + "riskCategoryID": {}, + "riskCategoryName": {}, + "riskDecision": {}, + "riskKindID": {}, + "riskKindName": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "name", @@ -3267,507 +3264,507 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Vulnerability", Fields: []IntegrationMappingField{ { - InputKey: "autoDismissedAt", - GoField: "AutoDismissedAt", - EntField: "auto_dismissed_at", - Type: "time.Time", - Required: false, + InputKey: "autoDismissedAt", + GoField: "AutoDismissedAt", + EntField: "auto_dismissed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "blocking", - GoField: "Blocking", - EntField: "blocking", - Type: "bool", - Required: false, + InputKey: "blocking", + GoField: "Blocking", + EntField: "blocking", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "category", - GoField: "Category", - EntField: "category", - Type: "string", - Required: false, + InputKey: "category", + GoField: "Category", + EntField: "category", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "cveID", - GoField: "CveID", - EntField: "cve_id", - Type: "string", - Required: false, + InputKey: "cveID", + GoField: "CveID", + EntField: "cve_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "cweIds", - GoField: "CweIds", - EntField: "cwe_ids", - Type: "json.RawMessage", - Required: false, + InputKey: "cweIds", + GoField: "CweIds", + EntField: "cwe_ids", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dependencyScope", - GoField: "DependencyScope", - EntField: "dependency_scope", - Type: "string", - Required: false, + InputKey: "dependencyScope", + GoField: "DependencyScope", + EntField: "dependency_scope", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "discoveredAt", - GoField: "DiscoveredAt", - EntField: "discovered_at", - Type: "time.Time", - Required: false, + InputKey: "discoveredAt", + GoField: "DiscoveredAt", + EntField: "discovered_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedAt", - GoField: "DismissedAt", - EntField: "dismissed_at", - Type: "time.Time", - Required: false, + InputKey: "dismissedAt", + GoField: "DismissedAt", + EntField: "dismissed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedComment", - GoField: "DismissedComment", - EntField: "dismissed_comment", - Type: "string", - Required: false, + InputKey: "dismissedComment", + GoField: "DismissedComment", + EntField: "dismissed_comment", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedReason", - GoField: "DismissedReason", - EntField: "dismissed_reason", - Type: "string", - Required: false, + InputKey: "dismissedReason", + GoField: "DismissedReason", + EntField: "dismissed_reason", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "exploitability", - GoField: "Exploitability", - EntField: "exploitability", - Type: "float64", - Required: false, + InputKey: "exploitability", + GoField: "Exploitability", + EntField: "exploitability", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalOwnerID", - GoField: "ExternalOwnerID", - EntField: "external_owner_id", - Type: "string", - Required: false, + InputKey: "externalOwnerID", + GoField: "ExternalOwnerID", + EntField: "external_owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalURI", - GoField: "ExternalURI", - EntField: "external_uri", - Type: "string", - Required: false, + InputKey: "externalURI", + GoField: "ExternalURI", + EntField: "external_uri", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstPatchedVersion", - GoField: "FirstPatchedVersion", - EntField: "first_patched_version", - Type: "string", - Required: false, + InputKey: "firstPatchedVersion", + GoField: "FirstPatchedVersion", + EntField: "first_patched_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "fixedAt", - GoField: "FixedAt", - EntField: "fixed_at", - Type: "time.Time", - Required: false, + InputKey: "fixedAt", + GoField: "FixedAt", + EntField: "fixed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "float64", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impacts", - GoField: "Impacts", - EntField: "impacts", - Type: "json.RawMessage", - Required: false, + InputKey: "impacts", + GoField: "Impacts", + EntField: "impacts", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "manifestPath", - GoField: "ManifestPath", - EntField: "manifest_path", - Type: "string", - Required: false, + InputKey: "manifestPath", + GoField: "ManifestPath", + EntField: "manifest_path", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "open", - GoField: "Open", - EntField: "open", - Type: "bool", - Required: false, + InputKey: "open", + GoField: "Open", + EntField: "open", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "packageEcosystem", - GoField: "PackageEcosystem", - EntField: "package_ecosystem", - Type: "string", - Required: false, + InputKey: "packageEcosystem", + GoField: "PackageEcosystem", + EntField: "package_ecosystem", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "packageName", - GoField: "PackageName", - EntField: "package_name", - Type: "string", - Required: false, + InputKey: "packageName", + GoField: "PackageName", + EntField: "package_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "priority", - GoField: "Priority", - EntField: "priority", - Type: "string", - Required: false, + InputKey: "priority", + GoField: "Priority", + EntField: "priority", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "production", - GoField: "Production", - EntField: "production", - Type: "bool", - Required: false, + InputKey: "production", + GoField: "Production", + EntField: "production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "public", - GoField: "Public", - EntField: "public", - Type: "bool", - Required: false, + InputKey: "public", + GoField: "Public", + EntField: "public", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "publishedAt", - GoField: "PublishedAt", - EntField: "published_at", - Type: "time.Time", - Required: false, + InputKey: "publishedAt", + GoField: "PublishedAt", + EntField: "published_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "rawPayload", - GoField: "RawPayload", - EntField: "raw_payload", - Type: "json.RawMessage", - Required: false, + InputKey: "rawPayload", + GoField: "RawPayload", + EntField: "raw_payload", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "references", - GoField: "References", - EntField: "references", - Type: "json.RawMessage", - Required: false, + InputKey: "references", + GoField: "References", + EntField: "references", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "remediationSLA", - GoField: "RemediationSLA", - EntField: "remediation_sla", - Type: "int", - Required: false, + InputKey: "remediationSLA", + GoField: "RemediationSLA", + EntField: "remediation_sla", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "float64", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "severity", - GoField: "Severity", - EntField: "severity", - Type: "string", - Required: false, + InputKey: "severity", + GoField: "Severity", + EntField: "severity", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceUpdatedAt", - GoField: "SourceUpdatedAt", - EntField: "source_updated_at", - Type: "time.Time", - Required: false, + InputKey: "sourceUpdatedAt", + GoField: "SourceUpdatedAt", + EntField: "source_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "summary", - GoField: "Summary", - EntField: "summary", - Type: "string", - Required: false, + InputKey: "summary", + GoField: "Summary", + EntField: "summary", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "validated", - GoField: "Validated", - EntField: "validated", - Type: "bool", - Required: false, + InputKey: "validated", + GoField: "Validated", + EntField: "validated", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vector", - GoField: "Vector", - EntField: "vector", - Type: "string", - Required: false, + InputKey: "vector", + GoField: "Vector", + EntField: "vector", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerabilityStatusID", - GoField: "VulnerabilityStatusID", - EntField: "vulnerability_status_id", - Type: "string", - Required: false, + InputKey: "vulnerabilityStatusID", + GoField: "VulnerabilityStatusID", + EntField: "vulnerability_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerabilityStatusName", - GoField: "VulnerabilityStatusName", - EntField: "vulnerability_status_name", - Type: "string", - Required: false, + InputKey: "vulnerabilityStatusName", + GoField: "VulnerabilityStatusName", + EntField: "vulnerability_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerableVersionRange", - GoField: "VulnerableVersionRange", - EntField: "vulnerable_version_range", - Type: "string", - Required: false, + InputKey: "vulnerableVersionRange", + GoField: "VulnerableVersionRange", + EntField: "vulnerable_version_range", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "autoDismissedAt": {}, - "blocking": {}, - "category": {}, - "cveID": {}, - "cweIds": {}, - "dependencyScope": {}, - "description": {}, - "discoveredAt": {}, - "dismissedAt": {}, - "dismissedComment": {}, - "dismissedReason": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "exploitability": {}, - "externalID": {}, - "externalOwnerID": {}, - "externalURI": {}, - "firstPatchedVersion": {}, - "fixedAt": {}, - "impact": {}, - "impacts": {}, - "internalNotes": {}, - "manifestPath": {}, - "metadata": {}, - "open": {}, - "ownerID": {}, - "packageEcosystem": {}, - "packageName": {}, - "priority": {}, - "production": {}, - "public": {}, - "publishedAt": {}, - "rawPayload": {}, - "references": {}, - "remediationSLA": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "severity": {}, - "source": {}, - "sourceUpdatedAt": {}, - "summary": {}, - "systemInternalID": {}, - "tags": {}, - "validated": {}, - "vector": {}, - "vulnerabilityStatusID": {}, + "autoDismissedAt": {}, + "blocking": {}, + "category": {}, + "cveID": {}, + "cweIds": {}, + "dependencyScope": {}, + "description": {}, + "discoveredAt": {}, + "dismissedAt": {}, + "dismissedComment": {}, + "dismissedReason": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "exploitability": {}, + "externalID": {}, + "externalOwnerID": {}, + "externalURI": {}, + "firstPatchedVersion": {}, + "fixedAt": {}, + "impact": {}, + "impacts": {}, + "internalNotes": {}, + "manifestPath": {}, + "metadata": {}, + "open": {}, + "ownerID": {}, + "packageEcosystem": {}, + "packageName": {}, + "priority": {}, + "production": {}, + "public": {}, + "publishedAt": {}, + "rawPayload": {}, + "references": {}, + "remediationSLA": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "severity": {}, + "source": {}, + "sourceUpdatedAt": {}, + "summary": {}, + "systemInternalID": {}, + "tags": {}, + "validated": {}, + "vector": {}, + "vulnerabilityStatusID": {}, "vulnerabilityStatusName": {}, - "vulnerableVersionRange": {}, + "vulnerableVersionRange": {}, }, RequiredKeys: []string{ "externalID", diff --git a/internal/ent/schema/organizationsetting.go b/internal/ent/schema/organizationsetting.go index 8f01988994..6f427a8b02 100644 --- a/internal/ent/schema/organizationsetting.go +++ b/internal/ent/schema/organizationsetting.go @@ -9,6 +9,9 @@ import ( "entgo.io/ent/schema" "entgo.io/ent/schema/field" "github.com/gertd/go-pluralize" + "github.com/theopenlane/iam/entfga" + "github.com/theopenlane/utils/keygen" + "github.com/theopenlane/core/common/enums" "github.com/theopenlane/core/common/models" "github.com/theopenlane/core/internal/ent/generated" @@ -16,8 +19,6 @@ import ( "github.com/theopenlane/core/internal/ent/interceptors" "github.com/theopenlane/core/internal/ent/privacy/policy" "github.com/theopenlane/core/internal/ent/validator" - "github.com/theopenlane/iam/entfga" - "github.com/theopenlane/utils/keygen" ) // OrganizationSetting holds the schema definition for the OrganizationSetting entity @@ -156,6 +157,14 @@ func (OrganizationSetting) Fields() []ent.Field { ). Default(false). Comment("whether or not a payment method has been added to the account"), + field.Time("pending_deletion_at"). + Comment("when will this organization be deleted? usually this is after org has not added a payment method afte n period"). + GoType(models.DateTime{}). + Optional(). + Nillable(). + Annotations( + entgql.Skip(entgql.SkipMutationCreateInput | entgql.SkipMutationUpdateInput), + ), } } diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index 7c42969f39..b342411b4f 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1 +1 @@ -4b7e0c8a2045c613368dd1c04ce2976a1a4d132fa088f2605de688e4aa3f3dd7 \ No newline at end of file +ca53205da473ccc07ac75235ada6d985dd823e3bc1b74467a5c98ffcd4dc56a3 \ No newline at end of file diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index e4663399b9..6b64870c5f 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1 +1 @@ -2663e47f6208e1d97ba8e1032842640253b907f3758bd4428ac5a18f0dc0ffaa \ No newline at end of file +df75b5bd6bd0c7afbb2a947593221bf36228aff14ae0f01307eb996724602398 \ No newline at end of file diff --git a/internal/graphapi/clientschema/checksum/.schema_checksum b/internal/graphapi/clientschema/checksum/.schema_checksum index 216e1e3b1e..6e4b5ac28a 100644 --- a/internal/graphapi/clientschema/checksum/.schema_checksum +++ b/internal/graphapi/clientschema/checksum/.schema_checksum @@ -1 +1 @@ -ada1325ce9078925ca51d7da78ed4007f100a5c0084880c8a8f50321f3cf9800 \ No newline at end of file +118dc7f6b5222bc34c0094a1efaa9cca9399d716017455a7c5b10682924c4978 \ No newline at end of file diff --git a/internal/graphapi/clientschema/schema.graphql b/internal/graphapi/clientschema/schema.graphql index eb18493ac7..986c1ecaa6 100644 --- a/internal/graphapi/clientschema/schema.graphql +++ b/internal/graphapi/clientschema/schema.graphql @@ -55327,6 +55327,10 @@ type OrganizationSetting implements Node { whether or not a payment method has been added to the account """ paymentMethodAdded: Boolean! + """ + when will this organization be deleted? usually this is after org has not added a payment method afte n period + """ + pendingDeletionAt: DateTime organization: Organization files( """ @@ -55872,6 +55876,19 @@ input OrganizationSettingWhereInput { complianceWebhookTokenEqualFold: String complianceWebhookTokenContainsFold: String """ + pending_deletion_at field predicates + """ + pendingDeletionAt: DateTime + pendingDeletionAtNEQ: DateTime + pendingDeletionAtIn: [DateTime!] + pendingDeletionAtNotIn: [DateTime!] + pendingDeletionAtGT: DateTime + pendingDeletionAtGTE: DateTime + pendingDeletionAtLT: DateTime + pendingDeletionAtLTE: DateTime + pendingDeletionAtIsNil: Boolean + pendingDeletionAtNotNil: Boolean + """ organization edge predicates """ hasOrganization: Boolean diff --git a/internal/graphapi/generated/ent.generated.go b/internal/graphapi/generated/ent.generated.go index 5770ca4625..515fa832aa 100644 --- a/internal/graphapi/generated/ent.generated.go +++ b/internal/graphapi/generated/ent.generated.go @@ -88268,6 +88268,8 @@ func (ec *executionContext) fieldContext_File_organizationSetting(_ context.Cont return ec.fieldContext_OrganizationSetting_complianceWebhookToken(ctx, field) case "paymentMethodAdded": return ec.fieldContext_OrganizationSetting_paymentMethodAdded(ctx, field) + case "pendingDeletionAt": + return ec.fieldContext_OrganizationSetting_pendingDeletionAt(ctx, field) case "organization": return ec.fieldContext_OrganizationSetting_organization(ctx, field) case "files": @@ -130132,6 +130134,8 @@ func (ec *executionContext) fieldContext_Organization_setting(_ context.Context, return ec.fieldContext_OrganizationSetting_complianceWebhookToken(ctx, field) case "paymentMethodAdded": return ec.fieldContext_OrganizationSetting_paymentMethodAdded(ctx, field) + case "pendingDeletionAt": + return ec.fieldContext_OrganizationSetting_pendingDeletionAt(ctx, field) case "organization": return ec.fieldContext_OrganizationSetting_organization(ctx, field) case "files": @@ -135414,6 +135418,35 @@ func (ec *executionContext) fieldContext_OrganizationSetting_paymentMethodAdded( return fc, nil } +func (ec *executionContext) _OrganizationSetting_pendingDeletionAt(ctx context.Context, field graphql.CollectedField, obj *generated.OrganizationSetting) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_OrganizationSetting_pendingDeletionAt, + func(ctx context.Context) (any, error) { + return obj.PendingDeletionAt, nil + }, + nil, + ec.marshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime, + true, + false, + ) +} + +func (ec *executionContext) fieldContext_OrganizationSetting_pendingDeletionAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "OrganizationSetting", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type DateTime does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _OrganizationSetting_organization(ctx context.Context, field graphql.CollectedField, obj *generated.OrganizationSetting) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, @@ -135921,6 +135954,8 @@ func (ec *executionContext) fieldContext_OrganizationSettingEdge_node(_ context. return ec.fieldContext_OrganizationSetting_complianceWebhookToken(ctx, field) case "paymentMethodAdded": return ec.fieldContext_OrganizationSetting_paymentMethodAdded(ctx, field) + case "pendingDeletionAt": + return ec.fieldContext_OrganizationSetting_pendingDeletionAt(ctx, field) case "organization": return ec.fieldContext_OrganizationSetting_organization(ctx, field) case "files": @@ -159906,6 +159941,8 @@ func (ec *executionContext) fieldContext_Query_organizationSetting(ctx context.C return ec.fieldContext_OrganizationSetting_complianceWebhookToken(ctx, field) case "paymentMethodAdded": return ec.fieldContext_OrganizationSetting_paymentMethodAdded(ctx, field) + case "pendingDeletionAt": + return ec.fieldContext_OrganizationSetting_pendingDeletionAt(ctx, field) case "organization": return ec.fieldContext_OrganizationSetting_organization(ctx, field) case "files": @@ -344307,7 +344344,7 @@ func (ec *executionContext) unmarshalInputOrganizationSettingWhereInput(ctx cont asMap[k] = v } - fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "idEqualFold", "idContainsFold", "createdAt", "createdAtNEQ", "createdAtIn", "createdAtNotIn", "createdAtGT", "createdAtGTE", "createdAtLT", "createdAtLTE", "createdAtIsNil", "createdAtNotNil", "updatedAt", "updatedAtNEQ", "updatedAtIn", "updatedAtNotIn", "updatedAtGT", "updatedAtGTE", "updatedAtLT", "updatedAtLTE", "updatedAtIsNil", "updatedAtNotNil", "createdBy", "createdByNEQ", "createdByIn", "createdByNotIn", "createdByGT", "createdByGTE", "createdByLT", "createdByLTE", "createdByContains", "createdByHasPrefix", "createdByHasSuffix", "createdByIsNil", "createdByNotNil", "createdByEqualFold", "createdByContainsFold", "updatedBy", "updatedByNEQ", "updatedByIn", "updatedByNotIn", "updatedByGT", "updatedByGTE", "updatedByLT", "updatedByLTE", "updatedByContains", "updatedByHasPrefix", "updatedByHasSuffix", "updatedByIsNil", "updatedByNotNil", "updatedByEqualFold", "updatedByContainsFold", "billingContact", "billingContactNEQ", "billingContactIn", "billingContactNotIn", "billingContactGT", "billingContactGTE", "billingContactLT", "billingContactLTE", "billingContactContains", "billingContactHasPrefix", "billingContactHasSuffix", "billingContactIsNil", "billingContactNotNil", "billingContactEqualFold", "billingContactContainsFold", "billingEmail", "billingEmailNEQ", "billingEmailIn", "billingEmailNotIn", "billingEmailGT", "billingEmailGTE", "billingEmailLT", "billingEmailLTE", "billingEmailContains", "billingEmailHasPrefix", "billingEmailHasSuffix", "billingEmailIsNil", "billingEmailNotNil", "billingEmailEqualFold", "billingEmailContainsFold", "billingPhone", "billingPhoneNEQ", "billingPhoneIn", "billingPhoneNotIn", "billingPhoneGT", "billingPhoneGTE", "billingPhoneLT", "billingPhoneLTE", "billingPhoneContains", "billingPhoneHasPrefix", "billingPhoneHasSuffix", "billingPhoneIsNil", "billingPhoneNotNil", "billingPhoneEqualFold", "billingPhoneContainsFold", "taxIdentifier", "taxIdentifierNEQ", "taxIdentifierIn", "taxIdentifierNotIn", "taxIdentifierGT", "taxIdentifierGTE", "taxIdentifierLT", "taxIdentifierLTE", "taxIdentifierContains", "taxIdentifierHasPrefix", "taxIdentifierHasSuffix", "taxIdentifierIsNil", "taxIdentifierNotNil", "taxIdentifierEqualFold", "taxIdentifierContainsFold", "geoLocation", "geoLocationNEQ", "geoLocationIn", "geoLocationNotIn", "geoLocationIsNil", "geoLocationNotNil", "organizationID", "organizationIDNEQ", "organizationIDIn", "organizationIDNotIn", "organizationIDGT", "organizationIDGTE", "organizationIDLT", "organizationIDLTE", "organizationIDContains", "organizationIDHasPrefix", "organizationIDHasSuffix", "organizationIDIsNil", "organizationIDNotNil", "organizationIDEqualFold", "organizationIDContainsFold", "billingNotificationsEnabled", "billingNotificationsEnabledNEQ", "allowMatchingDomainsAutojoin", "allowMatchingDomainsAutojoinNEQ", "allowMatchingDomainsAutojoinIsNil", "allowMatchingDomainsAutojoinNotNil", "identityProvider", "identityProviderNEQ", "identityProviderIn", "identityProviderNotIn", "identityProviderIsNil", "identityProviderNotNil", "identityProviderClientID", "identityProviderClientIDNEQ", "identityProviderClientIDIn", "identityProviderClientIDNotIn", "identityProviderClientIDGT", "identityProviderClientIDGTE", "identityProviderClientIDLT", "identityProviderClientIDLTE", "identityProviderClientIDContains", "identityProviderClientIDHasPrefix", "identityProviderClientIDHasSuffix", "identityProviderClientIDIsNil", "identityProviderClientIDNotNil", "identityProviderClientIDEqualFold", "identityProviderClientIDContainsFold", "identityProviderClientSecret", "identityProviderClientSecretNEQ", "identityProviderClientSecretIn", "identityProviderClientSecretNotIn", "identityProviderClientSecretGT", "identityProviderClientSecretGTE", "identityProviderClientSecretLT", "identityProviderClientSecretLTE", "identityProviderClientSecretContains", "identityProviderClientSecretHasPrefix", "identityProviderClientSecretHasSuffix", "identityProviderClientSecretIsNil", "identityProviderClientSecretNotNil", "identityProviderClientSecretEqualFold", "identityProviderClientSecretContainsFold", "identityProviderMetadataEndpoint", "identityProviderMetadataEndpointNEQ", "identityProviderMetadataEndpointIn", "identityProviderMetadataEndpointNotIn", "identityProviderMetadataEndpointGT", "identityProviderMetadataEndpointGTE", "identityProviderMetadataEndpointLT", "identityProviderMetadataEndpointLTE", "identityProviderMetadataEndpointContains", "identityProviderMetadataEndpointHasPrefix", "identityProviderMetadataEndpointHasSuffix", "identityProviderMetadataEndpointIsNil", "identityProviderMetadataEndpointNotNil", "identityProviderMetadataEndpointEqualFold", "identityProviderMetadataEndpointContainsFold", "identityProviderAuthTested", "identityProviderAuthTestedNEQ", "identityProviderEntityID", "identityProviderEntityIDNEQ", "identityProviderEntityIDIn", "identityProviderEntityIDNotIn", "identityProviderEntityIDGT", "identityProviderEntityIDGTE", "identityProviderEntityIDLT", "identityProviderEntityIDLTE", "identityProviderEntityIDContains", "identityProviderEntityIDHasPrefix", "identityProviderEntityIDHasSuffix", "identityProviderEntityIDIsNil", "identityProviderEntityIDNotNil", "identityProviderEntityIDEqualFold", "identityProviderEntityIDContainsFold", "oidcDiscoveryEndpoint", "oidcDiscoveryEndpointNEQ", "oidcDiscoveryEndpointIn", "oidcDiscoveryEndpointNotIn", "oidcDiscoveryEndpointGT", "oidcDiscoveryEndpointGTE", "oidcDiscoveryEndpointLT", "oidcDiscoveryEndpointLTE", "oidcDiscoveryEndpointContains", "oidcDiscoveryEndpointHasPrefix", "oidcDiscoveryEndpointHasSuffix", "oidcDiscoveryEndpointIsNil", "oidcDiscoveryEndpointNotNil", "oidcDiscoveryEndpointEqualFold", "oidcDiscoveryEndpointContainsFold", "samlSigninURL", "samlSigninURLNEQ", "samlSigninURLIn", "samlSigninURLNotIn", "samlSigninURLGT", "samlSigninURLGTE", "samlSigninURLLT", "samlSigninURLLTE", "samlSigninURLContains", "samlSigninURLHasPrefix", "samlSigninURLHasSuffix", "samlSigninURLIsNil", "samlSigninURLNotNil", "samlSigninURLEqualFold", "samlSigninURLContainsFold", "samlIssuer", "samlIssuerNEQ", "samlIssuerIn", "samlIssuerNotIn", "samlIssuerGT", "samlIssuerGTE", "samlIssuerLT", "samlIssuerLTE", "samlIssuerContains", "samlIssuerHasPrefix", "samlIssuerHasSuffix", "samlIssuerIsNil", "samlIssuerNotNil", "samlIssuerEqualFold", "samlIssuerContainsFold", "samlCert", "samlCertNEQ", "samlCertIn", "samlCertNotIn", "samlCertGT", "samlCertGTE", "samlCertLT", "samlCertLTE", "samlCertContains", "samlCertHasPrefix", "samlCertHasSuffix", "samlCertIsNil", "samlCertNotNil", "samlCertEqualFold", "samlCertContainsFold", "identityProviderLoginEnforced", "identityProviderLoginEnforcedNEQ", "multifactorAuthEnforced", "multifactorAuthEnforcedNEQ", "multifactorAuthEnforcedIsNil", "multifactorAuthEnforcedNotNil", "complianceWebhookToken", "complianceWebhookTokenNEQ", "complianceWebhookTokenIn", "complianceWebhookTokenNotIn", "complianceWebhookTokenGT", "complianceWebhookTokenGTE", "complianceWebhookTokenLT", "complianceWebhookTokenLTE", "complianceWebhookTokenContains", "complianceWebhookTokenHasPrefix", "complianceWebhookTokenHasSuffix", "complianceWebhookTokenIsNil", "complianceWebhookTokenNotNil", "complianceWebhookTokenEqualFold", "complianceWebhookTokenContainsFold", "hasOrganization", "hasOrganizationWith", "hasFiles", "hasFilesWith", "tagsHas", "domainsHas", "allowedEmailDomainsHas"} + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "idEqualFold", "idContainsFold", "createdAt", "createdAtNEQ", "createdAtIn", "createdAtNotIn", "createdAtGT", "createdAtGTE", "createdAtLT", "createdAtLTE", "createdAtIsNil", "createdAtNotNil", "updatedAt", "updatedAtNEQ", "updatedAtIn", "updatedAtNotIn", "updatedAtGT", "updatedAtGTE", "updatedAtLT", "updatedAtLTE", "updatedAtIsNil", "updatedAtNotNil", "createdBy", "createdByNEQ", "createdByIn", "createdByNotIn", "createdByGT", "createdByGTE", "createdByLT", "createdByLTE", "createdByContains", "createdByHasPrefix", "createdByHasSuffix", "createdByIsNil", "createdByNotNil", "createdByEqualFold", "createdByContainsFold", "updatedBy", "updatedByNEQ", "updatedByIn", "updatedByNotIn", "updatedByGT", "updatedByGTE", "updatedByLT", "updatedByLTE", "updatedByContains", "updatedByHasPrefix", "updatedByHasSuffix", "updatedByIsNil", "updatedByNotNil", "updatedByEqualFold", "updatedByContainsFold", "billingContact", "billingContactNEQ", "billingContactIn", "billingContactNotIn", "billingContactGT", "billingContactGTE", "billingContactLT", "billingContactLTE", "billingContactContains", "billingContactHasPrefix", "billingContactHasSuffix", "billingContactIsNil", "billingContactNotNil", "billingContactEqualFold", "billingContactContainsFold", "billingEmail", "billingEmailNEQ", "billingEmailIn", "billingEmailNotIn", "billingEmailGT", "billingEmailGTE", "billingEmailLT", "billingEmailLTE", "billingEmailContains", "billingEmailHasPrefix", "billingEmailHasSuffix", "billingEmailIsNil", "billingEmailNotNil", "billingEmailEqualFold", "billingEmailContainsFold", "billingPhone", "billingPhoneNEQ", "billingPhoneIn", "billingPhoneNotIn", "billingPhoneGT", "billingPhoneGTE", "billingPhoneLT", "billingPhoneLTE", "billingPhoneContains", "billingPhoneHasPrefix", "billingPhoneHasSuffix", "billingPhoneIsNil", "billingPhoneNotNil", "billingPhoneEqualFold", "billingPhoneContainsFold", "taxIdentifier", "taxIdentifierNEQ", "taxIdentifierIn", "taxIdentifierNotIn", "taxIdentifierGT", "taxIdentifierGTE", "taxIdentifierLT", "taxIdentifierLTE", "taxIdentifierContains", "taxIdentifierHasPrefix", "taxIdentifierHasSuffix", "taxIdentifierIsNil", "taxIdentifierNotNil", "taxIdentifierEqualFold", "taxIdentifierContainsFold", "geoLocation", "geoLocationNEQ", "geoLocationIn", "geoLocationNotIn", "geoLocationIsNil", "geoLocationNotNil", "organizationID", "organizationIDNEQ", "organizationIDIn", "organizationIDNotIn", "organizationIDGT", "organizationIDGTE", "organizationIDLT", "organizationIDLTE", "organizationIDContains", "organizationIDHasPrefix", "organizationIDHasSuffix", "organizationIDIsNil", "organizationIDNotNil", "organizationIDEqualFold", "organizationIDContainsFold", "billingNotificationsEnabled", "billingNotificationsEnabledNEQ", "allowMatchingDomainsAutojoin", "allowMatchingDomainsAutojoinNEQ", "allowMatchingDomainsAutojoinIsNil", "allowMatchingDomainsAutojoinNotNil", "identityProvider", "identityProviderNEQ", "identityProviderIn", "identityProviderNotIn", "identityProviderIsNil", "identityProviderNotNil", "identityProviderClientID", "identityProviderClientIDNEQ", "identityProviderClientIDIn", "identityProviderClientIDNotIn", "identityProviderClientIDGT", "identityProviderClientIDGTE", "identityProviderClientIDLT", "identityProviderClientIDLTE", "identityProviderClientIDContains", "identityProviderClientIDHasPrefix", "identityProviderClientIDHasSuffix", "identityProviderClientIDIsNil", "identityProviderClientIDNotNil", "identityProviderClientIDEqualFold", "identityProviderClientIDContainsFold", "identityProviderClientSecret", "identityProviderClientSecretNEQ", "identityProviderClientSecretIn", "identityProviderClientSecretNotIn", "identityProviderClientSecretGT", "identityProviderClientSecretGTE", "identityProviderClientSecretLT", "identityProviderClientSecretLTE", "identityProviderClientSecretContains", "identityProviderClientSecretHasPrefix", "identityProviderClientSecretHasSuffix", "identityProviderClientSecretIsNil", "identityProviderClientSecretNotNil", "identityProviderClientSecretEqualFold", "identityProviderClientSecretContainsFold", "identityProviderMetadataEndpoint", "identityProviderMetadataEndpointNEQ", "identityProviderMetadataEndpointIn", "identityProviderMetadataEndpointNotIn", "identityProviderMetadataEndpointGT", "identityProviderMetadataEndpointGTE", "identityProviderMetadataEndpointLT", "identityProviderMetadataEndpointLTE", "identityProviderMetadataEndpointContains", "identityProviderMetadataEndpointHasPrefix", "identityProviderMetadataEndpointHasSuffix", "identityProviderMetadataEndpointIsNil", "identityProviderMetadataEndpointNotNil", "identityProviderMetadataEndpointEqualFold", "identityProviderMetadataEndpointContainsFold", "identityProviderAuthTested", "identityProviderAuthTestedNEQ", "identityProviderEntityID", "identityProviderEntityIDNEQ", "identityProviderEntityIDIn", "identityProviderEntityIDNotIn", "identityProviderEntityIDGT", "identityProviderEntityIDGTE", "identityProviderEntityIDLT", "identityProviderEntityIDLTE", "identityProviderEntityIDContains", "identityProviderEntityIDHasPrefix", "identityProviderEntityIDHasSuffix", "identityProviderEntityIDIsNil", "identityProviderEntityIDNotNil", "identityProviderEntityIDEqualFold", "identityProviderEntityIDContainsFold", "oidcDiscoveryEndpoint", "oidcDiscoveryEndpointNEQ", "oidcDiscoveryEndpointIn", "oidcDiscoveryEndpointNotIn", "oidcDiscoveryEndpointGT", "oidcDiscoveryEndpointGTE", "oidcDiscoveryEndpointLT", "oidcDiscoveryEndpointLTE", "oidcDiscoveryEndpointContains", "oidcDiscoveryEndpointHasPrefix", "oidcDiscoveryEndpointHasSuffix", "oidcDiscoveryEndpointIsNil", "oidcDiscoveryEndpointNotNil", "oidcDiscoveryEndpointEqualFold", "oidcDiscoveryEndpointContainsFold", "samlSigninURL", "samlSigninURLNEQ", "samlSigninURLIn", "samlSigninURLNotIn", "samlSigninURLGT", "samlSigninURLGTE", "samlSigninURLLT", "samlSigninURLLTE", "samlSigninURLContains", "samlSigninURLHasPrefix", "samlSigninURLHasSuffix", "samlSigninURLIsNil", "samlSigninURLNotNil", "samlSigninURLEqualFold", "samlSigninURLContainsFold", "samlIssuer", "samlIssuerNEQ", "samlIssuerIn", "samlIssuerNotIn", "samlIssuerGT", "samlIssuerGTE", "samlIssuerLT", "samlIssuerLTE", "samlIssuerContains", "samlIssuerHasPrefix", "samlIssuerHasSuffix", "samlIssuerIsNil", "samlIssuerNotNil", "samlIssuerEqualFold", "samlIssuerContainsFold", "samlCert", "samlCertNEQ", "samlCertIn", "samlCertNotIn", "samlCertGT", "samlCertGTE", "samlCertLT", "samlCertLTE", "samlCertContains", "samlCertHasPrefix", "samlCertHasSuffix", "samlCertIsNil", "samlCertNotNil", "samlCertEqualFold", "samlCertContainsFold", "identityProviderLoginEnforced", "identityProviderLoginEnforcedNEQ", "multifactorAuthEnforced", "multifactorAuthEnforcedNEQ", "multifactorAuthEnforcedIsNil", "multifactorAuthEnforcedNotNil", "complianceWebhookToken", "complianceWebhookTokenNEQ", "complianceWebhookTokenIn", "complianceWebhookTokenNotIn", "complianceWebhookTokenGT", "complianceWebhookTokenGTE", "complianceWebhookTokenLT", "complianceWebhookTokenLTE", "complianceWebhookTokenContains", "complianceWebhookTokenHasPrefix", "complianceWebhookTokenHasSuffix", "complianceWebhookTokenIsNil", "complianceWebhookTokenNotNil", "complianceWebhookTokenEqualFold", "complianceWebhookTokenContainsFold", "pendingDeletionAt", "pendingDeletionAtNEQ", "pendingDeletionAtIn", "pendingDeletionAtNotIn", "pendingDeletionAtGT", "pendingDeletionAtGTE", "pendingDeletionAtLT", "pendingDeletionAtLTE", "pendingDeletionAtIsNil", "pendingDeletionAtNotNil", "hasOrganization", "hasOrganizationWith", "hasFiles", "hasFilesWith", "tagsHas", "domainsHas", "allowedEmailDomainsHas"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -346407,6 +346444,76 @@ func (ec *executionContext) unmarshalInputOrganizationSettingWhereInput(ctx cont return it, err } it.ComplianceWebhookTokenContainsFold = data + case "pendingDeletionAt": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAt")) + data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAt = data + case "pendingDeletionAtNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtNEQ")) + data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtNEQ = data + case "pendingDeletionAtIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtIn")) + data, err := ec.unmarshalODateTime2ᚕgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTimeᚄ(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtIn = data + case "pendingDeletionAtNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtNotIn")) + data, err := ec.unmarshalODateTime2ᚕgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTimeᚄ(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtNotIn = data + case "pendingDeletionAtGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtGT")) + data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtGT = data + case "pendingDeletionAtGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtGTE")) + data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtGTE = data + case "pendingDeletionAtLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtLT")) + data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtLT = data + case "pendingDeletionAtLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtLTE")) + data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtLTE = data + case "pendingDeletionAtIsNil": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtIsNil")) + data, err := ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtIsNil = data + case "pendingDeletionAtNotNil": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtNotNil")) + data, err := ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtNotNil = data case "hasOrganization": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasOrganization")) data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) @@ -497077,6 +497184,8 @@ func (ec *executionContext) _OrganizationSetting(ctx context.Context, sel ast.Se if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } + case "pendingDeletionAt": + out.Values[i] = ec._OrganizationSetting_pendingDeletionAt(ctx, field, obj) case "organization": field := field diff --git a/internal/graphapi/generated/organizationsetting.generated.go b/internal/graphapi/generated/organizationsetting.generated.go index 01c4404937..fe4b34fe7e 100644 --- a/internal/graphapi/generated/organizationsetting.generated.go +++ b/internal/graphapi/generated/organizationsetting.generated.go @@ -114,6 +114,8 @@ func (ec *executionContext) fieldContext_OrganizationSettingBulkCreatePayload_or return ec.fieldContext_OrganizationSetting_complianceWebhookToken(ctx, field) case "paymentMethodAdded": return ec.fieldContext_OrganizationSetting_paymentMethodAdded(ctx, field) + case "pendingDeletionAt": + return ec.fieldContext_OrganizationSetting_pendingDeletionAt(ctx, field) case "organization": return ec.fieldContext_OrganizationSetting_organization(ctx, field) case "files": @@ -240,6 +242,8 @@ func (ec *executionContext) fieldContext_OrganizationSettingBulkUpdatePayload_or return ec.fieldContext_OrganizationSetting_complianceWebhookToken(ctx, field) case "paymentMethodAdded": return ec.fieldContext_OrganizationSetting_paymentMethodAdded(ctx, field) + case "pendingDeletionAt": + return ec.fieldContext_OrganizationSetting_pendingDeletionAt(ctx, field) case "organization": return ec.fieldContext_OrganizationSetting_organization(ctx, field) case "files": @@ -366,6 +370,8 @@ func (ec *executionContext) fieldContext_OrganizationSettingCreatePayload_organi return ec.fieldContext_OrganizationSetting_complianceWebhookToken(ctx, field) case "paymentMethodAdded": return ec.fieldContext_OrganizationSetting_paymentMethodAdded(ctx, field) + case "pendingDeletionAt": + return ec.fieldContext_OrganizationSetting_pendingDeletionAt(ctx, field) case "organization": return ec.fieldContext_OrganizationSetting_organization(ctx, field) case "files": @@ -492,6 +498,8 @@ func (ec *executionContext) fieldContext_OrganizationSettingUpdatePayload_organi return ec.fieldContext_OrganizationSetting_complianceWebhookToken(ctx, field) case "paymentMethodAdded": return ec.fieldContext_OrganizationSetting_paymentMethodAdded(ctx, field) + case "pendingDeletionAt": + return ec.fieldContext_OrganizationSetting_pendingDeletionAt(ctx, field) case "organization": return ec.fieldContext_OrganizationSetting_organization(ctx, field) case "files": diff --git a/internal/graphapi/generated/root_.generated.go b/internal/graphapi/generated/root_.generated.go index 9f3bcd3038..8bf9cdf175 100644 --- a/internal/graphapi/generated/root_.generated.go +++ b/internal/graphapi/generated/root_.generated.go @@ -4463,6 +4463,7 @@ type ComplexityRoot struct { Organization func(childComplexity int) int OrganizationID func(childComplexity int) int PaymentMethodAdded func(childComplexity int) int + PendingDeletionAt func(childComplexity int) int SamlCert func(childComplexity int) int SamlIssuer func(childComplexity int) int SamlSigninURL func(childComplexity int) int @@ -34539,6 +34540,13 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.OrganizationSetting.PaymentMethodAdded(childComplexity), true + case "OrganizationSetting.pendingDeletionAt": + if e.ComplexityRoot.OrganizationSetting.PendingDeletionAt == nil { + break + } + + return e.ComplexityRoot.OrganizationSetting.PendingDeletionAt(childComplexity), true + case "OrganizationSetting.samlCert": if e.ComplexityRoot.OrganizationSetting.SamlCert == nil { break @@ -101873,6 +101881,10 @@ type OrganizationSetting implements Node { whether or not a payment method has been added to the account """ paymentMethodAdded: Boolean! + """ + when will this organization be deleted? usually this is after org has not added a payment method afte n period + """ + pendingDeletionAt: DateTime organization: Organization files( """ @@ -102360,6 +102372,19 @@ input OrganizationSettingWhereInput { complianceWebhookTokenEqualFold: String complianceWebhookTokenContainsFold: String """ + pending_deletion_at field predicates + """ + pendingDeletionAt: DateTime + pendingDeletionAtNEQ: DateTime + pendingDeletionAtIn: [DateTime!] + pendingDeletionAtNotIn: [DateTime!] + pendingDeletionAtGT: DateTime + pendingDeletionAtGTE: DateTime + pendingDeletionAtLT: DateTime + pendingDeletionAtLTE: DateTime + pendingDeletionAtIsNil: Boolean + pendingDeletionAtNotNil: Boolean + """ organization edge predicates """ hasOrganization: Boolean diff --git a/internal/graphapi/historygenerated/ent.generated.go b/internal/graphapi/historygenerated/ent.generated.go index efeaa7ce04..79f76a716b 100644 --- a/internal/graphapi/historygenerated/ent.generated.go +++ b/internal/graphapi/historygenerated/ent.generated.go @@ -46851,6 +46851,35 @@ func (ec *executionContext) fieldContext_OrganizationSettingHistory_paymentMetho return fc, nil } +func (ec *executionContext) _OrganizationSettingHistory_pendingDeletionAt(ctx context.Context, field graphql.CollectedField, obj *historygenerated.OrganizationSettingHistory) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + ec.fieldContext_OrganizationSettingHistory_pendingDeletionAt, + func(ctx context.Context) (any, error) { + return obj.PendingDeletionAt, nil + }, + nil, + ec.marshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime, + true, + false, + ) +} + +func (ec *executionContext) fieldContext_OrganizationSettingHistory_pendingDeletionAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "OrganizationSettingHistory", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type DateTime does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _OrganizationSettingHistoryConnection_edges(ctx context.Context, field graphql.CollectedField, obj *historygenerated.OrganizationSettingHistoryConnection) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, @@ -47046,6 +47075,8 @@ func (ec *executionContext) fieldContext_OrganizationSettingHistoryEdge_node(_ c return ec.fieldContext_OrganizationSettingHistory_complianceWebhookToken(ctx, field) case "paymentMethodAdded": return ec.fieldContext_OrganizationSettingHistory_paymentMethodAdded(ctx, field) + case "pendingDeletionAt": + return ec.fieldContext_OrganizationSettingHistory_pendingDeletionAt(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type OrganizationSettingHistory", field.Name) }, @@ -172790,7 +172821,7 @@ func (ec *executionContext) unmarshalInputOrganizationSettingHistoryWhereInput(c asMap[k] = v } - fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "idEqualFold", "idContainsFold", "historyTime", "historyTimeNEQ", "historyTimeIn", "historyTimeNotIn", "historyTimeGT", "historyTimeGTE", "historyTimeLT", "historyTimeLTE", "ref", "refNEQ", "refIn", "refNotIn", "refGT", "refGTE", "refLT", "refLTE", "refContains", "refHasPrefix", "refHasSuffix", "refIsNil", "refNotNil", "refEqualFold", "refContainsFold", "operation", "operationNEQ", "operationIn", "operationNotIn", "createdAt", "createdAtNEQ", "createdAtIn", "createdAtNotIn", "createdAtGT", "createdAtGTE", "createdAtLT", "createdAtLTE", "createdAtIsNil", "createdAtNotNil", "updatedAt", "updatedAtNEQ", "updatedAtIn", "updatedAtNotIn", "updatedAtGT", "updatedAtGTE", "updatedAtLT", "updatedAtLTE", "updatedAtIsNil", "updatedAtNotNil", "createdBy", "createdByNEQ", "createdByIn", "createdByNotIn", "createdByGT", "createdByGTE", "createdByLT", "createdByLTE", "createdByContains", "createdByHasPrefix", "createdByHasSuffix", "createdByIsNil", "createdByNotNil", "createdByEqualFold", "createdByContainsFold", "updatedBy", "updatedByNEQ", "updatedByIn", "updatedByNotIn", "updatedByGT", "updatedByGTE", "updatedByLT", "updatedByLTE", "updatedByContains", "updatedByHasPrefix", "updatedByHasSuffix", "updatedByIsNil", "updatedByNotNil", "updatedByEqualFold", "updatedByContainsFold", "billingContact", "billingContactNEQ", "billingContactIn", "billingContactNotIn", "billingContactGT", "billingContactGTE", "billingContactLT", "billingContactLTE", "billingContactContains", "billingContactHasPrefix", "billingContactHasSuffix", "billingContactIsNil", "billingContactNotNil", "billingContactEqualFold", "billingContactContainsFold", "billingEmail", "billingEmailNEQ", "billingEmailIn", "billingEmailNotIn", "billingEmailGT", "billingEmailGTE", "billingEmailLT", "billingEmailLTE", "billingEmailContains", "billingEmailHasPrefix", "billingEmailHasSuffix", "billingEmailIsNil", "billingEmailNotNil", "billingEmailEqualFold", "billingEmailContainsFold", "billingPhone", "billingPhoneNEQ", "billingPhoneIn", "billingPhoneNotIn", "billingPhoneGT", "billingPhoneGTE", "billingPhoneLT", "billingPhoneLTE", "billingPhoneContains", "billingPhoneHasPrefix", "billingPhoneHasSuffix", "billingPhoneIsNil", "billingPhoneNotNil", "billingPhoneEqualFold", "billingPhoneContainsFold", "taxIdentifier", "taxIdentifierNEQ", "taxIdentifierIn", "taxIdentifierNotIn", "taxIdentifierGT", "taxIdentifierGTE", "taxIdentifierLT", "taxIdentifierLTE", "taxIdentifierContains", "taxIdentifierHasPrefix", "taxIdentifierHasSuffix", "taxIdentifierIsNil", "taxIdentifierNotNil", "taxIdentifierEqualFold", "taxIdentifierContainsFold", "geoLocation", "geoLocationNEQ", "geoLocationIn", "geoLocationNotIn", "geoLocationIsNil", "geoLocationNotNil", "organizationID", "organizationIDNEQ", "organizationIDIn", "organizationIDNotIn", "organizationIDGT", "organizationIDGTE", "organizationIDLT", "organizationIDLTE", "organizationIDContains", "organizationIDHasPrefix", "organizationIDHasSuffix", "organizationIDIsNil", "organizationIDNotNil", "organizationIDEqualFold", "organizationIDContainsFold", "billingNotificationsEnabled", "billingNotificationsEnabledNEQ", "allowMatchingDomainsAutojoin", "allowMatchingDomainsAutojoinNEQ", "allowMatchingDomainsAutojoinIsNil", "allowMatchingDomainsAutojoinNotNil", "identityProvider", "identityProviderNEQ", "identityProviderIn", "identityProviderNotIn", "identityProviderIsNil", "identityProviderNotNil", "identityProviderClientID", "identityProviderClientIDNEQ", "identityProviderClientIDIn", "identityProviderClientIDNotIn", "identityProviderClientIDGT", "identityProviderClientIDGTE", "identityProviderClientIDLT", "identityProviderClientIDLTE", "identityProviderClientIDContains", "identityProviderClientIDHasPrefix", "identityProviderClientIDHasSuffix", "identityProviderClientIDIsNil", "identityProviderClientIDNotNil", "identityProviderClientIDEqualFold", "identityProviderClientIDContainsFold", "identityProviderClientSecret", "identityProviderClientSecretNEQ", "identityProviderClientSecretIn", "identityProviderClientSecretNotIn", "identityProviderClientSecretGT", "identityProviderClientSecretGTE", "identityProviderClientSecretLT", "identityProviderClientSecretLTE", "identityProviderClientSecretContains", "identityProviderClientSecretHasPrefix", "identityProviderClientSecretHasSuffix", "identityProviderClientSecretIsNil", "identityProviderClientSecretNotNil", "identityProviderClientSecretEqualFold", "identityProviderClientSecretContainsFold", "identityProviderMetadataEndpoint", "identityProviderMetadataEndpointNEQ", "identityProviderMetadataEndpointIn", "identityProviderMetadataEndpointNotIn", "identityProviderMetadataEndpointGT", "identityProviderMetadataEndpointGTE", "identityProviderMetadataEndpointLT", "identityProviderMetadataEndpointLTE", "identityProviderMetadataEndpointContains", "identityProviderMetadataEndpointHasPrefix", "identityProviderMetadataEndpointHasSuffix", "identityProviderMetadataEndpointIsNil", "identityProviderMetadataEndpointNotNil", "identityProviderMetadataEndpointEqualFold", "identityProviderMetadataEndpointContainsFold", "identityProviderAuthTested", "identityProviderAuthTestedNEQ", "identityProviderEntityID", "identityProviderEntityIDNEQ", "identityProviderEntityIDIn", "identityProviderEntityIDNotIn", "identityProviderEntityIDGT", "identityProviderEntityIDGTE", "identityProviderEntityIDLT", "identityProviderEntityIDLTE", "identityProviderEntityIDContains", "identityProviderEntityIDHasPrefix", "identityProviderEntityIDHasSuffix", "identityProviderEntityIDIsNil", "identityProviderEntityIDNotNil", "identityProviderEntityIDEqualFold", "identityProviderEntityIDContainsFold", "oidcDiscoveryEndpoint", "oidcDiscoveryEndpointNEQ", "oidcDiscoveryEndpointIn", "oidcDiscoveryEndpointNotIn", "oidcDiscoveryEndpointGT", "oidcDiscoveryEndpointGTE", "oidcDiscoveryEndpointLT", "oidcDiscoveryEndpointLTE", "oidcDiscoveryEndpointContains", "oidcDiscoveryEndpointHasPrefix", "oidcDiscoveryEndpointHasSuffix", "oidcDiscoveryEndpointIsNil", "oidcDiscoveryEndpointNotNil", "oidcDiscoveryEndpointEqualFold", "oidcDiscoveryEndpointContainsFold", "samlSigninURL", "samlSigninURLNEQ", "samlSigninURLIn", "samlSigninURLNotIn", "samlSigninURLGT", "samlSigninURLGTE", "samlSigninURLLT", "samlSigninURLLTE", "samlSigninURLContains", "samlSigninURLHasPrefix", "samlSigninURLHasSuffix", "samlSigninURLIsNil", "samlSigninURLNotNil", "samlSigninURLEqualFold", "samlSigninURLContainsFold", "samlIssuer", "samlIssuerNEQ", "samlIssuerIn", "samlIssuerNotIn", "samlIssuerGT", "samlIssuerGTE", "samlIssuerLT", "samlIssuerLTE", "samlIssuerContains", "samlIssuerHasPrefix", "samlIssuerHasSuffix", "samlIssuerIsNil", "samlIssuerNotNil", "samlIssuerEqualFold", "samlIssuerContainsFold", "samlCert", "samlCertNEQ", "samlCertIn", "samlCertNotIn", "samlCertGT", "samlCertGTE", "samlCertLT", "samlCertLTE", "samlCertContains", "samlCertHasPrefix", "samlCertHasSuffix", "samlCertIsNil", "samlCertNotNil", "samlCertEqualFold", "samlCertContainsFold", "identityProviderLoginEnforced", "identityProviderLoginEnforcedNEQ", "multifactorAuthEnforced", "multifactorAuthEnforcedNEQ", "multifactorAuthEnforcedIsNil", "multifactorAuthEnforcedNotNil", "complianceWebhookToken", "complianceWebhookTokenNEQ", "complianceWebhookTokenIn", "complianceWebhookTokenNotIn", "complianceWebhookTokenGT", "complianceWebhookTokenGTE", "complianceWebhookTokenLT", "complianceWebhookTokenLTE", "complianceWebhookTokenContains", "complianceWebhookTokenHasPrefix", "complianceWebhookTokenHasSuffix", "complianceWebhookTokenIsNil", "complianceWebhookTokenNotNil", "complianceWebhookTokenEqualFold", "complianceWebhookTokenContainsFold"} + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "idEqualFold", "idContainsFold", "historyTime", "historyTimeNEQ", "historyTimeIn", "historyTimeNotIn", "historyTimeGT", "historyTimeGTE", "historyTimeLT", "historyTimeLTE", "ref", "refNEQ", "refIn", "refNotIn", "refGT", "refGTE", "refLT", "refLTE", "refContains", "refHasPrefix", "refHasSuffix", "refIsNil", "refNotNil", "refEqualFold", "refContainsFold", "operation", "operationNEQ", "operationIn", "operationNotIn", "createdAt", "createdAtNEQ", "createdAtIn", "createdAtNotIn", "createdAtGT", "createdAtGTE", "createdAtLT", "createdAtLTE", "createdAtIsNil", "createdAtNotNil", "updatedAt", "updatedAtNEQ", "updatedAtIn", "updatedAtNotIn", "updatedAtGT", "updatedAtGTE", "updatedAtLT", "updatedAtLTE", "updatedAtIsNil", "updatedAtNotNil", "createdBy", "createdByNEQ", "createdByIn", "createdByNotIn", "createdByGT", "createdByGTE", "createdByLT", "createdByLTE", "createdByContains", "createdByHasPrefix", "createdByHasSuffix", "createdByIsNil", "createdByNotNil", "createdByEqualFold", "createdByContainsFold", "updatedBy", "updatedByNEQ", "updatedByIn", "updatedByNotIn", "updatedByGT", "updatedByGTE", "updatedByLT", "updatedByLTE", "updatedByContains", "updatedByHasPrefix", "updatedByHasSuffix", "updatedByIsNil", "updatedByNotNil", "updatedByEqualFold", "updatedByContainsFold", "billingContact", "billingContactNEQ", "billingContactIn", "billingContactNotIn", "billingContactGT", "billingContactGTE", "billingContactLT", "billingContactLTE", "billingContactContains", "billingContactHasPrefix", "billingContactHasSuffix", "billingContactIsNil", "billingContactNotNil", "billingContactEqualFold", "billingContactContainsFold", "billingEmail", "billingEmailNEQ", "billingEmailIn", "billingEmailNotIn", "billingEmailGT", "billingEmailGTE", "billingEmailLT", "billingEmailLTE", "billingEmailContains", "billingEmailHasPrefix", "billingEmailHasSuffix", "billingEmailIsNil", "billingEmailNotNil", "billingEmailEqualFold", "billingEmailContainsFold", "billingPhone", "billingPhoneNEQ", "billingPhoneIn", "billingPhoneNotIn", "billingPhoneGT", "billingPhoneGTE", "billingPhoneLT", "billingPhoneLTE", "billingPhoneContains", "billingPhoneHasPrefix", "billingPhoneHasSuffix", "billingPhoneIsNil", "billingPhoneNotNil", "billingPhoneEqualFold", "billingPhoneContainsFold", "taxIdentifier", "taxIdentifierNEQ", "taxIdentifierIn", "taxIdentifierNotIn", "taxIdentifierGT", "taxIdentifierGTE", "taxIdentifierLT", "taxIdentifierLTE", "taxIdentifierContains", "taxIdentifierHasPrefix", "taxIdentifierHasSuffix", "taxIdentifierIsNil", "taxIdentifierNotNil", "taxIdentifierEqualFold", "taxIdentifierContainsFold", "geoLocation", "geoLocationNEQ", "geoLocationIn", "geoLocationNotIn", "geoLocationIsNil", "geoLocationNotNil", "organizationID", "organizationIDNEQ", "organizationIDIn", "organizationIDNotIn", "organizationIDGT", "organizationIDGTE", "organizationIDLT", "organizationIDLTE", "organizationIDContains", "organizationIDHasPrefix", "organizationIDHasSuffix", "organizationIDIsNil", "organizationIDNotNil", "organizationIDEqualFold", "organizationIDContainsFold", "billingNotificationsEnabled", "billingNotificationsEnabledNEQ", "allowMatchingDomainsAutojoin", "allowMatchingDomainsAutojoinNEQ", "allowMatchingDomainsAutojoinIsNil", "allowMatchingDomainsAutojoinNotNil", "identityProvider", "identityProviderNEQ", "identityProviderIn", "identityProviderNotIn", "identityProviderIsNil", "identityProviderNotNil", "identityProviderClientID", "identityProviderClientIDNEQ", "identityProviderClientIDIn", "identityProviderClientIDNotIn", "identityProviderClientIDGT", "identityProviderClientIDGTE", "identityProviderClientIDLT", "identityProviderClientIDLTE", "identityProviderClientIDContains", "identityProviderClientIDHasPrefix", "identityProviderClientIDHasSuffix", "identityProviderClientIDIsNil", "identityProviderClientIDNotNil", "identityProviderClientIDEqualFold", "identityProviderClientIDContainsFold", "identityProviderClientSecret", "identityProviderClientSecretNEQ", "identityProviderClientSecretIn", "identityProviderClientSecretNotIn", "identityProviderClientSecretGT", "identityProviderClientSecretGTE", "identityProviderClientSecretLT", "identityProviderClientSecretLTE", "identityProviderClientSecretContains", "identityProviderClientSecretHasPrefix", "identityProviderClientSecretHasSuffix", "identityProviderClientSecretIsNil", "identityProviderClientSecretNotNil", "identityProviderClientSecretEqualFold", "identityProviderClientSecretContainsFold", "identityProviderMetadataEndpoint", "identityProviderMetadataEndpointNEQ", "identityProviderMetadataEndpointIn", "identityProviderMetadataEndpointNotIn", "identityProviderMetadataEndpointGT", "identityProviderMetadataEndpointGTE", "identityProviderMetadataEndpointLT", "identityProviderMetadataEndpointLTE", "identityProviderMetadataEndpointContains", "identityProviderMetadataEndpointHasPrefix", "identityProviderMetadataEndpointHasSuffix", "identityProviderMetadataEndpointIsNil", "identityProviderMetadataEndpointNotNil", "identityProviderMetadataEndpointEqualFold", "identityProviderMetadataEndpointContainsFold", "identityProviderAuthTested", "identityProviderAuthTestedNEQ", "identityProviderEntityID", "identityProviderEntityIDNEQ", "identityProviderEntityIDIn", "identityProviderEntityIDNotIn", "identityProviderEntityIDGT", "identityProviderEntityIDGTE", "identityProviderEntityIDLT", "identityProviderEntityIDLTE", "identityProviderEntityIDContains", "identityProviderEntityIDHasPrefix", "identityProviderEntityIDHasSuffix", "identityProviderEntityIDIsNil", "identityProviderEntityIDNotNil", "identityProviderEntityIDEqualFold", "identityProviderEntityIDContainsFold", "oidcDiscoveryEndpoint", "oidcDiscoveryEndpointNEQ", "oidcDiscoveryEndpointIn", "oidcDiscoveryEndpointNotIn", "oidcDiscoveryEndpointGT", "oidcDiscoveryEndpointGTE", "oidcDiscoveryEndpointLT", "oidcDiscoveryEndpointLTE", "oidcDiscoveryEndpointContains", "oidcDiscoveryEndpointHasPrefix", "oidcDiscoveryEndpointHasSuffix", "oidcDiscoveryEndpointIsNil", "oidcDiscoveryEndpointNotNil", "oidcDiscoveryEndpointEqualFold", "oidcDiscoveryEndpointContainsFold", "samlSigninURL", "samlSigninURLNEQ", "samlSigninURLIn", "samlSigninURLNotIn", "samlSigninURLGT", "samlSigninURLGTE", "samlSigninURLLT", "samlSigninURLLTE", "samlSigninURLContains", "samlSigninURLHasPrefix", "samlSigninURLHasSuffix", "samlSigninURLIsNil", "samlSigninURLNotNil", "samlSigninURLEqualFold", "samlSigninURLContainsFold", "samlIssuer", "samlIssuerNEQ", "samlIssuerIn", "samlIssuerNotIn", "samlIssuerGT", "samlIssuerGTE", "samlIssuerLT", "samlIssuerLTE", "samlIssuerContains", "samlIssuerHasPrefix", "samlIssuerHasSuffix", "samlIssuerIsNil", "samlIssuerNotNil", "samlIssuerEqualFold", "samlIssuerContainsFold", "samlCert", "samlCertNEQ", "samlCertIn", "samlCertNotIn", "samlCertGT", "samlCertGTE", "samlCertLT", "samlCertLTE", "samlCertContains", "samlCertHasPrefix", "samlCertHasSuffix", "samlCertIsNil", "samlCertNotNil", "samlCertEqualFold", "samlCertContainsFold", "identityProviderLoginEnforced", "identityProviderLoginEnforcedNEQ", "multifactorAuthEnforced", "multifactorAuthEnforcedNEQ", "multifactorAuthEnforcedIsNil", "multifactorAuthEnforcedNotNil", "complianceWebhookToken", "complianceWebhookTokenNEQ", "complianceWebhookTokenIn", "complianceWebhookTokenNotIn", "complianceWebhookTokenGT", "complianceWebhookTokenGTE", "complianceWebhookTokenLT", "complianceWebhookTokenLTE", "complianceWebhookTokenContains", "complianceWebhookTokenHasPrefix", "complianceWebhookTokenHasSuffix", "complianceWebhookTokenIsNil", "complianceWebhookTokenNotNil", "complianceWebhookTokenEqualFold", "complianceWebhookTokenContainsFold", "pendingDeletionAt", "pendingDeletionAtNEQ", "pendingDeletionAtIn", "pendingDeletionAtNotIn", "pendingDeletionAtGT", "pendingDeletionAtGTE", "pendingDeletionAtLT", "pendingDeletionAtLTE", "pendingDeletionAtIsNil", "pendingDeletionAtNotNil"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -175079,6 +175110,76 @@ func (ec *executionContext) unmarshalInputOrganizationSettingHistoryWhereInput(c return it, err } it.ComplianceWebhookTokenContainsFold = data + case "pendingDeletionAt": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAt")) + data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAt = data + case "pendingDeletionAtNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtNEQ")) + data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtNEQ = data + case "pendingDeletionAtIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtIn")) + data, err := ec.unmarshalODateTime2ᚕgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTimeᚄ(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtIn = data + case "pendingDeletionAtNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtNotIn")) + data, err := ec.unmarshalODateTime2ᚕgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTimeᚄ(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtNotIn = data + case "pendingDeletionAtGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtGT")) + data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtGT = data + case "pendingDeletionAtGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtGTE")) + data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtGTE = data + case "pendingDeletionAtLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtLT")) + data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtLT = data + case "pendingDeletionAtLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtLTE")) + data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtLTE = data + case "pendingDeletionAtIsNil": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtIsNil")) + data, err := ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtIsNil = data + case "pendingDeletionAtNotNil": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAtNotNil")) + data, err := ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAtNotNil = data } } return it, nil @@ -256896,6 +256997,8 @@ func (ec *executionContext) _OrganizationSettingHistory(ctx context.Context, sel if out.Values[i] == graphql.Null { out.Invalids++ } + case "pendingDeletionAt": + out.Values[i] = ec._OrganizationSettingHistory_pendingDeletionAt(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } diff --git a/internal/graphapi/historygenerated/root_.generated.go b/internal/graphapi/historygenerated/root_.generated.go index 08f5626d92..563aa334c3 100644 --- a/internal/graphapi/historygenerated/root_.generated.go +++ b/internal/graphapi/historygenerated/root_.generated.go @@ -1785,6 +1785,7 @@ type ComplexityRoot struct { Operation func(childComplexity int) int OrganizationID func(childComplexity int) int PaymentMethodAdded func(childComplexity int) int + PendingDeletionAt func(childComplexity int) int Ref func(childComplexity int) int SamlCert func(childComplexity int) int SamlIssuer func(childComplexity int) int @@ -12942,6 +12943,13 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.OrganizationSettingHistory.PaymentMethodAdded(childComplexity), true + case "OrganizationSettingHistory.pendingDeletionAt": + if e.ComplexityRoot.OrganizationSettingHistory.PendingDeletionAt == nil { + break + } + + return e.ComplexityRoot.OrganizationSettingHistory.PendingDeletionAt(childComplexity), true + case "OrganizationSettingHistory.ref": if e.ComplexityRoot.OrganizationSettingHistory.Ref == nil { break @@ -44346,6 +44354,10 @@ type OrganizationSettingHistory implements Node { whether or not a payment method has been added to the account """ paymentMethodAdded: Boolean! + """ + when will this organization be deleted? usually this is after org has not added a payment method afte n period + """ + pendingDeletionAt: DateTime } """ A connection to a list of items. @@ -44845,6 +44857,19 @@ input OrganizationSettingHistoryWhereInput { complianceWebhookTokenNotNil: Boolean complianceWebhookTokenEqualFold: String complianceWebhookTokenContainsFold: String + """ + pending_deletion_at field predicates + """ + pendingDeletionAt: DateTime + pendingDeletionAtNEQ: DateTime + pendingDeletionAtIn: [DateTime!] + pendingDeletionAtNotIn: [DateTime!] + pendingDeletionAtGT: DateTime + pendingDeletionAtGTE: DateTime + pendingDeletionAtLT: DateTime + pendingDeletionAtLTE: DateTime + pendingDeletionAtIsNil: Boolean + pendingDeletionAtNotNil: Boolean } """ Information about pagination in a connection. diff --git a/internal/graphapi/historyschema/checksum/.history_schema_checksum b/internal/graphapi/historyschema/checksum/.history_schema_checksum index 24e6ae686c..d91f9ebd8f 100644 --- a/internal/graphapi/historyschema/checksum/.history_schema_checksum +++ b/internal/graphapi/historyschema/checksum/.history_schema_checksum @@ -1 +1 @@ -4a03fd32693e7d9a47bc4f103f088b9fdd413ef16dfea7986f01aef5290cda0b \ No newline at end of file +9badaf13f898a8329ce46ccfefee08c62f8a6f596c5956b1a70bf9d956c222e6 \ No newline at end of file diff --git a/internal/graphapi/historyschema/schema.graphql b/internal/graphapi/historyschema/schema.graphql index eb58a67331..48a7b9ef15 100644 --- a/internal/graphapi/historyschema/schema.graphql +++ b/internal/graphapi/historyschema/schema.graphql @@ -22317,6 +22317,10 @@ type OrganizationSettingHistory implements Node { whether or not a payment method has been added to the account """ paymentMethodAdded: Boolean! + """ + when will this organization be deleted? usually this is after org has not added a payment method afte n period + """ + pendingDeletionAt: DateTime } """ A connection to a list of items. @@ -22816,6 +22820,19 @@ input OrganizationSettingHistoryWhereInput { complianceWebhookTokenNotNil: Boolean complianceWebhookTokenEqualFold: String complianceWebhookTokenContainsFold: String + """ + pending_deletion_at field predicates + """ + pendingDeletionAt: DateTime + pendingDeletionAtNEQ: DateTime + pendingDeletionAtIn: [DateTime!] + pendingDeletionAtNotIn: [DateTime!] + pendingDeletionAtGT: DateTime + pendingDeletionAtGTE: DateTime + pendingDeletionAtLT: DateTime + pendingDeletionAtLTE: DateTime + pendingDeletionAtIsNil: Boolean + pendingDeletionAtNotNil: Boolean } """ Information about pagination in a connection. diff --git a/internal/graphapi/query/history/notificationtemplatehistory.graphql b/internal/graphapi/query/history/notificationtemplatehistory.graphql index 4b12f4e0d4..1bef948ff1 100644 --- a/internal/graphapi/query/history/notificationtemplatehistory.graphql +++ b/internal/graphapi/query/history/notificationtemplatehistory.graphql @@ -1,114 +1,100 @@ -query GetAllNotificationTemplateHistories($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [NotificationTemplateHistoryOrder!]) { - notificationTemplateHistories( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - active - blocks - bodyTemplate - channel - createdAt - createdBy - defaults - description - destinations - emailTemplateID - format - historyTime - id - integrationID - internalNotes - jsonconfig - key - locale - metadata - name - operation - ownerID - ref - revision - subjectTemplate - systemInternalID - systemOwned - templateContext - titleTemplate - topicPattern - uischema - updatedAt - updatedBy - version - workflowDefinitionID - } - } - } +query GetAllNotificationTemplateHistories ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [NotificationTemplateHistoryOrder!]) { + notificationTemplateHistories(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + active + blocks + bodyTemplate + channel + createdAt + createdBy + defaults + description + destinations + emailTemplateID + format + historyTime + id + integrationID + internalNotes + jsonconfig + key + locale + metadata + name + operation + ownerID + ref + revision + subjectTemplate + systemInternalID + systemOwned + templateContext + titleTemplate + topicPattern + uischema + updatedAt + updatedBy + version + workflowDefinitionID + } + } + } } - -query GetNotificationTemplateHistories($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [NotificationTemplateHistoryOrder!], $where: NotificationTemplateHistoryWhereInput) { - notificationTemplateHistories( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - where: $where - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - active - blocks - bodyTemplate - channel - createdAt - createdBy - defaults - description - destinations - emailTemplateID - format - historyTime - id - integrationID - internalNotes - jsonconfig - key - locale - metadata - name - operation - ownerID - ref - revision - subjectTemplate - systemInternalID - systemOwned - templateContext - titleTemplate - topicPattern - uischema - updatedAt - updatedBy - version - workflowDefinitionID - } - } - } +query GetNotificationTemplateHistories ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [NotificationTemplateHistoryOrder!], $where: NotificationTemplateHistoryWhereInput) { + notificationTemplateHistories(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy, where: $where) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + active + blocks + bodyTemplate + channel + createdAt + createdBy + defaults + description + destinations + emailTemplateID + format + historyTime + id + integrationID + internalNotes + jsonconfig + key + locale + metadata + name + operation + ownerID + ref + revision + subjectTemplate + systemInternalID + systemOwned + templateContext + titleTemplate + topicPattern + uischema + updatedAt + updatedBy + version + workflowDefinitionID + } + } + } } diff --git a/internal/graphapi/query/history/vendorscoringconfighistory.graphql b/internal/graphapi/query/history/vendorscoringconfighistory.graphql index 1c6d524953..f609a46b93 100644 --- a/internal/graphapi/query/history/vendorscoringconfighistory.graphql +++ b/internal/graphapi/query/history/vendorscoringconfighistory.graphql @@ -1,70 +1,56 @@ -query GetAllVendorScoringConfigHistories($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [VendorScoringConfigHistoryOrder!]) { - vendorScoringConfigHistories( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - createdAt - createdBy - historyTime - id - operation - ownerID - questions - ref - riskThresholds - scoringMode - tags - updatedAt - updatedBy - } - } - } +query GetAllVendorScoringConfigHistories ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [VendorScoringConfigHistoryOrder!]) { + vendorScoringConfigHistories(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + createdAt + createdBy + historyTime + id + operation + ownerID + questions + ref + riskThresholds + scoringMode + tags + updatedAt + updatedBy + } + } + } } - -query GetVendorScoringConfigHistories($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [VendorScoringConfigHistoryOrder!], $where: VendorScoringConfigHistoryWhereInput) { - vendorScoringConfigHistories( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - where: $where - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - createdAt - createdBy - historyTime - id - operation - ownerID - questions - ref - riskThresholds - scoringMode - tags - updatedAt - updatedBy - } - } - } +query GetVendorScoringConfigHistories ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [VendorScoringConfigHistoryOrder!], $where: VendorScoringConfigHistoryWhereInput) { + vendorScoringConfigHistories(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy, where: $where) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + createdAt + createdBy + historyTime + id + operation + ownerID + questions + ref + riskThresholds + scoringMode + tags + updatedAt + updatedBy + } + } + } } diff --git a/internal/graphapi/query/integration.graphql b/internal/graphapi/query/integration.graphql index 2015632e61..589b9e189f 100644 --- a/internal/graphapi/query/integration.graphql +++ b/internal/graphapi/query/integration.graphql @@ -1,114 +1,110 @@ -mutation DeleteIntegration($deleteIntegrationId: ID!) { - deleteIntegration(id: $deleteIntegrationId) { - deletedID - } +mutation DeleteIntegration ($deleteIntegrationId: ID!) { + deleteIntegration(id: $deleteIntegrationId) { + deletedID + } } - query GetAllIntegrations { - integrations { - edges { - node { - description - id - kind - name - ownerID - createdAt - createdBy - updatedAt - updatedBy - integrationType - metadata - } - } - } + integrations { + edges { + node { + description + id + kind + name + ownerID + createdAt + createdBy + updatedAt + updatedBy + integrationType + metadata + } + } + } } - -query GetIntegrationByID($integrationId: ID!) { - integration(id: $integrationId) { - createdAt - createdBy - definitionID - definitionSlug - definitionVersion - description - environmentID - environmentName - family - id - integrationType - internalNotes - kind - metadata - name - ownerID - platformID - primaryDirectory - providerMetadataSnapshot - scopeID - scopeName - status - systemInternalID - systemOwned - tags - updatedAt - updatedBy - } +query GetIntegrationByID ($integrationId: ID!) { + integration(id: $integrationId) { + createdAt + createdBy + definitionID + definitionSlug + definitionVersion + description + environmentID + environmentName + family + id + integrationType + internalNotes + kind + metadata + name + ownerID + platformID + primaryDirectory + providerMetadataSnapshot + scopeID + scopeName + status + systemInternalID + systemOwned + tags + updatedAt + updatedBy + } } - -query GetIntegrationByIDWithSecrets($integrationId: ID!) { - integration(id: $integrationId) { - description - id - kind - name - ownerID - secrets { - edges { - node { - id - name - kind - } - } - } - createdAt - createdBy - updatedAt - updatedBy - integrationType - metadata - } +query GetIntegrationByIDWithSecrets ($integrationId: ID!) { + integration(id: $integrationId) { + description + id + kind + name + ownerID + secrets { + edges { + node { + id + name + kind + } + } + } + createdAt + createdBy + updatedAt + updatedBy + integrationType + metadata + } } - -query GetIntegrations($where: IntegrationWhereInput) { - integrations(where: $where) { - edges { - node { - description - id - kind - name - ownerID - owner { - id - } - secrets { - edges { - node { - id - name - kind - } - } - } - createdAt - createdBy - updatedAt - updatedBy - integrationType - metadata - } - } - } +query GetIntegrations ($where: IntegrationWhereInput) { + integrations(where: $where) { + edges { + node { + description + id + kind + name + ownerID + owner { + id + } + secrets { + edges { + node { + id + name + kind + } + } + } + createdAt + createdBy + updatedAt + updatedBy + integrationType + metadata + } + } + } } diff --git a/internal/graphapi/query/organizationsetting.graphql b/internal/graphapi/query/organizationsetting.graphql index a9fad8c26a..af472f062c 100644 --- a/internal/graphapi/query/organizationsetting.graphql +++ b/internal/graphapi/query/organizationsetting.graphql @@ -59,6 +59,7 @@ query GetOrganizationSettingByID ($organizationSettingId: ID!) { oidcDiscoveryEndpoint organizationID paymentMethodAdded + pendingDeletionAt samlCert samlIssuer samlSigninURL @@ -134,6 +135,7 @@ mutation UpdateOrganizationSetting ($updateOrganizationSettingId: ID!, $input: U oidcDiscoveryEndpoint organizationID paymentMethodAdded + pendingDeletionAt samlCert samlIssuer samlSigninURL diff --git a/internal/graphapi/query/platform.graphql b/internal/graphapi/query/platform.graphql index 685774350d..62fae77a55 100644 --- a/internal/graphapi/query/platform.graphql +++ b/internal/graphapi/query/platform.graphql @@ -1,666 +1,635 @@ -mutation CreateBulkCSVPlatform($input: Upload!) { - createBulkCSVPlatform(input: $input) { - platforms { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - } - } +mutation CreateBulkCSVPlatform ($input: Upload!) { + createBulkCSVPlatform(input: $input) { + platforms { + accessModelID + accessModelName + businessOwner + businessOwnerGroupID + businessOwnerUserID + businessPurpose + containsPii + costCenter + createdAt + createdBy + criticalityID + criticalityName + dataFlowSummary + description + displayID + encryptionStatusID + encryptionStatusName + environmentID + environmentName + estimatedMonthlyCost + externalReferenceID + externalUUID + id + internalOwner + internalOwnerGroupID + internalOwnerUserID + metadata + name + ownerID + physicalLocation + platformDataClassificationID + platformDataClassificationName + platformKindID + platformKindName + platformOwnerID + purchaseDate + region + scopeID + scopeName + scopeStatement + securityOwner + securityOwnerGroupID + securityOwnerUserID + securityTierID + securityTierName + sourceIdentifier + sourceType + status + tags + technicalOwner + technicalOwnerGroupID + technicalOwnerUserID + trustBoundaryDescription + updatedAt + updatedBy + workflowEligibleMarker + } + } } - -mutation CreateBulkPlatform($input: [CreatePlatformInput!]) { - createBulkPlatform(input: $input) { - platforms { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - architectureDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - dataFlowDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - trustBoundaryDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - } - } +mutation CreateBulkPlatform ($input: [CreatePlatformInput!]) { + createBulkPlatform(input: $input) { + platforms { + accessModelID + accessModelName + businessOwner + businessOwnerGroupID + businessOwnerUserID + businessPurpose + containsPii + costCenter + createdAt + createdBy + criticalityID + criticalityName + dataFlowSummary + description + displayID + encryptionStatusID + encryptionStatusName + environmentID + environmentName + estimatedMonthlyCost + externalReferenceID + externalUUID + id + internalOwner + internalOwnerGroupID + internalOwnerUserID + metadata + name + ownerID + physicalLocation + platformDataClassificationID + platformDataClassificationName + platformKindID + platformKindName + platformOwnerID + purchaseDate + region + scopeID + scopeName + scopeStatement + securityOwner + securityOwnerGroupID + securityOwnerUserID + securityTierID + securityTierName + sourceIdentifier + sourceType + status + tags + technicalOwner + technicalOwnerGroupID + technicalOwnerUserID + trustBoundaryDescription + updatedAt + updatedBy + workflowEligibleMarker + architectureDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + dataFlowDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + trustBoundaryDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + } + } } - -mutation CreatePlatform($input: CreatePlatformInput!, $architectureDiagrams: [Upload!], $dataFlowDiagrams: [Upload!], $trustBoundaryDiagrams: [Upload!]) { - createPlatform( - input: $input - architectureDiagrams: $architectureDiagrams - dataFlowDiagrams: $dataFlowDiagrams - trustBoundaryDiagrams: $trustBoundaryDiagrams - ) { - platform { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - sourceAssets { - edges { - node { - id - name - } - } - } - sourceEntities { - edges { - node { - id - name - } - } - } - outOfScopeAssets { - edges { - node { - id - name - } - } - } - outOfScopeVendors { - edges { - node { - id - name - } - } - } - architectureDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - dataFlowDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - trustBoundaryDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - } - } +mutation CreatePlatform ($input: CreatePlatformInput!, $architectureDiagrams: [Upload!], $dataFlowDiagrams: [Upload!], $trustBoundaryDiagrams: [Upload!]) { + createPlatform(input: $input, architectureDiagrams: $architectureDiagrams, dataFlowDiagrams: $dataFlowDiagrams, trustBoundaryDiagrams: $trustBoundaryDiagrams) { + platform { + accessModelID + accessModelName + businessOwner + businessOwnerGroupID + businessOwnerUserID + businessPurpose + containsPii + costCenter + createdAt + createdBy + criticalityID + criticalityName + dataFlowSummary + description + displayID + encryptionStatusID + encryptionStatusName + environmentID + environmentName + estimatedMonthlyCost + externalReferenceID + externalUUID + id + internalOwner + internalOwnerGroupID + internalOwnerUserID + metadata + name + ownerID + physicalLocation + platformDataClassificationID + platformDataClassificationName + platformKindID + platformKindName + platformOwnerID + purchaseDate + region + scopeID + scopeName + scopeStatement + securityOwner + securityOwnerGroupID + securityOwnerUserID + securityTierID + securityTierName + sourceIdentifier + sourceType + status + tags + technicalOwner + technicalOwnerGroupID + technicalOwnerUserID + trustBoundaryDescription + updatedAt + updatedBy + workflowEligibleMarker + sourceAssets { + edges { + node { + id + name + } + } + } + sourceEntities { + edges { + node { + id + name + } + } + } + outOfScopeAssets { + edges { + node { + id + name + } + } + } + outOfScopeVendors { + edges { + node { + id + name + } + } + } + architectureDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + dataFlowDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + trustBoundaryDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + } + } } - -mutation DeletePlatform($deletePlatformId: ID!) { - deletePlatform(id: $deletePlatformId) { - deletedID - } +mutation DeletePlatform ($deletePlatformId: ID!) { + deletePlatform(id: $deletePlatformId) { + deletedID + } } - -query GetAllPlatforms($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [PlatformOrder!]) { - platforms( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - identityHolders { - edges { - node { - id - fullName - email - displayID - } - } - } - } - } - } +query GetAllPlatforms ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [PlatformOrder!]) { + platforms(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + accessModelID + accessModelName + businessOwner + businessOwnerGroupID + businessOwnerUserID + businessPurpose + containsPii + costCenter + createdAt + createdBy + criticalityID + criticalityName + dataFlowSummary + description + displayID + encryptionStatusID + encryptionStatusName + environmentID + environmentName + estimatedMonthlyCost + externalReferenceID + externalUUID + id + internalOwner + internalOwnerGroupID + internalOwnerUserID + metadata + name + ownerID + physicalLocation + platformDataClassificationID + platformDataClassificationName + platformKindID + platformKindName + platformOwnerID + purchaseDate + region + scopeID + scopeName + scopeStatement + securityOwner + securityOwnerGroupID + securityOwnerUserID + securityTierID + securityTierName + sourceIdentifier + sourceType + status + tags + technicalOwner + technicalOwnerGroupID + technicalOwnerUserID + trustBoundaryDescription + updatedAt + updatedBy + workflowEligibleMarker + identityHolders { + edges { + node { + id + fullName + email + displayID + } + } + } + } + } + } } - -query GetPlatformByID($platformId: ID!) { - platform(id: $platformId) { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - } +query GetPlatformByID ($platformId: ID!) { + platform(id: $platformId) { + accessModelID + accessModelName + businessOwner + businessOwnerGroupID + businessOwnerUserID + businessPurpose + containsPii + costCenter + createdAt + createdBy + criticalityID + criticalityName + dataFlowSummary + description + displayID + encryptionStatusID + encryptionStatusName + environmentID + environmentName + estimatedMonthlyCost + externalReferenceID + externalUUID + id + internalOwner + internalOwnerGroupID + internalOwnerUserID + metadata + name + ownerID + physicalLocation + platformDataClassificationID + platformDataClassificationName + platformKindID + platformKindName + platformOwnerID + purchaseDate + region + scopeID + scopeName + scopeStatement + securityOwner + securityOwnerGroupID + securityOwnerUserID + securityTierID + securityTierName + sourceIdentifier + sourceType + status + tags + technicalOwner + technicalOwnerGroupID + technicalOwnerUserID + trustBoundaryDescription + updatedAt + updatedBy + workflowEligibleMarker + } } - -query GetPlatforms($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [PlatformOrder!], $where: PlatformWhereInput) { - platforms( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - where: $where - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - } - } - } +query GetPlatforms ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [PlatformOrder!], $where: PlatformWhereInput) { + platforms(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy, where: $where) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + accessModelID + accessModelName + businessOwner + businessOwnerGroupID + businessOwnerUserID + businessPurpose + containsPii + costCenter + createdAt + createdBy + criticalityID + criticalityName + dataFlowSummary + description + displayID + encryptionStatusID + encryptionStatusName + environmentID + environmentName + estimatedMonthlyCost + externalReferenceID + externalUUID + id + internalOwner + internalOwnerGroupID + internalOwnerUserID + metadata + name + ownerID + physicalLocation + platformDataClassificationID + platformDataClassificationName + platformKindID + platformKindName + platformOwnerID + purchaseDate + region + scopeID + scopeName + scopeStatement + securityOwner + securityOwnerGroupID + securityOwnerUserID + securityTierID + securityTierName + sourceIdentifier + sourceType + status + tags + technicalOwner + technicalOwnerGroupID + technicalOwnerUserID + trustBoundaryDescription + updatedAt + updatedBy + workflowEligibleMarker + } + } + } } - -mutation UpdatePlatform($updatePlatformId: ID!, $input: UpdatePlatformInput!, $architectureDiagrams: [Upload!], $dataFlowDiagrams: [Upload!], $trustBoundaryDiagrams: [Upload!]) { - updatePlatform( - id: $updatePlatformId - input: $input - architectureDiagrams: $architectureDiagrams - dataFlowDiagrams: $dataFlowDiagrams - trustBoundaryDiagrams: $trustBoundaryDiagrams - ) { - platform { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - assets { - edges { - node { - id - name - } - } - } - entities { - edges { - node { - id - name - } - } - } - sourceAssets { - edges { - node { - id - name - } - } - } - sourceEntities { - edges { - node { - id - name - } - } - } - outOfScopeAssets { - edges { - node { - id - name - } - } - } - outOfScopeVendors { - edges { - node { - id - name - } - } - } - architectureDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - dataFlowDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - trustBoundaryDiagrams { - edges { - node { - id - categoryType - base64 - providedFileName - } - } - } - } - } +mutation UpdatePlatform ($updatePlatformId: ID!, $input: UpdatePlatformInput!, $architectureDiagrams: [Upload!], $dataFlowDiagrams: [Upload!], $trustBoundaryDiagrams: [Upload!]) { + updatePlatform(id: $updatePlatformId, input: $input, architectureDiagrams: $architectureDiagrams, dataFlowDiagrams: $dataFlowDiagrams, trustBoundaryDiagrams: $trustBoundaryDiagrams) { + platform { + accessModelID + accessModelName + businessOwner + businessOwnerGroupID + businessOwnerUserID + businessPurpose + containsPii + costCenter + createdAt + createdBy + criticalityID + criticalityName + dataFlowSummary + description + displayID + encryptionStatusID + encryptionStatusName + environmentID + environmentName + estimatedMonthlyCost + externalReferenceID + externalUUID + id + internalOwner + internalOwnerGroupID + internalOwnerUserID + metadata + name + ownerID + physicalLocation + platformDataClassificationID + platformDataClassificationName + platformKindID + platformKindName + platformOwnerID + purchaseDate + region + scopeID + scopeName + scopeStatement + securityOwner + securityOwnerGroupID + securityOwnerUserID + securityTierID + securityTierName + sourceIdentifier + sourceType + status + tags + technicalOwner + technicalOwnerGroupID + technicalOwnerUserID + trustBoundaryDescription + updatedAt + updatedBy + workflowEligibleMarker + assets { + edges { + node { + id + name + } + } + } + entities { + edges { + node { + id + name + } + } + } + sourceAssets { + edges { + node { + id + name + } + } + } + sourceEntities { + edges { + node { + id + name + } + } + } + outOfScopeAssets { + edges { + node { + id + name + } + } + } + outOfScopeVendors { + edges { + node { + id + name + } + } + } + architectureDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + dataFlowDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + trustBoundaryDiagrams { + edges { + node { + id + categoryType + base64 + providedFileName + } + } + } + } + } } diff --git a/internal/graphapi/query/remediation.graphql b/internal/graphapi/query/remediation.graphql index 7b5919a623..ebddc78e84 100644 --- a/internal/graphapi/query/remediation.graphql +++ b/internal/graphapi/query/remediation.graphql @@ -1,387 +1,377 @@ -mutation CreateBulkCSVRemediation($input: Upload!) { - createBulkCSVRemediation(input: $input) { - remediations { - completedAt - createdAt - createdBy - displayID - dueAt - environmentID - environmentName - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - internalNotes - metadata - ownerID - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - scopeID - scopeName - source - state - status - summary - systemInternalID - systemOwned - tags - ticketReference - title - updatedAt - updatedBy - } - } +mutation CreateBulkCSVRemediation ($input: Upload!) { + createBulkCSVRemediation(input: $input) { + remediations { + completedAt + createdAt + createdBy + displayID + dueAt + environmentID + environmentName + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + internalNotes + metadata + ownerID + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + scopeID + scopeName + source + state + status + summary + systemInternalID + systemOwned + tags + ticketReference + title + updatedAt + updatedBy + } + } } - -mutation CreateBulkRemediation($input: [CreateRemediationInput!]) { - createBulkRemediation(input: $input) { - remediations { - completedAt - createdAt - createdBy - displayID - dueAt - environmentID - environmentName - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - internalNotes - metadata - ownerID - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - scopeID - scopeName - source - state - status - summary - systemInternalID - systemOwned - tags - ticketReference - title - updatedAt - updatedBy - } - } +mutation CreateBulkRemediation ($input: [CreateRemediationInput!]) { + createBulkRemediation(input: $input) { + remediations { + completedAt + createdAt + createdBy + displayID + dueAt + environmentID + environmentName + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + internalNotes + metadata + ownerID + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + scopeID + scopeName + source + state + status + summary + systemInternalID + systemOwned + tags + ticketReference + title + updatedAt + updatedBy + } + } } - -mutation CreateRemediation($input: CreateRemediationInput!) { - createRemediation(input: $input) { - remediation { - completedAt - createdAt - createdBy - displayID - dueAt - environmentID - environmentName - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - internalNotes - metadata - ownerID - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - scopeID - scopeName - source - state - status - summary - systemInternalID - systemOwned - tags - ticketReference - title - updatedAt - updatedBy - } - } +mutation CreateRemediation ($input: CreateRemediationInput!) { + createRemediation(input: $input) { + remediation { + completedAt + createdAt + createdBy + displayID + dueAt + environmentID + environmentName + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + internalNotes + metadata + ownerID + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + scopeID + scopeName + source + state + status + summary + systemInternalID + systemOwned + tags + ticketReference + title + updatedAt + updatedBy + } + } } - -mutation DeleteBulkRemediation($ids: [ID!]!) { - deleteBulkRemediation(ids: $ids) { - deletedIDs - } +mutation DeleteBulkRemediation ($ids: [ID!]!) { + deleteBulkRemediation(ids: $ids) { + deletedIDs + } } - -mutation DeleteRemediation($deleteRemediationId: ID!) { - deleteRemediation(id: $deleteRemediationId) { - deletedID - } +mutation DeleteRemediation ($deleteRemediationId: ID!) { + deleteRemediation(id: $deleteRemediationId) { + deletedID + } } - query GetAllRemediations { - remediations { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - completedAt - createdAt - createdBy - dueAt - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - metadata - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - source - state - summary - tags - ticketReference - title - updatedAt - updatedBy - } - } - } + remediations { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + completedAt + createdAt + createdBy + dueAt + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + metadata + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + source + state + summary + tags + ticketReference + title + updatedAt + updatedBy + } + } + } } - -query GetRemediationByID($remediationId: ID!) { - remediation(id: $remediationId) { - completedAt - createdAt - createdBy - displayID - dueAt - environmentID - environmentName - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - internalNotes - metadata - ownerID - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - scopeID - scopeName - source - state - status - summary - systemInternalID - systemOwned - tags - ticketReference - title - updatedAt - updatedBy - } +query GetRemediationByID ($remediationId: ID!) { + remediation(id: $remediationId) { + completedAt + createdAt + createdBy + displayID + dueAt + environmentID + environmentName + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + internalNotes + metadata + ownerID + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + scopeID + scopeName + source + state + status + summary + systemInternalID + systemOwned + tags + ticketReference + title + updatedAt + updatedBy + } } - -query GetRemediations($first: Int, $last: Int, $where: RemediationWhereInput) { - remediations(first: $first, last: $last, where: $where) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - completedAt - createdAt - createdBy - dueAt - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - metadata - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - source - state - summary - tags - ticketReference - title - updatedAt - updatedBy - } - } - } +query GetRemediations ($first: Int, $last: Int, $where: RemediationWhereInput) { + remediations(first: $first, last: $last, where: $where) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + completedAt + createdAt + createdBy + dueAt + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + metadata + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + source + state + summary + tags + ticketReference + title + updatedAt + updatedBy + } + } + } } - -mutation UpdateBulkCSVRemediation($input: Upload!) { - updateBulkCSVRemediation(input: $input) { - remediations { - completedAt - createdAt - createdBy - displayID - dueAt - environmentID - environmentName - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - internalNotes - metadata - ownerID - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - scopeID - scopeName - source - state - status - summary - systemInternalID - systemOwned - tags - ticketReference - title - updatedAt - updatedBy - } - updatedIDs - } +mutation UpdateBulkCSVRemediation ($input: Upload!) { + updateBulkCSVRemediation(input: $input) { + remediations { + completedAt + createdAt + createdBy + displayID + dueAt + environmentID + environmentName + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + internalNotes + metadata + ownerID + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + scopeID + scopeName + source + state + status + summary + systemInternalID + systemOwned + tags + ticketReference + title + updatedAt + updatedBy + } + updatedIDs + } } - -mutation UpdateBulkRemediation($ids: [ID!]!, $input: UpdateRemediationInput!) { - updateBulkRemediation(ids: $ids, input: $input) { - remediations { - completedAt - createdAt - createdBy - displayID - dueAt - environmentID - environmentName - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - internalNotes - metadata - ownerID - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - scopeID - scopeName - source - state - status - summary - systemInternalID - systemOwned - tags - ticketReference - title - updatedAt - updatedBy - } - updatedIDs - } +mutation UpdateBulkRemediation ($ids: [ID!]!, $input: UpdateRemediationInput!) { + updateBulkRemediation(ids: $ids, input: $input) { + remediations { + completedAt + createdAt + createdBy + displayID + dueAt + environmentID + environmentName + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + internalNotes + metadata + ownerID + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + scopeID + scopeName + source + state + status + summary + systemInternalID + systemOwned + tags + ticketReference + title + updatedAt + updatedBy + } + updatedIDs + } } - -mutation UpdateRemediation($updateRemediationId: ID!, $input: UpdateRemediationInput!) { - updateRemediation(id: $updateRemediationId, input: $input) { - remediation { - completedAt - createdAt - createdBy - displayID - dueAt - environmentID - environmentName - error - explanation - externalID - externalOwnerID - externalURI - id - instructions - intent - internalNotes - metadata - ownerID - ownerReference - prGeneratedAt - pullRequestURI - repositoryURI - scopeID - scopeName - source - state - status - summary - systemInternalID - systemOwned - tags - ticketReference - title - updatedAt - updatedBy - } - } +mutation UpdateRemediation ($updateRemediationId: ID!, $input: UpdateRemediationInput!) { + updateRemediation(id: $updateRemediationId, input: $input) { + remediation { + completedAt + createdAt + createdBy + displayID + dueAt + environmentID + environmentName + error + explanation + externalID + externalOwnerID + externalURI + id + instructions + intent + internalNotes + metadata + ownerID + ownerReference + prGeneratedAt + pullRequestURI + repositoryURI + scopeID + scopeName + source + state + status + summary + systemInternalID + systemOwned + tags + ticketReference + title + updatedAt + updatedBy + } + } } diff --git a/internal/graphapi/schema/ent.graphql b/internal/graphapi/schema/ent.graphql index 74dbed2016..137a203041 100644 --- a/internal/graphapi/schema/ent.graphql +++ b/internal/graphapi/schema/ent.graphql @@ -45621,6 +45621,10 @@ type OrganizationSetting implements Node { whether or not a payment method has been added to the account """ paymentMethodAdded: Boolean! + """ + when will this organization be deleted? usually this is after org has not added a payment method afte n period + """ + pendingDeletionAt: DateTime organization: Organization files( """ @@ -46108,6 +46112,19 @@ input OrganizationSettingWhereInput { complianceWebhookTokenEqualFold: String complianceWebhookTokenContainsFold: String """ + pending_deletion_at field predicates + """ + pendingDeletionAt: DateTime + pendingDeletionAtNEQ: DateTime + pendingDeletionAtIn: [DateTime!] + pendingDeletionAtNotIn: [DateTime!] + pendingDeletionAtGT: DateTime + pendingDeletionAtGTE: DateTime + pendingDeletionAtLT: DateTime + pendingDeletionAtLTE: DateTime + pendingDeletionAtIsNil: Boolean + pendingDeletionAtNotNil: Boolean + """ organization edge predicates """ hasOrganization: Boolean diff --git a/internal/graphapi/schemahistory/ent.graphql b/internal/graphapi/schemahistory/ent.graphql index 372040eaf0..631e908681 100644 --- a/internal/graphapi/schemahistory/ent.graphql +++ b/internal/graphapi/schemahistory/ent.graphql @@ -22223,6 +22223,10 @@ type OrganizationSettingHistory implements Node { whether or not a payment method has been added to the account """ paymentMethodAdded: Boolean! + """ + when will this organization be deleted? usually this is after org has not added a payment method afte n period + """ + pendingDeletionAt: DateTime } """ A connection to a list of items. @@ -22722,6 +22726,19 @@ input OrganizationSettingHistoryWhereInput { complianceWebhookTokenNotNil: Boolean complianceWebhookTokenEqualFold: String complianceWebhookTokenContainsFold: String + """ + pending_deletion_at field predicates + """ + pendingDeletionAt: DateTime + pendingDeletionAtNEQ: DateTime + pendingDeletionAtIn: [DateTime!] + pendingDeletionAtNotIn: [DateTime!] + pendingDeletionAtGT: DateTime + pendingDeletionAtGTE: DateTime + pendingDeletionAtLT: DateTime + pendingDeletionAtLTE: DateTime + pendingDeletionAtIsNil: Boolean + pendingDeletionAtNotNil: Boolean } """ Information about pagination in a connection. diff --git a/internal/graphapi/testclient/checksum/.client_checksum b/internal/graphapi/testclient/checksum/.client_checksum index ca7b1fc88f..34a1391d78 100644 --- a/internal/graphapi/testclient/checksum/.client_checksum +++ b/internal/graphapi/testclient/checksum/.client_checksum @@ -1 +1 @@ -8a820204b41d57e3cf1d13a8919cde3ead6bc100af350a670959a6be6b98d85e \ No newline at end of file +e558e249b553271448e526676c7cd1a15ac8af1b18e8323292b3b669af40267c \ No newline at end of file diff --git a/internal/graphapi/testclient/graphclient.go b/internal/graphapi/testclient/graphclient.go index 5739271244..06a6c4e416 100644 --- a/internal/graphapi/testclient/graphclient.go +++ b/internal/graphapi/testclient/graphclient.go @@ -79922,6 +79922,7 @@ type GetOrganizationSettingByID_OrganizationSetting struct { Organization *GetOrganizationSettingByID_OrganizationSetting_Organization "json:\"organization,omitempty\" graphql:\"organization\"" OrganizationID *string "json:\"organizationID,omitempty\" graphql:\"organizationID\"" PaymentMethodAdded bool "json:\"paymentMethodAdded\" graphql:\"paymentMethodAdded\"" + PendingDeletionAt *models.DateTime "json:\"pendingDeletionAt,omitempty\" graphql:\"pendingDeletionAt\"" SamlCert *string "json:\"samlCert,omitempty\" graphql:\"samlCert\"" SamlIssuer *string "json:\"samlIssuer,omitempty\" graphql:\"samlIssuer\"" SamlSigninURL *string "json:\"samlSigninURL,omitempty\" graphql:\"samlSigninURL\"" @@ -80081,6 +80082,12 @@ func (t *GetOrganizationSettingByID_OrganizationSetting) GetPaymentMethodAdded() } return t.PaymentMethodAdded } +func (t *GetOrganizationSettingByID_OrganizationSetting) GetPendingDeletionAt() *models.DateTime { + if t == nil { + t = &GetOrganizationSettingByID_OrganizationSetting{} + } + return t.PendingDeletionAt +} func (t *GetOrganizationSettingByID_OrganizationSetting) GetSamlCert() *string { if t == nil { t = &GetOrganizationSettingByID_OrganizationSetting{} @@ -80380,6 +80387,7 @@ type UpdateOrganizationSetting_UpdateOrganizationSetting_OrganizationSetting str Organization *UpdateOrganizationSetting_UpdateOrganizationSetting_OrganizationSetting_Organization "json:\"organization,omitempty\" graphql:\"organization\"" OrganizationID *string "json:\"organizationID,omitempty\" graphql:\"organizationID\"" PaymentMethodAdded bool "json:\"paymentMethodAdded\" graphql:\"paymentMethodAdded\"" + PendingDeletionAt *models.DateTime "json:\"pendingDeletionAt,omitempty\" graphql:\"pendingDeletionAt\"" SamlCert *string "json:\"samlCert,omitempty\" graphql:\"samlCert\"" SamlIssuer *string "json:\"samlIssuer,omitempty\" graphql:\"samlIssuer\"" SamlSigninURL *string "json:\"samlSigninURL,omitempty\" graphql:\"samlSigninURL\"" @@ -80539,6 +80547,12 @@ func (t *UpdateOrganizationSetting_UpdateOrganizationSetting_OrganizationSetting } return t.PaymentMethodAdded } +func (t *UpdateOrganizationSetting_UpdateOrganizationSetting_OrganizationSetting) GetPendingDeletionAt() *models.DateTime { + if t == nil { + t = &UpdateOrganizationSetting_UpdateOrganizationSetting_OrganizationSetting{} + } + return t.PendingDeletionAt +} func (t *UpdateOrganizationSetting_UpdateOrganizationSetting_OrganizationSetting) GetSamlCert() *string { if t == nil { t = &UpdateOrganizationSetting_UpdateOrganizationSetting_OrganizationSetting{} @@ -183196,6 +183210,7 @@ const GetOrganizationSettingByIDDocument = `query GetOrganizationSettingByID ($o oidcDiscoveryEndpoint organizationID paymentMethodAdded + pendingDeletionAt samlCert samlIssuer samlSigninURL @@ -183309,6 +183324,7 @@ const UpdateOrganizationSettingDocument = `mutation UpdateOrganizationSetting ($ oidcDiscoveryEndpoint organizationID paymentMethodAdded + pendingDeletionAt samlCert samlIssuer samlSigninURL diff --git a/internal/graphapi/testclient/models.go b/internal/graphapi/testclient/models.go index 9bb4706b55..81c7368a9c 100644 --- a/internal/graphapi/testclient/models.go +++ b/internal/graphapi/testclient/models.go @@ -25213,9 +25213,11 @@ type OrganizationSetting struct { // unique token used to receive compliance webhook events ComplianceWebhookToken *string `json:"complianceWebhookToken,omitempty"` // whether or not a payment method has been added to the account - PaymentMethodAdded bool `json:"paymentMethodAdded"` - Organization *Organization `json:"organization,omitempty"` - Files *FileConnection `json:"files"` + PaymentMethodAdded bool `json:"paymentMethodAdded"` + // when will this organization be deleted? usually this is after org has not added a payment method afte n period + PendingDeletionAt *models.DateTime `json:"pendingDeletionAt,omitempty"` + Organization *Organization `json:"organization,omitempty"` + Files *FileConnection `json:"files"` } func (OrganizationSetting) IsNode() {} @@ -25612,6 +25614,17 @@ type OrganizationSettingWhereInput struct { ComplianceWebhookTokenNotNil *bool `json:"complianceWebhookTokenNotNil,omitempty"` ComplianceWebhookTokenEqualFold *string `json:"complianceWebhookTokenEqualFold,omitempty"` ComplianceWebhookTokenContainsFold *string `json:"complianceWebhookTokenContainsFold,omitempty"` + // pending_deletion_at field predicates + PendingDeletionAt *models.DateTime `json:"pendingDeletionAt,omitempty"` + PendingDeletionAtNeq *models.DateTime `json:"pendingDeletionAtNEQ,omitempty"` + PendingDeletionAtIn []*models.DateTime `json:"pendingDeletionAtIn,omitempty"` + PendingDeletionAtNotIn []*models.DateTime `json:"pendingDeletionAtNotIn,omitempty"` + PendingDeletionAtGt *models.DateTime `json:"pendingDeletionAtGT,omitempty"` + PendingDeletionAtGte *models.DateTime `json:"pendingDeletionAtGTE,omitempty"` + PendingDeletionAtLt *models.DateTime `json:"pendingDeletionAtLT,omitempty"` + PendingDeletionAtLte *models.DateTime `json:"pendingDeletionAtLTE,omitempty"` + PendingDeletionAtIsNil *bool `json:"pendingDeletionAtIsNil,omitempty"` + PendingDeletionAtNotNil *bool `json:"pendingDeletionAtNotNil,omitempty"` // organization edge predicates HasOrganization *bool `json:"hasOrganization,omitempty"` HasOrganizationWith []*OrganizationWhereInput `json:"hasOrganizationWith,omitempty"` diff --git a/internal/integrations/operations/ingest_generated.go b/internal/integrations/operations/ingest_generated.go index 5ea0e459a1..f203dc38fd 100644 --- a/internal/integrations/operations/ingest_generated.go +++ b/internal/integrations/operations/ingest_generated.go @@ -338,11 +338,11 @@ func buildIngestMetadata(integration *ent.Integration, operationName string, rec } if options.WorkflowMeta != nil { - metadata.WorkflowInstanceID = options.WorkflowMeta.InstanceID - metadata.WorkflowActionKey = options.WorkflowMeta.ActionKey + metadata.WorkflowInstanceID = options.WorkflowMeta.InstanceID + metadata.WorkflowActionKey = options.WorkflowMeta.ActionKey metadata.WorkflowActionIndex = options.WorkflowMeta.ActionIndex - metadata.WorkflowObjectID = options.WorkflowMeta.ObjectID - metadata.WorkflowObjectType = string(options.WorkflowMeta.ObjectType) + metadata.WorkflowObjectID = options.WorkflowMeta.ObjectID + metadata.WorkflowObjectType = string(options.WorkflowMeta.ObjectType) } return metadata From 564f512e5ed08e7601800104e2ce2c976f668240 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Fri, 10 Apr 2026 21:26:57 +0100 Subject: [PATCH 15/32] remove update skip --- .task/checksum/generate-ent-smart | 2 +- .task/checksum/generate-graphql-smart | 2 +- .../ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- internal/ent/generated/gql_mutation_input.go | 8 ++++ internal/ent/schema/organizationsetting.go | 2 +- .../checksum/.history_schema_checksum | 2 +- internal/graphapi/checksum/.schema_checksum | 2 +- .../clientschema/checksum/.schema_checksum | 2 +- internal/graphapi/clientschema/schema.graphql | 5 ++ internal/graphapi/generated/ent.generated.go | 16 ++++++- .../graphapi/generated/root_.generated.go | 5 ++ internal/graphapi/query/organization.graphql | 2 + internal/graphapi/schema/ent.graphql | 5 ++ .../testclient/checksum/.client_checksum | 2 +- internal/graphapi/testclient/graphclient.go | 46 +++++++++++++------ internal/graphapi/testclient/models.go | 17 ++++--- .../httpserve/specs/openlane.openapi.json | 2 +- .../httpserve/specs/openlane.openapi.yaml | 2 +- 19 files changed, 92 insertions(+), 34 deletions(-) diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index 39bec711e9..0a66a31de0 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1 +1 @@ -f654f5017c5bb30dda53b029921831f +8d9cf1c76a511f3a76f657547e03d2dc diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index 8d2e573649..5be4458666 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1 +1 @@ -375b1e6b642e42f8de8165de9185c1e6 +ca234f150a9d421a691a4a424689ccd5 diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index e3199ac551..5bee731805 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -7176b539f6d046726d637abfee501821c89bebf3cbd5b21fd321fe9c0f620522 \ No newline at end of file +760f6d4e6a8c077cad55522b05a0315d955103aa4efc8172e1fd2663f248f5cb \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index 8a1d5d7fda..5209374123 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -0f22125c5b4702289f1a4ac2a2cb8f380b6cfa17a429ce79992b77ae333ccf37 \ No newline at end of file +65de0d9d84ae0a01c8f43e663231e755e3e8efb29e80d5b1281a0f2d98cdd062 \ No newline at end of file diff --git a/internal/ent/generated/gql_mutation_input.go b/internal/ent/generated/gql_mutation_input.go index bcd9f9074b..8d9445954b 100644 --- a/internal/ent/generated/gql_mutation_input.go +++ b/internal/ent/generated/gql_mutation_input.go @@ -17678,6 +17678,8 @@ type UpdateOrganizationSettingInput struct { MultifactorAuthEnforced *bool ClearComplianceWebhookToken bool ComplianceWebhookToken *string + ClearPendingDeletionAt bool + PendingDeletionAt *models.DateTime ClearOrganization bool OrganizationID *string ClearFiles bool @@ -17828,6 +17830,12 @@ func (i *UpdateOrganizationSettingInput) Mutate(m *OrganizationSettingMutation) if v := i.ComplianceWebhookToken; v != nil { m.SetComplianceWebhookToken(*v) } + if i.ClearPendingDeletionAt { + m.ClearPendingDeletionAt() + } + if v := i.PendingDeletionAt; v != nil { + m.SetPendingDeletionAt(*v) + } if i.ClearOrganization { m.ClearOrganization() } diff --git a/internal/ent/schema/organizationsetting.go b/internal/ent/schema/organizationsetting.go index 6f427a8b02..dadbba3e36 100644 --- a/internal/ent/schema/organizationsetting.go +++ b/internal/ent/schema/organizationsetting.go @@ -163,7 +163,7 @@ func (OrganizationSetting) Fields() []ent.Field { Optional(). Nillable(). Annotations( - entgql.Skip(entgql.SkipMutationCreateInput | entgql.SkipMutationUpdateInput), + entgql.Skip(entgql.SkipMutationCreateInput), ), } } diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index b342411b4f..80899209b5 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1 +1 @@ -ca53205da473ccc07ac75235ada6d985dd823e3bc1b74467a5c98ffcd4dc56a3 \ No newline at end of file +4f9b7fe05f788d4def84306cdd62219bd1228e675acfe1c38baa651d3f3550a6 \ No newline at end of file diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index 6b64870c5f..d471fbdbeb 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1 +1 @@ -df75b5bd6bd0c7afbb2a947593221bf36228aff14ae0f01307eb996724602398 \ No newline at end of file +c07031c2dc3a39a2ccd0c06f32652694ca463cc415c62071ccbfd13dff781411 \ No newline at end of file diff --git a/internal/graphapi/clientschema/checksum/.schema_checksum b/internal/graphapi/clientschema/checksum/.schema_checksum index 6e4b5ac28a..3fe60e1a49 100644 --- a/internal/graphapi/clientschema/checksum/.schema_checksum +++ b/internal/graphapi/clientschema/checksum/.schema_checksum @@ -1 +1 @@ -118dc7f6b5222bc34c0094a1efaa9cca9399d716017455a7c5b10682924c4978 \ No newline at end of file +696b2cbcc4a962d31848e803dd36b1275fdb672391eb3a6458a445692989c2dc \ No newline at end of file diff --git a/internal/graphapi/clientschema/schema.graphql b/internal/graphapi/clientschema/schema.graphql index 986c1ecaa6..a0661717e7 100644 --- a/internal/graphapi/clientschema/schema.graphql +++ b/internal/graphapi/clientschema/schema.graphql @@ -89985,6 +89985,11 @@ input UpdateOrganizationSettingInput { """ complianceWebhookToken: String clearComplianceWebhookToken: Boolean + """ + when will this organization be deleted? usually this is after org has not added a payment method afte n period + """ + pendingDeletionAt: DateTime + clearPendingDeletionAt: Boolean organizationID: ID clearOrganization: Boolean addFileIDs: [ID!] diff --git a/internal/graphapi/generated/ent.generated.go b/internal/graphapi/generated/ent.generated.go index 515fa832aa..4e9a61d905 100644 --- a/internal/graphapi/generated/ent.generated.go +++ b/internal/graphapi/generated/ent.generated.go @@ -427139,7 +427139,7 @@ func (ec *executionContext) unmarshalInputUpdateOrganizationSettingInput(ctx con asMap[k] = v } - fieldsInOrder := [...]string{"tags", "appendTags", "clearTags", "domains", "appendDomains", "clearDomains", "billingContact", "clearBillingContact", "billingEmail", "clearBillingEmail", "billingPhone", "clearBillingPhone", "billingAddress", "clearBillingAddress", "taxIdentifier", "clearTaxIdentifier", "geoLocation", "clearGeoLocation", "billingNotificationsEnabled", "allowedEmailDomains", "appendAllowedEmailDomains", "clearAllowedEmailDomains", "allowMatchingDomainsAutojoin", "clearAllowMatchingDomainsAutojoin", "identityProvider", "clearIdentityProvider", "identityProviderClientID", "clearIdentityProviderClientID", "identityProviderClientSecret", "clearIdentityProviderClientSecret", "identityProviderMetadataEndpoint", "clearIdentityProviderMetadataEndpoint", "identityProviderEntityID", "clearIdentityProviderEntityID", "oidcDiscoveryEndpoint", "clearOidcDiscoveryEndpoint", "samlSigninURL", "clearSamlSigninURL", "samlIssuer", "clearSamlIssuer", "samlCert", "clearSamlCert", "identityProviderLoginEnforced", "multifactorAuthEnforced", "clearMultifactorAuthEnforced", "complianceWebhookToken", "clearComplianceWebhookToken", "organizationID", "clearOrganization", "addFileIDs", "removeFileIDs", "clearFiles"} + fieldsInOrder := [...]string{"tags", "appendTags", "clearTags", "domains", "appendDomains", "clearDomains", "billingContact", "clearBillingContact", "billingEmail", "clearBillingEmail", "billingPhone", "clearBillingPhone", "billingAddress", "clearBillingAddress", "taxIdentifier", "clearTaxIdentifier", "geoLocation", "clearGeoLocation", "billingNotificationsEnabled", "allowedEmailDomains", "appendAllowedEmailDomains", "clearAllowedEmailDomains", "allowMatchingDomainsAutojoin", "clearAllowMatchingDomainsAutojoin", "identityProvider", "clearIdentityProvider", "identityProviderClientID", "clearIdentityProviderClientID", "identityProviderClientSecret", "clearIdentityProviderClientSecret", "identityProviderMetadataEndpoint", "clearIdentityProviderMetadataEndpoint", "identityProviderEntityID", "clearIdentityProviderEntityID", "oidcDiscoveryEndpoint", "clearOidcDiscoveryEndpoint", "samlSigninURL", "clearSamlSigninURL", "samlIssuer", "clearSamlIssuer", "samlCert", "clearSamlCert", "identityProviderLoginEnforced", "multifactorAuthEnforced", "clearMultifactorAuthEnforced", "complianceWebhookToken", "clearComplianceWebhookToken", "pendingDeletionAt", "clearPendingDeletionAt", "organizationID", "clearOrganization", "addFileIDs", "removeFileIDs", "clearFiles"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -427475,6 +427475,20 @@ func (ec *executionContext) unmarshalInputUpdateOrganizationSettingInput(ctx con return it, err } it.ClearComplianceWebhookToken = data + case "pendingDeletionAt": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAt")) + data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) + if err != nil { + return it, err + } + it.PendingDeletionAt = data + case "clearPendingDeletionAt": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clearPendingDeletionAt")) + data, err := ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.ClearPendingDeletionAt = data case "organizationID": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("organizationID")) data, err := ec.unmarshalOID2ᚖstring(ctx, v) diff --git a/internal/graphapi/generated/root_.generated.go b/internal/graphapi/generated/root_.generated.go index 8bf9cdf175..dc46286651 100644 --- a/internal/graphapi/generated/root_.generated.go +++ b/internal/graphapi/generated/root_.generated.go @@ -132386,6 +132386,11 @@ input UpdateOrganizationSettingInput { """ complianceWebhookToken: String clearComplianceWebhookToken: Boolean + """ + when will this organization be deleted? usually this is after org has not added a payment method afte n period + """ + pendingDeletionAt: DateTime + clearPendingDeletionAt: Boolean organizationID: ID clearOrganization: Boolean addFileIDs: [ID!] diff --git a/internal/graphapi/query/organization.graphql b/internal/graphapi/query/organization.graphql index 7252a36fa1..09764c7ce4 100644 --- a/internal/graphapi/query/organization.graphql +++ b/internal/graphapi/query/organization.graphql @@ -146,6 +146,8 @@ query GetAllOrganizations { taxIdentifier geoLocation tags + paymentMethodAdded + pendingDeletionAt } orgSubscriptions { stripeSubscriptionStatus diff --git a/internal/graphapi/schema/ent.graphql b/internal/graphapi/schema/ent.graphql index 137a203041..a9940d4285 100644 --- a/internal/graphapi/schema/ent.graphql +++ b/internal/graphapi/schema/ent.graphql @@ -76126,6 +76126,11 @@ input UpdateOrganizationSettingInput { """ complianceWebhookToken: String clearComplianceWebhookToken: Boolean + """ + when will this organization be deleted? usually this is after org has not added a payment method afte n period + """ + pendingDeletionAt: DateTime + clearPendingDeletionAt: Boolean organizationID: ID clearOrganization: Boolean addFileIDs: [ID!] diff --git a/internal/graphapi/testclient/checksum/.client_checksum b/internal/graphapi/testclient/checksum/.client_checksum index 34a1391d78..c6292de32a 100644 --- a/internal/graphapi/testclient/checksum/.client_checksum +++ b/internal/graphapi/testclient/checksum/.client_checksum @@ -1 +1 @@ -e558e249b553271448e526676c7cd1a15ac8af1b18e8323292b3b669af40267c \ No newline at end of file +bf9f862842c3eaa36ce72d2300d7c81e236d0fb5e6d1f5569cddf82734328d19 \ No newline at end of file diff --git a/internal/graphapi/testclient/graphclient.go b/internal/graphapi/testclient/graphclient.go index 06a6c4e416..b3105c63c4 100644 --- a/internal/graphapi/testclient/graphclient.go +++ b/internal/graphapi/testclient/graphclient.go @@ -77633,21 +77633,23 @@ func (t *GetAllOrganizations_Organizations_Edges_Node_Members) GetTotalCount() i } type GetAllOrganizations_Organizations_Edges_Node_Setting struct { - AllowMatchingDomainsAutojoin *bool "json:\"allowMatchingDomainsAutojoin,omitempty\" graphql:\"allowMatchingDomainsAutojoin\"" - AllowedEmailDomains []string "json:\"allowedEmailDomains,omitempty\" graphql:\"allowedEmailDomains\"" - BillingAddress *models.Address "json:\"billingAddress,omitempty\" graphql:\"billingAddress\"" - BillingContact *string "json:\"billingContact,omitempty\" graphql:\"billingContact\"" - BillingEmail *string "json:\"billingEmail,omitempty\" graphql:\"billingEmail\"" - BillingPhone *string "json:\"billingPhone,omitempty\" graphql:\"billingPhone\"" - CreatedAt *time.Time "json:\"createdAt,omitempty\" graphql:\"createdAt\"" - CreatedBy *string "json:\"createdBy,omitempty\" graphql:\"createdBy\"" - Domains []string "json:\"domains,omitempty\" graphql:\"domains\"" - GeoLocation *enums.Region "json:\"geoLocation,omitempty\" graphql:\"geoLocation\"" - ID string "json:\"id\" graphql:\"id\"" - Tags []string "json:\"tags,omitempty\" graphql:\"tags\"" - TaxIdentifier *string "json:\"taxIdentifier,omitempty\" graphql:\"taxIdentifier\"" - UpdatedAt *time.Time "json:\"updatedAt,omitempty\" graphql:\"updatedAt\"" - UpdatedBy *string "json:\"updatedBy,omitempty\" graphql:\"updatedBy\"" + AllowMatchingDomainsAutojoin *bool "json:\"allowMatchingDomainsAutojoin,omitempty\" graphql:\"allowMatchingDomainsAutojoin\"" + AllowedEmailDomains []string "json:\"allowedEmailDomains,omitempty\" graphql:\"allowedEmailDomains\"" + BillingAddress *models.Address "json:\"billingAddress,omitempty\" graphql:\"billingAddress\"" + BillingContact *string "json:\"billingContact,omitempty\" graphql:\"billingContact\"" + BillingEmail *string "json:\"billingEmail,omitempty\" graphql:\"billingEmail\"" + BillingPhone *string "json:\"billingPhone,omitempty\" graphql:\"billingPhone\"" + CreatedAt *time.Time "json:\"createdAt,omitempty\" graphql:\"createdAt\"" + CreatedBy *string "json:\"createdBy,omitempty\" graphql:\"createdBy\"" + Domains []string "json:\"domains,omitempty\" graphql:\"domains\"" + GeoLocation *enums.Region "json:\"geoLocation,omitempty\" graphql:\"geoLocation\"" + ID string "json:\"id\" graphql:\"id\"" + PaymentMethodAdded bool "json:\"paymentMethodAdded\" graphql:\"paymentMethodAdded\"" + PendingDeletionAt *models.DateTime "json:\"pendingDeletionAt,omitempty\" graphql:\"pendingDeletionAt\"" + Tags []string "json:\"tags,omitempty\" graphql:\"tags\"" + TaxIdentifier *string "json:\"taxIdentifier,omitempty\" graphql:\"taxIdentifier\"" + UpdatedAt *time.Time "json:\"updatedAt,omitempty\" graphql:\"updatedAt\"" + UpdatedBy *string "json:\"updatedBy,omitempty\" graphql:\"updatedBy\"" } func (t *GetAllOrganizations_Organizations_Edges_Node_Setting) GetAllowMatchingDomainsAutojoin() *bool { @@ -77716,6 +77718,18 @@ func (t *GetAllOrganizations_Organizations_Edges_Node_Setting) GetID() string { } return t.ID } +func (t *GetAllOrganizations_Organizations_Edges_Node_Setting) GetPaymentMethodAdded() bool { + if t == nil { + t = &GetAllOrganizations_Organizations_Edges_Node_Setting{} + } + return t.PaymentMethodAdded +} +func (t *GetAllOrganizations_Organizations_Edges_Node_Setting) GetPendingDeletionAt() *models.DateTime { + if t == nil { + t = &GetAllOrganizations_Organizations_Edges_Node_Setting{} + } + return t.PendingDeletionAt +} func (t *GetAllOrganizations_Organizations_Edges_Node_Setting) GetTags() []string { if t == nil { t = &GetAllOrganizations_Organizations_Edges_Node_Setting{} @@ -182730,6 +182744,8 @@ const GetAllOrganizationsDocument = `query GetAllOrganizations { taxIdentifier geoLocation tags + paymentMethodAdded + pendingDeletionAt } orgSubscriptions { stripeSubscriptionStatus diff --git a/internal/graphapi/testclient/models.go b/internal/graphapi/testclient/models.go index 81c7368a9c..13cf1d06da 100644 --- a/internal/graphapi/testclient/models.go +++ b/internal/graphapi/testclient/models.go @@ -42186,13 +42186,16 @@ type UpdateOrganizationSettingInput struct { MultifactorAuthEnforced *bool `json:"multifactorAuthEnforced,omitempty"` ClearMultifactorAuthEnforced *bool `json:"clearMultifactorAuthEnforced,omitempty"` // unique token used to receive compliance webhook events - ComplianceWebhookToken *string `json:"complianceWebhookToken,omitempty"` - ClearComplianceWebhookToken *bool `json:"clearComplianceWebhookToken,omitempty"` - OrganizationID *string `json:"organizationID,omitempty"` - ClearOrganization *bool `json:"clearOrganization,omitempty"` - AddFileIDs []string `json:"addFileIDs,omitempty"` - RemoveFileIDs []string `json:"removeFileIDs,omitempty"` - ClearFiles *bool `json:"clearFiles,omitempty"` + ComplianceWebhookToken *string `json:"complianceWebhookToken,omitempty"` + ClearComplianceWebhookToken *bool `json:"clearComplianceWebhookToken,omitempty"` + // when will this organization be deleted? usually this is after org has not added a payment method afte n period + PendingDeletionAt *models.DateTime `json:"pendingDeletionAt,omitempty"` + ClearPendingDeletionAt *bool `json:"clearPendingDeletionAt,omitempty"` + OrganizationID *string `json:"organizationID,omitempty"` + ClearOrganization *bool `json:"clearOrganization,omitempty"` + AddFileIDs []string `json:"addFileIDs,omitempty"` + RemoveFileIDs []string `json:"removeFileIDs,omitempty"` + ClearFiles *bool `json:"clearFiles,omitempty"` } // UpdatePersonalAccessTokenInput is used for update PersonalAccessToken object. diff --git a/internal/httpserve/specs/openlane.openapi.json b/internal/httpserve/specs/openlane.openapi.json index 0f1051cf65..3fcddf3aba 100644 --- a/internal/httpserve/specs/openlane.openapi.json +++ b/internal/httpserve/specs/openlane.openapi.json @@ -3426,7 +3426,7 @@ "examples": { "error": { "value": { - "error": "googleapi: Error 401: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project., unauthorized", + "error": "Get \"https://www.googleapis.com/oauth2/v2/userinfo?alt=json\u0026prettyPrint=false\": dial tcp: lookup www.googleapis.com: i/o timeout", "error_code": "INVALID_INPUT", "success": false } diff --git a/internal/httpserve/specs/openlane.openapi.yaml b/internal/httpserve/specs/openlane.openapi.yaml index d16b44fec7..96a8719e3c 100644 --- a/internal/httpserve/specs/openlane.openapi.yaml +++ b/internal/httpserve/specs/openlane.openapi.yaml @@ -2462,7 +2462,7 @@ paths: examples: error: value: - error: 'googleapi: Error 401: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project., unauthorized' + error: 'Get "https://www.googleapis.com/oauth2/v2/userinfo?alt=json&prettyPrint=false": dial tcp: lookup www.googleapis.com: i/o timeout' error_code: INVALID_INPUT success: false schema: From f9570a3ffe6d17d97b2fbd4733f26c291fb46b9d Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Mon, 13 Apr 2026 23:36:29 +0100 Subject: [PATCH 16/32] task db:create --- ...54_organization_settings_pending_deletion.sql | 7 +++++++ ...ization_settings_pending_deletion_history.sql | 7 +++++++ db/migrations-goose-postgres/atlas.sum | 16 +++------------- ...27_organization_settings_pending_deletion.sql | 2 ++ ...ization_settings_pending_deletion_history.sql | 2 ++ db/migrations/atlas.sum | 16 +++------------- 6 files changed, 24 insertions(+), 26 deletions(-) create mode 100644 db/migrations-goose-postgres/20260413223454_organization_settings_pending_deletion.sql create mode 100644 db/migrations-goose-postgres/20260413223505_organization_settings_pending_deletion_history.sql create mode 100644 db/migrations/20260413223427_organization_settings_pending_deletion.sql create mode 100644 db/migrations/20260413223440_organization_settings_pending_deletion_history.sql diff --git a/db/migrations-goose-postgres/20260413223454_organization_settings_pending_deletion.sql b/db/migrations-goose-postgres/20260413223454_organization_settings_pending_deletion.sql new file mode 100644 index 0000000000..71d9dabd55 --- /dev/null +++ b/db/migrations-goose-postgres/20260413223454_organization_settings_pending_deletion.sql @@ -0,0 +1,7 @@ +-- +goose Up +-- modify "organization_settings" table +ALTER TABLE "organization_settings" ADD COLUMN "pending_deletion_at" timestamptz NULL; + +-- +goose Down +-- reverse: modify "organization_settings" table +ALTER TABLE "organization_settings" DROP COLUMN "pending_deletion_at"; diff --git a/db/migrations-goose-postgres/20260413223505_organization_settings_pending_deletion_history.sql b/db/migrations-goose-postgres/20260413223505_organization_settings_pending_deletion_history.sql new file mode 100644 index 0000000000..e5c73bf6ac --- /dev/null +++ b/db/migrations-goose-postgres/20260413223505_organization_settings_pending_deletion_history.sql @@ -0,0 +1,7 @@ +-- +goose Up +-- modify "organization_setting_history" table +ALTER TABLE "organization_setting_history" ADD COLUMN "pending_deletion_at" timestamptz NULL; + +-- +goose Down +-- reverse: modify "organization_setting_history" table +ALTER TABLE "organization_setting_history" DROP COLUMN "pending_deletion_at"; diff --git a/db/migrations-goose-postgres/atlas.sum b/db/migrations-goose-postgres/atlas.sum index 05708497bd..f6f8722436 100644 --- a/db/migrations-goose-postgres/atlas.sum +++ b/db/migrations-goose-postgres/atlas.sum @@ -1,10 +1,4 @@ -<<<<<<< HEAD -h1:+ePPh56qGmoXtliNhNKNS7tFP84eeb5XyPLUHgcfBxY= -||||||| 88f89acb1 -h1:naXeXzbYVaesdBDbBF5ZKaK2td5J9ZQUeUi7uno/Sc0= -======= -h1:Oj+iNwTe6GXTEIv0KaNa+p/72HK86eOlVIUuY6YsZmw= ->>>>>>> origin/main +h1:rJXOtnZpcgin2m7NN7yYmx+o+m46DE5pjs+Fbwy4b8A= 20251229183203_init.sql h1:g/05irCXoqKFObJV2PPLuvDRqma+da41VPsZ5fXQgfE= 20251229183205_init_history.sql h1:P/q2kAHb8zfNMOWzYkKtPbOwoh9GdJUQljSNAiPEjYI= 20251231045229_workflow.sql h1:uUPRLO4yw2y//fPGeqIXRrL+fiEN1TRGkF4wHiqPaPk= @@ -108,15 +102,11 @@ h1:Oj+iNwTe6GXTEIv0KaNa+p/72HK86eOlVIUuY6YsZmw= 20260407225000_vulnfieldupdates_history.sql h1:/O7u/7iOHrRnrE4jPQcJ65HIt3mrcT0yYtZHo+NPnDI= 20260408044535_risk_fields.sql h1:n9clyMuYmhF3bZdSetseLALyt7Fx5vE1dDfx8UelMpY= 20260408044538_risk_fields_history.sql h1:ncd06MV03ae12UQ362vQ/uRvBrv00/q3YdhlumzW3k0= -<<<<<<< HEAD -20260410191615_organization_settings_pending_deletion.sql h1:mpqXw4jpPJnPifIg8nxE4PAQnmcyUSM/fT8ZkjKis8A= -20260410191626_organization_settings_pending_deletion_history.sql h1:AEtey7I9DiTaYarGqr/OPqDm+0p7rL03DY84ujGYZxk= -||||||| 88f89acb1 -======= 20260410220700_integrationsupdates.sql h1:QwjVyaKvMwjYVtQmYo973ukf52TZoJOITSkfR7eBfQQ= 20260410220703_integrationsupdates_history.sql h1:Ot3p2nQTLTtqchTMjIjfwHWTI2K8nI6pybo76Ck94sI= 20260411061312_risk_status.sql h1:kk5WlQ/WXWN2Fj6IxtanaEAHSj3gNnPm78dW/buHkNI= 20260411061315_risk_status_history.sql h1:gf6iar2R1KYlit1HYuD0dQ4qRqiGPvPwMquwcVUCNNc= 20260412014212_risk_due.sql h1:DQfGfj1hCS75IrWYBjKwjGYof6YEC7RBlnRhBEPBs68= 20260412014218_risk_due_history.sql h1:Tu46804CppUkSweLwGQB/X7HKUNaaGPJfzMk5SzONq4= ->>>>>>> origin/main +20260413223454_organization_settings_pending_deletion.sql h1:eRMTou36MW0GAjDnb7ewI1PYJttFGORrV0hovomDa14= +20260413223505_organization_settings_pending_deletion_history.sql h1:NyrMRFgQ9aQR74CzESiS44cjIrSC+yHLzJ/3ZLiNHm8= diff --git a/db/migrations/20260413223427_organization_settings_pending_deletion.sql b/db/migrations/20260413223427_organization_settings_pending_deletion.sql new file mode 100644 index 0000000000..11507c0723 --- /dev/null +++ b/db/migrations/20260413223427_organization_settings_pending_deletion.sql @@ -0,0 +1,2 @@ +-- Modify "organization_settings" table +ALTER TABLE "organization_settings" ADD COLUMN "pending_deletion_at" timestamptz NULL; diff --git a/db/migrations/20260413223440_organization_settings_pending_deletion_history.sql b/db/migrations/20260413223440_organization_settings_pending_deletion_history.sql new file mode 100644 index 0000000000..340a5b0ca5 --- /dev/null +++ b/db/migrations/20260413223440_organization_settings_pending_deletion_history.sql @@ -0,0 +1,2 @@ +-- Modify "organization_setting_history" table +ALTER TABLE "organization_setting_history" ADD COLUMN "pending_deletion_at" timestamptz NULL; diff --git a/db/migrations/atlas.sum b/db/migrations/atlas.sum index 444150f86c..cadbc89651 100644 --- a/db/migrations/atlas.sum +++ b/db/migrations/atlas.sum @@ -1,10 +1,4 @@ -<<<<<<< HEAD -h1:4lrgPuw5uG9xYVK8VpjAICbVps/XFMROizrAGCb9QpM= -||||||| 88f89acb1 -h1:hVO5CSVqg580Ef6srZ8Q8jhacvxx8qx5OTonun4l5BQ= -======= -h1:+XZUV/IWms+k2as/aGqvuN8H7aZg4YIkPi4anEFP9v0= ->>>>>>> origin/main +h1:thPaVwOcz/bInGu6Ts0yd1DPqfyCWGBWoOl0XK3OVSA= 20251229183159_init.sql h1:3uf/ftr28zW8YUD9qAaY2GESQHC7pYmkhlI6oDWUCKU= 20251229183201_init_history.sql h1:1tFSeCDWvZgb2Ctw80C/s3tqVPNLADQw9fSDACzL8WA= 20251231045221_workflow.sql h1:5bLq4cHh2kxUV7xajK5bq5McKKpr88HmufYauTdsgUw= @@ -108,15 +102,11 @@ h1:+XZUV/IWms+k2as/aGqvuN8H7aZg4YIkPi4anEFP9v0= 20260407224954_vulnfieldupdates_history.sql h1:stWXvVqqGIZQ8vvERR2Ra5xlFbQYAwXvzJoCdLmPQqs= 20260408044529_risk_fields.sql h1:0h/AapJB1GGnRNx98qzkO4MHTKvkxBTDWfIV13VoFx0= 20260408044531_risk_fields_history.sql h1:LDW+Dm5eg6AX5/0dN4c2FW9GZnv6aTVJasHmXCsji+k= -<<<<<<< HEAD -20260410191549_organization_settings_pending_deletion.sql h1:oz7ntNP3Qo+bpxmPw8qJcMgGlJOpHrgbVkbDEQZzfYk= -20260410191601_organization_settings_pending_deletion_history.sql h1:jJ5XqBXD+zoyathRUCI8nQTpDrb0BEXM6C30euwPunE= -||||||| 88f89acb1 -======= 20260410220654_integrationsupdates.sql h1:9Wri+lEWbuDM/GXVCsUcuxpCAEOjvBQN2HnYFa0hJeg= 20260410220656_integrationsupdates_history.sql h1:Av7MNI3zh9u370gebeyBXz5h+YE/ugw62uyMb/sskU4= 20260411061304_risk_status.sql h1:r3O0/V6Wg0kutBX5jxjictfAsQyXcMBYkxvX9Njc6YQ= 20260411061307_risk_status_history.sql h1:XnlsrxnAq/IkUALVJKesGQpWXaxOGFzM3O6I+VpY5nE= 20260412014155_risk_due.sql h1:JE0LxsUquGE8T3a6HE5tjTdmH6T3OTSlX8CWaY0fNbk= 20260412014203_risk_due_history.sql h1:nP3mVlwIbZshfKpGs5A+lrW5lNbkW1nA5mX8DU5qHxs= ->>>>>>> origin/main +20260413223427_organization_settings_pending_deletion.sql h1:21wuMetB70GXO3s72toCeZ2Yv7Rx1jj6SA6JOkc1nx8= +20260413223440_organization_settings_pending_deletion_history.sql h1:oNv0GIWL/fXbnoXCnaMkONZWf6GZKb4T7OjTHdhPKrQ= From 5063fd099b872ea6726491c0f4ce5e2c15ccd93d Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Tue, 14 Apr 2026 01:58:59 +0100 Subject: [PATCH 17/32] allow mutation of org_settings by system admin --- .task/checksum/generate-ent-smart | 8 +- .task/checksum/generate-graphql-smart | 8 +- .task/checksum/generate-openapi-smart | 8 +- .../ent/checksum/.history_schema_checksum | 8 +- internal/ent/checksum/.schema_checksum | 8 +- internal/ent/csvgenerated/csv_generated.go | 718 +-- internal/ent/generated/gql_where_input.go | 10 + .../ent/historygenerated/gql_where_input.go | 10 + .../integration_mapping_generated.go | 4441 +++++++++-------- internal/ent/interceptors/organization.go | 4 + .../ent/interceptors/organizationsetting.go | 4 + internal/ent/schema/organization.go | 1 + internal/ent/schema/organizationsetting.go | 7 +- .../checksum/.history_schema_checksum | 8 +- internal/graphapi/checksum/.schema_checksum | 8 +- .../clientschema/checksum/.schema_checksum | 8 +- internal/graphapi/clientschema/schema.graphql | 5 + internal/graphapi/generated/ent.generated.go | 16 +- .../graphapi/generated/root_.generated.go | 5 + .../historygenerated/ent.generated.go | 16 +- .../historygenerated/root_.generated.go | 5 + .../checksum/.history_schema_checksum | 8 +- .../graphapi/historyschema/schema.graphql | 5 + .../graphapi/query/identityholder.graphql | 888 ++-- internal/graphapi/query/platform.graphql | 155 - internal/graphapi/schema/ent.graphql | 5 + internal/graphapi/schemahistory/ent.graphql | 5 + .../testclient/checksum/.client_checksum | 8 +- internal/graphapi/testclient/models.go | 3 + .../httpserve/specs/openlane.openapi.json | 2 +- .../httpserve/specs/openlane.openapi.yaml | 2 +- .../operations/ingest_generated.go | 8 +- 32 files changed, 3155 insertions(+), 3240 deletions(-) diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index 73aca249d0..73239faabb 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1,7 +1 @@ -<<<<<<< HEAD -8d9cf1c76a511f3a76f657547e03d2dc -||||||| 88f89acb1 -c624fa50f427be2982b702e4d2867226 -======= -9452e02653cad26bddff1521d0c6bf15 ->>>>>>> origin/main +7e2dbffcd9d8d87226c44c4daf98c7be diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index 597031e48e..886ef95a0a 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1,7 +1 @@ -<<<<<<< HEAD -ca234f150a9d421a691a4a424689ccd5 -||||||| 88f89acb1 -ab4f10c1f302b58e8894331c2638d026 -======= -6d403116f50c19ea1989090e2e803339 ->>>>>>> origin/main +c8aa24025d0ce1f8e3d97a90583ddde7 diff --git a/.task/checksum/generate-openapi-smart b/.task/checksum/generate-openapi-smart index 3d05bea539..a5331014eb 100644 --- a/.task/checksum/generate-openapi-smart +++ b/.task/checksum/generate-openapi-smart @@ -1,7 +1 @@ -<<<<<<< HEAD -3e50b013cc461ceed5bc2151e7688130 -||||||| 88f89acb1 -11bd8cdf78dd89d991c184f3915d031d -======= -f624c72fa9e845073db4e4bdb3b0eea1 ->>>>>>> origin/main +76e1ae53815c369bd25a0d735abf7690 diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index b18aca75f8..f937918ab0 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1,7 +1 @@ -<<<<<<< HEAD -760f6d4e6a8c077cad55522b05a0315d955103aa4efc8172e1fd2663f248f5cb -||||||| 88f89acb1 -75681d38f4e677d8c892151fa80193880a759e3e7317a41c9a3186496e8b7f3d -======= -161fb355e7972d97261ba30e17326d93d85e08dceb7eddefcc1f079a72eede96 ->>>>>>> origin/main +447ed99207a702f171e4e72bccbd9ec78ed9d5381dc951b201c9a28f1fa82b68 \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index fb8f64226b..fa631a4cf1 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1,7 +1 @@ -<<<<<<< HEAD -65de0d9d84ae0a01c8f43e663231e755e3e8efb29e80d5b1281a0f2d98cdd062 -||||||| 88f89acb1 -1e26ae909c12e7c362dff0b1d9b2afbb1278c2dbfcac8aaec65b27d9da337f14 -======= -ac973816a53cf1ab5187c339584ca8d14e345b014ce03adebda7c6aef16b988c ->>>>>>> origin/main +6bcac9e2fc580d23a6cde8aa64b1b12a2a30f01a6828050b9b2e0537e541e2b6 \ No newline at end of file diff --git a/internal/ent/csvgenerated/csv_generated.go b/internal/ent/csvgenerated/csv_generated.go index b85151d202..e7dfee7eb6 100644 --- a/internal/ent/csvgenerated/csv_generated.go +++ b/internal/ent/csvgenerated/csv_generated.go @@ -7,6 +7,7 @@ import ( "strings" "github.com/theopenlane/core/internal/ent/generated" + "github.com/theopenlane/core/internal/ent/generated/predicate" "github.com/theopenlane/core/internal/ent/generated/actionplan" "github.com/theopenlane/core/internal/ent/generated/asset" "github.com/theopenlane/core/internal/ent/generated/control" @@ -16,7 +17,6 @@ import ( "github.com/theopenlane/core/internal/ent/generated/identityholder" "github.com/theopenlane/core/internal/ent/generated/internalpolicy" "github.com/theopenlane/core/internal/ent/generated/platform" - "github.com/theopenlane/core/internal/ent/generated/predicate" "github.com/theopenlane/core/internal/ent/generated/procedure" "github.com/theopenlane/core/internal/ent/generated/risk" "github.com/theopenlane/core/internal/ent/generated/subcontrol" @@ -845,7 +845,8 @@ type CSVSchemaInfo struct { var CSVReferenceRegistry = map[string]CSVSchemaInfo{ "APIToken": { SchemaName: "APIToken", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "ActionPlan": { SchemaName: "ActionPlan", @@ -999,7 +1000,8 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Contact": { SchemaName: "Contact", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Control": { SchemaName: "Control", @@ -1072,23 +1074,28 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ControlImplementation": { SchemaName: "ControlImplementation", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "ControlObjective": { SchemaName: "ControlObjective", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "CustomDomain": { SchemaName: "CustomDomain", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "CustomTypeEnum": { SchemaName: "CustomTypeEnum", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "DNSVerification": { SchemaName: "DNSVerification", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "DirectoryAccount": { SchemaName: "DirectoryAccount", @@ -1105,31 +1112,38 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "DirectoryGroup": { SchemaName: "DirectoryGroup", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "DirectoryMembership": { SchemaName: "DirectoryMembership", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "DirectorySyncRun": { SchemaName: "DirectorySyncRun", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Discussion": { SchemaName: "Discussion", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "DocumentData": { SchemaName: "DocumentData", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "EmailBranding": { SchemaName: "EmailBranding", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "EmailTemplate": { SchemaName: "EmailTemplate", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Entity": { SchemaName: "Entity", @@ -1170,11 +1184,13 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "EntityType": { SchemaName: "EntityType", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Event": { SchemaName: "Event", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Evidence": { SchemaName: "Evidence", @@ -1191,35 +1207,43 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Export": { SchemaName: "Export", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "File": { SchemaName: "File", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Finding": { SchemaName: "Finding", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "FindingControl": { SchemaName: "FindingControl", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Group": { SchemaName: "Group", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "GroupMembership": { SchemaName: "GroupMembership", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "GroupSetting": { SchemaName: "GroupSetting", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Hush": { SchemaName: "Hush", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "IdentityHolder": { SchemaName: "IdentityHolder", @@ -1289,71 +1313,88 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Invite": { SchemaName: "Invite", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "JobResult": { SchemaName: "JobResult", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "JobRunner": { SchemaName: "JobRunner", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "JobRunnerRegistrationToken": { SchemaName: "JobRunnerRegistrationToken", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "JobRunnerToken": { SchemaName: "JobRunnerToken", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "JobTemplate": { SchemaName: "JobTemplate", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "MappableDomain": { SchemaName: "MappableDomain", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "MappedControl": { SchemaName: "MappedControl", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Narrative": { SchemaName: "Narrative", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Notification": { SchemaName: "Notification", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "NotificationPreference": { SchemaName: "NotificationPreference", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "NotificationTemplate": { SchemaName: "NotificationTemplate", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Onboarding": { SchemaName: "Onboarding", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "OrgMembership": { SchemaName: "OrgMembership", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Organization": { SchemaName: "Organization", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "OrganizationSetting": { SchemaName: "OrganizationSetting", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "PersonalAccessToken": { SchemaName: "PersonalAccessToken", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Platform": { SchemaName: "Platform", @@ -1516,7 +1557,8 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ProgramMembership": { SchemaName: "ProgramMembership", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Remediation": { SchemaName: "Remediation", @@ -1623,7 +1665,8 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "SLADefinition": { SchemaName: "SLADefinition", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Scan": { SchemaName: "Scan", @@ -1701,11 +1744,13 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ScheduledJobRun": { SchemaName: "ScheduledJobRun", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Standard": { SchemaName: "Standard", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Subcontrol": { SchemaName: "Subcontrol", @@ -1778,23 +1823,28 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Subprocessor": { SchemaName: "Subprocessor", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Subscriber": { SchemaName: "Subscriber", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "SystemDetail": { SchemaName: "SystemDetail", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "TFASetting": { SchemaName: "TFASetting", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "TagDefinition": { SchemaName: "TagDefinition", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Task": { SchemaName: "Task", @@ -1827,51 +1877,63 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Template": { SchemaName: "Template", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "TrustCenter": { SchemaName: "TrustCenter", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "TrustCenterCompliance": { SchemaName: "TrustCenterCompliance", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "TrustCenterDoc": { SchemaName: "TrustCenterDoc", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "TrustCenterEntity": { SchemaName: "TrustCenterEntity", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "TrustCenterFAQ": { SchemaName: "TrustCenterFAQ", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "TrustCenterNDARequest": { SchemaName: "TrustCenterNDARequest", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "TrustCenterSetting": { SchemaName: "TrustCenterSetting", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "TrustCenterSubprocessor": { SchemaName: "TrustCenterSubprocessor", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "TrustCenterWatermarkConfig": { SchemaName: "TrustCenterWatermarkConfig", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "User": { SchemaName: "User", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "UserSetting": { SchemaName: "UserSetting", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "VendorRiskScore": { SchemaName: "VendorRiskScore", @@ -1888,7 +1950,8 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "VendorScoringConfig": { SchemaName: "VendorScoringConfig", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, "Vulnerability": { SchemaName: "Vulnerability", @@ -1905,7 +1968,8 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "WorkflowDefinition": { SchemaName: "WorkflowDefinition", - Rules: []CSVReferenceRule{}, + Rules: []CSVReferenceRule{ + }, }, } @@ -1936,7 +2000,7 @@ func (APITokenCSVInput) CSVInputWrapper() {} // APITokenCSVUpdateInput wraps UpdateAPITokenInput with CSV reference columns for bulk updates. type APITokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateAPITokenInput } @@ -1945,10 +2009,10 @@ func (APITokenCSVUpdateInput) CSVInputWrapper() {} // ActionPlanCSVInput wraps CreateActionPlanInput with CSV reference columns. type ActionPlanCSVInput struct { - Input generated.CreateActionPlanInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + Input generated.CreateActionPlanInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks ActionPlanCSVInput for CSV header preprocessing. @@ -1957,11 +2021,11 @@ func (ActionPlanCSVInput) CSVInputWrapper() {} // ActionPlanCSVUpdateInput wraps UpdateActionPlanInput with CSV reference columns for bulk updates. type ActionPlanCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateActionPlanInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + ID string `csv:"ID"` + Input generated.UpdateActionPlanInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks ActionPlanCSVUpdateInput for CSV header preprocessing. @@ -1969,7 +2033,7 @@ func (ActionPlanCSVUpdateInput) CSVInputWrapper() {} // AssessmentCSVInput wraps CreateAssessmentInput with CSV reference columns. type AssessmentCSVInput struct { - Input generated.CreateAssessmentInput + Input generated.CreateAssessmentInput AssessmentTemplateRef string `csv:"AssessmentTemplateRef"` } @@ -1979,8 +2043,8 @@ func (AssessmentCSVInput) CSVInputWrapper() {} // AssessmentCSVUpdateInput wraps UpdateAssessmentInput with CSV reference columns for bulk updates. type AssessmentCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateAssessmentInput + ID string `csv:"ID"` + Input generated.UpdateAssessmentInput AssessmentTemplateRef string `csv:"AssessmentTemplateRef"` } @@ -1989,9 +2053,9 @@ func (AssessmentCSVUpdateInput) CSVInputWrapper() {} // AssessmentResponseCSVInput wraps CreateAssessmentResponseInput with CSV reference columns. type AssessmentResponseCSVInput struct { - Input generated.CreateAssessmentResponseInput + Input generated.CreateAssessmentResponseInput AssessmentIdentityHolderEmail string `csv:"AssessmentIdentityHolderEmail"` - AssessmentResponseEntityName string `csv:"AssessmentResponseEntityName"` + AssessmentResponseEntityName string `csv:"AssessmentResponseEntityName"` } // CSVInputWrapper marks AssessmentResponseCSVInput for CSV header preprocessing. @@ -1999,10 +2063,10 @@ func (AssessmentResponseCSVInput) CSVInputWrapper() {} // AssetCSVInput wraps CreateAssetInput with CSV reference columns. type AssetCSVInput struct { - Input generated.CreateAssetInput + Input generated.CreateAssetInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - SourcePlatformName string `csv:"SourcePlatformName"` + SourcePlatformName string `csv:"SourcePlatformName"` } // CSVInputWrapper marks AssetCSVInput for CSV header preprocessing. @@ -2011,11 +2075,11 @@ func (AssetCSVInput) CSVInputWrapper() {} // AssetCSVUpdateInput wraps UpdateAssetInput with CSV reference columns for bulk updates. type AssetCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateAssetInput + ID string `csv:"ID"` + Input generated.UpdateAssetInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - SourcePlatformName string `csv:"SourcePlatformName"` + SourcePlatformName string `csv:"SourcePlatformName"` } // CSVInputWrapper marks AssetCSVUpdateInput for CSV header preprocessing. @@ -2023,9 +2087,9 @@ func (AssetCSVUpdateInput) CSVInputWrapper() {} // CampaignCSVInput wraps CreateCampaignInput with CSV reference columns. type CampaignCSVInput struct { - Input generated.CreateCampaignInput - CampaignEntityName string `csv:"CampaignEntityName"` - CampaignTemplateRef string `csv:"CampaignTemplateRef"` + Input generated.CreateCampaignInput + CampaignEntityName string `csv:"CampaignEntityName"` + CampaignTemplateRef string `csv:"CampaignTemplateRef"` InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } @@ -2036,10 +2100,10 @@ func (CampaignCSVInput) CSVInputWrapper() {} // CampaignCSVUpdateInput wraps UpdateCampaignInput with CSV reference columns for bulk updates. type CampaignCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateCampaignInput - CampaignEntityName string `csv:"CampaignEntityName"` - CampaignTemplateRef string `csv:"CampaignTemplateRef"` + ID string `csv:"ID"` + Input generated.UpdateCampaignInput + CampaignEntityName string `csv:"CampaignEntityName"` + CampaignTemplateRef string `csv:"CampaignTemplateRef"` InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } @@ -2049,7 +2113,7 @@ func (CampaignCSVUpdateInput) CSVInputWrapper() {} // CampaignTargetCSVInput wraps CreateCampaignTargetInput with CSV reference columns. type CampaignTargetCSVInput struct { - Input generated.CreateCampaignTargetInput + Input generated.CreateCampaignTargetInput CampaignTargetGroupName string `csv:"CampaignTargetGroupName"` CampaignTargetUserEmail string `csv:"CampaignTargetUserEmail"` } @@ -2060,8 +2124,8 @@ func (CampaignTargetCSVInput) CSVInputWrapper() {} // CampaignTargetCSVUpdateInput wraps UpdateCampaignTargetInput with CSV reference columns for bulk updates. type CampaignTargetCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateCampaignTargetInput + ID string `csv:"ID"` + Input generated.UpdateCampaignTargetInput CampaignTargetGroupName string `csv:"CampaignTargetGroupName"` CampaignTargetUserEmail string `csv:"CampaignTargetUserEmail"` } @@ -2080,7 +2144,7 @@ func (ContactCSVInput) CSVInputWrapper() {} // ContactCSVUpdateInput wraps UpdateContactInput with CSV reference columns for bulk updates. type ContactCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateContactInput } @@ -2089,15 +2153,15 @@ func (ContactCSVUpdateInput) CSVInputWrapper() {} // ControlCSVInput wraps CreateControlInput with CSV reference columns. type ControlCSVInput struct { - Input generated.CreateControlInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + Input generated.CreateControlInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks ControlCSVInput for CSV header preprocessing. @@ -2106,16 +2170,16 @@ func (ControlCSVInput) CSVInputWrapper() {} // ControlCSVUpdateInput wraps UpdateControlInput with CSV reference columns for bulk updates. type ControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateControlInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + ID string `csv:"ID"` + Input generated.UpdateControlInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks ControlCSVUpdateInput for CSV header preprocessing. @@ -2132,7 +2196,7 @@ func (ControlImplementationCSVInput) CSVInputWrapper() {} // ControlImplementationCSVUpdateInput wraps UpdateControlImplementationInput with CSV reference columns for bulk updates. type ControlImplementationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateControlImplementationInput } @@ -2150,7 +2214,7 @@ func (ControlObjectiveCSVInput) CSVInputWrapper() {} // ControlObjectiveCSVUpdateInput wraps UpdateControlObjectiveInput with CSV reference columns for bulk updates. type ControlObjectiveCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateControlObjectiveInput } @@ -2168,7 +2232,7 @@ func (CustomDomainCSVInput) CSVInputWrapper() {} // CustomDomainCSVUpdateInput wraps UpdateCustomDomainInput with CSV reference columns for bulk updates. type CustomDomainCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateCustomDomainInput } @@ -2186,7 +2250,7 @@ func (CustomTypeEnumCSVInput) CSVInputWrapper() {} // CustomTypeEnumCSVUpdateInput wraps UpdateCustomTypeEnumInput with CSV reference columns for bulk updates. type CustomTypeEnumCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateCustomTypeEnumInput } @@ -2204,7 +2268,7 @@ func (DNSVerificationCSVInput) CSVInputWrapper() {} // DNSVerificationCSVUpdateInput wraps UpdateDNSVerificationInput with CSV reference columns for bulk updates. type DNSVerificationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDNSVerificationInput } @@ -2213,7 +2277,7 @@ func (DNSVerificationCSVUpdateInput) CSVInputWrapper() {} // DirectoryAccountCSVInput wraps CreateDirectoryAccountInput with CSV reference columns. type DirectoryAccountCSVInput struct { - Input generated.CreateDirectoryAccountInput + Input generated.CreateDirectoryAccountInput DirectoryAccountIdentityHolderEmail string `csv:"DirectoryAccountIdentityHolderEmail"` } @@ -2223,8 +2287,8 @@ func (DirectoryAccountCSVInput) CSVInputWrapper() {} // DirectoryAccountCSVUpdateInput wraps UpdateDirectoryAccountInput with CSV reference columns for bulk updates. type DirectoryAccountCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateDirectoryAccountInput + ID string `csv:"ID"` + Input generated.UpdateDirectoryAccountInput DirectoryAccountIdentityHolderEmail string `csv:"DirectoryAccountIdentityHolderEmail"` } @@ -2242,7 +2306,7 @@ func (DirectoryGroupCSVInput) CSVInputWrapper() {} // DirectoryGroupCSVUpdateInput wraps UpdateDirectoryGroupInput with CSV reference columns for bulk updates. type DirectoryGroupCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectoryGroupInput } @@ -2260,7 +2324,7 @@ func (DirectoryMembershipCSVInput) CSVInputWrapper() {} // DirectoryMembershipCSVUpdateInput wraps UpdateDirectoryMembershipInput with CSV reference columns for bulk updates. type DirectoryMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectoryMembershipInput } @@ -2278,7 +2342,7 @@ func (DirectorySyncRunCSVInput) CSVInputWrapper() {} // DirectorySyncRunCSVUpdateInput wraps UpdateDirectorySyncRunInput with CSV reference columns for bulk updates. type DirectorySyncRunCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectorySyncRunInput } @@ -2296,7 +2360,7 @@ func (DiscussionCSVInput) CSVInputWrapper() {} // DiscussionCSVUpdateInput wraps UpdateDiscussionInput with CSV reference columns for bulk updates. type DiscussionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDiscussionInput } @@ -2314,7 +2378,7 @@ func (DocumentDataCSVInput) CSVInputWrapper() {} // DocumentDataCSVUpdateInput wraps UpdateDocumentDataInput with CSV reference columns for bulk updates. type DocumentDataCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDocumentDataInput } @@ -2332,7 +2396,7 @@ func (EmailBrandingCSVInput) CSVInputWrapper() {} // EmailBrandingCSVUpdateInput wraps UpdateEmailBrandingInput with CSV reference columns for bulk updates. type EmailBrandingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEmailBrandingInput } @@ -2350,7 +2414,7 @@ func (EmailTemplateCSVInput) CSVInputWrapper() {} // EmailTemplateCSVUpdateInput wraps UpdateEmailTemplateInput with CSV reference columns for bulk updates. type EmailTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEmailTemplateInput } @@ -2359,11 +2423,11 @@ func (EmailTemplateCSVUpdateInput) CSVInputWrapper() {} // EntityCSVInput wraps CreateEntityInput with CSV reference columns. type EntityCSVInput struct { - Input generated.CreateEntityInput + Input generated.CreateEntityInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks EntityCSVInput for CSV header preprocessing. @@ -2372,12 +2436,12 @@ func (EntityCSVInput) CSVInputWrapper() {} // EntityCSVUpdateInput wraps UpdateEntityInput with CSV reference columns for bulk updates. type EntityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateEntityInput + ID string `csv:"ID"` + Input generated.UpdateEntityInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks EntityCSVUpdateInput for CSV header preprocessing. @@ -2394,7 +2458,7 @@ func (EntityTypeCSVInput) CSVInputWrapper() {} // EntityTypeCSVUpdateInput wraps UpdateEntityTypeInput with CSV reference columns for bulk updates. type EntityTypeCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEntityTypeInput } @@ -2412,7 +2476,7 @@ func (EventCSVInput) CSVInputWrapper() {} // EventCSVUpdateInput wraps UpdateEventInput with CSV reference columns for bulk updates. type EventCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEventInput } @@ -2421,7 +2485,7 @@ func (EventCSVUpdateInput) CSVInputWrapper() {} // EvidenceCSVInput wraps CreateEvidenceInput with CSV reference columns. type EvidenceCSVInput struct { - Input generated.CreateEvidenceInput + Input generated.CreateEvidenceInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -2431,8 +2495,8 @@ func (EvidenceCSVInput) CSVInputWrapper() {} // EvidenceCSVUpdateInput wraps UpdateEvidenceInput with CSV reference columns for bulk updates. type EvidenceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateEvidenceInput + ID string `csv:"ID"` + Input generated.UpdateEvidenceInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -2450,7 +2514,7 @@ func (ExportCSVInput) CSVInputWrapper() {} // ExportCSVUpdateInput wraps UpdateExportInput with CSV reference columns for bulk updates. type ExportCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateExportInput } @@ -2468,7 +2532,7 @@ func (FileCSVInput) CSVInputWrapper() {} // FileCSVUpdateInput wraps UpdateFileInput with CSV reference columns for bulk updates. type FileCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFileInput } @@ -2486,7 +2550,7 @@ func (FindingCSVInput) CSVInputWrapper() {} // FindingCSVUpdateInput wraps UpdateFindingInput with CSV reference columns for bulk updates. type FindingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFindingInput } @@ -2504,7 +2568,7 @@ func (FindingControlCSVInput) CSVInputWrapper() {} // FindingControlCSVUpdateInput wraps UpdateFindingControlInput with CSV reference columns for bulk updates. type FindingControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFindingControlInput } @@ -2522,7 +2586,7 @@ func (GroupCSVInput) CSVInputWrapper() {} // GroupCSVUpdateInput wraps UpdateGroupInput with CSV reference columns for bulk updates. type GroupCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupInput } @@ -2540,7 +2604,7 @@ func (GroupMembershipCSVInput) CSVInputWrapper() {} // GroupMembershipCSVUpdateInput wraps UpdateGroupMembershipInput with CSV reference columns for bulk updates. type GroupMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupMembershipInput } @@ -2558,7 +2622,7 @@ func (GroupSettingCSVInput) CSVInputWrapper() {} // GroupSettingCSVUpdateInput wraps UpdateGroupSettingInput with CSV reference columns for bulk updates. type GroupSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupSettingInput } @@ -2576,7 +2640,7 @@ func (HushCSVInput) CSVInputWrapper() {} // HushCSVUpdateInput wraps UpdateHushInput with CSV reference columns for bulk updates. type HushCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateHushInput } @@ -2585,11 +2649,11 @@ func (HushCSVUpdateInput) CSVInputWrapper() {} // IdentityHolderCSVInput wraps CreateIdentityHolderInput with CSV reference columns. type IdentityHolderCSVInput struct { - Input generated.CreateIdentityHolderInput - EmployerEntityName string `csv:"EmployerEntityName"` + Input generated.CreateIdentityHolderInput + EmployerEntityName string `csv:"EmployerEntityName"` IdentityHolderUserEmail string `csv:"IdentityHolderUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } // CSVInputWrapper marks IdentityHolderCSVInput for CSV header preprocessing. @@ -2598,12 +2662,12 @@ func (IdentityHolderCSVInput) CSVInputWrapper() {} // IdentityHolderCSVUpdateInput wraps UpdateIdentityHolderInput with CSV reference columns for bulk updates. type IdentityHolderCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateIdentityHolderInput - EmployerEntityName string `csv:"EmployerEntityName"` + ID string `csv:"ID"` + Input generated.UpdateIdentityHolderInput + EmployerEntityName string `csv:"EmployerEntityName"` IdentityHolderUserEmail string `csv:"IdentityHolderUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } // CSVInputWrapper marks IdentityHolderCSVUpdateInput for CSV header preprocessing. @@ -2611,10 +2675,10 @@ func (IdentityHolderCSVUpdateInput) CSVInputWrapper() {} // InternalPolicyCSVInput wraps CreateInternalPolicyInput with CSV reference columns. type InternalPolicyCSVInput struct { - Input generated.CreateInternalPolicyInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + Input generated.CreateInternalPolicyInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks InternalPolicyCSVInput for CSV header preprocessing. @@ -2623,11 +2687,11 @@ func (InternalPolicyCSVInput) CSVInputWrapper() {} // InternalPolicyCSVUpdateInput wraps UpdateInternalPolicyInput with CSV reference columns for bulk updates. type InternalPolicyCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateInternalPolicyInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + ID string `csv:"ID"` + Input generated.UpdateInternalPolicyInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks InternalPolicyCSVUpdateInput for CSV header preprocessing. @@ -2644,7 +2708,7 @@ func (InviteCSVInput) CSVInputWrapper() {} // InviteCSVUpdateInput wraps UpdateInviteInput with CSV reference columns for bulk updates. type InviteCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateInviteInput } @@ -2662,7 +2726,7 @@ func (JobResultCSVInput) CSVInputWrapper() {} // JobResultCSVUpdateInput wraps UpdateJobResultInput with CSV reference columns for bulk updates. type JobResultCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobResultInput } @@ -2680,7 +2744,7 @@ func (JobRunnerCSVInput) CSVInputWrapper() {} // JobRunnerCSVUpdateInput wraps UpdateJobRunnerInput with CSV reference columns for bulk updates. type JobRunnerCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerInput } @@ -2698,7 +2762,7 @@ func (JobRunnerRegistrationTokenCSVInput) CSVInputWrapper() {} // JobRunnerRegistrationTokenCSVUpdateInput wraps UpdateJobRunnerRegistrationTokenInput with CSV reference columns for bulk updates. type JobRunnerRegistrationTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerRegistrationTokenInput } @@ -2716,7 +2780,7 @@ func (JobRunnerTokenCSVInput) CSVInputWrapper() {} // JobRunnerTokenCSVUpdateInput wraps UpdateJobRunnerTokenInput with CSV reference columns for bulk updates. type JobRunnerTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerTokenInput } @@ -2734,7 +2798,7 @@ func (JobTemplateCSVInput) CSVInputWrapper() {} // JobTemplateCSVUpdateInput wraps UpdateJobTemplateInput with CSV reference columns for bulk updates. type JobTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobTemplateInput } @@ -2752,7 +2816,7 @@ func (MappableDomainCSVInput) CSVInputWrapper() {} // MappableDomainCSVUpdateInput wraps UpdateMappableDomainInput with CSV reference columns for bulk updates. type MappableDomainCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateMappableDomainInput } @@ -2770,7 +2834,7 @@ func (MappedControlCSVInput) CSVInputWrapper() {} // MappedControlCSVUpdateInput wraps UpdateMappedControlInput with CSV reference columns for bulk updates. type MappedControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateMappedControlInput } @@ -2788,7 +2852,7 @@ func (NarrativeCSVInput) CSVInputWrapper() {} // NarrativeCSVUpdateInput wraps UpdateNarrativeInput with CSV reference columns for bulk updates. type NarrativeCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNarrativeInput } @@ -2806,7 +2870,7 @@ func (NotificationCSVInput) CSVInputWrapper() {} // NotificationCSVUpdateInput wraps UpdateNotificationInput with CSV reference columns for bulk updates. type NotificationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationInput } @@ -2824,7 +2888,7 @@ func (NotificationPreferenceCSVInput) CSVInputWrapper() {} // NotificationPreferenceCSVUpdateInput wraps UpdateNotificationPreferenceInput with CSV reference columns for bulk updates. type NotificationPreferenceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationPreferenceInput } @@ -2842,7 +2906,7 @@ func (NotificationTemplateCSVInput) CSVInputWrapper() {} // NotificationTemplateCSVUpdateInput wraps UpdateNotificationTemplateInput with CSV reference columns for bulk updates. type NotificationTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationTemplateInput } @@ -2868,7 +2932,7 @@ func (OrgMembershipCSVInput) CSVInputWrapper() {} // OrgMembershipCSVUpdateInput wraps UpdateOrgMembershipInput with CSV reference columns for bulk updates. type OrgMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrgMembershipInput } @@ -2886,7 +2950,7 @@ func (OrganizationCSVInput) CSVInputWrapper() {} // OrganizationCSVUpdateInput wraps UpdateOrganizationInput with CSV reference columns for bulk updates. type OrganizationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrganizationInput } @@ -2904,7 +2968,7 @@ func (OrganizationSettingCSVInput) CSVInputWrapper() {} // OrganizationSettingCSVUpdateInput wraps UpdateOrganizationSettingInput with CSV reference columns for bulk updates. type OrganizationSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrganizationSettingInput } @@ -2922,7 +2986,7 @@ func (PersonalAccessTokenCSVInput) CSVInputWrapper() {} // PersonalAccessTokenCSVUpdateInput wraps UpdatePersonalAccessTokenInput with CSV reference columns for bulk updates. type PersonalAccessTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdatePersonalAccessTokenInput } @@ -2931,21 +2995,21 @@ func (PersonalAccessTokenCSVUpdateInput) CSVInputWrapper() {} // PlatformCSVInput wraps CreatePlatformInput with CSV reference columns. type PlatformCSVInput struct { - Input generated.CreatePlatformInput - BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` - BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` - OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` - PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` - SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` - SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` - SourceAssetNames []string `csv:"SourceAssetNames"` - SourceEntityNames []string `csv:"SourceEntityNames"` - SystemDetailNames []string `csv:"SystemDetailNames"` - TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` - TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` + Input generated.CreatePlatformInput + BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` + BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` + OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` + PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` + SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` + SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` + SourceAssetNames []string `csv:"SourceAssetNames"` + SourceEntityNames []string `csv:"SourceEntityNames"` + SystemDetailNames []string `csv:"SystemDetailNames"` + TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` + TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` } // CSVInputWrapper marks PlatformCSVInput for CSV header preprocessing. @@ -2954,22 +3018,22 @@ func (PlatformCSVInput) CSVInputWrapper() {} // PlatformCSVUpdateInput wraps UpdatePlatformInput with CSV reference columns for bulk updates. type PlatformCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdatePlatformInput - BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` - BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` - OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` - PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` - SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` - SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` - SourceAssetNames []string `csv:"SourceAssetNames"` - SourceEntityNames []string `csv:"SourceEntityNames"` - SystemDetailNames []string `csv:"SystemDetailNames"` - TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` - TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` + ID string `csv:"ID"` + Input generated.UpdatePlatformInput + BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` + BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` + OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` + PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` + SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` + SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` + SourceAssetNames []string `csv:"SourceAssetNames"` + SourceEntityNames []string `csv:"SourceEntityNames"` + SystemDetailNames []string `csv:"SystemDetailNames"` + TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` + TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` } // CSVInputWrapper marks PlatformCSVUpdateInput for CSV header preprocessing. @@ -2977,8 +3041,8 @@ func (PlatformCSVUpdateInput) CSVInputWrapper() {} // ProcedureCSVInput wraps CreateProcedureInput with CSV reference columns. type ProcedureCSVInput struct { - Input generated.CreateProcedureInput - ApproverGroupName string `csv:"ApproverGroupName"` + Input generated.CreateProcedureInput + ApproverGroupName string `csv:"ApproverGroupName"` DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } @@ -2988,9 +3052,9 @@ func (ProcedureCSVInput) CSVInputWrapper() {} // ProcedureCSVUpdateInput wraps UpdateProcedureInput with CSV reference columns for bulk updates. type ProcedureCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateProcedureInput - ApproverGroupName string `csv:"ApproverGroupName"` + ID string `csv:"ID"` + Input generated.UpdateProcedureInput + ApproverGroupName string `csv:"ApproverGroupName"` DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } @@ -2999,9 +3063,9 @@ func (ProcedureCSVUpdateInput) CSVInputWrapper() {} // ProgramCSVInput wraps CreateProgramInput with CSV reference columns. type ProgramCSVInput struct { - Input generated.CreateProgramInput - ControlRefCodes []string `csv:"ControlRefCodes"` - ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` + Input generated.CreateProgramInput + ControlRefCodes []string `csv:"ControlRefCodes"` + ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` } // CSVInputWrapper marks ProgramCSVInput for CSV header preprocessing. @@ -3010,10 +3074,10 @@ func (ProgramCSVInput) CSVInputWrapper() {} // ProgramCSVUpdateInput wraps UpdateProgramInput with CSV reference columns for bulk updates. type ProgramCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateProgramInput - ControlRefCodes []string `csv:"ControlRefCodes"` - ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` + ID string `csv:"ID"` + Input generated.UpdateProgramInput + ControlRefCodes []string `csv:"ControlRefCodes"` + ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` } // CSVInputWrapper marks ProgramCSVUpdateInput for CSV header preprocessing. @@ -3030,7 +3094,7 @@ func (ProgramMembershipCSVInput) CSVInputWrapper() {} // ProgramMembershipCSVUpdateInput wraps UpdateProgramMembershipInput with CSV reference columns for bulk updates. type ProgramMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateProgramMembershipInput } @@ -3039,8 +3103,8 @@ func (ProgramMembershipCSVUpdateInput) CSVInputWrapper() {} // RemediationCSVInput wraps CreateRemediationInput with CSV reference columns. type RemediationCSVInput struct { - Input generated.CreateRemediationInput - ControlRefCodes []string `csv:"ControlRefCodes"` + Input generated.CreateRemediationInput + ControlRefCodes []string `csv:"ControlRefCodes"` SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } @@ -3050,9 +3114,9 @@ func (RemediationCSVInput) CSVInputWrapper() {} // RemediationCSVUpdateInput wraps UpdateRemediationInput with CSV reference columns for bulk updates. type RemediationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateRemediationInput - ControlRefCodes []string `csv:"ControlRefCodes"` + ID string `csv:"ID"` + Input generated.UpdateRemediationInput + ControlRefCodes []string `csv:"ControlRefCodes"` SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } @@ -3061,7 +3125,7 @@ func (RemediationCSVUpdateInput) CSVInputWrapper() {} // ReviewCSVInput wraps CreateReviewInput with CSV reference columns. type ReviewCSVInput struct { - Input generated.CreateReviewInput + Input generated.CreateReviewInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3071,8 +3135,8 @@ func (ReviewCSVInput) CSVInputWrapper() {} // ReviewCSVUpdateInput wraps UpdateReviewInput with CSV reference columns for bulk updates. type ReviewCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateReviewInput + ID string `csv:"ID"` + Input generated.UpdateReviewInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3081,15 +3145,15 @@ func (ReviewCSVUpdateInput) CSVInputWrapper() {} // RiskCSVInput wraps CreateRiskInput with CSV reference columns. type RiskCSVInput struct { - Input generated.CreateRiskInput - ActionPlanNames []string `csv:"ActionPlanNames"` - AssetNames []string `csv:"AssetNames"` - ControlRefCodes []string `csv:"ControlRefCodes"` - EntityNames []string `csv:"EntityNames"` - PlatformNames []string `csv:"PlatformNames"` - RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` - StakeholderGroupName string `csv:"StakeholderGroupName"` - SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` + Input generated.CreateRiskInput + ActionPlanNames []string `csv:"ActionPlanNames"` + AssetNames []string `csv:"AssetNames"` + ControlRefCodes []string `csv:"ControlRefCodes"` + EntityNames []string `csv:"EntityNames"` + PlatformNames []string `csv:"PlatformNames"` + RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` + StakeholderGroupName string `csv:"StakeholderGroupName"` + SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } // CSVInputWrapper marks RiskCSVInput for CSV header preprocessing. @@ -3098,16 +3162,16 @@ func (RiskCSVInput) CSVInputWrapper() {} // RiskCSVUpdateInput wraps UpdateRiskInput with CSV reference columns for bulk updates. type RiskCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateRiskInput - ActionPlanNames []string `csv:"ActionPlanNames"` - AssetNames []string `csv:"AssetNames"` - ControlRefCodes []string `csv:"ControlRefCodes"` - EntityNames []string `csv:"EntityNames"` - PlatformNames []string `csv:"PlatformNames"` - RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` - StakeholderGroupName string `csv:"StakeholderGroupName"` - SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` + ID string `csv:"ID"` + Input generated.UpdateRiskInput + ActionPlanNames []string `csv:"ActionPlanNames"` + AssetNames []string `csv:"AssetNames"` + ControlRefCodes []string `csv:"ControlRefCodes"` + EntityNames []string `csv:"EntityNames"` + PlatformNames []string `csv:"PlatformNames"` + RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` + StakeholderGroupName string `csv:"StakeholderGroupName"` + SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } // CSVInputWrapper marks RiskCSVUpdateInput for CSV header preprocessing. @@ -3124,7 +3188,7 @@ func (SLADefinitionCSVInput) CSVInputWrapper() {} // SLADefinitionCSVUpdateInput wraps UpdateSLADefinitionInput with CSV reference columns for bulk updates. type SLADefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSLADefinitionInput } @@ -3133,14 +3197,14 @@ func (SLADefinitionCSVUpdateInput) CSVInputWrapper() {} // ScanCSVInput wraps CreateScanInput with CSV reference columns. type ScanCSVInput struct { - Input generated.CreateScanInput - AssignedToGroupName string `csv:"AssignedToGroupName"` - AssignedToUserEmail string `csv:"AssignedToUserEmail"` + Input generated.CreateScanInput + AssignedToGroupName string `csv:"AssignedToGroupName"` + AssignedToUserEmail string `csv:"AssignedToUserEmail"` GeneratedByPlatformName string `csv:"GeneratedByPlatformName"` - PerformedByGroupName string `csv:"PerformedByGroupName"` - PerformedByUserEmail string `csv:"PerformedByUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + PerformedByGroupName string `csv:"PerformedByGroupName"` + PerformedByUserEmail string `csv:"PerformedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks ScanCSVInput for CSV header preprocessing. @@ -3149,15 +3213,15 @@ func (ScanCSVInput) CSVInputWrapper() {} // ScanCSVUpdateInput wraps UpdateScanInput with CSV reference columns for bulk updates. type ScanCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateScanInput - AssignedToGroupName string `csv:"AssignedToGroupName"` - AssignedToUserEmail string `csv:"AssignedToUserEmail"` + ID string `csv:"ID"` + Input generated.UpdateScanInput + AssignedToGroupName string `csv:"AssignedToGroupName"` + AssignedToUserEmail string `csv:"AssignedToUserEmail"` GeneratedByPlatformName string `csv:"GeneratedByPlatformName"` - PerformedByGroupName string `csv:"PerformedByGroupName"` - PerformedByUserEmail string `csv:"PerformedByUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + PerformedByGroupName string `csv:"PerformedByGroupName"` + PerformedByUserEmail string `csv:"PerformedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks ScanCSVUpdateInput for CSV header preprocessing. @@ -3165,7 +3229,7 @@ func (ScanCSVUpdateInput) CSVInputWrapper() {} // ScheduledJobCSVInput wraps CreateScheduledJobInput with CSV reference columns. type ScheduledJobCSVInput struct { - Input generated.CreateScheduledJobInput + Input generated.CreateScheduledJobInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3175,8 +3239,8 @@ func (ScheduledJobCSVInput) CSVInputWrapper() {} // ScheduledJobCSVUpdateInput wraps UpdateScheduledJobInput with CSV reference columns for bulk updates. type ScheduledJobCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateScheduledJobInput + ID string `csv:"ID"` + Input generated.UpdateScheduledJobInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3194,7 +3258,7 @@ func (ScheduledJobRunCSVInput) CSVInputWrapper() {} // ScheduledJobRunCSVUpdateInput wraps UpdateScheduledJobRunInput with CSV reference columns for bulk updates. type ScheduledJobRunCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateScheduledJobRunInput } @@ -3212,7 +3276,7 @@ func (StandardCSVInput) CSVInputWrapper() {} // StandardCSVUpdateInput wraps UpdateStandardInput with CSV reference columns for bulk updates. type StandardCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateStandardInput } @@ -3221,15 +3285,15 @@ func (StandardCSVUpdateInput) CSVInputWrapper() {} // SubcontrolCSVInput wraps CreateSubcontrolInput with CSV reference columns. type SubcontrolCSVInput struct { - Input generated.CreateSubcontrolInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + Input generated.CreateSubcontrolInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks SubcontrolCSVInput for CSV header preprocessing. @@ -3238,16 +3302,16 @@ func (SubcontrolCSVInput) CSVInputWrapper() {} // SubcontrolCSVUpdateInput wraps UpdateSubcontrolInput with CSV reference columns for bulk updates. type SubcontrolCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateSubcontrolInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + ID string `csv:"ID"` + Input generated.UpdateSubcontrolInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks SubcontrolCSVUpdateInput for CSV header preprocessing. @@ -3264,7 +3328,7 @@ func (SubprocessorCSVInput) CSVInputWrapper() {} // SubprocessorCSVUpdateInput wraps UpdateSubprocessorInput with CSV reference columns for bulk updates. type SubprocessorCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSubprocessorInput } @@ -3282,7 +3346,7 @@ func (SubscriberCSVInput) CSVInputWrapper() {} // SubscriberCSVUpdateInput wraps UpdateSubscriberInput with CSV reference columns for bulk updates. type SubscriberCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSubscriberInput } @@ -3300,7 +3364,7 @@ func (SystemDetailCSVInput) CSVInputWrapper() {} // SystemDetailCSVUpdateInput wraps UpdateSystemDetailInput with CSV reference columns for bulk updates. type SystemDetailCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSystemDetailInput } @@ -3318,7 +3382,7 @@ func (TFASettingCSVInput) CSVInputWrapper() {} // TFASettingCSVUpdateInput wraps UpdateTFASettingInput with CSV reference columns for bulk updates. type TFASettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTFASettingInput } @@ -3336,7 +3400,7 @@ func (TagDefinitionCSVInput) CSVInputWrapper() {} // TagDefinitionCSVUpdateInput wraps UpdateTagDefinitionInput with CSV reference columns for bulk updates. type TagDefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTagDefinitionInput } @@ -3345,9 +3409,9 @@ func (TagDefinitionCSVUpdateInput) CSVInputWrapper() {} // TaskCSVInput wraps CreateTaskInput with CSV reference columns. type TaskCSVInput struct { - Input generated.CreateTaskInput - AssigneeEmail string `csv:"AssigneeEmail"` - AssignerEmail string `csv:"AssignerEmail"` + Input generated.CreateTaskInput + AssigneeEmail string `csv:"AssigneeEmail"` + AssignerEmail string `csv:"AssignerEmail"` ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3357,10 +3421,10 @@ func (TaskCSVInput) CSVInputWrapper() {} // TaskCSVUpdateInput wraps UpdateTaskInput with CSV reference columns for bulk updates. type TaskCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateTaskInput - AssigneeEmail string `csv:"AssigneeEmail"` - AssignerEmail string `csv:"AssignerEmail"` + ID string `csv:"ID"` + Input generated.UpdateTaskInput + AssigneeEmail string `csv:"AssigneeEmail"` + AssignerEmail string `csv:"AssignerEmail"` ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3378,7 +3442,7 @@ func (TemplateCSVInput) CSVInputWrapper() {} // TemplateCSVUpdateInput wraps UpdateTemplateInput with CSV reference columns for bulk updates. type TemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTemplateInput } @@ -3396,7 +3460,7 @@ func (TrustCenterCSVInput) CSVInputWrapper() {} // TrustCenterCSVUpdateInput wraps UpdateTrustCenterInput with CSV reference columns for bulk updates. type TrustCenterCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterInput } @@ -3414,7 +3478,7 @@ func (TrustCenterComplianceCSVInput) CSVInputWrapper() {} // TrustCenterComplianceCSVUpdateInput wraps UpdateTrustCenterComplianceInput with CSV reference columns for bulk updates. type TrustCenterComplianceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterComplianceInput } @@ -3432,7 +3496,7 @@ func (TrustCenterDocCSVInput) CSVInputWrapper() {} // TrustCenterDocCSVUpdateInput wraps UpdateTrustCenterDocInput with CSV reference columns for bulk updates. type TrustCenterDocCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterDocInput } @@ -3450,7 +3514,7 @@ func (TrustCenterEntityCSVInput) CSVInputWrapper() {} // TrustCenterEntityCSVUpdateInput wraps UpdateTrustCenterEntityInput with CSV reference columns for bulk updates. type TrustCenterEntityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterEntityInput } @@ -3468,7 +3532,7 @@ func (TrustCenterFAQCSVInput) CSVInputWrapper() {} // TrustCenterFAQCSVUpdateInput wraps UpdateTrustCenterFAQInput with CSV reference columns for bulk updates. type TrustCenterFAQCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterFAQInput } @@ -3486,7 +3550,7 @@ func (TrustCenterNDARequestCSVInput) CSVInputWrapper() {} // TrustCenterNDARequestCSVUpdateInput wraps UpdateTrustCenterNDARequestInput with CSV reference columns for bulk updates. type TrustCenterNDARequestCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterNDARequestInput } @@ -3504,7 +3568,7 @@ func (TrustCenterSettingCSVInput) CSVInputWrapper() {} // TrustCenterSettingCSVUpdateInput wraps UpdateTrustCenterSettingInput with CSV reference columns for bulk updates. type TrustCenterSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterSettingInput } @@ -3522,7 +3586,7 @@ func (TrustCenterSubprocessorCSVInput) CSVInputWrapper() {} // TrustCenterSubprocessorCSVUpdateInput wraps UpdateTrustCenterSubprocessorInput with CSV reference columns for bulk updates. type TrustCenterSubprocessorCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterSubprocessorInput } @@ -3540,7 +3604,7 @@ func (TrustCenterWatermarkConfigCSVInput) CSVInputWrapper() {} // TrustCenterWatermarkConfigCSVUpdateInput wraps UpdateTrustCenterWatermarkConfigInput with CSV reference columns for bulk updates. type TrustCenterWatermarkConfigCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterWatermarkConfigInput } @@ -3558,7 +3622,7 @@ func (UserCSVInput) CSVInputWrapper() {} // UserCSVUpdateInput wraps UpdateUserInput with CSV reference columns for bulk updates. type UserCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateUserInput } @@ -3576,7 +3640,7 @@ func (UserSettingCSVInput) CSVInputWrapper() {} // UserSettingCSVUpdateInput wraps UpdateUserSettingInput with CSV reference columns for bulk updates. type UserSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateUserSettingInput } @@ -3585,7 +3649,7 @@ func (UserSettingCSVUpdateInput) CSVInputWrapper() {} // VendorRiskScoreCSVInput wraps CreateVendorRiskScoreInput with CSV reference columns. type VendorRiskScoreCSVInput struct { - Input generated.CreateVendorRiskScoreInput + Input generated.CreateVendorRiskScoreInput VendorRiskScoreEntityName string `csv:"VendorRiskScoreEntityName"` } @@ -3595,8 +3659,8 @@ func (VendorRiskScoreCSVInput) CSVInputWrapper() {} // VendorRiskScoreCSVUpdateInput wraps UpdateVendorRiskScoreInput with CSV reference columns for bulk updates. type VendorRiskScoreCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateVendorRiskScoreInput + ID string `csv:"ID"` + Input generated.UpdateVendorRiskScoreInput VendorRiskScoreEntityName string `csv:"VendorRiskScoreEntityName"` } @@ -3614,7 +3678,7 @@ func (VendorScoringConfigCSVInput) CSVInputWrapper() {} // VendorScoringConfigCSVUpdateInput wraps UpdateVendorScoringConfigInput with CSV reference columns for bulk updates. type VendorScoringConfigCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateVendorScoringConfigInput } @@ -3623,7 +3687,7 @@ func (VendorScoringConfigCSVUpdateInput) CSVInputWrapper() {} // VulnerabilityCSVInput wraps CreateVulnerabilityInput with CSV reference columns. type VulnerabilityCSVInput struct { - Input generated.CreateVulnerabilityInput + Input generated.CreateVulnerabilityInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3633,8 +3697,8 @@ func (VulnerabilityCSVInput) CSVInputWrapper() {} // VulnerabilityCSVUpdateInput wraps UpdateVulnerabilityInput with CSV reference columns for bulk updates. type VulnerabilityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateVulnerabilityInput + ID string `csv:"ID"` + Input generated.UpdateVulnerabilityInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3652,7 +3716,7 @@ func (WorkflowDefinitionCSVInput) CSVInputWrapper() {} // WorkflowDefinitionCSVUpdateInput wraps UpdateWorkflowDefinitionInput with CSV reference columns for bulk updates. type WorkflowDefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateWorkflowDefinitionInput } diff --git a/internal/ent/generated/gql_where_input.go b/internal/ent/generated/gql_where_input.go index 9d38f00c4c..fb0526c874 100644 --- a/internal/ent/generated/gql_where_input.go +++ b/internal/ent/generated/gql_where_input.go @@ -71773,6 +71773,10 @@ type OrganizationSettingWhereInput struct { ComplianceWebhookTokenEqualFold *string `json:"complianceWebhookTokenEqualFold,omitempty"` ComplianceWebhookTokenContainsFold *string `json:"complianceWebhookTokenContainsFold,omitempty"` + // "payment_method_added" field predicates. + PaymentMethodAdded *bool `json:"paymentMethodAdded,omitempty"` + PaymentMethodAddedNEQ *bool `json:"paymentMethodAddedNEQ,omitempty"` + // "pending_deletion_at" field predicates. PendingDeletionAt *models.DateTime `json:"pendingDeletionAt,omitempty"` PendingDeletionAtNEQ *models.DateTime `json:"pendingDeletionAtNEQ,omitempty"` @@ -72762,6 +72766,12 @@ func (i *OrganizationSettingWhereInput) P() (predicate.OrganizationSetting, erro if i.ComplianceWebhookTokenContainsFold != nil { predicates = append(predicates, organizationsetting.ComplianceWebhookTokenContainsFold(*i.ComplianceWebhookTokenContainsFold)) } + if i.PaymentMethodAdded != nil { + predicates = append(predicates, organizationsetting.PaymentMethodAddedEQ(*i.PaymentMethodAdded)) + } + if i.PaymentMethodAddedNEQ != nil { + predicates = append(predicates, organizationsetting.PaymentMethodAddedNEQ(*i.PaymentMethodAddedNEQ)) + } if i.PendingDeletionAt != nil { predicates = append(predicates, organizationsetting.PendingDeletionAtEQ(*i.PendingDeletionAt)) } diff --git a/internal/ent/historygenerated/gql_where_input.go b/internal/ent/historygenerated/gql_where_input.go index 3c207ba4f0..9931c880dc 100644 --- a/internal/ent/historygenerated/gql_where_input.go +++ b/internal/ent/historygenerated/gql_where_input.go @@ -54226,6 +54226,10 @@ type OrganizationSettingHistoryWhereInput struct { ComplianceWebhookTokenEqualFold *string `json:"complianceWebhookTokenEqualFold,omitempty"` ComplianceWebhookTokenContainsFold *string `json:"complianceWebhookTokenContainsFold,omitempty"` + // "payment_method_added" field predicates. + PaymentMethodAdded *bool `json:"paymentMethodAdded,omitempty"` + PaymentMethodAddedNEQ *bool `json:"paymentMethodAddedNEQ,omitempty"` + // "pending_deletion_at" field predicates. PendingDeletionAt *models.DateTime `json:"pendingDeletionAt,omitempty"` PendingDeletionAtNEQ *models.DateTime `json:"pendingDeletionAtNEQ,omitempty"` @@ -55288,6 +55292,12 @@ func (i *OrganizationSettingHistoryWhereInput) P() (predicate.OrganizationSettin if i.ComplianceWebhookTokenContainsFold != nil { predicates = append(predicates, organizationsettinghistory.ComplianceWebhookTokenContainsFold(*i.ComplianceWebhookTokenContainsFold)) } + if i.PaymentMethodAdded != nil { + predicates = append(predicates, organizationsettinghistory.PaymentMethodAddedEQ(*i.PaymentMethodAdded)) + } + if i.PaymentMethodAddedNEQ != nil { + predicates = append(predicates, organizationsettinghistory.PaymentMethodAddedNEQ(*i.PaymentMethodAddedNEQ)) + } if i.PendingDeletionAt != nil { predicates = append(predicates, organizationsettinghistory.PendingDeletionAtEQ(*i.PendingDeletionAt)) } diff --git a/internal/ent/integrationgenerated/integration_mapping_generated.go b/internal/ent/integrationgenerated/integration_mapping_generated.go index c16f997a54..fc7f05d402 100644 --- a/internal/ent/integrationgenerated/integration_mapping_generated.go +++ b/internal/ent/integrationgenerated/integration_mapping_generated.go @@ -6,24 +6,25 @@ import ( "github.com/theopenlane/core/pkg/gala" ) + // IntegrationMappingField describes an integration mapping target field type IntegrationMappingField struct { - InputKey string - GoField string - EntField string - Type string - Required bool + InputKey string + GoField string + EntField string + Type string + Required bool UpsertKey bool LookupKey bool } // IntegrationMappingSchema describes a schema with integration mapping fields type IntegrationMappingSchema struct { - Name string - Fields []IntegrationMappingField - AllowedKeys map[string]struct{} + Name string + Fields []IntegrationMappingField + AllowedKeys map[string]struct{} RequiredKeys []string - UpsertKeys []string + UpsertKeys []string StockPersist bool } @@ -32,45 +33,45 @@ type IntegrationIngestSource string const ( IntegrationIngestSourceOperation IntegrationIngestSource = "operation" - IntegrationIngestSourceWorkflow IntegrationIngestSource = "workflow" - IntegrationIngestSourceWebhook IntegrationIngestSource = "webhook" - IntegrationIngestSourceDirect IntegrationIngestSource = "direct" + IntegrationIngestSourceWorkflow IntegrationIngestSource = "workflow" + IntegrationIngestSourceWebhook IntegrationIngestSource = "webhook" + IntegrationIngestSourceDirect IntegrationIngestSource = "direct" ) // IntegrationIngestMetadata captures source-agnostic execution context for second-stage ingest handlers type IntegrationIngestMetadata struct { - IntegrationID string `json:"integrationId"` - DefinitionID string `json:"definitionId,omitempty"` - Operation string `json:"operation,omitempty"` - Variant string `json:"variant,omitempty"` - Source IntegrationIngestSource `json:"source,omitempty"` - RunID string `json:"runId,omitempty"` - Webhook string `json:"webhook,omitempty"` - WebhookEvent string `json:"webhookEvent,omitempty"` - DeliveryID string `json:"deliveryId,omitempty"` - WorkflowInstanceID string `json:"workflowInstanceId,omitempty"` - WorkflowActionKey string `json:"workflowActionKey,omitempty"` - WorkflowActionIndex int `json:"workflowActionIndex,omitempty"` - WorkflowObjectID string `json:"workflowObjectId,omitempty"` - WorkflowObjectType string `json:"workflowObjectType,omitempty"` + IntegrationID string `json:"integrationId"` + DefinitionID string `json:"definitionId,omitempty"` + Operation string `json:"operation,omitempty"` + Variant string `json:"variant,omitempty"` + Source IntegrationIngestSource `json:"source,omitempty"` + RunID string `json:"runId,omitempty"` + Webhook string `json:"webhook,omitempty"` + WebhookEvent string `json:"webhookEvent,omitempty"` + DeliveryID string `json:"deliveryId,omitempty"` + WorkflowInstanceID string `json:"workflowInstanceId,omitempty"` + WorkflowActionKey string `json:"workflowActionKey,omitempty"` + WorkflowActionIndex int `json:"workflowActionIndex,omitempty"` + WorkflowObjectID string `json:"workflowObjectId,omitempty"` + WorkflowObjectType string `json:"workflowObjectType,omitempty"` } const ( - IntegrationMappingSchemaAsset = "Asset" - IntegrationMappingSchemaContact = "Contact" - IntegrationMappingSchemaDirectoryAccount = "DirectoryAccount" - IntegrationMappingSchemaDirectoryGroup = "DirectoryGroup" + IntegrationMappingSchemaAsset = "Asset" + IntegrationMappingSchemaContact = "Contact" + IntegrationMappingSchemaDirectoryAccount = "DirectoryAccount" + IntegrationMappingSchemaDirectoryGroup = "DirectoryGroup" IntegrationMappingSchemaDirectoryMembership = "DirectoryMembership" - IntegrationMappingSchemaEntity = "Entity" - IntegrationMappingSchemaFinding = "Finding" - IntegrationMappingSchemaRisk = "Risk" - IntegrationMappingSchemaVulnerability = "Vulnerability" + IntegrationMappingSchemaEntity = "Entity" + IntegrationMappingSchemaFinding = "Finding" + IntegrationMappingSchemaRisk = "Risk" + IntegrationMappingSchemaVulnerability = "Vulnerability" ) // IntegrationIngestAssetRequested is the typed second-stage ingest contract for Asset records type IntegrationIngestAssetRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateAssetInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateAssetInput `json:"input"` } // IntegrationIngestAssetRequestedTopic is the typed Gala topic for Asset ingest requests @@ -80,8 +81,8 @@ var IntegrationIngestAssetRequestedTopic = gala.Topic[IntegrationIngestAssetRequ // IntegrationIngestContactRequested is the typed second-stage ingest contract for Contact records type IntegrationIngestContactRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateContactInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateContactInput `json:"input"` } // IntegrationIngestContactRequestedTopic is the typed Gala topic for Contact ingest requests @@ -91,8 +92,8 @@ var IntegrationIngestContactRequestedTopic = gala.Topic[IntegrationIngestContact // IntegrationIngestDirectoryAccountRequested is the typed second-stage ingest contract for DirectoryAccount records type IntegrationIngestDirectoryAccountRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryAccountInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryAccountInput `json:"input"` } // IntegrationIngestDirectoryAccountRequestedTopic is the typed Gala topic for DirectoryAccount ingest requests @@ -102,8 +103,8 @@ var IntegrationIngestDirectoryAccountRequestedTopic = gala.Topic[IntegrationInge // IntegrationIngestDirectoryGroupRequested is the typed second-stage ingest contract for DirectoryGroup records type IntegrationIngestDirectoryGroupRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryGroupInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryGroupInput `json:"input"` } // IntegrationIngestDirectoryGroupRequestedTopic is the typed Gala topic for DirectoryGroup ingest requests @@ -113,8 +114,8 @@ var IntegrationIngestDirectoryGroupRequestedTopic = gala.Topic[IntegrationIngest // IntegrationIngestDirectoryMembershipRequested is the typed second-stage ingest contract for DirectoryMembership records type IntegrationIngestDirectoryMembershipRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryMembershipInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryMembershipInput `json:"input"` } // IntegrationIngestDirectoryMembershipRequestedTopic is the typed Gala topic for DirectoryMembership ingest requests @@ -124,8 +125,8 @@ var IntegrationIngestDirectoryMembershipRequestedTopic = gala.Topic[IntegrationI // IntegrationIngestEntityRequested is the typed second-stage ingest contract for Entity records type IntegrationIngestEntityRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateEntityInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateEntityInput `json:"input"` } // IntegrationIngestEntityRequestedTopic is the typed Gala topic for Entity ingest requests @@ -135,8 +136,8 @@ var IntegrationIngestEntityRequestedTopic = gala.Topic[IntegrationIngestEntityRe // IntegrationIngestFindingRequested is the typed second-stage ingest contract for Finding records type IntegrationIngestFindingRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateFindingInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateFindingInput `json:"input"` } // IntegrationIngestFindingRequestedTopic is the typed Gala topic for Finding ingest requests @@ -147,7 +148,7 @@ var IntegrationIngestFindingRequestedTopic = gala.Topic[IntegrationIngestFinding // IntegrationIngestRiskRequested is the typed second-stage ingest contract for Risk records type IntegrationIngestRiskRequested struct { Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateRiskInput `json:"input"` + Input generated.CreateRiskInput `json:"input"` } // IntegrationIngestRiskRequestedTopic is the typed Gala topic for Risk ingest requests @@ -157,8 +158,8 @@ var IntegrationIngestRiskRequestedTopic = gala.Topic[IntegrationIngestRiskReques // IntegrationIngestVulnerabilityRequested is the typed second-stage ingest contract for Vulnerability records type IntegrationIngestVulnerabilityRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateVulnerabilityInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateVulnerabilityInput `json:"input"` } // IntegrationIngestVulnerabilityRequestedTopic is the typed Gala topic for Vulnerability ingest requests @@ -168,350 +169,350 @@ var IntegrationIngestVulnerabilityRequestedTopic = gala.Topic[IntegrationIngestV // Integration mapping keys for Asset. const ( - IntegrationMappingAssetAccessModelID = "accessModelID" - IntegrationMappingAssetAccessModelName = "accessModelName" - IntegrationMappingAssetAssetDataClassificationID = "assetDataClassificationID" + IntegrationMappingAssetAccessModelID = "accessModelID" + IntegrationMappingAssetAccessModelName = "accessModelName" + IntegrationMappingAssetAssetDataClassificationID = "assetDataClassificationID" IntegrationMappingAssetAssetDataClassificationName = "assetDataClassificationName" - IntegrationMappingAssetAssetSubtypeID = "assetSubtypeID" - IntegrationMappingAssetAssetSubtypeName = "assetSubtypeName" - IntegrationMappingAssetAssetType = "assetType" - IntegrationMappingAssetCategories = "categories" - IntegrationMappingAssetContainsPii = "containsPii" - IntegrationMappingAssetCostCenter = "costCenter" - IntegrationMappingAssetCriticalityID = "criticalityID" - IntegrationMappingAssetCriticalityName = "criticalityName" - IntegrationMappingAssetDescription = "description" - IntegrationMappingAssetDisplayName = "displayName" - IntegrationMappingAssetEncryptionStatusID = "encryptionStatusID" - IntegrationMappingAssetEncryptionStatusName = "encryptionStatusName" - IntegrationMappingAssetEnvironmentID = "environmentID" - IntegrationMappingAssetEnvironmentName = "environmentName" - IntegrationMappingAssetEstimatedMonthlyCost = "estimatedMonthlyCost" - IntegrationMappingAssetIdentifier = "identifier" - IntegrationMappingAssetIntegrationID = "integrationID" - IntegrationMappingAssetInternalNotes = "internalNotes" - IntegrationMappingAssetInternalOwner = "internalOwner" - IntegrationMappingAssetInternalOwnerGroupID = "internalOwnerGroupID" - IntegrationMappingAssetInternalOwnerUserID = "internalOwnerUserID" - IntegrationMappingAssetName = "name" - IntegrationMappingAssetObservedAt = "observedAt" - IntegrationMappingAssetOwnerID = "ownerID" - IntegrationMappingAssetPhysicalLocation = "physicalLocation" - IntegrationMappingAssetPurchaseDate = "purchaseDate" - IntegrationMappingAssetRegion = "region" - IntegrationMappingAssetScopeID = "scopeID" - IntegrationMappingAssetScopeName = "scopeName" - IntegrationMappingAssetSecurityTierID = "securityTierID" - IntegrationMappingAssetSecurityTierName = "securityTierName" - IntegrationMappingAssetSourceIdentifier = "sourceIdentifier" - IntegrationMappingAssetSourceType = "sourceType" - IntegrationMappingAssetSystemInternalID = "systemInternalID" - IntegrationMappingAssetTags = "tags" - IntegrationMappingAssetWebsite = "website" + IntegrationMappingAssetAssetSubtypeID = "assetSubtypeID" + IntegrationMappingAssetAssetSubtypeName = "assetSubtypeName" + IntegrationMappingAssetAssetType = "assetType" + IntegrationMappingAssetCategories = "categories" + IntegrationMappingAssetContainsPii = "containsPii" + IntegrationMappingAssetCostCenter = "costCenter" + IntegrationMappingAssetCriticalityID = "criticalityID" + IntegrationMappingAssetCriticalityName = "criticalityName" + IntegrationMappingAssetDescription = "description" + IntegrationMappingAssetDisplayName = "displayName" + IntegrationMappingAssetEncryptionStatusID = "encryptionStatusID" + IntegrationMappingAssetEncryptionStatusName = "encryptionStatusName" + IntegrationMappingAssetEnvironmentID = "environmentID" + IntegrationMappingAssetEnvironmentName = "environmentName" + IntegrationMappingAssetEstimatedMonthlyCost = "estimatedMonthlyCost" + IntegrationMappingAssetIdentifier = "identifier" + IntegrationMappingAssetIntegrationID = "integrationID" + IntegrationMappingAssetInternalNotes = "internalNotes" + IntegrationMappingAssetInternalOwner = "internalOwner" + IntegrationMappingAssetInternalOwnerGroupID = "internalOwnerGroupID" + IntegrationMappingAssetInternalOwnerUserID = "internalOwnerUserID" + IntegrationMappingAssetName = "name" + IntegrationMappingAssetObservedAt = "observedAt" + IntegrationMappingAssetOwnerID = "ownerID" + IntegrationMappingAssetPhysicalLocation = "physicalLocation" + IntegrationMappingAssetPurchaseDate = "purchaseDate" + IntegrationMappingAssetRegion = "region" + IntegrationMappingAssetScopeID = "scopeID" + IntegrationMappingAssetScopeName = "scopeName" + IntegrationMappingAssetSecurityTierID = "securityTierID" + IntegrationMappingAssetSecurityTierName = "securityTierName" + IntegrationMappingAssetSourceIdentifier = "sourceIdentifier" + IntegrationMappingAssetSourceType = "sourceType" + IntegrationMappingAssetSystemInternalID = "systemInternalID" + IntegrationMappingAssetTags = "tags" + IntegrationMappingAssetWebsite = "website" ) // Integration mapping keys for Contact. const ( - IntegrationMappingContactAddress = "address" - IntegrationMappingContactCompany = "company" - IntegrationMappingContactEmail = "email" - IntegrationMappingContactExternalID = "externalID" - IntegrationMappingContactFullName = "fullName" + IntegrationMappingContactAddress = "address" + IntegrationMappingContactCompany = "company" + IntegrationMappingContactEmail = "email" + IntegrationMappingContactExternalID = "externalID" + IntegrationMappingContactFullName = "fullName" IntegrationMappingContactIntegrationID = "integrationID" - IntegrationMappingContactObservedAt = "observedAt" - IntegrationMappingContactPhoneNumber = "phoneNumber" - IntegrationMappingContactStatus = "status" - IntegrationMappingContactTags = "tags" - IntegrationMappingContactTitle = "title" + IntegrationMappingContactObservedAt = "observedAt" + IntegrationMappingContactPhoneNumber = "phoneNumber" + IntegrationMappingContactStatus = "status" + IntegrationMappingContactTags = "tags" + IntegrationMappingContactTitle = "title" ) // Integration mapping keys for DirectoryAccount. const ( - IntegrationMappingDirectoryAccountAccountType = "accountType" - IntegrationMappingDirectoryAccountAddedAt = "addedAt" - IntegrationMappingDirectoryAccountAvatarRemoteURL = "avatarRemoteURL" - IntegrationMappingDirectoryAccountAvatarUpdatedAt = "avatarUpdatedAt" - IntegrationMappingDirectoryAccountCanonicalEmail = "canonicalEmail" - IntegrationMappingDirectoryAccountDepartment = "department" + IntegrationMappingDirectoryAccountAccountType = "accountType" + IntegrationMappingDirectoryAccountAddedAt = "addedAt" + IntegrationMappingDirectoryAccountAvatarRemoteURL = "avatarRemoteURL" + IntegrationMappingDirectoryAccountAvatarUpdatedAt = "avatarUpdatedAt" + IntegrationMappingDirectoryAccountCanonicalEmail = "canonicalEmail" + IntegrationMappingDirectoryAccountDepartment = "department" IntegrationMappingDirectoryAccountDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryAccountDirectoryName = "directoryName" - IntegrationMappingDirectoryAccountDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryAccountDisplayName = "displayName" - IntegrationMappingDirectoryAccountEnvironmentID = "environmentID" - IntegrationMappingDirectoryAccountEnvironmentName = "environmentName" - IntegrationMappingDirectoryAccountExternalID = "externalID" - IntegrationMappingDirectoryAccountFamilyName = "familyName" - IntegrationMappingDirectoryAccountFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryAccountGivenName = "givenName" - IntegrationMappingDirectoryAccountIdentityHolderID = "identityHolderID" - IntegrationMappingDirectoryAccountIntegrationID = "integrationID" - IntegrationMappingDirectoryAccountJobTitle = "jobTitle" - IntegrationMappingDirectoryAccountLastLoginAt = "lastLoginAt" - IntegrationMappingDirectoryAccountLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryAccountLastSeenIP = "lastSeenIP" - IntegrationMappingDirectoryAccountMetadata = "metadata" - IntegrationMappingDirectoryAccountMfaState = "mfaState" - IntegrationMappingDirectoryAccountObservedAt = "observedAt" - IntegrationMappingDirectoryAccountOrganizationUnit = "organizationUnit" - IntegrationMappingDirectoryAccountPlatformID = "platformID" - IntegrationMappingDirectoryAccountPrimarySource = "primarySource" - IntegrationMappingDirectoryAccountProfile = "profile" - IntegrationMappingDirectoryAccountProfileHash = "profileHash" - IntegrationMappingDirectoryAccountRemovedAt = "removedAt" - IntegrationMappingDirectoryAccountScopeID = "scopeID" - IntegrationMappingDirectoryAccountScopeName = "scopeName" - IntegrationMappingDirectoryAccountSecondaryKey = "secondaryKey" - IntegrationMappingDirectoryAccountSourceVersion = "sourceVersion" - IntegrationMappingDirectoryAccountStatus = "status" - IntegrationMappingDirectoryAccountTags = "tags" + IntegrationMappingDirectoryAccountDirectoryName = "directoryName" + IntegrationMappingDirectoryAccountDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryAccountDisplayName = "displayName" + IntegrationMappingDirectoryAccountEnvironmentID = "environmentID" + IntegrationMappingDirectoryAccountEnvironmentName = "environmentName" + IntegrationMappingDirectoryAccountExternalID = "externalID" + IntegrationMappingDirectoryAccountFamilyName = "familyName" + IntegrationMappingDirectoryAccountFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryAccountGivenName = "givenName" + IntegrationMappingDirectoryAccountIdentityHolderID = "identityHolderID" + IntegrationMappingDirectoryAccountIntegrationID = "integrationID" + IntegrationMappingDirectoryAccountJobTitle = "jobTitle" + IntegrationMappingDirectoryAccountLastLoginAt = "lastLoginAt" + IntegrationMappingDirectoryAccountLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryAccountLastSeenIP = "lastSeenIP" + IntegrationMappingDirectoryAccountMetadata = "metadata" + IntegrationMappingDirectoryAccountMfaState = "mfaState" + IntegrationMappingDirectoryAccountObservedAt = "observedAt" + IntegrationMappingDirectoryAccountOrganizationUnit = "organizationUnit" + IntegrationMappingDirectoryAccountPlatformID = "platformID" + IntegrationMappingDirectoryAccountPrimarySource = "primarySource" + IntegrationMappingDirectoryAccountProfile = "profile" + IntegrationMappingDirectoryAccountProfileHash = "profileHash" + IntegrationMappingDirectoryAccountRemovedAt = "removedAt" + IntegrationMappingDirectoryAccountScopeID = "scopeID" + IntegrationMappingDirectoryAccountScopeName = "scopeName" + IntegrationMappingDirectoryAccountSecondaryKey = "secondaryKey" + IntegrationMappingDirectoryAccountSourceVersion = "sourceVersion" + IntegrationMappingDirectoryAccountStatus = "status" + IntegrationMappingDirectoryAccountTags = "tags" ) // Integration mapping keys for DirectoryGroup. const ( - IntegrationMappingDirectoryGroupAddedAt = "addedAt" - IntegrationMappingDirectoryGroupClassification = "classification" - IntegrationMappingDirectoryGroupDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryGroupDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryGroupDisplayName = "displayName" - IntegrationMappingDirectoryGroupEmail = "email" - IntegrationMappingDirectoryGroupEnvironmentID = "environmentID" - IntegrationMappingDirectoryGroupEnvironmentName = "environmentName" - IntegrationMappingDirectoryGroupExternalID = "externalID" + IntegrationMappingDirectoryGroupAddedAt = "addedAt" + IntegrationMappingDirectoryGroupClassification = "classification" + IntegrationMappingDirectoryGroupDirectoryInstanceID = "directoryInstanceID" + IntegrationMappingDirectoryGroupDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryGroupDisplayName = "displayName" + IntegrationMappingDirectoryGroupEmail = "email" + IntegrationMappingDirectoryGroupEnvironmentID = "environmentID" + IntegrationMappingDirectoryGroupEnvironmentName = "environmentName" + IntegrationMappingDirectoryGroupExternalID = "externalID" IntegrationMappingDirectoryGroupExternalSharingAllowed = "externalSharingAllowed" - IntegrationMappingDirectoryGroupFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryGroupIntegrationID = "integrationID" - IntegrationMappingDirectoryGroupLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryGroupMemberCount = "memberCount" - IntegrationMappingDirectoryGroupMetadata = "metadata" - IntegrationMappingDirectoryGroupObservedAt = "observedAt" - IntegrationMappingDirectoryGroupPlatformID = "platformID" - IntegrationMappingDirectoryGroupProfile = "profile" - IntegrationMappingDirectoryGroupProfileHash = "profileHash" - IntegrationMappingDirectoryGroupRemovedAt = "removedAt" - IntegrationMappingDirectoryGroupScopeID = "scopeID" - IntegrationMappingDirectoryGroupScopeName = "scopeName" - IntegrationMappingDirectoryGroupSourceVersion = "sourceVersion" - IntegrationMappingDirectoryGroupStatus = "status" - IntegrationMappingDirectoryGroupTags = "tags" + IntegrationMappingDirectoryGroupFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryGroupIntegrationID = "integrationID" + IntegrationMappingDirectoryGroupLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryGroupMemberCount = "memberCount" + IntegrationMappingDirectoryGroupMetadata = "metadata" + IntegrationMappingDirectoryGroupObservedAt = "observedAt" + IntegrationMappingDirectoryGroupPlatformID = "platformID" + IntegrationMappingDirectoryGroupProfile = "profile" + IntegrationMappingDirectoryGroupProfileHash = "profileHash" + IntegrationMappingDirectoryGroupRemovedAt = "removedAt" + IntegrationMappingDirectoryGroupScopeID = "scopeID" + IntegrationMappingDirectoryGroupScopeName = "scopeName" + IntegrationMappingDirectoryGroupSourceVersion = "sourceVersion" + IntegrationMappingDirectoryGroupStatus = "status" + IntegrationMappingDirectoryGroupTags = "tags" ) // Integration mapping keys for DirectoryMembership. const ( - IntegrationMappingDirectoryMembershipAddedAt = "addedAt" - IntegrationMappingDirectoryMembershipDirectoryAccountID = "directoryAccountID" - IntegrationMappingDirectoryMembershipDirectoryGroupID = "directoryGroupID" + IntegrationMappingDirectoryMembershipAddedAt = "addedAt" + IntegrationMappingDirectoryMembershipDirectoryAccountID = "directoryAccountID" + IntegrationMappingDirectoryMembershipDirectoryGroupID = "directoryGroupID" IntegrationMappingDirectoryMembershipDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryMembershipDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryMembershipEnvironmentID = "environmentID" - IntegrationMappingDirectoryMembershipEnvironmentName = "environmentName" - IntegrationMappingDirectoryMembershipFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryMembershipIntegrationID = "integrationID" - IntegrationMappingDirectoryMembershipLastConfirmedRunID = "lastConfirmedRunID" - IntegrationMappingDirectoryMembershipLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryMembershipMetadata = "metadata" - IntegrationMappingDirectoryMembershipObservedAt = "observedAt" - IntegrationMappingDirectoryMembershipPlatformID = "platformID" - IntegrationMappingDirectoryMembershipRemovedAt = "removedAt" - IntegrationMappingDirectoryMembershipRole = "role" - IntegrationMappingDirectoryMembershipScopeID = "scopeID" - IntegrationMappingDirectoryMembershipScopeName = "scopeName" - IntegrationMappingDirectoryMembershipSource = "source" + IntegrationMappingDirectoryMembershipDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryMembershipEnvironmentID = "environmentID" + IntegrationMappingDirectoryMembershipEnvironmentName = "environmentName" + IntegrationMappingDirectoryMembershipFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryMembershipIntegrationID = "integrationID" + IntegrationMappingDirectoryMembershipLastConfirmedRunID = "lastConfirmedRunID" + IntegrationMappingDirectoryMembershipLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryMembershipMetadata = "metadata" + IntegrationMappingDirectoryMembershipObservedAt = "observedAt" + IntegrationMappingDirectoryMembershipPlatformID = "platformID" + IntegrationMappingDirectoryMembershipRemovedAt = "removedAt" + IntegrationMappingDirectoryMembershipRole = "role" + IntegrationMappingDirectoryMembershipScopeID = "scopeID" + IntegrationMappingDirectoryMembershipScopeName = "scopeName" + IntegrationMappingDirectoryMembershipSource = "source" ) // Integration mapping keys for Entity. const ( - IntegrationMappingEntityAnnualSpend = "annualSpend" - IntegrationMappingEntityApprovedForUse = "approvedForUse" - IntegrationMappingEntityAutoRenews = "autoRenews" - IntegrationMappingEntityBillingModel = "billingModel" - IntegrationMappingEntityContractEndDate = "contractEndDate" - IntegrationMappingEntityContractRenewalAt = "contractRenewalAt" - IntegrationMappingEntityContractStartDate = "contractStartDate" - IntegrationMappingEntityDisplayName = "displayName" - IntegrationMappingEntityDomains = "domains" - IntegrationMappingEntityEntityRelationshipStateID = "entityRelationshipStateID" - IntegrationMappingEntityEntityRelationshipStateName = "entityRelationshipStateName" - IntegrationMappingEntityEntitySecurityQuestionnaireStatusID = "entitySecurityQuestionnaireStatusID" + IntegrationMappingEntityAnnualSpend = "annualSpend" + IntegrationMappingEntityApprovedForUse = "approvedForUse" + IntegrationMappingEntityAutoRenews = "autoRenews" + IntegrationMappingEntityBillingModel = "billingModel" + IntegrationMappingEntityContractEndDate = "contractEndDate" + IntegrationMappingEntityContractRenewalAt = "contractRenewalAt" + IntegrationMappingEntityContractStartDate = "contractStartDate" + IntegrationMappingEntityDisplayName = "displayName" + IntegrationMappingEntityDomains = "domains" + IntegrationMappingEntityEntityRelationshipStateID = "entityRelationshipStateID" + IntegrationMappingEntityEntityRelationshipStateName = "entityRelationshipStateName" + IntegrationMappingEntityEntitySecurityQuestionnaireStatusID = "entitySecurityQuestionnaireStatusID" IntegrationMappingEntityEntitySecurityQuestionnaireStatusName = "entitySecurityQuestionnaireStatusName" - IntegrationMappingEntityEntitySourceTypeID = "entitySourceTypeID" - IntegrationMappingEntityEntitySourceTypeName = "entitySourceTypeName" - IntegrationMappingEntityEnvironmentID = "environmentID" - IntegrationMappingEntityEnvironmentName = "environmentName" - IntegrationMappingEntityExternalID = "externalID" - IntegrationMappingEntityHasSoc2 = "hasSoc2" - IntegrationMappingEntityInternalNotes = "internalNotes" - IntegrationMappingEntityInternalOwner = "internalOwner" - IntegrationMappingEntityInternalOwnerGroupID = "internalOwnerGroupID" - IntegrationMappingEntityInternalOwnerUserID = "internalOwnerUserID" - IntegrationMappingEntityLastReviewedAt = "lastReviewedAt" - IntegrationMappingEntityLinks = "links" - IntegrationMappingEntityMfaEnforced = "mfaEnforced" - IntegrationMappingEntityMfaSupported = "mfaSupported" - IntegrationMappingEntityName = "name" - IntegrationMappingEntityNextReviewAt = "nextReviewAt" - IntegrationMappingEntityObservedAt = "observedAt" - IntegrationMappingEntityOwnerID = "ownerID" - IntegrationMappingEntityProvidedServices = "providedServices" - IntegrationMappingEntityRenewalRisk = "renewalRisk" - IntegrationMappingEntityReviewFrequency = "reviewFrequency" - IntegrationMappingEntityReviewedBy = "reviewedBy" - IntegrationMappingEntityReviewedByGroupID = "reviewedByGroupID" - IntegrationMappingEntityReviewedByUserID = "reviewedByUserID" - IntegrationMappingEntityRiskRating = "riskRating" - IntegrationMappingEntityRiskScore = "riskScore" - IntegrationMappingEntityScopeID = "scopeID" - IntegrationMappingEntityScopeName = "scopeName" - IntegrationMappingEntitySoc2PeriodEnd = "soc2PeriodEnd" - IntegrationMappingEntitySpendCurrency = "spendCurrency" - IntegrationMappingEntitySsoEnforced = "ssoEnforced" - IntegrationMappingEntityStatus = "status" - IntegrationMappingEntityStatusPageURL = "statusPageURL" - IntegrationMappingEntitySystemInternalID = "systemInternalID" - IntegrationMappingEntityTags = "tags" - IntegrationMappingEntityTerminationNoticeDays = "terminationNoticeDays" - IntegrationMappingEntityTier = "tier" - IntegrationMappingEntityVendorMetadata = "vendorMetadata" + IntegrationMappingEntityEntitySourceTypeID = "entitySourceTypeID" + IntegrationMappingEntityEntitySourceTypeName = "entitySourceTypeName" + IntegrationMappingEntityEnvironmentID = "environmentID" + IntegrationMappingEntityEnvironmentName = "environmentName" + IntegrationMappingEntityExternalID = "externalID" + IntegrationMappingEntityHasSoc2 = "hasSoc2" + IntegrationMappingEntityInternalNotes = "internalNotes" + IntegrationMappingEntityInternalOwner = "internalOwner" + IntegrationMappingEntityInternalOwnerGroupID = "internalOwnerGroupID" + IntegrationMappingEntityInternalOwnerUserID = "internalOwnerUserID" + IntegrationMappingEntityLastReviewedAt = "lastReviewedAt" + IntegrationMappingEntityLinks = "links" + IntegrationMappingEntityMfaEnforced = "mfaEnforced" + IntegrationMappingEntityMfaSupported = "mfaSupported" + IntegrationMappingEntityName = "name" + IntegrationMappingEntityNextReviewAt = "nextReviewAt" + IntegrationMappingEntityObservedAt = "observedAt" + IntegrationMappingEntityOwnerID = "ownerID" + IntegrationMappingEntityProvidedServices = "providedServices" + IntegrationMappingEntityRenewalRisk = "renewalRisk" + IntegrationMappingEntityReviewFrequency = "reviewFrequency" + IntegrationMappingEntityReviewedBy = "reviewedBy" + IntegrationMappingEntityReviewedByGroupID = "reviewedByGroupID" + IntegrationMappingEntityReviewedByUserID = "reviewedByUserID" + IntegrationMappingEntityRiskRating = "riskRating" + IntegrationMappingEntityRiskScore = "riskScore" + IntegrationMappingEntityScopeID = "scopeID" + IntegrationMappingEntityScopeName = "scopeName" + IntegrationMappingEntitySoc2PeriodEnd = "soc2PeriodEnd" + IntegrationMappingEntitySpendCurrency = "spendCurrency" + IntegrationMappingEntitySsoEnforced = "ssoEnforced" + IntegrationMappingEntityStatus = "status" + IntegrationMappingEntityStatusPageURL = "statusPageURL" + IntegrationMappingEntitySystemInternalID = "systemInternalID" + IntegrationMappingEntityTags = "tags" + IntegrationMappingEntityTerminationNoticeDays = "terminationNoticeDays" + IntegrationMappingEntityTier = "tier" + IntegrationMappingEntityVendorMetadata = "vendorMetadata" ) // Integration mapping keys for Finding. const ( - IntegrationMappingFindingAssessmentID = "assessmentID" - IntegrationMappingFindingBlocksProduction = "blocksProduction" - IntegrationMappingFindingCategories = "categories" - IntegrationMappingFindingCategory = "category" - IntegrationMappingFindingDescription = "description" - IntegrationMappingFindingDisplayName = "displayName" - IntegrationMappingFindingEnvironmentID = "environmentID" - IntegrationMappingFindingEnvironmentName = "environmentName" - IntegrationMappingFindingEventTime = "eventTime" - IntegrationMappingFindingExploitability = "exploitability" - IntegrationMappingFindingExternalID = "externalID" - IntegrationMappingFindingExternalOwnerID = "externalOwnerID" - IntegrationMappingFindingExternalURI = "externalURI" - IntegrationMappingFindingFindingClass = "findingClass" - IntegrationMappingFindingFindingStatusID = "findingStatusID" - IntegrationMappingFindingFindingStatusName = "findingStatusName" - IntegrationMappingFindingImpact = "impact" - IntegrationMappingFindingInternalNotes = "internalNotes" - IntegrationMappingFindingMetadata = "metadata" - IntegrationMappingFindingNumericSeverity = "numericSeverity" - IntegrationMappingFindingOpen = "open" - IntegrationMappingFindingOwnerID = "ownerID" - IntegrationMappingFindingPriority = "priority" - IntegrationMappingFindingProduction = "production" - IntegrationMappingFindingPublic = "public" - IntegrationMappingFindingRawPayload = "rawPayload" - IntegrationMappingFindingRecommendation = "recommendation" + IntegrationMappingFindingAssessmentID = "assessmentID" + IntegrationMappingFindingBlocksProduction = "blocksProduction" + IntegrationMappingFindingCategories = "categories" + IntegrationMappingFindingCategory = "category" + IntegrationMappingFindingDescription = "description" + IntegrationMappingFindingDisplayName = "displayName" + IntegrationMappingFindingEnvironmentID = "environmentID" + IntegrationMappingFindingEnvironmentName = "environmentName" + IntegrationMappingFindingEventTime = "eventTime" + IntegrationMappingFindingExploitability = "exploitability" + IntegrationMappingFindingExternalID = "externalID" + IntegrationMappingFindingExternalOwnerID = "externalOwnerID" + IntegrationMappingFindingExternalURI = "externalURI" + IntegrationMappingFindingFindingClass = "findingClass" + IntegrationMappingFindingFindingStatusID = "findingStatusID" + IntegrationMappingFindingFindingStatusName = "findingStatusName" + IntegrationMappingFindingImpact = "impact" + IntegrationMappingFindingInternalNotes = "internalNotes" + IntegrationMappingFindingMetadata = "metadata" + IntegrationMappingFindingNumericSeverity = "numericSeverity" + IntegrationMappingFindingOpen = "open" + IntegrationMappingFindingOwnerID = "ownerID" + IntegrationMappingFindingPriority = "priority" + IntegrationMappingFindingProduction = "production" + IntegrationMappingFindingPublic = "public" + IntegrationMappingFindingRawPayload = "rawPayload" + IntegrationMappingFindingRecommendation = "recommendation" IntegrationMappingFindingRecommendedActions = "recommendedActions" - IntegrationMappingFindingReferences = "references" - IntegrationMappingFindingRemediationSLA = "remediationSLA" - IntegrationMappingFindingReportedAt = "reportedAt" - IntegrationMappingFindingResourceName = "resourceName" - IntegrationMappingFindingScopeID = "scopeID" - IntegrationMappingFindingScopeName = "scopeName" - IntegrationMappingFindingScore = "score" - IntegrationMappingFindingSeverity = "severity" - IntegrationMappingFindingSource = "source" - IntegrationMappingFindingSourceUpdatedAt = "sourceUpdatedAt" - IntegrationMappingFindingState = "state" - IntegrationMappingFindingStepsToReproduce = "stepsToReproduce" - IntegrationMappingFindingSystemInternalID = "systemInternalID" - IntegrationMappingFindingTags = "tags" - IntegrationMappingFindingTargetDetails = "targetDetails" - IntegrationMappingFindingTargets = "targets" - IntegrationMappingFindingValidated = "validated" - IntegrationMappingFindingVector = "vector" + IntegrationMappingFindingReferences = "references" + IntegrationMappingFindingRemediationSLA = "remediationSLA" + IntegrationMappingFindingReportedAt = "reportedAt" + IntegrationMappingFindingResourceName = "resourceName" + IntegrationMappingFindingScopeID = "scopeID" + IntegrationMappingFindingScopeName = "scopeName" + IntegrationMappingFindingScore = "score" + IntegrationMappingFindingSeverity = "severity" + IntegrationMappingFindingSource = "source" + IntegrationMappingFindingSourceUpdatedAt = "sourceUpdatedAt" + IntegrationMappingFindingState = "state" + IntegrationMappingFindingStepsToReproduce = "stepsToReproduce" + IntegrationMappingFindingSystemInternalID = "systemInternalID" + IntegrationMappingFindingTags = "tags" + IntegrationMappingFindingTargetDetails = "targetDetails" + IntegrationMappingFindingTargets = "targets" + IntegrationMappingFindingValidated = "validated" + IntegrationMappingFindingVector = "vector" ) // Integration mapping keys for Risk. const ( - IntegrationMappingRiskBusinessCosts = "businessCosts" + IntegrationMappingRiskBusinessCosts = "businessCosts" IntegrationMappingRiskBusinessCostsJSON = "businessCostsJSON" - IntegrationMappingRiskDetails = "details" - IntegrationMappingRiskDetailsJSON = "detailsJSON" - IntegrationMappingRiskDueDate = "dueDate" - IntegrationMappingRiskEnvironmentID = "environmentID" - IntegrationMappingRiskEnvironmentName = "environmentName" - IntegrationMappingRiskExternalID = "externalID" - IntegrationMappingRiskExternalUUID = "externalUUID" - IntegrationMappingRiskImpact = "impact" - IntegrationMappingRiskIntegrationID = "integrationID" - IntegrationMappingRiskLastReviewedAt = "lastReviewedAt" - IntegrationMappingRiskLikelihood = "likelihood" - IntegrationMappingRiskMitigatedAt = "mitigatedAt" - IntegrationMappingRiskMitigation = "mitigation" - IntegrationMappingRiskMitigationJSON = "mitigationJSON" - IntegrationMappingRiskName = "name" - IntegrationMappingRiskNextReviewDueAt = "nextReviewDueAt" - IntegrationMappingRiskObservedAt = "observedAt" - IntegrationMappingRiskOwnerID = "ownerID" - IntegrationMappingRiskResidualScore = "residualScore" - IntegrationMappingRiskReviewFrequency = "reviewFrequency" - IntegrationMappingRiskReviewRequired = "reviewRequired" - IntegrationMappingRiskRiskCategoryID = "riskCategoryID" - IntegrationMappingRiskRiskCategoryName = "riskCategoryName" - IntegrationMappingRiskRiskDecision = "riskDecision" - IntegrationMappingRiskRiskKindID = "riskKindID" - IntegrationMappingRiskRiskKindName = "riskKindName" - IntegrationMappingRiskScopeID = "scopeID" - IntegrationMappingRiskScopeName = "scopeName" - IntegrationMappingRiskScore = "score" - IntegrationMappingRiskStatus = "status" - IntegrationMappingRiskTags = "tags" + IntegrationMappingRiskDetails = "details" + IntegrationMappingRiskDetailsJSON = "detailsJSON" + IntegrationMappingRiskDueDate = "dueDate" + IntegrationMappingRiskEnvironmentID = "environmentID" + IntegrationMappingRiskEnvironmentName = "environmentName" + IntegrationMappingRiskExternalID = "externalID" + IntegrationMappingRiskExternalUUID = "externalUUID" + IntegrationMappingRiskImpact = "impact" + IntegrationMappingRiskIntegrationID = "integrationID" + IntegrationMappingRiskLastReviewedAt = "lastReviewedAt" + IntegrationMappingRiskLikelihood = "likelihood" + IntegrationMappingRiskMitigatedAt = "mitigatedAt" + IntegrationMappingRiskMitigation = "mitigation" + IntegrationMappingRiskMitigationJSON = "mitigationJSON" + IntegrationMappingRiskName = "name" + IntegrationMappingRiskNextReviewDueAt = "nextReviewDueAt" + IntegrationMappingRiskObservedAt = "observedAt" + IntegrationMappingRiskOwnerID = "ownerID" + IntegrationMappingRiskResidualScore = "residualScore" + IntegrationMappingRiskReviewFrequency = "reviewFrequency" + IntegrationMappingRiskReviewRequired = "reviewRequired" + IntegrationMappingRiskRiskCategoryID = "riskCategoryID" + IntegrationMappingRiskRiskCategoryName = "riskCategoryName" + IntegrationMappingRiskRiskDecision = "riskDecision" + IntegrationMappingRiskRiskKindID = "riskKindID" + IntegrationMappingRiskRiskKindName = "riskKindName" + IntegrationMappingRiskScopeID = "scopeID" + IntegrationMappingRiskScopeName = "scopeName" + IntegrationMappingRiskScore = "score" + IntegrationMappingRiskStatus = "status" + IntegrationMappingRiskTags = "tags" ) // Integration mapping keys for Vulnerability. const ( - IntegrationMappingVulnerabilityAutoDismissedAt = "autoDismissedAt" - IntegrationMappingVulnerabilityBlocking = "blocking" - IntegrationMappingVulnerabilityCategory = "category" - IntegrationMappingVulnerabilityCveID = "cveID" - IntegrationMappingVulnerabilityCweIds = "cweIds" - IntegrationMappingVulnerabilityDependencyScope = "dependencyScope" - IntegrationMappingVulnerabilityDescription = "description" - IntegrationMappingVulnerabilityDiscoveredAt = "discoveredAt" - IntegrationMappingVulnerabilityDismissedAt = "dismissedAt" - IntegrationMappingVulnerabilityDismissedComment = "dismissedComment" - IntegrationMappingVulnerabilityDismissedReason = "dismissedReason" - IntegrationMappingVulnerabilityDisplayName = "displayName" - IntegrationMappingVulnerabilityEnvironmentID = "environmentID" - IntegrationMappingVulnerabilityEnvironmentName = "environmentName" - IntegrationMappingVulnerabilityExploitability = "exploitability" - IntegrationMappingVulnerabilityExternalID = "externalID" - IntegrationMappingVulnerabilityExternalOwnerID = "externalOwnerID" - IntegrationMappingVulnerabilityExternalURI = "externalURI" - IntegrationMappingVulnerabilityFirstPatchedVersion = "firstPatchedVersion" - IntegrationMappingVulnerabilityFixedAt = "fixedAt" - IntegrationMappingVulnerabilityImpact = "impact" - IntegrationMappingVulnerabilityImpacts = "impacts" - IntegrationMappingVulnerabilityInternalNotes = "internalNotes" - IntegrationMappingVulnerabilityManifestPath = "manifestPath" - IntegrationMappingVulnerabilityMetadata = "metadata" - IntegrationMappingVulnerabilityOpen = "open" - IntegrationMappingVulnerabilityOwnerID = "ownerID" - IntegrationMappingVulnerabilityPackageEcosystem = "packageEcosystem" - IntegrationMappingVulnerabilityPackageName = "packageName" - IntegrationMappingVulnerabilityPriority = "priority" - IntegrationMappingVulnerabilityProduction = "production" - IntegrationMappingVulnerabilityPublic = "public" - IntegrationMappingVulnerabilityPublishedAt = "publishedAt" - IntegrationMappingVulnerabilityRawPayload = "rawPayload" - IntegrationMappingVulnerabilityReferences = "references" - IntegrationMappingVulnerabilityRemediationSLA = "remediationSLA" - IntegrationMappingVulnerabilityScopeID = "scopeID" - IntegrationMappingVulnerabilityScopeName = "scopeName" - IntegrationMappingVulnerabilityScore = "score" - IntegrationMappingVulnerabilitySeverity = "severity" - IntegrationMappingVulnerabilitySource = "source" - IntegrationMappingVulnerabilitySourceUpdatedAt = "sourceUpdatedAt" - IntegrationMappingVulnerabilitySummary = "summary" - IntegrationMappingVulnerabilitySystemInternalID = "systemInternalID" - IntegrationMappingVulnerabilityTags = "tags" - IntegrationMappingVulnerabilityValidated = "validated" - IntegrationMappingVulnerabilityVector = "vector" - IntegrationMappingVulnerabilityVulnerabilityStatusID = "vulnerabilityStatusID" + IntegrationMappingVulnerabilityAutoDismissedAt = "autoDismissedAt" + IntegrationMappingVulnerabilityBlocking = "blocking" + IntegrationMappingVulnerabilityCategory = "category" + IntegrationMappingVulnerabilityCveID = "cveID" + IntegrationMappingVulnerabilityCweIds = "cweIds" + IntegrationMappingVulnerabilityDependencyScope = "dependencyScope" + IntegrationMappingVulnerabilityDescription = "description" + IntegrationMappingVulnerabilityDiscoveredAt = "discoveredAt" + IntegrationMappingVulnerabilityDismissedAt = "dismissedAt" + IntegrationMappingVulnerabilityDismissedComment = "dismissedComment" + IntegrationMappingVulnerabilityDismissedReason = "dismissedReason" + IntegrationMappingVulnerabilityDisplayName = "displayName" + IntegrationMappingVulnerabilityEnvironmentID = "environmentID" + IntegrationMappingVulnerabilityEnvironmentName = "environmentName" + IntegrationMappingVulnerabilityExploitability = "exploitability" + IntegrationMappingVulnerabilityExternalID = "externalID" + IntegrationMappingVulnerabilityExternalOwnerID = "externalOwnerID" + IntegrationMappingVulnerabilityExternalURI = "externalURI" + IntegrationMappingVulnerabilityFirstPatchedVersion = "firstPatchedVersion" + IntegrationMappingVulnerabilityFixedAt = "fixedAt" + IntegrationMappingVulnerabilityImpact = "impact" + IntegrationMappingVulnerabilityImpacts = "impacts" + IntegrationMappingVulnerabilityInternalNotes = "internalNotes" + IntegrationMappingVulnerabilityManifestPath = "manifestPath" + IntegrationMappingVulnerabilityMetadata = "metadata" + IntegrationMappingVulnerabilityOpen = "open" + IntegrationMappingVulnerabilityOwnerID = "ownerID" + IntegrationMappingVulnerabilityPackageEcosystem = "packageEcosystem" + IntegrationMappingVulnerabilityPackageName = "packageName" + IntegrationMappingVulnerabilityPriority = "priority" + IntegrationMappingVulnerabilityProduction = "production" + IntegrationMappingVulnerabilityPublic = "public" + IntegrationMappingVulnerabilityPublishedAt = "publishedAt" + IntegrationMappingVulnerabilityRawPayload = "rawPayload" + IntegrationMappingVulnerabilityReferences = "references" + IntegrationMappingVulnerabilityRemediationSLA = "remediationSLA" + IntegrationMappingVulnerabilityScopeID = "scopeID" + IntegrationMappingVulnerabilityScopeName = "scopeName" + IntegrationMappingVulnerabilityScore = "score" + IntegrationMappingVulnerabilitySeverity = "severity" + IntegrationMappingVulnerabilitySource = "source" + IntegrationMappingVulnerabilitySourceUpdatedAt = "sourceUpdatedAt" + IntegrationMappingVulnerabilitySummary = "summary" + IntegrationMappingVulnerabilitySystemInternalID = "systemInternalID" + IntegrationMappingVulnerabilityTags = "tags" + IntegrationMappingVulnerabilityValidated = "validated" + IntegrationMappingVulnerabilityVector = "vector" + IntegrationMappingVulnerabilityVulnerabilityStatusID = "vulnerabilityStatusID" IntegrationMappingVulnerabilityVulnerabilityStatusName = "vulnerabilityStatusName" - IntegrationMappingVulnerabilityVulnerableVersionRange = "vulnerableVersionRange" + IntegrationMappingVulnerabilityVulnerableVersionRange = "vulnerableVersionRange" ) // IntegrationMappingSchemas maps schema names to their mapping metadata @@ -520,407 +521,407 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Asset", Fields: []IntegrationMappingField{ { - InputKey: "accessModelID", - GoField: "AccessModelID", - EntField: "access_model_id", - Type: "string", - Required: false, + InputKey: "accessModelID", + GoField: "AccessModelID", + EntField: "access_model_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "accessModelName", - GoField: "AccessModelName", - EntField: "access_model_name", - Type: "string", - Required: false, + InputKey: "accessModelName", + GoField: "AccessModelName", + EntField: "access_model_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetDataClassificationID", - GoField: "AssetDataClassificationID", - EntField: "asset_data_classification_id", - Type: "string", - Required: false, + InputKey: "assetDataClassificationID", + GoField: "AssetDataClassificationID", + EntField: "asset_data_classification_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetDataClassificationName", - GoField: "AssetDataClassificationName", - EntField: "asset_data_classification_name", - Type: "string", - Required: false, + InputKey: "assetDataClassificationName", + GoField: "AssetDataClassificationName", + EntField: "asset_data_classification_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetSubtypeID", - GoField: "AssetSubtypeID", - EntField: "asset_subtype_id", - Type: "string", - Required: false, + InputKey: "assetSubtypeID", + GoField: "AssetSubtypeID", + EntField: "asset_subtype_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetSubtypeName", - GoField: "AssetSubtypeName", - EntField: "asset_subtype_name", - Type: "string", - Required: false, + InputKey: "assetSubtypeName", + GoField: "AssetSubtypeName", + EntField: "asset_subtype_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetType", - GoField: "AssetType", - EntField: "asset_type", - Type: "string", - Required: true, + InputKey: "assetType", + GoField: "AssetType", + EntField: "asset_type", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "categories", - GoField: "Categories", - EntField: "categories", - Type: "json.RawMessage", - Required: false, + InputKey: "categories", + GoField: "Categories", + EntField: "categories", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "containsPii", - GoField: "ContainsPii", - EntField: "contains_pii", - Type: "bool", - Required: false, + InputKey: "containsPii", + GoField: "ContainsPii", + EntField: "contains_pii", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "costCenter", - GoField: "CostCenter", - EntField: "cost_center", - Type: "string", - Required: false, + InputKey: "costCenter", + GoField: "CostCenter", + EntField: "cost_center", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "criticalityID", - GoField: "CriticalityID", - EntField: "criticality_id", - Type: "string", - Required: false, + InputKey: "criticalityID", + GoField: "CriticalityID", + EntField: "criticality_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "criticalityName", - GoField: "CriticalityName", - EntField: "criticality_name", - Type: "string", - Required: false, + InputKey: "criticalityName", + GoField: "CriticalityName", + EntField: "criticality_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "encryptionStatusID", - GoField: "EncryptionStatusID", - EntField: "encryption_status_id", - Type: "string", - Required: false, + InputKey: "encryptionStatusID", + GoField: "EncryptionStatusID", + EntField: "encryption_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "encryptionStatusName", - GoField: "EncryptionStatusName", - EntField: "encryption_status_name", - Type: "string", - Required: false, + InputKey: "encryptionStatusName", + GoField: "EncryptionStatusName", + EntField: "encryption_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "estimatedMonthlyCost", - GoField: "EstimatedMonthlyCost", - EntField: "estimated_monthly_cost", - Type: "float64", - Required: false, + InputKey: "estimatedMonthlyCost", + GoField: "EstimatedMonthlyCost", + EntField: "estimated_monthly_cost", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "identifier", - GoField: "Identifier", - EntField: "identifier", - Type: "string", - Required: false, + InputKey: "identifier", + GoField: "Identifier", + EntField: "identifier", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwner", - GoField: "InternalOwner", - EntField: "internal_owner", - Type: "string", - Required: false, + InputKey: "internalOwner", + GoField: "InternalOwner", + EntField: "internal_owner", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerGroupID", - GoField: "InternalOwnerGroupID", - EntField: "internal_owner_group_id", - Type: "string", - Required: false, + InputKey: "internalOwnerGroupID", + GoField: "InternalOwnerGroupID", + EntField: "internal_owner_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerUserID", - GoField: "InternalOwnerUserID", - EntField: "internal_owner_user_id", - Type: "string", - Required: false, + InputKey: "internalOwnerUserID", + GoField: "InternalOwnerUserID", + EntField: "internal_owner_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: true, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "physicalLocation", - GoField: "PhysicalLocation", - EntField: "physical_location", - Type: "string", - Required: false, + InputKey: "physicalLocation", + GoField: "PhysicalLocation", + EntField: "physical_location", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "purchaseDate", - GoField: "PurchaseDate", - EntField: "purchase_date", - Type: "time.Time", - Required: false, + InputKey: "purchaseDate", + GoField: "PurchaseDate", + EntField: "purchase_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "region", - GoField: "Region", - EntField: "region", - Type: "string", - Required: false, + InputKey: "region", + GoField: "Region", + EntField: "region", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "securityTierID", - GoField: "SecurityTierID", - EntField: "security_tier_id", - Type: "string", - Required: false, + InputKey: "securityTierID", + GoField: "SecurityTierID", + EntField: "security_tier_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "securityTierName", - GoField: "SecurityTierName", - EntField: "security_tier_name", - Type: "string", - Required: false, + InputKey: "securityTierName", + GoField: "SecurityTierName", + EntField: "security_tier_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceIdentifier", - GoField: "SourceIdentifier", - EntField: "source_identifier", - Type: "string", - Required: false, + InputKey: "sourceIdentifier", + GoField: "SourceIdentifier", + EntField: "source_identifier", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "sourceType", - GoField: "SourceType", - EntField: "source_type", - Type: "string", - Required: true, + InputKey: "sourceType", + GoField: "SourceType", + EntField: "source_type", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "website", - GoField: "Website", - EntField: "website", - Type: "string", - Required: false, + InputKey: "website", + GoField: "Website", + EntField: "website", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "accessModelID": {}, - "accessModelName": {}, - "assetDataClassificationID": {}, + "accessModelID": {}, + "accessModelName": {}, + "assetDataClassificationID": {}, "assetDataClassificationName": {}, - "assetSubtypeID": {}, - "assetSubtypeName": {}, - "assetType": {}, - "categories": {}, - "containsPii": {}, - "costCenter": {}, - "criticalityID": {}, - "criticalityName": {}, - "description": {}, - "displayName": {}, - "encryptionStatusID": {}, - "encryptionStatusName": {}, - "environmentID": {}, - "environmentName": {}, - "estimatedMonthlyCost": {}, - "identifier": {}, - "integrationID": {}, - "internalNotes": {}, - "internalOwner": {}, - "internalOwnerGroupID": {}, - "internalOwnerUserID": {}, - "name": {}, - "observedAt": {}, - "ownerID": {}, - "physicalLocation": {}, - "purchaseDate": {}, - "region": {}, - "scopeID": {}, - "scopeName": {}, - "securityTierID": {}, - "securityTierName": {}, - "sourceIdentifier": {}, - "sourceType": {}, - "systemInternalID": {}, - "tags": {}, - "website": {}, + "assetSubtypeID": {}, + "assetSubtypeName": {}, + "assetType": {}, + "categories": {}, + "containsPii": {}, + "costCenter": {}, + "criticalityID": {}, + "criticalityName": {}, + "description": {}, + "displayName": {}, + "encryptionStatusID": {}, + "encryptionStatusName": {}, + "environmentID": {}, + "environmentName": {}, + "estimatedMonthlyCost": {}, + "identifier": {}, + "integrationID": {}, + "internalNotes": {}, + "internalOwner": {}, + "internalOwnerGroupID": {}, + "internalOwnerUserID": {}, + "name": {}, + "observedAt": {}, + "ownerID": {}, + "physicalLocation": {}, + "purchaseDate": {}, + "region": {}, + "scopeID": {}, + "scopeName": {}, + "securityTierID": {}, + "securityTierName": {}, + "sourceIdentifier": {}, + "sourceType": {}, + "systemInternalID": {}, + "tags": {}, + "website": {}, }, RequiredKeys: []string{ "assetType", @@ -936,117 +937,117 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Contact", Fields: []IntegrationMappingField{ { - InputKey: "address", - GoField: "Address", - EntField: "address", - Type: "string", - Required: false, + InputKey: "address", + GoField: "Address", + EntField: "address", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "company", - GoField: "Company", - EntField: "company", - Type: "string", - Required: false, + InputKey: "company", + GoField: "Company", + EntField: "company", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "email", - GoField: "Email", - EntField: "email", - Type: "string", - Required: false, + InputKey: "email", + GoField: "Email", + EntField: "email", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "fullName", - GoField: "FullName", - EntField: "full_name", - Type: "string", - Required: false, + InputKey: "fullName", + GoField: "FullName", + EntField: "full_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "phoneNumber", - GoField: "PhoneNumber", - EntField: "phone_number", - Type: "string", - Required: false, + InputKey: "phoneNumber", + GoField: "PhoneNumber", + EntField: "phone_number", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "title", - GoField: "Title", - EntField: "title", - Type: "string", - Required: false, + InputKey: "title", + GoField: "Title", + EntField: "title", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "address": {}, - "company": {}, - "email": {}, - "externalID": {}, - "fullName": {}, + "address": {}, + "company": {}, + "email": {}, + "externalID": {}, + "fullName": {}, "integrationID": {}, - "observedAt": {}, - "phoneNumber": {}, - "status": {}, - "tags": {}, - "title": {}, + "observedAt": {}, + "phoneNumber": {}, + "status": {}, + "tags": {}, + "title": {}, }, RequiredKeys: []string{ "status", @@ -1061,377 +1062,377 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryAccount", Fields: []IntegrationMappingField{ { - InputKey: "accountType", - GoField: "AccountType", - EntField: "account_type", - Type: "string", - Required: false, + InputKey: "accountType", + GoField: "AccountType", + EntField: "account_type", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "avatarRemoteURL", - GoField: "AvatarRemoteURL", - EntField: "avatar_remote_url", - Type: "string", - Required: false, + InputKey: "avatarRemoteURL", + GoField: "AvatarRemoteURL", + EntField: "avatar_remote_url", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "avatarUpdatedAt", - GoField: "AvatarUpdatedAt", - EntField: "avatar_updated_at", - Type: "time.Time", - Required: false, + InputKey: "avatarUpdatedAt", + GoField: "AvatarUpdatedAt", + EntField: "avatar_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "canonicalEmail", - GoField: "CanonicalEmail", - EntField: "canonical_email", - Type: "string", - Required: false, + InputKey: "canonicalEmail", + GoField: "CanonicalEmail", + EntField: "canonical_email", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "department", - GoField: "Department", - EntField: "department", - Type: "string", - Required: false, + InputKey: "department", + GoField: "Department", + EntField: "department", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryName", - GoField: "DirectoryName", - EntField: "directory_name", - Type: "string", - Required: false, + InputKey: "directoryName", + GoField: "DirectoryName", + EntField: "directory_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: false, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "familyName", - GoField: "FamilyName", - EntField: "family_name", - Type: "string", - Required: false, + InputKey: "familyName", + GoField: "FamilyName", + EntField: "family_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "givenName", - GoField: "GivenName", - EntField: "given_name", - Type: "string", - Required: false, + InputKey: "givenName", + GoField: "GivenName", + EntField: "given_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "identityHolderID", - GoField: "IdentityHolderID", - EntField: "identity_holder_id", - Type: "string", - Required: false, + InputKey: "identityHolderID", + GoField: "IdentityHolderID", + EntField: "identity_holder_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "jobTitle", - GoField: "JobTitle", - EntField: "job_title", - Type: "string", - Required: false, + InputKey: "jobTitle", + GoField: "JobTitle", + EntField: "job_title", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastLoginAt", - GoField: "LastLoginAt", - EntField: "last_login_at", - Type: "time.Time", - Required: false, + InputKey: "lastLoginAt", + GoField: "LastLoginAt", + EntField: "last_login_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenIP", - GoField: "LastSeenIP", - EntField: "last_seen_ip", - Type: "string", - Required: false, + InputKey: "lastSeenIP", + GoField: "LastSeenIP", + EntField: "last_seen_ip", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaState", - GoField: "MfaState", - EntField: "mfa_state", - Type: "string", - Required: true, + InputKey: "mfaState", + GoField: "MfaState", + EntField: "mfa_state", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "organizationUnit", - GoField: "OrganizationUnit", - EntField: "organization_unit", - Type: "string", - Required: false, + InputKey: "organizationUnit", + GoField: "OrganizationUnit", + EntField: "organization_unit", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "primarySource", - GoField: "PrimarySource", - EntField: "primary_source", - Type: "bool", - Required: true, + InputKey: "primarySource", + GoField: "PrimarySource", + EntField: "primary_source", + Type: "bool", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "profile", - GoField: "Profile", - EntField: "profile", - Type: "json.RawMessage", - Required: false, + InputKey: "profile", + GoField: "Profile", + EntField: "profile", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profileHash", - GoField: "ProfileHash", - EntField: "profile_hash", - Type: "string", - Required: true, + InputKey: "profileHash", + GoField: "ProfileHash", + EntField: "profile_hash", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "secondaryKey", - GoField: "SecondaryKey", - EntField: "secondary_key", - Type: "string", - Required: false, + InputKey: "secondaryKey", + GoField: "SecondaryKey", + EntField: "secondary_key", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceVersion", - GoField: "SourceVersion", - EntField: "source_version", - Type: "string", - Required: false, + InputKey: "sourceVersion", + GoField: "SourceVersion", + EntField: "source_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "accountType": {}, - "addedAt": {}, - "avatarRemoteURL": {}, - "avatarUpdatedAt": {}, - "canonicalEmail": {}, - "department": {}, + "accountType": {}, + "addedAt": {}, + "avatarRemoteURL": {}, + "avatarUpdatedAt": {}, + "canonicalEmail": {}, + "department": {}, "directoryInstanceID": {}, - "directoryName": {}, - "directorySyncRunID": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "familyName": {}, - "firstSeenAt": {}, - "givenName": {}, - "identityHolderID": {}, - "integrationID": {}, - "jobTitle": {}, - "lastLoginAt": {}, - "lastSeenAt": {}, - "lastSeenIP": {}, - "metadata": {}, - "mfaState": {}, - "observedAt": {}, - "organizationUnit": {}, - "platformID": {}, - "primarySource": {}, - "profile": {}, - "profileHash": {}, - "removedAt": {}, - "scopeID": {}, - "scopeName": {}, - "secondaryKey": {}, - "sourceVersion": {}, - "status": {}, - "tags": {}, + "directoryName": {}, + "directorySyncRunID": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "familyName": {}, + "firstSeenAt": {}, + "givenName": {}, + "identityHolderID": {}, + "integrationID": {}, + "jobTitle": {}, + "lastLoginAt": {}, + "lastSeenAt": {}, + "lastSeenIP": {}, + "metadata": {}, + "mfaState": {}, + "observedAt": {}, + "organizationUnit": {}, + "platformID": {}, + "primarySource": {}, + "profile": {}, + "profileHash": {}, + "removedAt": {}, + "scopeID": {}, + "scopeName": {}, + "secondaryKey": {}, + "sourceVersion": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "externalID", @@ -1453,257 +1454,257 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryGroup", Fields: []IntegrationMappingField{ { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "classification", - GoField: "Classification", - EntField: "classification", - Type: "string", - Required: true, + InputKey: "classification", + GoField: "Classification", + EntField: "classification", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: true, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "email", - GoField: "Email", - EntField: "email", - Type: "string", - Required: false, + InputKey: "email", + GoField: "Email", + EntField: "email", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: false, LookupKey: true, }, { - InputKey: "externalSharingAllowed", - GoField: "ExternalSharingAllowed", - EntField: "external_sharing_allowed", - Type: "bool", - Required: false, + InputKey: "externalSharingAllowed", + GoField: "ExternalSharingAllowed", + EntField: "external_sharing_allowed", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: true, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "memberCount", - GoField: "MemberCount", - EntField: "member_count", - Type: "int", - Required: false, + InputKey: "memberCount", + GoField: "MemberCount", + EntField: "member_count", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profile", - GoField: "Profile", - EntField: "profile", - Type: "json.RawMessage", - Required: false, + InputKey: "profile", + GoField: "Profile", + EntField: "profile", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profileHash", - GoField: "ProfileHash", - EntField: "profile_hash", - Type: "string", - Required: true, + InputKey: "profileHash", + GoField: "ProfileHash", + EntField: "profile_hash", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceVersion", - GoField: "SourceVersion", - EntField: "source_version", - Type: "string", - Required: false, + InputKey: "sourceVersion", + GoField: "SourceVersion", + EntField: "source_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "addedAt": {}, - "classification": {}, - "directoryInstanceID": {}, - "directorySyncRunID": {}, - "displayName": {}, - "email": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, + "addedAt": {}, + "classification": {}, + "directoryInstanceID": {}, + "directorySyncRunID": {}, + "displayName": {}, + "email": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, "externalSharingAllowed": {}, - "firstSeenAt": {}, - "integrationID": {}, - "lastSeenAt": {}, - "memberCount": {}, - "metadata": {}, - "observedAt": {}, - "platformID": {}, - "profile": {}, - "profileHash": {}, - "removedAt": {}, - "scopeID": {}, - "scopeName": {}, - "sourceVersion": {}, - "status": {}, - "tags": {}, + "firstSeenAt": {}, + "integrationID": {}, + "lastSeenAt": {}, + "memberCount": {}, + "metadata": {}, + "observedAt": {}, + "platformID": {}, + "profile": {}, + "profileHash": {}, + "removedAt": {}, + "scopeID": {}, + "scopeName": {}, + "sourceVersion": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "classification", @@ -1724,197 +1725,197 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryMembership", Fields: []IntegrationMappingField{ { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryAccountID", - GoField: "DirectoryAccountID", - EntField: "directory_account_id", - Type: "string", - Required: true, + InputKey: "directoryAccountID", + GoField: "DirectoryAccountID", + EntField: "directory_account_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "directoryGroupID", - GoField: "DirectoryGroupID", - EntField: "directory_group_id", - Type: "string", - Required: true, + InputKey: "directoryGroupID", + GoField: "DirectoryGroupID", + EntField: "directory_group_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: true, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: true, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "lastConfirmedRunID", - GoField: "LastConfirmedRunID", - EntField: "last_confirmed_run_id", - Type: "string", - Required: false, + InputKey: "lastConfirmedRunID", + GoField: "LastConfirmedRunID", + EntField: "last_confirmed_run_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "role", - GoField: "Role", - EntField: "role", - Type: "string", - Required: false, + InputKey: "role", + GoField: "Role", + EntField: "role", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "addedAt": {}, - "directoryAccountID": {}, - "directoryGroupID": {}, + "addedAt": {}, + "directoryAccountID": {}, + "directoryGroupID": {}, "directoryInstanceID": {}, - "directorySyncRunID": {}, - "environmentID": {}, - "environmentName": {}, - "firstSeenAt": {}, - "integrationID": {}, - "lastConfirmedRunID": {}, - "lastSeenAt": {}, - "metadata": {}, - "observedAt": {}, - "platformID": {}, - "removedAt": {}, - "role": {}, - "scopeID": {}, - "scopeName": {}, - "source": {}, + "directorySyncRunID": {}, + "environmentID": {}, + "environmentName": {}, + "firstSeenAt": {}, + "integrationID": {}, + "lastConfirmedRunID": {}, + "lastSeenAt": {}, + "metadata": {}, + "observedAt": {}, + "platformID": {}, + "removedAt": {}, + "role": {}, + "scopeID": {}, + "scopeName": {}, + "source": {}, }, RequiredKeys: []string{ "directoryAccountID", @@ -1935,519 +1936,520 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Entity", Fields: []IntegrationMappingField{ { - InputKey: "annualSpend", - GoField: "AnnualSpend", - EntField: "annual_spend", - Type: "float64", - Required: false, + InputKey: "annualSpend", + GoField: "AnnualSpend", + EntField: "annual_spend", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "approvedForUse", - GoField: "ApprovedForUse", - EntField: "approved_for_use", - Type: "bool", - Required: false, + InputKey: "approvedForUse", + GoField: "ApprovedForUse", + EntField: "approved_for_use", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "autoRenews", - GoField: "AutoRenews", - EntField: "auto_renews", - Type: "bool", - Required: false, + InputKey: "autoRenews", + GoField: "AutoRenews", + EntField: "auto_renews", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "billingModel", - GoField: "BillingModel", - EntField: "billing_model", - Type: "string", - Required: false, + InputKey: "billingModel", + GoField: "BillingModel", + EntField: "billing_model", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractEndDate", - GoField: "ContractEndDate", - EntField: "contract_end_date", - Type: "time.Time", - Required: false, + InputKey: "contractEndDate", + GoField: "ContractEndDate", + EntField: "contract_end_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractRenewalAt", - GoField: "ContractRenewalAt", - EntField: "contract_renewal_at", - Type: "time.Time", - Required: false, + InputKey: "contractRenewalAt", + GoField: "ContractRenewalAt", + EntField: "contract_renewal_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractStartDate", - GoField: "ContractStartDate", - EntField: "contract_start_date", - Type: "time.Time", - Required: false, + InputKey: "contractStartDate", + GoField: "ContractStartDate", + EntField: "contract_start_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "domains", - GoField: "Domains", - EntField: "domains", - Type: "json.RawMessage", - Required: false, + InputKey: "domains", + GoField: "Domains", + EntField: "domains", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entityRelationshipStateID", - GoField: "EntityRelationshipStateID", - EntField: "entity_relationship_state_id", - Type: "string", - Required: false, + InputKey: "entityRelationshipStateID", + GoField: "EntityRelationshipStateID", + EntField: "entity_relationship_state_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entityRelationshipStateName", - GoField: "EntityRelationshipStateName", - EntField: "entity_relationship_state_name", - Type: "string", - Required: false, + InputKey: "entityRelationshipStateName", + GoField: "EntityRelationshipStateName", + EntField: "entity_relationship_state_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySecurityQuestionnaireStatusID", - GoField: "EntitySecurityQuestionnaireStatusID", - EntField: "entity_security_questionnaire_status_id", - Type: "string", - Required: false, + InputKey: "entitySecurityQuestionnaireStatusID", + GoField: "EntitySecurityQuestionnaireStatusID", + EntField: "entity_security_questionnaire_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySecurityQuestionnaireStatusName", - GoField: "EntitySecurityQuestionnaireStatusName", - EntField: "entity_security_questionnaire_status_name", - Type: "string", - Required: false, + InputKey: "entitySecurityQuestionnaireStatusName", + GoField: "EntitySecurityQuestionnaireStatusName", + EntField: "entity_security_questionnaire_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySourceTypeID", - GoField: "EntitySourceTypeID", - EntField: "entity_source_type_id", - Type: "string", - Required: false, + InputKey: "entitySourceTypeID", + GoField: "EntitySourceTypeID", + EntField: "entity_source_type_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySourceTypeName", - GoField: "EntitySourceTypeName", - EntField: "entity_source_type_name", - Type: "string", - Required: false, + InputKey: "entitySourceTypeName", + GoField: "EntitySourceTypeName", + EntField: "entity_source_type_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "hasSoc2", - GoField: "HasSoc2", - EntField: "has_soc2", - Type: "bool", - Required: false, + InputKey: "hasSoc2", + GoField: "HasSoc2", + EntField: "has_soc2", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwner", - GoField: "InternalOwner", - EntField: "internal_owner", - Type: "string", - Required: false, + InputKey: "internalOwner", + GoField: "InternalOwner", + EntField: "internal_owner", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerGroupID", - GoField: "InternalOwnerGroupID", - EntField: "internal_owner_group_id", - Type: "string", - Required: false, + InputKey: "internalOwnerGroupID", + GoField: "InternalOwnerGroupID", + EntField: "internal_owner_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerUserID", - GoField: "InternalOwnerUserID", - EntField: "internal_owner_user_id", - Type: "string", - Required: false, + InputKey: "internalOwnerUserID", + GoField: "InternalOwnerUserID", + EntField: "internal_owner_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastReviewedAt", - GoField: "LastReviewedAt", - EntField: "last_reviewed_at", - Type: "time.Time", - Required: false, + InputKey: "lastReviewedAt", + GoField: "LastReviewedAt", + EntField: "last_reviewed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "links", - GoField: "Links", - EntField: "links", - Type: "json.RawMessage", - Required: false, + InputKey: "links", + GoField: "Links", + EntField: "links", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaEnforced", - GoField: "MfaEnforced", - EntField: "mfa_enforced", - Type: "bool", - Required: false, + InputKey: "mfaEnforced", + GoField: "MfaEnforced", + EntField: "mfa_enforced", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaSupported", - GoField: "MfaSupported", - EntField: "mfa_supported", - Type: "bool", - Required: false, + InputKey: "mfaSupported", + GoField: "MfaSupported", + EntField: "mfa_supported", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: false, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "nextReviewAt", - GoField: "NextReviewAt", - EntField: "next_review_at", - Type: "time.Time", - Required: false, + InputKey: "nextReviewAt", + GoField: "NextReviewAt", + EntField: "next_review_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "providedServices", - GoField: "ProvidedServices", - EntField: "provided_services", - Type: "json.RawMessage", - Required: false, + InputKey: "providedServices", + GoField: "ProvidedServices", + EntField: "provided_services", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "renewalRisk", - GoField: "RenewalRisk", - EntField: "renewal_risk", - Type: "string", - Required: false, + InputKey: "renewalRisk", + GoField: "RenewalRisk", + EntField: "renewal_risk", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewFrequency", - GoField: "ReviewFrequency", - EntField: "review_frequency", - Type: "string", - Required: false, + InputKey: "reviewFrequency", + GoField: "ReviewFrequency", + EntField: "review_frequency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedBy", - GoField: "ReviewedBy", - EntField: "reviewed_by", - Type: "string", - Required: false, + InputKey: "reviewedBy", + GoField: "ReviewedBy", + EntField: "reviewed_by", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedByGroupID", - GoField: "ReviewedByGroupID", - EntField: "reviewed_by_group_id", - Type: "string", - Required: false, + InputKey: "reviewedByGroupID", + GoField: "ReviewedByGroupID", + EntField: "reviewed_by_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedByUserID", - GoField: "ReviewedByUserID", - EntField: "reviewed_by_user_id", - Type: "string", - Required: false, + InputKey: "reviewedByUserID", + GoField: "ReviewedByUserID", + EntField: "reviewed_by_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskRating", - GoField: "RiskRating", - EntField: "risk_rating", - Type: "string", - Required: false, + InputKey: "riskRating", + GoField: "RiskRating", + EntField: "risk_rating", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskScore", - GoField: "RiskScore", - EntField: "risk_score", - Type: "int", - Required: false, + InputKey: "riskScore", + GoField: "RiskScore", + EntField: "risk_score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "soc2PeriodEnd", - GoField: "Soc2PeriodEnd", - EntField: "soc2_period_end", - Type: "time.Time", - Required: false, + InputKey: "soc2PeriodEnd", + GoField: "Soc2PeriodEnd", + EntField: "soc2_period_end", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "spendCurrency", - GoField: "SpendCurrency", - EntField: "spend_currency", - Type: "string", - Required: false, + InputKey: "spendCurrency", + GoField: "SpendCurrency", + EntField: "spend_currency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ssoEnforced", - GoField: "SsoEnforced", - EntField: "sso_enforced", - Type: "bool", - Required: false, + InputKey: "ssoEnforced", + GoField: "SsoEnforced", + EntField: "sso_enforced", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: false, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "statusPageURL", - GoField: "StatusPageURL", - EntField: "status_page_url", - Type: "string", - Required: false, + InputKey: "statusPageURL", + GoField: "StatusPageURL", + EntField: "status_page_url", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "terminationNoticeDays", - GoField: "TerminationNoticeDays", - EntField: "termination_notice_days", - Type: "int", - Required: false, + InputKey: "terminationNoticeDays", + GoField: "TerminationNoticeDays", + EntField: "termination_notice_days", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tier", - GoField: "Tier", - EntField: "tier", - Type: "string", - Required: false, + InputKey: "tier", + GoField: "Tier", + EntField: "tier", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vendorMetadata", - GoField: "VendorMetadata", - EntField: "vendor_metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "vendorMetadata", + GoField: "VendorMetadata", + EntField: "vendor_metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "annualSpend": {}, - "approvedForUse": {}, - "autoRenews": {}, - "billingModel": {}, - "contractEndDate": {}, - "contractRenewalAt": {}, - "contractStartDate": {}, - "displayName": {}, - "domains": {}, - "entityRelationshipStateID": {}, - "entityRelationshipStateName": {}, - "entitySecurityQuestionnaireStatusID": {}, + "annualSpend": {}, + "approvedForUse": {}, + "autoRenews": {}, + "billingModel": {}, + "contractEndDate": {}, + "contractRenewalAt": {}, + "contractStartDate": {}, + "displayName": {}, + "domains": {}, + "entityRelationshipStateID": {}, + "entityRelationshipStateName": {}, + "entitySecurityQuestionnaireStatusID": {}, "entitySecurityQuestionnaireStatusName": {}, - "entitySourceTypeID": {}, - "entitySourceTypeName": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "hasSoc2": {}, - "internalNotes": {}, - "internalOwner": {}, - "internalOwnerGroupID": {}, - "internalOwnerUserID": {}, - "lastReviewedAt": {}, - "links": {}, - "mfaEnforced": {}, - "mfaSupported": {}, - "name": {}, - "nextReviewAt": {}, - "observedAt": {}, - "ownerID": {}, - "providedServices": {}, - "renewalRisk": {}, - "reviewFrequency": {}, - "reviewedBy": {}, - "reviewedByGroupID": {}, - "reviewedByUserID": {}, - "riskRating": {}, - "riskScore": {}, - "scopeID": {}, - "scopeName": {}, - "soc2PeriodEnd": {}, - "spendCurrency": {}, - "ssoEnforced": {}, - "status": {}, - "statusPageURL": {}, - "systemInternalID": {}, - "tags": {}, - "terminationNoticeDays": {}, - "tier": {}, - "vendorMetadata": {}, + "entitySourceTypeID": {}, + "entitySourceTypeName": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "hasSoc2": {}, + "internalNotes": {}, + "internalOwner": {}, + "internalOwnerGroupID": {}, + "internalOwnerUserID": {}, + "lastReviewedAt": {}, + "links": {}, + "mfaEnforced": {}, + "mfaSupported": {}, + "name": {}, + "nextReviewAt": {}, + "observedAt": {}, + "ownerID": {}, + "providedServices": {}, + "renewalRisk": {}, + "reviewFrequency": {}, + "reviewedBy": {}, + "reviewedByGroupID": {}, + "reviewedByUserID": {}, + "riskRating": {}, + "riskScore": {}, + "scopeID": {}, + "scopeName": {}, + "soc2PeriodEnd": {}, + "spendCurrency": {}, + "ssoEnforced": {}, + "status": {}, + "statusPageURL": {}, + "systemInternalID": {}, + "tags": {}, + "terminationNoticeDays": {}, + "tier": {}, + "vendorMetadata": {}, + }, + RequiredKeys: []string{ }, - RequiredKeys: []string{}, UpsertKeys: []string{ "externalID", "name", @@ -2458,469 +2460,470 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Finding", Fields: []IntegrationMappingField{ { - InputKey: "assessmentID", - GoField: "AssessmentID", - EntField: "assessment_id", - Type: "string", - Required: false, + InputKey: "assessmentID", + GoField: "AssessmentID", + EntField: "assessment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "blocksProduction", - GoField: "BlocksProduction", - EntField: "blocks_production", - Type: "bool", - Required: false, + InputKey: "blocksProduction", + GoField: "BlocksProduction", + EntField: "blocks_production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "categories", - GoField: "Categories", - EntField: "categories", - Type: "json.RawMessage", - Required: false, + InputKey: "categories", + GoField: "Categories", + EntField: "categories", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "category", - GoField: "Category", - EntField: "category", - Type: "string", - Required: false, + InputKey: "category", + GoField: "Category", + EntField: "category", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "eventTime", - GoField: "EventTime", - EntField: "event_time", - Type: "time.Time", - Required: false, + InputKey: "eventTime", + GoField: "EventTime", + EntField: "event_time", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "exploitability", - GoField: "Exploitability", - EntField: "exploitability", - Type: "float64", - Required: false, + InputKey: "exploitability", + GoField: "Exploitability", + EntField: "exploitability", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalOwnerID", - GoField: "ExternalOwnerID", - EntField: "external_owner_id", - Type: "string", - Required: false, + InputKey: "externalOwnerID", + GoField: "ExternalOwnerID", + EntField: "external_owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalURI", - GoField: "ExternalURI", - EntField: "external_uri", - Type: "string", - Required: false, + InputKey: "externalURI", + GoField: "ExternalURI", + EntField: "external_uri", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingClass", - GoField: "FindingClass", - EntField: "finding_class", - Type: "string", - Required: false, + InputKey: "findingClass", + GoField: "FindingClass", + EntField: "finding_class", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingStatusID", - GoField: "FindingStatusID", - EntField: "finding_status_id", - Type: "string", - Required: false, + InputKey: "findingStatusID", + GoField: "FindingStatusID", + EntField: "finding_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingStatusName", - GoField: "FindingStatusName", - EntField: "finding_status_name", - Type: "string", - Required: false, + InputKey: "findingStatusName", + GoField: "FindingStatusName", + EntField: "finding_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "float64", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "numericSeverity", - GoField: "NumericSeverity", - EntField: "numeric_severity", - Type: "float64", - Required: false, + InputKey: "numericSeverity", + GoField: "NumericSeverity", + EntField: "numeric_severity", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "open", - GoField: "Open", - EntField: "open", - Type: "bool", - Required: false, + InputKey: "open", + GoField: "Open", + EntField: "open", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "priority", - GoField: "Priority", - EntField: "priority", - Type: "string", - Required: false, + InputKey: "priority", + GoField: "Priority", + EntField: "priority", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "production", - GoField: "Production", - EntField: "production", - Type: "bool", - Required: false, + InputKey: "production", + GoField: "Production", + EntField: "production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "public", - GoField: "Public", - EntField: "public", - Type: "bool", - Required: false, + InputKey: "public", + GoField: "Public", + EntField: "public", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "rawPayload", - GoField: "RawPayload", - EntField: "raw_payload", - Type: "json.RawMessage", - Required: false, + InputKey: "rawPayload", + GoField: "RawPayload", + EntField: "raw_payload", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "recommendation", - GoField: "Recommendation", - EntField: "recommendation", - Type: "string", - Required: false, + InputKey: "recommendation", + GoField: "Recommendation", + EntField: "recommendation", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "recommendedActions", - GoField: "RecommendedActions", - EntField: "recommended_actions", - Type: "string", - Required: false, + InputKey: "recommendedActions", + GoField: "RecommendedActions", + EntField: "recommended_actions", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "references", - GoField: "References", - EntField: "references", - Type: "json.RawMessage", - Required: false, + InputKey: "references", + GoField: "References", + EntField: "references", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "remediationSLA", - GoField: "RemediationSLA", - EntField: "remediation_sla", - Type: "int", - Required: false, + InputKey: "remediationSLA", + GoField: "RemediationSLA", + EntField: "remediation_sla", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reportedAt", - GoField: "ReportedAt", - EntField: "reported_at", - Type: "time.Time", - Required: false, + InputKey: "reportedAt", + GoField: "ReportedAt", + EntField: "reported_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "resourceName", - GoField: "ResourceName", - EntField: "resource_name", - Type: "string", - Required: false, + InputKey: "resourceName", + GoField: "ResourceName", + EntField: "resource_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "float64", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "severity", - GoField: "Severity", - EntField: "severity", - Type: "string", - Required: false, + InputKey: "severity", + GoField: "Severity", + EntField: "severity", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceUpdatedAt", - GoField: "SourceUpdatedAt", - EntField: "source_updated_at", - Type: "time.Time", - Required: false, + InputKey: "sourceUpdatedAt", + GoField: "SourceUpdatedAt", + EntField: "source_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "state", - GoField: "State", - EntField: "state", - Type: "string", - Required: false, + InputKey: "state", + GoField: "State", + EntField: "state", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "stepsToReproduce", - GoField: "StepsToReproduce", - EntField: "steps_to_reproduce", - Type: "json.RawMessage", - Required: false, + InputKey: "stepsToReproduce", + GoField: "StepsToReproduce", + EntField: "steps_to_reproduce", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "targetDetails", - GoField: "TargetDetails", - EntField: "target_details", - Type: "json.RawMessage", - Required: false, + InputKey: "targetDetails", + GoField: "TargetDetails", + EntField: "target_details", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "targets", - GoField: "Targets", - EntField: "targets", - Type: "json.RawMessage", - Required: false, + InputKey: "targets", + GoField: "Targets", + EntField: "targets", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "validated", - GoField: "Validated", - EntField: "validated", - Type: "bool", - Required: false, + InputKey: "validated", + GoField: "Validated", + EntField: "validated", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vector", - GoField: "Vector", - EntField: "vector", - Type: "string", - Required: false, + InputKey: "vector", + GoField: "Vector", + EntField: "vector", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "assessmentID": {}, - "blocksProduction": {}, - "categories": {}, - "category": {}, - "description": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "eventTime": {}, - "exploitability": {}, - "externalID": {}, - "externalOwnerID": {}, - "externalURI": {}, - "findingClass": {}, - "findingStatusID": {}, - "findingStatusName": {}, - "impact": {}, - "internalNotes": {}, - "metadata": {}, - "numericSeverity": {}, - "open": {}, - "ownerID": {}, - "priority": {}, - "production": {}, - "public": {}, - "rawPayload": {}, - "recommendation": {}, + "assessmentID": {}, + "blocksProduction": {}, + "categories": {}, + "category": {}, + "description": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "eventTime": {}, + "exploitability": {}, + "externalID": {}, + "externalOwnerID": {}, + "externalURI": {}, + "findingClass": {}, + "findingStatusID": {}, + "findingStatusName": {}, + "impact": {}, + "internalNotes": {}, + "metadata": {}, + "numericSeverity": {}, + "open": {}, + "ownerID": {}, + "priority": {}, + "production": {}, + "public": {}, + "rawPayload": {}, + "recommendation": {}, "recommendedActions": {}, - "references": {}, - "remediationSLA": {}, - "reportedAt": {}, - "resourceName": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "severity": {}, - "source": {}, - "sourceUpdatedAt": {}, - "state": {}, - "stepsToReproduce": {}, - "systemInternalID": {}, - "tags": {}, - "targetDetails": {}, - "targets": {}, - "validated": {}, - "vector": {}, + "references": {}, + "remediationSLA": {}, + "reportedAt": {}, + "resourceName": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "severity": {}, + "source": {}, + "sourceUpdatedAt": {}, + "state": {}, + "stepsToReproduce": {}, + "systemInternalID": {}, + "tags": {}, + "targetDetails": {}, + "targets": {}, + "validated": {}, + "vector": {}, + }, + RequiredKeys: []string{ }, - RequiredKeys: []string{}, UpsertKeys: []string{ "externalID", }, @@ -2930,337 +2933,337 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Risk", Fields: []IntegrationMappingField{ { - InputKey: "businessCosts", - GoField: "BusinessCosts", - EntField: "business_costs", - Type: "string", - Required: false, + InputKey: "businessCosts", + GoField: "BusinessCosts", + EntField: "business_costs", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "businessCostsJSON", - GoField: "BusinessCostsJSON", - EntField: "business_costs_json", - Type: "json.RawMessage", - Required: false, + InputKey: "businessCostsJSON", + GoField: "BusinessCostsJSON", + EntField: "business_costs_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "details", - GoField: "Details", - EntField: "details", - Type: "string", - Required: false, + InputKey: "details", + GoField: "Details", + EntField: "details", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "detailsJSON", - GoField: "DetailsJSON", - EntField: "details_json", - Type: "json.RawMessage", - Required: false, + InputKey: "detailsJSON", + GoField: "DetailsJSON", + EntField: "details_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dueDate", - GoField: "DueDate", - EntField: "due_date", - Type: "time.Time", - Required: false, + InputKey: "dueDate", + GoField: "DueDate", + EntField: "due_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalUUID", - GoField: "ExternalUUID", - EntField: "external_uuid", - Type: "string", - Required: false, + InputKey: "externalUUID", + GoField: "ExternalUUID", + EntField: "external_uuid", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "string", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastReviewedAt", - GoField: "LastReviewedAt", - EntField: "last_reviewed_at", - Type: "time.Time", - Required: false, + InputKey: "lastReviewedAt", + GoField: "LastReviewedAt", + EntField: "last_reviewed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "likelihood", - GoField: "Likelihood", - EntField: "likelihood", - Type: "string", - Required: false, + InputKey: "likelihood", + GoField: "Likelihood", + EntField: "likelihood", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigatedAt", - GoField: "MitigatedAt", - EntField: "mitigated_at", - Type: "time.Time", - Required: false, + InputKey: "mitigatedAt", + GoField: "MitigatedAt", + EntField: "mitigated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigation", - GoField: "Mitigation", - EntField: "mitigation", - Type: "string", - Required: false, + InputKey: "mitigation", + GoField: "Mitigation", + EntField: "mitigation", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigationJSON", - GoField: "MitigationJSON", - EntField: "mitigation_json", - Type: "json.RawMessage", - Required: false, + InputKey: "mitigationJSON", + GoField: "MitigationJSON", + EntField: "mitigation_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: true, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "nextReviewDueAt", - GoField: "NextReviewDueAt", - EntField: "next_review_due_at", - Type: "time.Time", - Required: false, + InputKey: "nextReviewDueAt", + GoField: "NextReviewDueAt", + EntField: "next_review_due_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "residualScore", - GoField: "ResidualScore", - EntField: "residual_score", - Type: "int", - Required: false, + InputKey: "residualScore", + GoField: "ResidualScore", + EntField: "residual_score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewFrequency", - GoField: "ReviewFrequency", - EntField: "review_frequency", - Type: "string", - Required: false, + InputKey: "reviewFrequency", + GoField: "ReviewFrequency", + EntField: "review_frequency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewRequired", - GoField: "ReviewRequired", - EntField: "review_required", - Type: "bool", - Required: false, + InputKey: "reviewRequired", + GoField: "ReviewRequired", + EntField: "review_required", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskCategoryID", - GoField: "RiskCategoryID", - EntField: "risk_category_id", - Type: "string", - Required: false, + InputKey: "riskCategoryID", + GoField: "RiskCategoryID", + EntField: "risk_category_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskCategoryName", - GoField: "RiskCategoryName", - EntField: "risk_category_name", - Type: "string", - Required: false, + InputKey: "riskCategoryName", + GoField: "RiskCategoryName", + EntField: "risk_category_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskDecision", - GoField: "RiskDecision", - EntField: "risk_decision", - Type: "string", - Required: false, + InputKey: "riskDecision", + GoField: "RiskDecision", + EntField: "risk_decision", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskKindID", - GoField: "RiskKindID", - EntField: "risk_kind_id", - Type: "string", - Required: false, + InputKey: "riskKindID", + GoField: "RiskKindID", + EntField: "risk_kind_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskKindName", - GoField: "RiskKindName", - EntField: "risk_kind_name", - Type: "string", - Required: false, + InputKey: "riskKindName", + GoField: "RiskKindName", + EntField: "risk_kind_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "int", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: false, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "businessCosts": {}, + "businessCosts": {}, "businessCostsJSON": {}, - "details": {}, - "detailsJSON": {}, - "dueDate": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "externalUUID": {}, - "impact": {}, - "integrationID": {}, - "lastReviewedAt": {}, - "likelihood": {}, - "mitigatedAt": {}, - "mitigation": {}, - "mitigationJSON": {}, - "name": {}, - "nextReviewDueAt": {}, - "observedAt": {}, - "ownerID": {}, - "residualScore": {}, - "reviewFrequency": {}, - "reviewRequired": {}, - "riskCategoryID": {}, - "riskCategoryName": {}, - "riskDecision": {}, - "riskKindID": {}, - "riskKindName": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "status": {}, - "tags": {}, + "details": {}, + "detailsJSON": {}, + "dueDate": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "externalUUID": {}, + "impact": {}, + "integrationID": {}, + "lastReviewedAt": {}, + "likelihood": {}, + "mitigatedAt": {}, + "mitigation": {}, + "mitigationJSON": {}, + "name": {}, + "nextReviewDueAt": {}, + "observedAt": {}, + "ownerID": {}, + "residualScore": {}, + "reviewFrequency": {}, + "reviewRequired": {}, + "riskCategoryID": {}, + "riskCategoryName": {}, + "riskDecision": {}, + "riskKindID": {}, + "riskKindName": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "name", @@ -3275,507 +3278,507 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Vulnerability", Fields: []IntegrationMappingField{ { - InputKey: "autoDismissedAt", - GoField: "AutoDismissedAt", - EntField: "auto_dismissed_at", - Type: "time.Time", - Required: false, + InputKey: "autoDismissedAt", + GoField: "AutoDismissedAt", + EntField: "auto_dismissed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "blocking", - GoField: "Blocking", - EntField: "blocking", - Type: "bool", - Required: false, + InputKey: "blocking", + GoField: "Blocking", + EntField: "blocking", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "category", - GoField: "Category", - EntField: "category", - Type: "string", - Required: false, + InputKey: "category", + GoField: "Category", + EntField: "category", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "cveID", - GoField: "CveID", - EntField: "cve_id", - Type: "string", - Required: false, + InputKey: "cveID", + GoField: "CveID", + EntField: "cve_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "cweIds", - GoField: "CweIds", - EntField: "cwe_ids", - Type: "json.RawMessage", - Required: false, + InputKey: "cweIds", + GoField: "CweIds", + EntField: "cwe_ids", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dependencyScope", - GoField: "DependencyScope", - EntField: "dependency_scope", - Type: "string", - Required: false, + InputKey: "dependencyScope", + GoField: "DependencyScope", + EntField: "dependency_scope", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "discoveredAt", - GoField: "DiscoveredAt", - EntField: "discovered_at", - Type: "time.Time", - Required: false, + InputKey: "discoveredAt", + GoField: "DiscoveredAt", + EntField: "discovered_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedAt", - GoField: "DismissedAt", - EntField: "dismissed_at", - Type: "time.Time", - Required: false, + InputKey: "dismissedAt", + GoField: "DismissedAt", + EntField: "dismissed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedComment", - GoField: "DismissedComment", - EntField: "dismissed_comment", - Type: "string", - Required: false, + InputKey: "dismissedComment", + GoField: "DismissedComment", + EntField: "dismissed_comment", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedReason", - GoField: "DismissedReason", - EntField: "dismissed_reason", - Type: "string", - Required: false, + InputKey: "dismissedReason", + GoField: "DismissedReason", + EntField: "dismissed_reason", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "exploitability", - GoField: "Exploitability", - EntField: "exploitability", - Type: "float64", - Required: false, + InputKey: "exploitability", + GoField: "Exploitability", + EntField: "exploitability", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalOwnerID", - GoField: "ExternalOwnerID", - EntField: "external_owner_id", - Type: "string", - Required: false, + InputKey: "externalOwnerID", + GoField: "ExternalOwnerID", + EntField: "external_owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalURI", - GoField: "ExternalURI", - EntField: "external_uri", - Type: "string", - Required: false, + InputKey: "externalURI", + GoField: "ExternalURI", + EntField: "external_uri", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstPatchedVersion", - GoField: "FirstPatchedVersion", - EntField: "first_patched_version", - Type: "string", - Required: false, + InputKey: "firstPatchedVersion", + GoField: "FirstPatchedVersion", + EntField: "first_patched_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "fixedAt", - GoField: "FixedAt", - EntField: "fixed_at", - Type: "time.Time", - Required: false, + InputKey: "fixedAt", + GoField: "FixedAt", + EntField: "fixed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "float64", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impacts", - GoField: "Impacts", - EntField: "impacts", - Type: "json.RawMessage", - Required: false, + InputKey: "impacts", + GoField: "Impacts", + EntField: "impacts", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "manifestPath", - GoField: "ManifestPath", - EntField: "manifest_path", - Type: "string", - Required: false, + InputKey: "manifestPath", + GoField: "ManifestPath", + EntField: "manifest_path", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "open", - GoField: "Open", - EntField: "open", - Type: "bool", - Required: false, + InputKey: "open", + GoField: "Open", + EntField: "open", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "packageEcosystem", - GoField: "PackageEcosystem", - EntField: "package_ecosystem", - Type: "string", - Required: false, + InputKey: "packageEcosystem", + GoField: "PackageEcosystem", + EntField: "package_ecosystem", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "packageName", - GoField: "PackageName", - EntField: "package_name", - Type: "string", - Required: false, + InputKey: "packageName", + GoField: "PackageName", + EntField: "package_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "priority", - GoField: "Priority", - EntField: "priority", - Type: "string", - Required: false, + InputKey: "priority", + GoField: "Priority", + EntField: "priority", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "production", - GoField: "Production", - EntField: "production", - Type: "bool", - Required: false, + InputKey: "production", + GoField: "Production", + EntField: "production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "public", - GoField: "Public", - EntField: "public", - Type: "bool", - Required: false, + InputKey: "public", + GoField: "Public", + EntField: "public", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "publishedAt", - GoField: "PublishedAt", - EntField: "published_at", - Type: "time.Time", - Required: false, + InputKey: "publishedAt", + GoField: "PublishedAt", + EntField: "published_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "rawPayload", - GoField: "RawPayload", - EntField: "raw_payload", - Type: "json.RawMessage", - Required: false, + InputKey: "rawPayload", + GoField: "RawPayload", + EntField: "raw_payload", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "references", - GoField: "References", - EntField: "references", - Type: "json.RawMessage", - Required: false, + InputKey: "references", + GoField: "References", + EntField: "references", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "remediationSLA", - GoField: "RemediationSLA", - EntField: "remediation_sla", - Type: "int", - Required: false, + InputKey: "remediationSLA", + GoField: "RemediationSLA", + EntField: "remediation_sla", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "float64", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "severity", - GoField: "Severity", - EntField: "severity", - Type: "string", - Required: false, + InputKey: "severity", + GoField: "Severity", + EntField: "severity", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceUpdatedAt", - GoField: "SourceUpdatedAt", - EntField: "source_updated_at", - Type: "time.Time", - Required: false, + InputKey: "sourceUpdatedAt", + GoField: "SourceUpdatedAt", + EntField: "source_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "summary", - GoField: "Summary", - EntField: "summary", - Type: "string", - Required: false, + InputKey: "summary", + GoField: "Summary", + EntField: "summary", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "validated", - GoField: "Validated", - EntField: "validated", - Type: "bool", - Required: false, + InputKey: "validated", + GoField: "Validated", + EntField: "validated", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vector", - GoField: "Vector", - EntField: "vector", - Type: "string", - Required: false, + InputKey: "vector", + GoField: "Vector", + EntField: "vector", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerabilityStatusID", - GoField: "VulnerabilityStatusID", - EntField: "vulnerability_status_id", - Type: "string", - Required: false, + InputKey: "vulnerabilityStatusID", + GoField: "VulnerabilityStatusID", + EntField: "vulnerability_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerabilityStatusName", - GoField: "VulnerabilityStatusName", - EntField: "vulnerability_status_name", - Type: "string", - Required: false, + InputKey: "vulnerabilityStatusName", + GoField: "VulnerabilityStatusName", + EntField: "vulnerability_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerableVersionRange", - GoField: "VulnerableVersionRange", - EntField: "vulnerable_version_range", - Type: "string", - Required: false, + InputKey: "vulnerableVersionRange", + GoField: "VulnerableVersionRange", + EntField: "vulnerable_version_range", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "autoDismissedAt": {}, - "blocking": {}, - "category": {}, - "cveID": {}, - "cweIds": {}, - "dependencyScope": {}, - "description": {}, - "discoveredAt": {}, - "dismissedAt": {}, - "dismissedComment": {}, - "dismissedReason": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "exploitability": {}, - "externalID": {}, - "externalOwnerID": {}, - "externalURI": {}, - "firstPatchedVersion": {}, - "fixedAt": {}, - "impact": {}, - "impacts": {}, - "internalNotes": {}, - "manifestPath": {}, - "metadata": {}, - "open": {}, - "ownerID": {}, - "packageEcosystem": {}, - "packageName": {}, - "priority": {}, - "production": {}, - "public": {}, - "publishedAt": {}, - "rawPayload": {}, - "references": {}, - "remediationSLA": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "severity": {}, - "source": {}, - "sourceUpdatedAt": {}, - "summary": {}, - "systemInternalID": {}, - "tags": {}, - "validated": {}, - "vector": {}, - "vulnerabilityStatusID": {}, + "autoDismissedAt": {}, + "blocking": {}, + "category": {}, + "cveID": {}, + "cweIds": {}, + "dependencyScope": {}, + "description": {}, + "discoveredAt": {}, + "dismissedAt": {}, + "dismissedComment": {}, + "dismissedReason": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "exploitability": {}, + "externalID": {}, + "externalOwnerID": {}, + "externalURI": {}, + "firstPatchedVersion": {}, + "fixedAt": {}, + "impact": {}, + "impacts": {}, + "internalNotes": {}, + "manifestPath": {}, + "metadata": {}, + "open": {}, + "ownerID": {}, + "packageEcosystem": {}, + "packageName": {}, + "priority": {}, + "production": {}, + "public": {}, + "publishedAt": {}, + "rawPayload": {}, + "references": {}, + "remediationSLA": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "severity": {}, + "source": {}, + "sourceUpdatedAt": {}, + "summary": {}, + "systemInternalID": {}, + "tags": {}, + "validated": {}, + "vector": {}, + "vulnerabilityStatusID": {}, "vulnerabilityStatusName": {}, - "vulnerableVersionRange": {}, + "vulnerableVersionRange": {}, }, RequiredKeys: []string{ "externalID", diff --git a/internal/ent/interceptors/organization.go b/internal/ent/interceptors/organization.go index 6631f2cfa8..1f28dd92a0 100644 --- a/internal/ent/interceptors/organization.go +++ b/internal/ent/interceptors/organization.go @@ -20,6 +20,10 @@ import ( // InterceptorOrganization is middleware to change the Organization query func InterceptorOrganization() ent.Interceptor { return intercept.TraverseFunc(func(ctx context.Context, q intercept.Query) error { + if auth.IsSystemAdminFromContext(ctx) { + return nil + } + // by pass checks on invite or pre-allowed request if _, allow := privacy.DecisionFromContext(ctx); allow { return nil diff --git a/internal/ent/interceptors/organizationsetting.go b/internal/ent/interceptors/organizationsetting.go index 990b7603cd..f6a8d1132c 100644 --- a/internal/ent/interceptors/organizationsetting.go +++ b/internal/ent/interceptors/organizationsetting.go @@ -17,6 +17,10 @@ import ( // InterceptorOrganizationSetting is middleware to change the org setting query func InterceptorOrganizationSetting() ent.Interceptor { return intercept.TraverseFunc(func(ctx context.Context, q intercept.Query) error { + if auth.IsSystemAdminFromContext(ctx) { + return nil + } + if _, allow := privacy.DecisionFromContext(ctx); allow { return nil } diff --git a/internal/ent/schema/organization.go b/internal/ent/schema/organization.go index 532fd223b1..e5c9aa37e5 100644 --- a/internal/ent/schema/organization.go +++ b/internal/ent/schema/organization.go @@ -663,6 +663,7 @@ func (Organization) Policy() ent.Policy { rule.AllowIfContextHasPrivacyTokenOfType[*token.OrgInviteToken](), // Allow invite tokens to query the org ID they are invited to rule.AllowIfContextHasPrivacyTokenOfType[*token.SignUpToken](), // Allow sign-up tokens to query the org ID they are subscribing to policy.CheckOrgReadAccess(), // access based on query and auth context + rule.AllowQueryIfSystemAdmin(), ), policy.WithMutationRules( rule.HasOrgMutationAccess(), // Requires edit for Update, and delete for Delete mutations diff --git a/internal/ent/schema/organizationsetting.go b/internal/ent/schema/organizationsetting.go index dadbba3e36..fa72335971 100644 --- a/internal/ent/schema/organizationsetting.go +++ b/internal/ent/schema/organizationsetting.go @@ -18,6 +18,7 @@ import ( "github.com/theopenlane/core/internal/ent/hooks" "github.com/theopenlane/core/internal/ent/interceptors" "github.com/theopenlane/core/internal/ent/privacy/policy" + "github.com/theopenlane/core/internal/ent/privacy/rule" "github.com/theopenlane/core/internal/ent/validator" ) @@ -151,9 +152,7 @@ func (OrganizationSetting) Fields() []ent.Field { }), field.Bool("payment_method_added"). Annotations( - entgql.Skip(entgql.SkipMutationCreateInput | - entgql.SkipMutationUpdateInput | - entgql.SkipWhereInput | entgql.SkipOrderField), + entgql.Skip(entgql.SkipMutationCreateInput | entgql.SkipMutationUpdateInput | entgql.SkipOrderField), ). Default(false). Comment("whether or not a payment method has been added to the account"), @@ -215,8 +214,10 @@ func (OrganizationSetting) Policy() ent.Policy { return policy.NewPolicy( policy.WithQueryRules( policy.CheckOrgReadAccess(), // access based on auth context + rule.AllowQueryIfSystemAdmin(), ), policy.WithMutationRules( + rule.AllowMutationIfSystemAdmin(), entfga.CheckEditAccess[*generated.OrganizationSettingMutation](), policy.CheckOrgWriteAccess(), // access based on auth context ), diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index 6c757ecd26..6e8d2c0541 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1,7 +1 @@ -<<<<<<< HEAD -4f9b7fe05f788d4def84306cdd62219bd1228e675acfe1c38baa651d3f3550a6 -||||||| 88f89acb1 -4b7e0c8a2045c613368dd1c04ce2976a1a4d132fa088f2605de688e4aa3f3dd7 -======= -9af2331134bd1b3230b60970f2649ffd9201937f450d8db0b0140ffb634184de ->>>>>>> origin/main +1a7de1984ffd3840d657bbec7fd0ef7d585bbffee5c0a56efec5e41e10b8354b \ No newline at end of file diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index c1b6d6c1a9..76355b54f4 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1,7 +1 @@ -<<<<<<< HEAD -c07031c2dc3a39a2ccd0c06f32652694ca463cc415c62071ccbfd13dff781411 -||||||| 88f89acb1 -2663e47f6208e1d97ba8e1032842640253b907f3758bd4428ac5a18f0dc0ffaa -======= -e053cfe43678e8717cffef566ac047cfbe1ab455cb565965749f48f36c3a290e ->>>>>>> origin/main +4231f12811871ca0b7c41b59e3c63ac490a9e4640b1b33b41832cd16181a98d2 \ No newline at end of file diff --git a/internal/graphapi/clientschema/checksum/.schema_checksum b/internal/graphapi/clientschema/checksum/.schema_checksum index e2ce64b744..db633386e9 100644 --- a/internal/graphapi/clientschema/checksum/.schema_checksum +++ b/internal/graphapi/clientschema/checksum/.schema_checksum @@ -1,7 +1 @@ -<<<<<<< HEAD -696b2cbcc4a962d31848e803dd36b1275fdb672391eb3a6458a445692989c2dc -||||||| 88f89acb1 -ada1325ce9078925ca51d7da78ed4007f100a5c0084880c8a8f50321f3cf9800 -======= -4cbce0579c287b6a141b5689df9ea436c3e64cc32189d3d9db7b68e6be961b47 ->>>>>>> origin/main +3338538a13ee5d2cd8c157ca623347ce0c96d5370b57219e48d1d20abdf3b864 \ No newline at end of file diff --git a/internal/graphapi/clientschema/schema.graphql b/internal/graphapi/clientschema/schema.graphql index 8e0406fcd6..d9b490538f 100644 --- a/internal/graphapi/clientschema/schema.graphql +++ b/internal/graphapi/clientschema/schema.graphql @@ -55896,6 +55896,11 @@ input OrganizationSettingWhereInput { complianceWebhookTokenEqualFold: String complianceWebhookTokenContainsFold: String """ + payment_method_added field predicates + """ + paymentMethodAdded: Boolean + paymentMethodAddedNEQ: Boolean + """ pending_deletion_at field predicates """ pendingDeletionAt: DateTime diff --git a/internal/graphapi/generated/ent.generated.go b/internal/graphapi/generated/ent.generated.go index eb13729b17..76d423eaec 100644 --- a/internal/graphapi/generated/ent.generated.go +++ b/internal/graphapi/generated/ent.generated.go @@ -344485,7 +344485,7 @@ func (ec *executionContext) unmarshalInputOrganizationSettingWhereInput(ctx cont asMap[k] = v } - fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "idEqualFold", "idContainsFold", "createdAt", "createdAtNEQ", "createdAtIn", "createdAtNotIn", "createdAtGT", "createdAtGTE", "createdAtLT", "createdAtLTE", "createdAtIsNil", "createdAtNotNil", "updatedAt", "updatedAtNEQ", "updatedAtIn", "updatedAtNotIn", "updatedAtGT", "updatedAtGTE", "updatedAtLT", "updatedAtLTE", "updatedAtIsNil", "updatedAtNotNil", "createdBy", "createdByNEQ", "createdByIn", "createdByNotIn", "createdByGT", "createdByGTE", "createdByLT", "createdByLTE", "createdByContains", "createdByHasPrefix", "createdByHasSuffix", "createdByIsNil", "createdByNotNil", "createdByEqualFold", "createdByContainsFold", "updatedBy", "updatedByNEQ", "updatedByIn", "updatedByNotIn", "updatedByGT", "updatedByGTE", "updatedByLT", "updatedByLTE", "updatedByContains", "updatedByHasPrefix", "updatedByHasSuffix", "updatedByIsNil", "updatedByNotNil", "updatedByEqualFold", "updatedByContainsFold", "billingContact", "billingContactNEQ", "billingContactIn", "billingContactNotIn", "billingContactGT", "billingContactGTE", "billingContactLT", "billingContactLTE", "billingContactContains", "billingContactHasPrefix", "billingContactHasSuffix", "billingContactIsNil", "billingContactNotNil", "billingContactEqualFold", "billingContactContainsFold", "billingEmail", "billingEmailNEQ", "billingEmailIn", "billingEmailNotIn", "billingEmailGT", "billingEmailGTE", "billingEmailLT", "billingEmailLTE", "billingEmailContains", "billingEmailHasPrefix", "billingEmailHasSuffix", "billingEmailIsNil", "billingEmailNotNil", "billingEmailEqualFold", "billingEmailContainsFold", "billingPhone", "billingPhoneNEQ", "billingPhoneIn", "billingPhoneNotIn", "billingPhoneGT", "billingPhoneGTE", "billingPhoneLT", "billingPhoneLTE", "billingPhoneContains", "billingPhoneHasPrefix", "billingPhoneHasSuffix", "billingPhoneIsNil", "billingPhoneNotNil", "billingPhoneEqualFold", "billingPhoneContainsFold", "taxIdentifier", "taxIdentifierNEQ", "taxIdentifierIn", "taxIdentifierNotIn", "taxIdentifierGT", "taxIdentifierGTE", "taxIdentifierLT", "taxIdentifierLTE", "taxIdentifierContains", "taxIdentifierHasPrefix", "taxIdentifierHasSuffix", "taxIdentifierIsNil", "taxIdentifierNotNil", "taxIdentifierEqualFold", "taxIdentifierContainsFold", "geoLocation", "geoLocationNEQ", "geoLocationIn", "geoLocationNotIn", "geoLocationIsNil", "geoLocationNotNil", "organizationID", "organizationIDNEQ", "organizationIDIn", "organizationIDNotIn", "organizationIDGT", "organizationIDGTE", "organizationIDLT", "organizationIDLTE", "organizationIDContains", "organizationIDHasPrefix", "organizationIDHasSuffix", "organizationIDIsNil", "organizationIDNotNil", "organizationIDEqualFold", "organizationIDContainsFold", "billingNotificationsEnabled", "billingNotificationsEnabledNEQ", "allowMatchingDomainsAutojoin", "allowMatchingDomainsAutojoinNEQ", "allowMatchingDomainsAutojoinIsNil", "allowMatchingDomainsAutojoinNotNil", "identityProvider", "identityProviderNEQ", "identityProviderIn", "identityProviderNotIn", "identityProviderIsNil", "identityProviderNotNil", "identityProviderClientID", "identityProviderClientIDNEQ", "identityProviderClientIDIn", "identityProviderClientIDNotIn", "identityProviderClientIDGT", "identityProviderClientIDGTE", "identityProviderClientIDLT", "identityProviderClientIDLTE", "identityProviderClientIDContains", "identityProviderClientIDHasPrefix", "identityProviderClientIDHasSuffix", "identityProviderClientIDIsNil", "identityProviderClientIDNotNil", "identityProviderClientIDEqualFold", "identityProviderClientIDContainsFold", "identityProviderClientSecret", "identityProviderClientSecretNEQ", "identityProviderClientSecretIn", "identityProviderClientSecretNotIn", "identityProviderClientSecretGT", "identityProviderClientSecretGTE", "identityProviderClientSecretLT", "identityProviderClientSecretLTE", "identityProviderClientSecretContains", "identityProviderClientSecretHasPrefix", "identityProviderClientSecretHasSuffix", "identityProviderClientSecretIsNil", "identityProviderClientSecretNotNil", "identityProviderClientSecretEqualFold", "identityProviderClientSecretContainsFold", "identityProviderMetadataEndpoint", "identityProviderMetadataEndpointNEQ", "identityProviderMetadataEndpointIn", "identityProviderMetadataEndpointNotIn", "identityProviderMetadataEndpointGT", "identityProviderMetadataEndpointGTE", "identityProviderMetadataEndpointLT", "identityProviderMetadataEndpointLTE", "identityProviderMetadataEndpointContains", "identityProviderMetadataEndpointHasPrefix", "identityProviderMetadataEndpointHasSuffix", "identityProviderMetadataEndpointIsNil", "identityProviderMetadataEndpointNotNil", "identityProviderMetadataEndpointEqualFold", "identityProviderMetadataEndpointContainsFold", "identityProviderAuthTested", "identityProviderAuthTestedNEQ", "identityProviderEntityID", "identityProviderEntityIDNEQ", "identityProviderEntityIDIn", "identityProviderEntityIDNotIn", "identityProviderEntityIDGT", "identityProviderEntityIDGTE", "identityProviderEntityIDLT", "identityProviderEntityIDLTE", "identityProviderEntityIDContains", "identityProviderEntityIDHasPrefix", "identityProviderEntityIDHasSuffix", "identityProviderEntityIDIsNil", "identityProviderEntityIDNotNil", "identityProviderEntityIDEqualFold", "identityProviderEntityIDContainsFold", "oidcDiscoveryEndpoint", "oidcDiscoveryEndpointNEQ", "oidcDiscoveryEndpointIn", "oidcDiscoveryEndpointNotIn", "oidcDiscoveryEndpointGT", "oidcDiscoveryEndpointGTE", "oidcDiscoveryEndpointLT", "oidcDiscoveryEndpointLTE", "oidcDiscoveryEndpointContains", "oidcDiscoveryEndpointHasPrefix", "oidcDiscoveryEndpointHasSuffix", "oidcDiscoveryEndpointIsNil", "oidcDiscoveryEndpointNotNil", "oidcDiscoveryEndpointEqualFold", "oidcDiscoveryEndpointContainsFold", "samlSigninURL", "samlSigninURLNEQ", "samlSigninURLIn", "samlSigninURLNotIn", "samlSigninURLGT", "samlSigninURLGTE", "samlSigninURLLT", "samlSigninURLLTE", "samlSigninURLContains", "samlSigninURLHasPrefix", "samlSigninURLHasSuffix", "samlSigninURLIsNil", "samlSigninURLNotNil", "samlSigninURLEqualFold", "samlSigninURLContainsFold", "samlIssuer", "samlIssuerNEQ", "samlIssuerIn", "samlIssuerNotIn", "samlIssuerGT", "samlIssuerGTE", "samlIssuerLT", "samlIssuerLTE", "samlIssuerContains", "samlIssuerHasPrefix", "samlIssuerHasSuffix", "samlIssuerIsNil", "samlIssuerNotNil", "samlIssuerEqualFold", "samlIssuerContainsFold", "samlCert", "samlCertNEQ", "samlCertIn", "samlCertNotIn", "samlCertGT", "samlCertGTE", "samlCertLT", "samlCertLTE", "samlCertContains", "samlCertHasPrefix", "samlCertHasSuffix", "samlCertIsNil", "samlCertNotNil", "samlCertEqualFold", "samlCertContainsFold", "identityProviderLoginEnforced", "identityProviderLoginEnforcedNEQ", "multifactorAuthEnforced", "multifactorAuthEnforcedNEQ", "multifactorAuthEnforcedIsNil", "multifactorAuthEnforcedNotNil", "complianceWebhookToken", "complianceWebhookTokenNEQ", "complianceWebhookTokenIn", "complianceWebhookTokenNotIn", "complianceWebhookTokenGT", "complianceWebhookTokenGTE", "complianceWebhookTokenLT", "complianceWebhookTokenLTE", "complianceWebhookTokenContains", "complianceWebhookTokenHasPrefix", "complianceWebhookTokenHasSuffix", "complianceWebhookTokenIsNil", "complianceWebhookTokenNotNil", "complianceWebhookTokenEqualFold", "complianceWebhookTokenContainsFold", "pendingDeletionAt", "pendingDeletionAtNEQ", "pendingDeletionAtIn", "pendingDeletionAtNotIn", "pendingDeletionAtGT", "pendingDeletionAtGTE", "pendingDeletionAtLT", "pendingDeletionAtLTE", "pendingDeletionAtIsNil", "pendingDeletionAtNotNil", "hasOrganization", "hasOrganizationWith", "hasFiles", "hasFilesWith", "tagsHas", "domainsHas", "allowedEmailDomainsHas"} + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "idEqualFold", "idContainsFold", "createdAt", "createdAtNEQ", "createdAtIn", "createdAtNotIn", "createdAtGT", "createdAtGTE", "createdAtLT", "createdAtLTE", "createdAtIsNil", "createdAtNotNil", "updatedAt", "updatedAtNEQ", "updatedAtIn", "updatedAtNotIn", "updatedAtGT", "updatedAtGTE", "updatedAtLT", "updatedAtLTE", "updatedAtIsNil", "updatedAtNotNil", "createdBy", "createdByNEQ", "createdByIn", "createdByNotIn", "createdByGT", "createdByGTE", "createdByLT", "createdByLTE", "createdByContains", "createdByHasPrefix", "createdByHasSuffix", "createdByIsNil", "createdByNotNil", "createdByEqualFold", "createdByContainsFold", "updatedBy", "updatedByNEQ", "updatedByIn", "updatedByNotIn", "updatedByGT", "updatedByGTE", "updatedByLT", "updatedByLTE", "updatedByContains", "updatedByHasPrefix", "updatedByHasSuffix", "updatedByIsNil", "updatedByNotNil", "updatedByEqualFold", "updatedByContainsFold", "billingContact", "billingContactNEQ", "billingContactIn", "billingContactNotIn", "billingContactGT", "billingContactGTE", "billingContactLT", "billingContactLTE", "billingContactContains", "billingContactHasPrefix", "billingContactHasSuffix", "billingContactIsNil", "billingContactNotNil", "billingContactEqualFold", "billingContactContainsFold", "billingEmail", "billingEmailNEQ", "billingEmailIn", "billingEmailNotIn", "billingEmailGT", "billingEmailGTE", "billingEmailLT", "billingEmailLTE", "billingEmailContains", "billingEmailHasPrefix", "billingEmailHasSuffix", "billingEmailIsNil", "billingEmailNotNil", "billingEmailEqualFold", "billingEmailContainsFold", "billingPhone", "billingPhoneNEQ", "billingPhoneIn", "billingPhoneNotIn", "billingPhoneGT", "billingPhoneGTE", "billingPhoneLT", "billingPhoneLTE", "billingPhoneContains", "billingPhoneHasPrefix", "billingPhoneHasSuffix", "billingPhoneIsNil", "billingPhoneNotNil", "billingPhoneEqualFold", "billingPhoneContainsFold", "taxIdentifier", "taxIdentifierNEQ", "taxIdentifierIn", "taxIdentifierNotIn", "taxIdentifierGT", "taxIdentifierGTE", "taxIdentifierLT", "taxIdentifierLTE", "taxIdentifierContains", "taxIdentifierHasPrefix", "taxIdentifierHasSuffix", "taxIdentifierIsNil", "taxIdentifierNotNil", "taxIdentifierEqualFold", "taxIdentifierContainsFold", "geoLocation", "geoLocationNEQ", "geoLocationIn", "geoLocationNotIn", "geoLocationIsNil", "geoLocationNotNil", "organizationID", "organizationIDNEQ", "organizationIDIn", "organizationIDNotIn", "organizationIDGT", "organizationIDGTE", "organizationIDLT", "organizationIDLTE", "organizationIDContains", "organizationIDHasPrefix", "organizationIDHasSuffix", "organizationIDIsNil", "organizationIDNotNil", "organizationIDEqualFold", "organizationIDContainsFold", "billingNotificationsEnabled", "billingNotificationsEnabledNEQ", "allowMatchingDomainsAutojoin", "allowMatchingDomainsAutojoinNEQ", "allowMatchingDomainsAutojoinIsNil", "allowMatchingDomainsAutojoinNotNil", "identityProvider", "identityProviderNEQ", "identityProviderIn", "identityProviderNotIn", "identityProviderIsNil", "identityProviderNotNil", "identityProviderClientID", "identityProviderClientIDNEQ", "identityProviderClientIDIn", "identityProviderClientIDNotIn", "identityProviderClientIDGT", "identityProviderClientIDGTE", "identityProviderClientIDLT", "identityProviderClientIDLTE", "identityProviderClientIDContains", "identityProviderClientIDHasPrefix", "identityProviderClientIDHasSuffix", "identityProviderClientIDIsNil", "identityProviderClientIDNotNil", "identityProviderClientIDEqualFold", "identityProviderClientIDContainsFold", "identityProviderClientSecret", "identityProviderClientSecretNEQ", "identityProviderClientSecretIn", "identityProviderClientSecretNotIn", "identityProviderClientSecretGT", "identityProviderClientSecretGTE", "identityProviderClientSecretLT", "identityProviderClientSecretLTE", "identityProviderClientSecretContains", "identityProviderClientSecretHasPrefix", "identityProviderClientSecretHasSuffix", "identityProviderClientSecretIsNil", "identityProviderClientSecretNotNil", "identityProviderClientSecretEqualFold", "identityProviderClientSecretContainsFold", "identityProviderMetadataEndpoint", "identityProviderMetadataEndpointNEQ", "identityProviderMetadataEndpointIn", "identityProviderMetadataEndpointNotIn", "identityProviderMetadataEndpointGT", "identityProviderMetadataEndpointGTE", "identityProviderMetadataEndpointLT", "identityProviderMetadataEndpointLTE", "identityProviderMetadataEndpointContains", "identityProviderMetadataEndpointHasPrefix", "identityProviderMetadataEndpointHasSuffix", "identityProviderMetadataEndpointIsNil", "identityProviderMetadataEndpointNotNil", "identityProviderMetadataEndpointEqualFold", "identityProviderMetadataEndpointContainsFold", "identityProviderAuthTested", "identityProviderAuthTestedNEQ", "identityProviderEntityID", "identityProviderEntityIDNEQ", "identityProviderEntityIDIn", "identityProviderEntityIDNotIn", "identityProviderEntityIDGT", "identityProviderEntityIDGTE", "identityProviderEntityIDLT", "identityProviderEntityIDLTE", "identityProviderEntityIDContains", "identityProviderEntityIDHasPrefix", "identityProviderEntityIDHasSuffix", "identityProviderEntityIDIsNil", "identityProviderEntityIDNotNil", "identityProviderEntityIDEqualFold", "identityProviderEntityIDContainsFold", "oidcDiscoveryEndpoint", "oidcDiscoveryEndpointNEQ", "oidcDiscoveryEndpointIn", "oidcDiscoveryEndpointNotIn", "oidcDiscoveryEndpointGT", "oidcDiscoveryEndpointGTE", "oidcDiscoveryEndpointLT", "oidcDiscoveryEndpointLTE", "oidcDiscoveryEndpointContains", "oidcDiscoveryEndpointHasPrefix", "oidcDiscoveryEndpointHasSuffix", "oidcDiscoveryEndpointIsNil", "oidcDiscoveryEndpointNotNil", "oidcDiscoveryEndpointEqualFold", "oidcDiscoveryEndpointContainsFold", "samlSigninURL", "samlSigninURLNEQ", "samlSigninURLIn", "samlSigninURLNotIn", "samlSigninURLGT", "samlSigninURLGTE", "samlSigninURLLT", "samlSigninURLLTE", "samlSigninURLContains", "samlSigninURLHasPrefix", "samlSigninURLHasSuffix", "samlSigninURLIsNil", "samlSigninURLNotNil", "samlSigninURLEqualFold", "samlSigninURLContainsFold", "samlIssuer", "samlIssuerNEQ", "samlIssuerIn", "samlIssuerNotIn", "samlIssuerGT", "samlIssuerGTE", "samlIssuerLT", "samlIssuerLTE", "samlIssuerContains", "samlIssuerHasPrefix", "samlIssuerHasSuffix", "samlIssuerIsNil", "samlIssuerNotNil", "samlIssuerEqualFold", "samlIssuerContainsFold", "samlCert", "samlCertNEQ", "samlCertIn", "samlCertNotIn", "samlCertGT", "samlCertGTE", "samlCertLT", "samlCertLTE", "samlCertContains", "samlCertHasPrefix", "samlCertHasSuffix", "samlCertIsNil", "samlCertNotNil", "samlCertEqualFold", "samlCertContainsFold", "identityProviderLoginEnforced", "identityProviderLoginEnforcedNEQ", "multifactorAuthEnforced", "multifactorAuthEnforcedNEQ", "multifactorAuthEnforcedIsNil", "multifactorAuthEnforcedNotNil", "complianceWebhookToken", "complianceWebhookTokenNEQ", "complianceWebhookTokenIn", "complianceWebhookTokenNotIn", "complianceWebhookTokenGT", "complianceWebhookTokenGTE", "complianceWebhookTokenLT", "complianceWebhookTokenLTE", "complianceWebhookTokenContains", "complianceWebhookTokenHasPrefix", "complianceWebhookTokenHasSuffix", "complianceWebhookTokenIsNil", "complianceWebhookTokenNotNil", "complianceWebhookTokenEqualFold", "complianceWebhookTokenContainsFold", "paymentMethodAdded", "paymentMethodAddedNEQ", "pendingDeletionAt", "pendingDeletionAtNEQ", "pendingDeletionAtIn", "pendingDeletionAtNotIn", "pendingDeletionAtGT", "pendingDeletionAtGTE", "pendingDeletionAtLT", "pendingDeletionAtLTE", "pendingDeletionAtIsNil", "pendingDeletionAtNotNil", "hasOrganization", "hasOrganizationWith", "hasFiles", "hasFilesWith", "tagsHas", "domainsHas", "allowedEmailDomainsHas"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -346585,6 +346585,20 @@ func (ec *executionContext) unmarshalInputOrganizationSettingWhereInput(ctx cont return it, err } it.ComplianceWebhookTokenContainsFold = data + case "paymentMethodAdded": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("paymentMethodAdded")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.PaymentMethodAdded = data + case "paymentMethodAddedNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("paymentMethodAddedNEQ")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.PaymentMethodAddedNEQ = data case "pendingDeletionAt": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAt")) data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) diff --git a/internal/graphapi/generated/root_.generated.go b/internal/graphapi/generated/root_.generated.go index 2575fbab2e..be5ec25ac2 100644 --- a/internal/graphapi/generated/root_.generated.go +++ b/internal/graphapi/generated/root_.generated.go @@ -102416,6 +102416,11 @@ input OrganizationSettingWhereInput { complianceWebhookTokenEqualFold: String complianceWebhookTokenContainsFold: String """ + payment_method_added field predicates + """ + paymentMethodAdded: Boolean + paymentMethodAddedNEQ: Boolean + """ pending_deletion_at field predicates """ pendingDeletionAt: DateTime diff --git a/internal/graphapi/historygenerated/ent.generated.go b/internal/graphapi/historygenerated/ent.generated.go index 8a947cf7ad..56ba5256d3 100644 --- a/internal/graphapi/historygenerated/ent.generated.go +++ b/internal/graphapi/historygenerated/ent.generated.go @@ -172914,7 +172914,7 @@ func (ec *executionContext) unmarshalInputOrganizationSettingHistoryWhereInput(c asMap[k] = v } - fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "idEqualFold", "idContainsFold", "historyTime", "historyTimeNEQ", "historyTimeIn", "historyTimeNotIn", "historyTimeGT", "historyTimeGTE", "historyTimeLT", "historyTimeLTE", "ref", "refNEQ", "refIn", "refNotIn", "refGT", "refGTE", "refLT", "refLTE", "refContains", "refHasPrefix", "refHasSuffix", "refIsNil", "refNotNil", "refEqualFold", "refContainsFold", "operation", "operationNEQ", "operationIn", "operationNotIn", "createdAt", "createdAtNEQ", "createdAtIn", "createdAtNotIn", "createdAtGT", "createdAtGTE", "createdAtLT", "createdAtLTE", "createdAtIsNil", "createdAtNotNil", "updatedAt", "updatedAtNEQ", "updatedAtIn", "updatedAtNotIn", "updatedAtGT", "updatedAtGTE", "updatedAtLT", "updatedAtLTE", "updatedAtIsNil", "updatedAtNotNil", "createdBy", "createdByNEQ", "createdByIn", "createdByNotIn", "createdByGT", "createdByGTE", "createdByLT", "createdByLTE", "createdByContains", "createdByHasPrefix", "createdByHasSuffix", "createdByIsNil", "createdByNotNil", "createdByEqualFold", "createdByContainsFold", "updatedBy", "updatedByNEQ", "updatedByIn", "updatedByNotIn", "updatedByGT", "updatedByGTE", "updatedByLT", "updatedByLTE", "updatedByContains", "updatedByHasPrefix", "updatedByHasSuffix", "updatedByIsNil", "updatedByNotNil", "updatedByEqualFold", "updatedByContainsFold", "billingContact", "billingContactNEQ", "billingContactIn", "billingContactNotIn", "billingContactGT", "billingContactGTE", "billingContactLT", "billingContactLTE", "billingContactContains", "billingContactHasPrefix", "billingContactHasSuffix", "billingContactIsNil", "billingContactNotNil", "billingContactEqualFold", "billingContactContainsFold", "billingEmail", "billingEmailNEQ", "billingEmailIn", "billingEmailNotIn", "billingEmailGT", "billingEmailGTE", "billingEmailLT", "billingEmailLTE", "billingEmailContains", "billingEmailHasPrefix", "billingEmailHasSuffix", "billingEmailIsNil", "billingEmailNotNil", "billingEmailEqualFold", "billingEmailContainsFold", "billingPhone", "billingPhoneNEQ", "billingPhoneIn", "billingPhoneNotIn", "billingPhoneGT", "billingPhoneGTE", "billingPhoneLT", "billingPhoneLTE", "billingPhoneContains", "billingPhoneHasPrefix", "billingPhoneHasSuffix", "billingPhoneIsNil", "billingPhoneNotNil", "billingPhoneEqualFold", "billingPhoneContainsFold", "taxIdentifier", "taxIdentifierNEQ", "taxIdentifierIn", "taxIdentifierNotIn", "taxIdentifierGT", "taxIdentifierGTE", "taxIdentifierLT", "taxIdentifierLTE", "taxIdentifierContains", "taxIdentifierHasPrefix", "taxIdentifierHasSuffix", "taxIdentifierIsNil", "taxIdentifierNotNil", "taxIdentifierEqualFold", "taxIdentifierContainsFold", "geoLocation", "geoLocationNEQ", "geoLocationIn", "geoLocationNotIn", "geoLocationIsNil", "geoLocationNotNil", "organizationID", "organizationIDNEQ", "organizationIDIn", "organizationIDNotIn", "organizationIDGT", "organizationIDGTE", "organizationIDLT", "organizationIDLTE", "organizationIDContains", "organizationIDHasPrefix", "organizationIDHasSuffix", "organizationIDIsNil", "organizationIDNotNil", "organizationIDEqualFold", "organizationIDContainsFold", "billingNotificationsEnabled", "billingNotificationsEnabledNEQ", "allowMatchingDomainsAutojoin", "allowMatchingDomainsAutojoinNEQ", "allowMatchingDomainsAutojoinIsNil", "allowMatchingDomainsAutojoinNotNil", "identityProvider", "identityProviderNEQ", "identityProviderIn", "identityProviderNotIn", "identityProviderIsNil", "identityProviderNotNil", "identityProviderClientID", "identityProviderClientIDNEQ", "identityProviderClientIDIn", "identityProviderClientIDNotIn", "identityProviderClientIDGT", "identityProviderClientIDGTE", "identityProviderClientIDLT", "identityProviderClientIDLTE", "identityProviderClientIDContains", "identityProviderClientIDHasPrefix", "identityProviderClientIDHasSuffix", "identityProviderClientIDIsNil", "identityProviderClientIDNotNil", "identityProviderClientIDEqualFold", "identityProviderClientIDContainsFold", "identityProviderClientSecret", "identityProviderClientSecretNEQ", "identityProviderClientSecretIn", "identityProviderClientSecretNotIn", "identityProviderClientSecretGT", "identityProviderClientSecretGTE", "identityProviderClientSecretLT", "identityProviderClientSecretLTE", "identityProviderClientSecretContains", "identityProviderClientSecretHasPrefix", "identityProviderClientSecretHasSuffix", "identityProviderClientSecretIsNil", "identityProviderClientSecretNotNil", "identityProviderClientSecretEqualFold", "identityProviderClientSecretContainsFold", "identityProviderMetadataEndpoint", "identityProviderMetadataEndpointNEQ", "identityProviderMetadataEndpointIn", "identityProviderMetadataEndpointNotIn", "identityProviderMetadataEndpointGT", "identityProviderMetadataEndpointGTE", "identityProviderMetadataEndpointLT", "identityProviderMetadataEndpointLTE", "identityProviderMetadataEndpointContains", "identityProviderMetadataEndpointHasPrefix", "identityProviderMetadataEndpointHasSuffix", "identityProviderMetadataEndpointIsNil", "identityProviderMetadataEndpointNotNil", "identityProviderMetadataEndpointEqualFold", "identityProviderMetadataEndpointContainsFold", "identityProviderAuthTested", "identityProviderAuthTestedNEQ", "identityProviderEntityID", "identityProviderEntityIDNEQ", "identityProviderEntityIDIn", "identityProviderEntityIDNotIn", "identityProviderEntityIDGT", "identityProviderEntityIDGTE", "identityProviderEntityIDLT", "identityProviderEntityIDLTE", "identityProviderEntityIDContains", "identityProviderEntityIDHasPrefix", "identityProviderEntityIDHasSuffix", "identityProviderEntityIDIsNil", "identityProviderEntityIDNotNil", "identityProviderEntityIDEqualFold", "identityProviderEntityIDContainsFold", "oidcDiscoveryEndpoint", "oidcDiscoveryEndpointNEQ", "oidcDiscoveryEndpointIn", "oidcDiscoveryEndpointNotIn", "oidcDiscoveryEndpointGT", "oidcDiscoveryEndpointGTE", "oidcDiscoveryEndpointLT", "oidcDiscoveryEndpointLTE", "oidcDiscoveryEndpointContains", "oidcDiscoveryEndpointHasPrefix", "oidcDiscoveryEndpointHasSuffix", "oidcDiscoveryEndpointIsNil", "oidcDiscoveryEndpointNotNil", "oidcDiscoveryEndpointEqualFold", "oidcDiscoveryEndpointContainsFold", "samlSigninURL", "samlSigninURLNEQ", "samlSigninURLIn", "samlSigninURLNotIn", "samlSigninURLGT", "samlSigninURLGTE", "samlSigninURLLT", "samlSigninURLLTE", "samlSigninURLContains", "samlSigninURLHasPrefix", "samlSigninURLHasSuffix", "samlSigninURLIsNil", "samlSigninURLNotNil", "samlSigninURLEqualFold", "samlSigninURLContainsFold", "samlIssuer", "samlIssuerNEQ", "samlIssuerIn", "samlIssuerNotIn", "samlIssuerGT", "samlIssuerGTE", "samlIssuerLT", "samlIssuerLTE", "samlIssuerContains", "samlIssuerHasPrefix", "samlIssuerHasSuffix", "samlIssuerIsNil", "samlIssuerNotNil", "samlIssuerEqualFold", "samlIssuerContainsFold", "samlCert", "samlCertNEQ", "samlCertIn", "samlCertNotIn", "samlCertGT", "samlCertGTE", "samlCertLT", "samlCertLTE", "samlCertContains", "samlCertHasPrefix", "samlCertHasSuffix", "samlCertIsNil", "samlCertNotNil", "samlCertEqualFold", "samlCertContainsFold", "identityProviderLoginEnforced", "identityProviderLoginEnforcedNEQ", "multifactorAuthEnforced", "multifactorAuthEnforcedNEQ", "multifactorAuthEnforcedIsNil", "multifactorAuthEnforcedNotNil", "complianceWebhookToken", "complianceWebhookTokenNEQ", "complianceWebhookTokenIn", "complianceWebhookTokenNotIn", "complianceWebhookTokenGT", "complianceWebhookTokenGTE", "complianceWebhookTokenLT", "complianceWebhookTokenLTE", "complianceWebhookTokenContains", "complianceWebhookTokenHasPrefix", "complianceWebhookTokenHasSuffix", "complianceWebhookTokenIsNil", "complianceWebhookTokenNotNil", "complianceWebhookTokenEqualFold", "complianceWebhookTokenContainsFold", "pendingDeletionAt", "pendingDeletionAtNEQ", "pendingDeletionAtIn", "pendingDeletionAtNotIn", "pendingDeletionAtGT", "pendingDeletionAtGTE", "pendingDeletionAtLT", "pendingDeletionAtLTE", "pendingDeletionAtIsNil", "pendingDeletionAtNotNil"} + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "idEqualFold", "idContainsFold", "historyTime", "historyTimeNEQ", "historyTimeIn", "historyTimeNotIn", "historyTimeGT", "historyTimeGTE", "historyTimeLT", "historyTimeLTE", "ref", "refNEQ", "refIn", "refNotIn", "refGT", "refGTE", "refLT", "refLTE", "refContains", "refHasPrefix", "refHasSuffix", "refIsNil", "refNotNil", "refEqualFold", "refContainsFold", "operation", "operationNEQ", "operationIn", "operationNotIn", "createdAt", "createdAtNEQ", "createdAtIn", "createdAtNotIn", "createdAtGT", "createdAtGTE", "createdAtLT", "createdAtLTE", "createdAtIsNil", "createdAtNotNil", "updatedAt", "updatedAtNEQ", "updatedAtIn", "updatedAtNotIn", "updatedAtGT", "updatedAtGTE", "updatedAtLT", "updatedAtLTE", "updatedAtIsNil", "updatedAtNotNil", "createdBy", "createdByNEQ", "createdByIn", "createdByNotIn", "createdByGT", "createdByGTE", "createdByLT", "createdByLTE", "createdByContains", "createdByHasPrefix", "createdByHasSuffix", "createdByIsNil", "createdByNotNil", "createdByEqualFold", "createdByContainsFold", "updatedBy", "updatedByNEQ", "updatedByIn", "updatedByNotIn", "updatedByGT", "updatedByGTE", "updatedByLT", "updatedByLTE", "updatedByContains", "updatedByHasPrefix", "updatedByHasSuffix", "updatedByIsNil", "updatedByNotNil", "updatedByEqualFold", "updatedByContainsFold", "billingContact", "billingContactNEQ", "billingContactIn", "billingContactNotIn", "billingContactGT", "billingContactGTE", "billingContactLT", "billingContactLTE", "billingContactContains", "billingContactHasPrefix", "billingContactHasSuffix", "billingContactIsNil", "billingContactNotNil", "billingContactEqualFold", "billingContactContainsFold", "billingEmail", "billingEmailNEQ", "billingEmailIn", "billingEmailNotIn", "billingEmailGT", "billingEmailGTE", "billingEmailLT", "billingEmailLTE", "billingEmailContains", "billingEmailHasPrefix", "billingEmailHasSuffix", "billingEmailIsNil", "billingEmailNotNil", "billingEmailEqualFold", "billingEmailContainsFold", "billingPhone", "billingPhoneNEQ", "billingPhoneIn", "billingPhoneNotIn", "billingPhoneGT", "billingPhoneGTE", "billingPhoneLT", "billingPhoneLTE", "billingPhoneContains", "billingPhoneHasPrefix", "billingPhoneHasSuffix", "billingPhoneIsNil", "billingPhoneNotNil", "billingPhoneEqualFold", "billingPhoneContainsFold", "taxIdentifier", "taxIdentifierNEQ", "taxIdentifierIn", "taxIdentifierNotIn", "taxIdentifierGT", "taxIdentifierGTE", "taxIdentifierLT", "taxIdentifierLTE", "taxIdentifierContains", "taxIdentifierHasPrefix", "taxIdentifierHasSuffix", "taxIdentifierIsNil", "taxIdentifierNotNil", "taxIdentifierEqualFold", "taxIdentifierContainsFold", "geoLocation", "geoLocationNEQ", "geoLocationIn", "geoLocationNotIn", "geoLocationIsNil", "geoLocationNotNil", "organizationID", "organizationIDNEQ", "organizationIDIn", "organizationIDNotIn", "organizationIDGT", "organizationIDGTE", "organizationIDLT", "organizationIDLTE", "organizationIDContains", "organizationIDHasPrefix", "organizationIDHasSuffix", "organizationIDIsNil", "organizationIDNotNil", "organizationIDEqualFold", "organizationIDContainsFold", "billingNotificationsEnabled", "billingNotificationsEnabledNEQ", "allowMatchingDomainsAutojoin", "allowMatchingDomainsAutojoinNEQ", "allowMatchingDomainsAutojoinIsNil", "allowMatchingDomainsAutojoinNotNil", "identityProvider", "identityProviderNEQ", "identityProviderIn", "identityProviderNotIn", "identityProviderIsNil", "identityProviderNotNil", "identityProviderClientID", "identityProviderClientIDNEQ", "identityProviderClientIDIn", "identityProviderClientIDNotIn", "identityProviderClientIDGT", "identityProviderClientIDGTE", "identityProviderClientIDLT", "identityProviderClientIDLTE", "identityProviderClientIDContains", "identityProviderClientIDHasPrefix", "identityProviderClientIDHasSuffix", "identityProviderClientIDIsNil", "identityProviderClientIDNotNil", "identityProviderClientIDEqualFold", "identityProviderClientIDContainsFold", "identityProviderClientSecret", "identityProviderClientSecretNEQ", "identityProviderClientSecretIn", "identityProviderClientSecretNotIn", "identityProviderClientSecretGT", "identityProviderClientSecretGTE", "identityProviderClientSecretLT", "identityProviderClientSecretLTE", "identityProviderClientSecretContains", "identityProviderClientSecretHasPrefix", "identityProviderClientSecretHasSuffix", "identityProviderClientSecretIsNil", "identityProviderClientSecretNotNil", "identityProviderClientSecretEqualFold", "identityProviderClientSecretContainsFold", "identityProviderMetadataEndpoint", "identityProviderMetadataEndpointNEQ", "identityProviderMetadataEndpointIn", "identityProviderMetadataEndpointNotIn", "identityProviderMetadataEndpointGT", "identityProviderMetadataEndpointGTE", "identityProviderMetadataEndpointLT", "identityProviderMetadataEndpointLTE", "identityProviderMetadataEndpointContains", "identityProviderMetadataEndpointHasPrefix", "identityProviderMetadataEndpointHasSuffix", "identityProviderMetadataEndpointIsNil", "identityProviderMetadataEndpointNotNil", "identityProviderMetadataEndpointEqualFold", "identityProviderMetadataEndpointContainsFold", "identityProviderAuthTested", "identityProviderAuthTestedNEQ", "identityProviderEntityID", "identityProviderEntityIDNEQ", "identityProviderEntityIDIn", "identityProviderEntityIDNotIn", "identityProviderEntityIDGT", "identityProviderEntityIDGTE", "identityProviderEntityIDLT", "identityProviderEntityIDLTE", "identityProviderEntityIDContains", "identityProviderEntityIDHasPrefix", "identityProviderEntityIDHasSuffix", "identityProviderEntityIDIsNil", "identityProviderEntityIDNotNil", "identityProviderEntityIDEqualFold", "identityProviderEntityIDContainsFold", "oidcDiscoveryEndpoint", "oidcDiscoveryEndpointNEQ", "oidcDiscoveryEndpointIn", "oidcDiscoveryEndpointNotIn", "oidcDiscoveryEndpointGT", "oidcDiscoveryEndpointGTE", "oidcDiscoveryEndpointLT", "oidcDiscoveryEndpointLTE", "oidcDiscoveryEndpointContains", "oidcDiscoveryEndpointHasPrefix", "oidcDiscoveryEndpointHasSuffix", "oidcDiscoveryEndpointIsNil", "oidcDiscoveryEndpointNotNil", "oidcDiscoveryEndpointEqualFold", "oidcDiscoveryEndpointContainsFold", "samlSigninURL", "samlSigninURLNEQ", "samlSigninURLIn", "samlSigninURLNotIn", "samlSigninURLGT", "samlSigninURLGTE", "samlSigninURLLT", "samlSigninURLLTE", "samlSigninURLContains", "samlSigninURLHasPrefix", "samlSigninURLHasSuffix", "samlSigninURLIsNil", "samlSigninURLNotNil", "samlSigninURLEqualFold", "samlSigninURLContainsFold", "samlIssuer", "samlIssuerNEQ", "samlIssuerIn", "samlIssuerNotIn", "samlIssuerGT", "samlIssuerGTE", "samlIssuerLT", "samlIssuerLTE", "samlIssuerContains", "samlIssuerHasPrefix", "samlIssuerHasSuffix", "samlIssuerIsNil", "samlIssuerNotNil", "samlIssuerEqualFold", "samlIssuerContainsFold", "samlCert", "samlCertNEQ", "samlCertIn", "samlCertNotIn", "samlCertGT", "samlCertGTE", "samlCertLT", "samlCertLTE", "samlCertContains", "samlCertHasPrefix", "samlCertHasSuffix", "samlCertIsNil", "samlCertNotNil", "samlCertEqualFold", "samlCertContainsFold", "identityProviderLoginEnforced", "identityProviderLoginEnforcedNEQ", "multifactorAuthEnforced", "multifactorAuthEnforcedNEQ", "multifactorAuthEnforcedIsNil", "multifactorAuthEnforcedNotNil", "complianceWebhookToken", "complianceWebhookTokenNEQ", "complianceWebhookTokenIn", "complianceWebhookTokenNotIn", "complianceWebhookTokenGT", "complianceWebhookTokenGTE", "complianceWebhookTokenLT", "complianceWebhookTokenLTE", "complianceWebhookTokenContains", "complianceWebhookTokenHasPrefix", "complianceWebhookTokenHasSuffix", "complianceWebhookTokenIsNil", "complianceWebhookTokenNotNil", "complianceWebhookTokenEqualFold", "complianceWebhookTokenContainsFold", "paymentMethodAdded", "paymentMethodAddedNEQ", "pendingDeletionAt", "pendingDeletionAtNEQ", "pendingDeletionAtIn", "pendingDeletionAtNotIn", "pendingDeletionAtGT", "pendingDeletionAtGTE", "pendingDeletionAtLT", "pendingDeletionAtLTE", "pendingDeletionAtIsNil", "pendingDeletionAtNotNil"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -175203,6 +175203,20 @@ func (ec *executionContext) unmarshalInputOrganizationSettingHistoryWhereInput(c return it, err } it.ComplianceWebhookTokenContainsFold = data + case "paymentMethodAdded": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("paymentMethodAdded")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.PaymentMethodAdded = data + case "paymentMethodAddedNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("paymentMethodAddedNEQ")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.PaymentMethodAddedNEQ = data case "pendingDeletionAt": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pendingDeletionAt")) data, err := ec.unmarshalODateTime2ᚖgithubᚗcomᚋtheopenlaneᚋcoreᚋcommonᚋmodelsᚐDateTime(ctx, v) diff --git a/internal/graphapi/historygenerated/root_.generated.go b/internal/graphapi/historygenerated/root_.generated.go index dac2ab60d8..7ecb7b1d53 100644 --- a/internal/graphapi/historygenerated/root_.generated.go +++ b/internal/graphapi/historygenerated/root_.generated.go @@ -44886,6 +44886,11 @@ input OrganizationSettingHistoryWhereInput { complianceWebhookTokenEqualFold: String complianceWebhookTokenContainsFold: String """ + payment_method_added field predicates + """ + paymentMethodAdded: Boolean + paymentMethodAddedNEQ: Boolean + """ pending_deletion_at field predicates """ pendingDeletionAt: DateTime diff --git a/internal/graphapi/historyschema/checksum/.history_schema_checksum b/internal/graphapi/historyschema/checksum/.history_schema_checksum index f6ac4e1dc6..c2e664a93e 100644 --- a/internal/graphapi/historyschema/checksum/.history_schema_checksum +++ b/internal/graphapi/historyschema/checksum/.history_schema_checksum @@ -1,7 +1 @@ -<<<<<<< HEAD -9badaf13f898a8329ce46ccfefee08c62f8a6f596c5956b1a70bf9d956c222e6 -||||||| 88f89acb1 -4a03fd32693e7d9a47bc4f103f088b9fdd413ef16dfea7986f01aef5290cda0b -======= -ded39f0d7e1128219e1139f576fd1bcea5fa4c87ffa34585783b39c066bd4e36 ->>>>>>> origin/main +1bc7cdbb9bb2d1e0d5cc474e9279a425c079c06be0d9411a143dd6327dd56480 \ No newline at end of file diff --git a/internal/graphapi/historyschema/schema.graphql b/internal/graphapi/historyschema/schema.graphql index 562d1d31cd..30fdbe60d3 100644 --- a/internal/graphapi/historyschema/schema.graphql +++ b/internal/graphapi/historyschema/schema.graphql @@ -22825,6 +22825,11 @@ input OrganizationSettingHistoryWhereInput { complianceWebhookTokenEqualFold: String complianceWebhookTokenContainsFold: String """ + payment_method_added field predicates + """ + paymentMethodAdded: Boolean + paymentMethodAddedNEQ: Boolean + """ pending_deletion_at field predicates """ pendingDeletionAt: DateTime diff --git a/internal/graphapi/query/identityholder.graphql b/internal/graphapi/query/identityholder.graphql index f442df8d95..e645e2835b 100644 --- a/internal/graphapi/query/identityholder.graphql +++ b/internal/graphapi/query/identityholder.graphql @@ -1,467 +1,439 @@ -mutation CreateBulkCSVIdentityHolder($input: Upload!) { - createBulkCSVIdentityHolder(input: $input) { - identityHolders { - alternateEmail - createdAt - createdBy - department - displayID - email - emailAliases - employerEntityID - endDate - environmentID - environmentName - externalReferenceID - externalUserID - fullName - id - identityHolderType - internalOwner - internalOwnerGroupID - internalOwnerUserID - isActive - isOpenlaneUser - location - metadata - ownerID - phoneNumber - scopeID - scopeName - startDate - status - tags - team - title - updatedAt - updatedBy - userID - workflowEligibleMarker - } - } +mutation CreateBulkCSVIdentityHolder ($input: Upload!) { + createBulkCSVIdentityHolder(input: $input) { + identityHolders { + alternateEmail + createdAt + createdBy + department + displayID + email + emailAliases + employerEntityID + endDate + environmentID + environmentName + externalReferenceID + externalUserID + fullName + id + identityHolderType + internalOwner + internalOwnerGroupID + internalOwnerUserID + isActive + isOpenlaneUser + location + metadata + ownerID + phoneNumber + scopeID + scopeName + startDate + status + tags + team + title + updatedAt + updatedBy + userID + workflowEligibleMarker + } + } } - -mutation CreateBulkIdentityHolder($input: [CreateIdentityHolderInput!]) { - createBulkIdentityHolder(input: $input) { - identityHolders { - alternateEmail - createdAt - createdBy - department - displayID - email - emailAliases - employerEntityID - endDate - environmentID - environmentName - externalReferenceID - externalUserID - fullName - id - identityHolderType - internalOwner - internalOwnerGroupID - internalOwnerUserID - isActive - isOpenlaneUser - location - metadata - ownerID - phoneNumber - scopeID - scopeName - startDate - status - tags - team - title - updatedAt - updatedBy - userID - workflowEligibleMarker - } - } +mutation CreateBulkIdentityHolder ($input: [CreateIdentityHolderInput!]) { + createBulkIdentityHolder(input: $input) { + identityHolders { + alternateEmail + createdAt + createdBy + department + displayID + email + emailAliases + employerEntityID + endDate + environmentID + environmentName + externalReferenceID + externalUserID + fullName + id + identityHolderType + internalOwner + internalOwnerGroupID + internalOwnerUserID + isActive + isOpenlaneUser + location + metadata + ownerID + phoneNumber + scopeID + scopeName + startDate + status + tags + team + title + updatedAt + updatedBy + userID + workflowEligibleMarker + } + } } - -mutation CreateIdentityHolder($input: CreateIdentityHolderInput!) { - createIdentityHolder(input: $input) { - identityHolder { - alternateEmail - createdAt - createdBy - department - displayID - email - emailAliases - employerEntityID - endDate - environmentID - environmentName - externalReferenceID - externalUserID - fullName - id - identityHolderType - internalOwner - internalOwnerGroupID - internalOwnerUserID - isActive - isOpenlaneUser - location - metadata - ownerID - phoneNumber - scopeID - scopeName - startDate - status - tags - team - title - updatedAt - updatedBy - userID - workflowEligibleMarker - } - } +mutation CreateIdentityHolder ($input: CreateIdentityHolderInput!) { + createIdentityHolder(input: $input) { + identityHolder { + alternateEmail + createdAt + createdBy + department + displayID + email + emailAliases + employerEntityID + endDate + environmentID + environmentName + externalReferenceID + externalUserID + fullName + id + identityHolderType + internalOwner + internalOwnerGroupID + internalOwnerUserID + isActive + isOpenlaneUser + location + metadata + ownerID + phoneNumber + scopeID + scopeName + startDate + status + tags + team + title + updatedAt + updatedBy + userID + workflowEligibleMarker + } + } } - -mutation DeleteIdentityHolder($deleteIdentityHolderId: ID!) { - deleteIdentityHolder(id: $deleteIdentityHolderId) { - deletedID - } +mutation DeleteIdentityHolder ($deleteIdentityHolderId: ID!) { + deleteIdentityHolder(id: $deleteIdentityHolderId) { + deletedID + } } - -query GetAllIdentityHolders($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [IdentityHolderOrder!]) { - identityHolders( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - alternateEmail - createdAt - createdBy - department - displayID - email - emailAliases - employerEntityID - endDate - environmentID - environmentName - externalReferenceID - externalUserID - fullName - id - identityHolderType - internalOwner - internalOwnerGroupID - internalOwnerUserID - isActive - isOpenlaneUser - location - metadata - ownerID - phoneNumber - scopeID - scopeName - startDate - status - tags - team - title - updatedAt - updatedBy - userID - workflowEligibleMarker - campaigns { - edges { - node { - id - name - status - displayID - } - } - } - directoryAccounts { - edges { - node { - id - integrationID - externalID - canonicalEmail - displayName - directoryName - avatarRemoteURL - avatarLocalFileID - } - } - } - } - } - } +query GetAllIdentityHolders ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [IdentityHolderOrder!]) { + identityHolders(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + alternateEmail + createdAt + createdBy + department + displayID + email + emailAliases + employerEntityID + endDate + environmentID + environmentName + externalReferenceID + externalUserID + fullName + id + identityHolderType + internalOwner + internalOwnerGroupID + internalOwnerUserID + isActive + isOpenlaneUser + location + metadata + ownerID + phoneNumber + scopeID + scopeName + startDate + status + tags + team + title + updatedAt + updatedBy + userID + workflowEligibleMarker + campaigns { + edges { + node { + id + name + status + displayID + } + } + } + directoryAccounts { + edges { + node { + id + integrationID + externalID + canonicalEmail + displayName + directoryName + avatarRemoteURL + avatarLocalFileID + } + } + } + } + } + } } - -query GetIdentityHolderByID($identityHolderId: ID!) { - identityHolder(id: $identityHolderId) { - alternateEmail - createdAt - createdBy - department - displayID - email - emailAliases - employerEntityID - endDate - environmentID - environmentName - externalReferenceID - externalUserID - fullName - id - identityHolderType - internalOwner - internalOwnerGroupID - internalOwnerUserID - isActive - isOpenlaneUser - location - metadata - ownerID - phoneNumber - scopeID - scopeName - startDate - status - tags - team - title - updatedAt - updatedBy - userID - workflowEligibleMarker - campaigns { - edges { - node { - id - name - status - displayID - } - } - } - directoryAccounts { - edges { - node { - id - integrationID - externalID - canonicalEmail - displayName - directoryName - avatarRemoteURL - avatarLocalFileID - } - } - } - } +query GetIdentityHolderByID ($identityHolderId: ID!) { + identityHolder(id: $identityHolderId) { + alternateEmail + createdAt + createdBy + department + displayID + email + emailAliases + employerEntityID + endDate + environmentID + environmentName + externalReferenceID + externalUserID + fullName + id + identityHolderType + internalOwner + internalOwnerGroupID + internalOwnerUserID + isActive + isOpenlaneUser + location + metadata + ownerID + phoneNumber + scopeID + scopeName + startDate + status + tags + team + title + updatedAt + updatedBy + userID + workflowEligibleMarker + campaigns { + edges { + node { + id + name + status + displayID + } + } + } + directoryAccounts { + edges { + node { + id + integrationID + externalID + canonicalEmail + displayName + directoryName + avatarRemoteURL + avatarLocalFileID + } + } + } + } } - -query GetIdentityHolderDirectoryAccounts($identityHolderId: ID!, $first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [DirectoryAccountOrder!], $where: DirectoryAccountWhereInput) { - identityHolder(id: $identityHolderId) { - id - email - fullName - directoryAccounts( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - where: $where - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - accountType - addedAt - avatarLocalFileID - avatarRemoteURL - avatarUpdatedAt - canonicalEmail - createdAt - createdBy - department - directoryInstanceID - directoryName - directorySyncRunID - displayID - displayName - environmentID - environmentName - externalID - familyName - firstSeenAt - givenName - id - identityHolderID - integrationID - jobTitle - lastLoginAt - lastSeenAt - lastSeenIP - metadata - mfaState - observedAt - organizationUnit - ownerID - platformID - primarySource - profile - profileHash - rawProfileFileID - removedAt - scopeID - scopeName - secondaryKey - sourceVersion - status - tags - updatedAt - updatedBy - } - } - } - } +query GetIdentityHolderDirectoryAccounts ($identityHolderId: ID!, $first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [DirectoryAccountOrder!], $where: DirectoryAccountWhereInput) { + identityHolder(id: $identityHolderId) { + id + email + fullName + directoryAccounts(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy, where: $where) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + accountType + addedAt + avatarLocalFileID + avatarRemoteURL + avatarUpdatedAt + canonicalEmail + createdAt + createdBy + department + directoryInstanceID + directoryName + directorySyncRunID + displayID + displayName + environmentID + environmentName + externalID + familyName + firstSeenAt + givenName + id + identityHolderID + integrationID + jobTitle + lastLoginAt + lastSeenAt + lastSeenIP + metadata + mfaState + observedAt + organizationUnit + ownerID + platformID + primarySource + profile + profileHash + rawProfileFileID + removedAt + scopeID + scopeName + secondaryKey + sourceVersion + status + tags + updatedAt + updatedBy + } + } + } + } } - -query GetIdentityHolders($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [IdentityHolderOrder!], $where: IdentityHolderWhereInput) { - identityHolders( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - where: $where - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - alternateEmail - createdAt - createdBy - department - displayID - email - emailAliases - employerEntityID - endDate - environmentID - environmentName - externalReferenceID - externalUserID - fullName - id - identityHolderType - internalOwner - internalOwnerGroupID - internalOwnerUserID - isActive - isOpenlaneUser - location - metadata - ownerID - phoneNumber - scopeID - scopeName - startDate - status - tags - team - title - updatedAt - updatedBy - userID - workflowEligibleMarker - campaigns { - edges { - node { - id - name - status - displayID - } - } - } - } - } - } +query GetIdentityHolders ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [IdentityHolderOrder!], $where: IdentityHolderWhereInput) { + identityHolders(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy, where: $where) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + alternateEmail + createdAt + createdBy + department + displayID + email + emailAliases + employerEntityID + endDate + environmentID + environmentName + externalReferenceID + externalUserID + fullName + id + identityHolderType + internalOwner + internalOwnerGroupID + internalOwnerUserID + isActive + isOpenlaneUser + location + metadata + ownerID + phoneNumber + scopeID + scopeName + startDate + status + tags + team + title + updatedAt + updatedBy + userID + workflowEligibleMarker + campaigns { + edges { + node { + id + name + status + displayID + } + } + } + } + } + } } - -mutation UpdateIdentityHolder($updateIdentityHolderId: ID!, $input: UpdateIdentityHolderInput!) { - updateIdentityHolder(id: $updateIdentityHolderId, input: $input) { - identityHolder { - alternateEmail - createdAt - createdBy - department - displayID - email - emailAliases - employerEntityID - endDate - environmentID - environmentName - externalReferenceID - externalUserID - fullName - id - identityHolderType - internalOwner - internalOwnerGroupID - internalOwnerUserID - isActive - isOpenlaneUser - location - metadata - ownerID - phoneNumber - scopeID - scopeName - startDate - status - tags - team - title - updatedAt - updatedBy - userID - workflowEligibleMarker - } - } +mutation UpdateIdentityHolder ($updateIdentityHolderId: ID!, $input: UpdateIdentityHolderInput!) { + updateIdentityHolder(id: $updateIdentityHolderId, input: $input) { + identityHolder { + alternateEmail + createdAt + createdBy + department + displayID + email + emailAliases + employerEntityID + endDate + environmentID + environmentName + externalReferenceID + externalUserID + fullName + id + identityHolderType + internalOwner + internalOwnerGroupID + internalOwnerUserID + isActive + isOpenlaneUser + location + metadata + ownerID + phoneNumber + scopeID + scopeName + startDate + status + tags + team + title + updatedAt + updatedBy + userID + workflowEligibleMarker + } + } } diff --git a/internal/graphapi/query/platform.graphql b/internal/graphapi/query/platform.graphql index d27d7a541e..0474ceb6b8 100644 --- a/internal/graphapi/query/platform.graphql +++ b/internal/graphapi/query/platform.graphql @@ -358,96 +358,6 @@ query GetAllPlatforms ($first: Int, $last: Int, $after: Cursor, $before: Cursor, } } } -<<<<<<< HEAD -||||||| 88f89acb1 - -query GetAllPlatforms($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [PlatformOrder!]) { - platforms( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - identityHolders { - edges { - node { - id - fullName - email - displayID - } - } - } - } - } - } -======= architectureDiagrams { edges { node { @@ -478,7 +388,6 @@ query GetAllPlatforms($first: Int, $last: Int, $after: Cursor, $before: Cursor, } } } ->>>>>>> origin/main } } } @@ -541,69 +450,6 @@ query GetPlatformByID ($platformId: ID!) { updatedAt updatedBy workflowEligibleMarker -<<<<<<< HEAD -||||||| 88f89acb1 - -query GetPlatformByID($platformId: ID!) { - platform(id: $platformId) { - accessModelID - accessModelName - businessOwner - businessOwnerGroupID - businessOwnerUserID - businessPurpose - containsPii - costCenter - createdAt - createdBy - criticalityID - criticalityName - dataFlowSummary - description - displayID - encryptionStatusID - encryptionStatusName - environmentID - environmentName - estimatedMonthlyCost - externalReferenceID - externalUUID - id - internalOwner - internalOwnerGroupID - internalOwnerUserID - metadata - name - ownerID - physicalLocation - platformDataClassificationID - platformDataClassificationName - platformKindID - platformKindName - platformOwnerID - purchaseDate - region - scopeID - scopeName - scopeStatement - securityOwner - securityOwnerGroupID - securityOwnerUserID - securityTierID - securityTierName - sourceIdentifier - sourceType - status - tags - technicalOwner - technicalOwnerGroupID - technicalOwnerUserID - trustBoundaryDescription - updatedAt - updatedBy - workflowEligibleMarker - } -======= architectureDiagrams { edges { node { @@ -634,7 +480,6 @@ query GetPlatformByID($platformId: ID!) { } } } ->>>>>>> origin/main } } query GetPlatforms ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [PlatformOrder!], $where: PlatformWhereInput) { diff --git a/internal/graphapi/schema/ent.graphql b/internal/graphapi/schema/ent.graphql index 642015dbf8..82b38fad42 100644 --- a/internal/graphapi/schema/ent.graphql +++ b/internal/graphapi/schema/ent.graphql @@ -46132,6 +46132,11 @@ input OrganizationSettingWhereInput { complianceWebhookTokenEqualFold: String complianceWebhookTokenContainsFold: String """ + payment_method_added field predicates + """ + paymentMethodAdded: Boolean + paymentMethodAddedNEQ: Boolean + """ pending_deletion_at field predicates """ pendingDeletionAt: DateTime diff --git a/internal/graphapi/schemahistory/ent.graphql b/internal/graphapi/schemahistory/ent.graphql index c285676afb..efadc70823 100644 --- a/internal/graphapi/schemahistory/ent.graphql +++ b/internal/graphapi/schemahistory/ent.graphql @@ -22731,6 +22731,11 @@ input OrganizationSettingHistoryWhereInput { complianceWebhookTokenEqualFold: String complianceWebhookTokenContainsFold: String """ + payment_method_added field predicates + """ + paymentMethodAdded: Boolean + paymentMethodAddedNEQ: Boolean + """ pending_deletion_at field predicates """ pendingDeletionAt: DateTime diff --git a/internal/graphapi/testclient/checksum/.client_checksum b/internal/graphapi/testclient/checksum/.client_checksum index 8f36490438..1a7a92beab 100644 --- a/internal/graphapi/testclient/checksum/.client_checksum +++ b/internal/graphapi/testclient/checksum/.client_checksum @@ -1,7 +1 @@ -<<<<<<< HEAD -bf9f862842c3eaa36ce72d2300d7c81e236d0fb5e6d1f5569cddf82734328d19 -||||||| 88f89acb1 -8a820204b41d57e3cf1d13a8919cde3ead6bc100af350a670959a6be6b98d85e -======= -51a24de4bc8c025f20507060a8908a46e9cd602b3815accd72a1841f45b0aa26 ->>>>>>> origin/main +56713e11649d69210950a3f694fe8efb2db138be67b1c1cc6e0324b92e4bb09d \ No newline at end of file diff --git a/internal/graphapi/testclient/models.go b/internal/graphapi/testclient/models.go index 8d7f6a66a1..82425a2e02 100644 --- a/internal/graphapi/testclient/models.go +++ b/internal/graphapi/testclient/models.go @@ -25624,6 +25624,9 @@ type OrganizationSettingWhereInput struct { ComplianceWebhookTokenNotNil *bool `json:"complianceWebhookTokenNotNil,omitempty"` ComplianceWebhookTokenEqualFold *string `json:"complianceWebhookTokenEqualFold,omitempty"` ComplianceWebhookTokenContainsFold *string `json:"complianceWebhookTokenContainsFold,omitempty"` + // payment_method_added field predicates + PaymentMethodAdded *bool `json:"paymentMethodAdded,omitempty"` + PaymentMethodAddedNeq *bool `json:"paymentMethodAddedNEQ,omitempty"` // pending_deletion_at field predicates PendingDeletionAt *models.DateTime `json:"pendingDeletionAt,omitempty"` PendingDeletionAtNeq *models.DateTime `json:"pendingDeletionAtNEQ,omitempty"` diff --git a/internal/httpserve/specs/openlane.openapi.json b/internal/httpserve/specs/openlane.openapi.json index 3fcddf3aba..0f1051cf65 100644 --- a/internal/httpserve/specs/openlane.openapi.json +++ b/internal/httpserve/specs/openlane.openapi.json @@ -3426,7 +3426,7 @@ "examples": { "error": { "value": { - "error": "Get \"https://www.googleapis.com/oauth2/v2/userinfo?alt=json\u0026prettyPrint=false\": dial tcp: lookup www.googleapis.com: i/o timeout", + "error": "googleapi: Error 401: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project., unauthorized", "error_code": "INVALID_INPUT", "success": false } diff --git a/internal/httpserve/specs/openlane.openapi.yaml b/internal/httpserve/specs/openlane.openapi.yaml index 96a8719e3c..d16b44fec7 100644 --- a/internal/httpserve/specs/openlane.openapi.yaml +++ b/internal/httpserve/specs/openlane.openapi.yaml @@ -2462,7 +2462,7 @@ paths: examples: error: value: - error: 'Get "https://www.googleapis.com/oauth2/v2/userinfo?alt=json&prettyPrint=false": dial tcp: lookup www.googleapis.com: i/o timeout' + error: 'googleapi: Error 401: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project., unauthorized' error_code: INVALID_INPUT success: false schema: diff --git a/internal/integrations/operations/ingest_generated.go b/internal/integrations/operations/ingest_generated.go index f203dc38fd..5ea0e459a1 100644 --- a/internal/integrations/operations/ingest_generated.go +++ b/internal/integrations/operations/ingest_generated.go @@ -338,11 +338,11 @@ func buildIngestMetadata(integration *ent.Integration, operationName string, rec } if options.WorkflowMeta != nil { - metadata.WorkflowInstanceID = options.WorkflowMeta.InstanceID - metadata.WorkflowActionKey = options.WorkflowMeta.ActionKey + metadata.WorkflowInstanceID = options.WorkflowMeta.InstanceID + metadata.WorkflowActionKey = options.WorkflowMeta.ActionKey metadata.WorkflowActionIndex = options.WorkflowMeta.ActionIndex - metadata.WorkflowObjectID = options.WorkflowMeta.ObjectID - metadata.WorkflowObjectType = string(options.WorkflowMeta.ObjectType) + metadata.WorkflowObjectID = options.WorkflowMeta.ObjectID + metadata.WorkflowObjectType = string(options.WorkflowMeta.ObjectType) } return metadata From fd2604156c050ed8495f06dafc72df6e08aeaec3 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Tue, 14 Apr 2026 17:25:36 +0100 Subject: [PATCH 18/32] admin should be able to fetch org members --- .task/checksum/generate-ent-smart | 2 +- internal/ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- internal/ent/interceptors/orgmembers.go | 4 ++++ internal/ent/schema/orgmembership.go | 3 +++ internal/graphapi/checksum/.history_schema_checksum | 2 +- 6 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index 73239faabb..e40e3c92b2 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1 +1 @@ -7e2dbffcd9d8d87226c44c4daf98c7be +b47af18cf6e2b94975a6eb1bb0f73abc diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index f937918ab0..416e1509ac 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -447ed99207a702f171e4e72bccbd9ec78ed9d5381dc951b201c9a28f1fa82b68 \ No newline at end of file +b92638d3e70afa8c2ba5932ccf4711787f4a194a6f0702764e7dc36fb7e9010d \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index fa631a4cf1..91528e56a7 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -6bcac9e2fc580d23a6cde8aa64b1b12a2a30f01a6828050b9b2e0537e541e2b6 \ No newline at end of file +04dd790063f8694ca17d88d81019bbc1dc0201707bec569f1d177cfa61493604 \ No newline at end of file diff --git a/internal/ent/interceptors/orgmembers.go b/internal/ent/interceptors/orgmembers.go index 9e80b9e5d2..ef7b44f4d2 100644 --- a/internal/ent/interceptors/orgmembers.go +++ b/internal/ent/interceptors/orgmembers.go @@ -17,6 +17,10 @@ import ( // TraverseOrgMembers is middleware to change the Org Members query func TraverseOrgMembers() ent.Interceptor { return intercept.TraverseFunc(func(ctx context.Context, q intercept.Query) error { + if auth.IsSystemAdminFromContext(ctx) { + return nil + } + // bypass filter if the request is internal and already set to allowed if _, allow := privacy.DecisionFromContext(ctx); allow { return nil diff --git a/internal/ent/schema/orgmembership.go b/internal/ent/schema/orgmembership.go index 35addd8217..ea1510a044 100644 --- a/internal/ent/schema/orgmembership.go +++ b/internal/ent/schema/orgmembership.go @@ -138,6 +138,9 @@ func (OrgMembership) Interceptors() []ent.Interceptor { // Policy of the OrgMembership func (OrgMembership) Policy() ent.Policy { return policy.NewPolicy( + policy.WithQueryRules( + rule.AllowQueryIfSystemAdmin(), + ), policy.WithOnMutationRules( ent.OpDelete|ent.OpDeleteOne, rule.AllowSelfOrgMembershipDelete(), diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index 6e8d2c0541..91f68f40fa 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1 +1 @@ -1a7de1984ffd3840d657bbec7fd0ef7d585bbffee5c0a56efec5e41e10b8354b \ No newline at end of file +eab8a921204fd4cc26f633a6e1ae7a9802c49402911daa7b85f8bd1059e47167 \ No newline at end of file From 8cd1dcd03e6295fbcec91be6b0c4e36b27f03204 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Tue, 14 Apr 2026 18:31:33 +0100 Subject: [PATCH 19/32] Drop organizationid property as it would be a periodic job --- common/jobspec/organization.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/common/jobspec/organization.go b/common/jobspec/organization.go index 14cb73b11d..8feb610334 100644 --- a/common/jobspec/organization.go +++ b/common/jobspec/organization.go @@ -15,10 +15,7 @@ func (OrganizationDeletionReminderArgs) InsertOpts() river.InsertOpts { } // OrganizationDeletionReminderArgs for the periodic worker to delete an organization -type OrganizationDeletionArgs struct { - // OrganizationID is the organization that is deleted - OrganizationID string `json:"organization_id"` -} +type OrganizationDeletionArgs struct{} // Kind satisfies the river.Job interface func (OrganizationDeletionArgs) Kind() string { return "org_deletion" } From d1fd44c1a1fd390a3a8848a5b424888748772417 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Tue, 14 Apr 2026 19:17:36 +0100 Subject: [PATCH 20/32] allow admin mutation --- internal/ent/schema/organization.go | 1 + internal/graphapi/organization.resolvers.go | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/ent/schema/organization.go b/internal/ent/schema/organization.go index e5c9aa37e5..b86df1cc13 100644 --- a/internal/ent/schema/organization.go +++ b/internal/ent/schema/organization.go @@ -666,6 +666,7 @@ func (Organization) Policy() ent.Policy { rule.AllowQueryIfSystemAdmin(), ), policy.WithMutationRules( + rule.AllowMutationIfSystemAdmin(), rule.HasOrgMutationAccess(), // Requires edit for Update, and delete for Delete mutations policy.AllowCreate(), // Allow all other users (e.g. a user with a JWT should be able to create a new org) ), diff --git a/internal/graphapi/organization.resolvers.go b/internal/graphapi/organization.resolvers.go index c71d621517..b7203d25eb 100644 --- a/internal/graphapi/organization.resolvers.go +++ b/internal/graphapi/organization.resolvers.go @@ -9,12 +9,13 @@ import ( "context" "github.com/99designs/gqlgen/graphql" + "github.com/theopenlane/iam/auth" + "github.com/theopenlane/core/internal/ent/generated" "github.com/theopenlane/core/internal/ent/generated/organization" "github.com/theopenlane/core/internal/graphapi/common" "github.com/theopenlane/core/internal/graphapi/model" "github.com/theopenlane/core/pkg/logx" - "github.com/theopenlane/iam/auth" ) // CreateOrganization is the resolver for the createOrganization field. @@ -74,7 +75,7 @@ func (r *mutationResolver) UpdateOrganization(ctx context.Context, id string, in // DeleteOrganization is the resolver for the deleteOrganization field. func (r *mutationResolver) DeleteOrganization(ctx context.Context, id string) (*model.OrganizationDeletePayload, error) { - if auth.GetAuthTypeFromContext(ctx) != auth.JWTAuthentication { + if auth.GetAuthTypeFromContext(ctx) != auth.JWTAuthentication && !auth.IsSystemAdminFromContext(ctx) { logx.FromContext(ctx).Info().Msg("organization attempted to be deleted with non-JWT auth type") return nil, common.ErrResourceNotAccessibleWithToken From 31fa5d8db94fd9b7b894e234808ef02ef3fd7eac Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Tue, 14 Apr 2026 19:42:44 +0100 Subject: [PATCH 21/32] task regenerate --- .task/checksum/generate-ent-smart | 2 +- .task/checksum/generate-graphql-smart | 2 +- ...ganization_setting_pending_deletion_at.sql | 7 + ...on_setting_pending_deletion_at_history.sql | 7 + db/migrations-goose-postgres/atlas.sum | 4 +- ...ganization_setting_pending_deletion_at.sql | 2 + ...on_setting_pending_deletion_at_history.sql | 2 + db/migrations/atlas.sum | 4 +- .../ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- internal/ent/csvgenerated/csv_generated.go | 718 ++- .../integration_mapping_generated.go | 4441 ++++++++--------- .../checksum/.history_schema_checksum | 2 +- internal/graphapi/checksum/.schema_checksum | 2 +- internal/graphapi/organization.resolvers.go | 3 +- .../operations/ingest_generated.go | 8 +- 16 files changed, 2581 insertions(+), 2627 deletions(-) create mode 100644 db/migrations-goose-postgres/20260414184205_organization_setting_pending_deletion_at.sql create mode 100644 db/migrations-goose-postgres/20260414184219_organization_setting_pending_deletion_at_history.sql create mode 100644 db/migrations/20260414184139_organization_setting_pending_deletion_at.sql create mode 100644 db/migrations/20260414184151_organization_setting_pending_deletion_at_history.sql diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index 1f7a24feed..54ff44b78a 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1 +1 @@ -8b98445e2002594d7bddc337451ab322 +906291a71d0377a46374b37840e9ca79 diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index 7a1ef40e97..aaaf3ea3ac 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1 +1 @@ -1a7f234a128c15b5ffd9e2ba25d8f689 +eb2f1b574fc1b14c675544ef2f0d20cb diff --git a/db/migrations-goose-postgres/20260414184205_organization_setting_pending_deletion_at.sql b/db/migrations-goose-postgres/20260414184205_organization_setting_pending_deletion_at.sql new file mode 100644 index 0000000000..71d9dabd55 --- /dev/null +++ b/db/migrations-goose-postgres/20260414184205_organization_setting_pending_deletion_at.sql @@ -0,0 +1,7 @@ +-- +goose Up +-- modify "organization_settings" table +ALTER TABLE "organization_settings" ADD COLUMN "pending_deletion_at" timestamptz NULL; + +-- +goose Down +-- reverse: modify "organization_settings" table +ALTER TABLE "organization_settings" DROP COLUMN "pending_deletion_at"; diff --git a/db/migrations-goose-postgres/20260414184219_organization_setting_pending_deletion_at_history.sql b/db/migrations-goose-postgres/20260414184219_organization_setting_pending_deletion_at_history.sql new file mode 100644 index 0000000000..e5c73bf6ac --- /dev/null +++ b/db/migrations-goose-postgres/20260414184219_organization_setting_pending_deletion_at_history.sql @@ -0,0 +1,7 @@ +-- +goose Up +-- modify "organization_setting_history" table +ALTER TABLE "organization_setting_history" ADD COLUMN "pending_deletion_at" timestamptz NULL; + +-- +goose Down +-- reverse: modify "organization_setting_history" table +ALTER TABLE "organization_setting_history" DROP COLUMN "pending_deletion_at"; diff --git a/db/migrations-goose-postgres/atlas.sum b/db/migrations-goose-postgres/atlas.sum index a7115fd597..bd9fceda76 100644 --- a/db/migrations-goose-postgres/atlas.sum +++ b/db/migrations-goose-postgres/atlas.sum @@ -1,4 +1,4 @@ -h1:3YN9UXf4PzQuO0o4HMn9tKaAkt8m0QFbvmiz3IrLf9k= +h1:A988Gqk+en5vQCpSEHE8f5rCiT3NP/0dvWb7lXD2E8g= 20251229183203_init.sql h1:g/05irCXoqKFObJV2PPLuvDRqma+da41VPsZ5fXQgfE= 20251229183205_init_history.sql h1:P/q2kAHb8zfNMOWzYkKtPbOwoh9GdJUQljSNAiPEjYI= 20251231045229_workflow.sql h1:uUPRLO4yw2y//fPGeqIXRrL+fiEN1TRGkF4wHiqPaPk= @@ -109,3 +109,5 @@ h1:3YN9UXf4PzQuO0o4HMn9tKaAkt8m0QFbvmiz3IrLf9k= 20260412014212_risk_due.sql h1:DQfGfj1hCS75IrWYBjKwjGYof6YEC7RBlnRhBEPBs68= 20260412014218_risk_due_history.sql h1:Tu46804CppUkSweLwGQB/X7HKUNaaGPJfzMk5SzONq4= 20260414152907_nonuniqueuuid.sql h1:btv/8OgYI99xrvUDoG/1Zf99veC+OwHKDQshJ7CQebY= +20260414184205_organization_setting_pending_deletion_at.sql h1:S6QGr5XI5wKc0S6Z3GAAscV/4BnSW6+kg12wj5Y4FuY= +20260414184219_organization_setting_pending_deletion_at_history.sql h1:gxzG6CTmAng9ZTCpAxWHrwAEJX5Pjgxr2d3I+2/tZmc= diff --git a/db/migrations/20260414184139_organization_setting_pending_deletion_at.sql b/db/migrations/20260414184139_organization_setting_pending_deletion_at.sql new file mode 100644 index 0000000000..11507c0723 --- /dev/null +++ b/db/migrations/20260414184139_organization_setting_pending_deletion_at.sql @@ -0,0 +1,2 @@ +-- Modify "organization_settings" table +ALTER TABLE "organization_settings" ADD COLUMN "pending_deletion_at" timestamptz NULL; diff --git a/db/migrations/20260414184151_organization_setting_pending_deletion_at_history.sql b/db/migrations/20260414184151_organization_setting_pending_deletion_at_history.sql new file mode 100644 index 0000000000..340a5b0ca5 --- /dev/null +++ b/db/migrations/20260414184151_organization_setting_pending_deletion_at_history.sql @@ -0,0 +1,2 @@ +-- Modify "organization_setting_history" table +ALTER TABLE "organization_setting_history" ADD COLUMN "pending_deletion_at" timestamptz NULL; diff --git a/db/migrations/atlas.sum b/db/migrations/atlas.sum index eb115533b0..65d26cc239 100644 --- a/db/migrations/atlas.sum +++ b/db/migrations/atlas.sum @@ -1,4 +1,4 @@ -h1:1bGaAqBhQ6WO0nqEeaTHOCLqjMe3x3mQUR8m/0O92Jk= +h1:WnJRpc3bsNJBnJr8V7Ynk9t/JsFdhD1j28+uxHbTLZA= 20251229183159_init.sql h1:3uf/ftr28zW8YUD9qAaY2GESQHC7pYmkhlI6oDWUCKU= 20251229183201_init_history.sql h1:1tFSeCDWvZgb2Ctw80C/s3tqVPNLADQw9fSDACzL8WA= 20251231045221_workflow.sql h1:5bLq4cHh2kxUV7xajK5bq5McKKpr88HmufYauTdsgUw= @@ -109,3 +109,5 @@ h1:1bGaAqBhQ6WO0nqEeaTHOCLqjMe3x3mQUR8m/0O92Jk= 20260412014155_risk_due.sql h1:JE0LxsUquGE8T3a6HE5tjTdmH6T3OTSlX8CWaY0fNbk= 20260412014203_risk_due_history.sql h1:nP3mVlwIbZshfKpGs5A+lrW5lNbkW1nA5mX8DU5qHxs= 20260414152900_nonuniqueuuid.sql h1:YXD/kcWFbLsrcdrJq17Bf8I+BU0sbMMjgjNbtB7Uouk= +20260414184139_organization_setting_pending_deletion_at.sql h1:8CLCSiV5tD9Sm5ukSPtmhFtmCZiJD1I5XODOKyiDAHM= +20260414184151_organization_setting_pending_deletion_at_history.sql h1:BOJq4nmMuza0hHXVaDZrhU6ZLCJ3aSYD1dnMgjWFFAE= diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index 6172e228bb..732fad1cde 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -fcad8eef27804f062d68e13dcad9a5d34c920233d21f202130f5b288896cdece \ No newline at end of file +183038f3a200e4e16e00f198e73b2236a7427134edb9f5813a76ab5a62e9ccee \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index 87b082b3d5..a732d49c8f 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -3c63a886697452e80c0e236ea13bb56bf90c922ca0f04f0834c9cb38b7c3758f \ No newline at end of file +14f938eab2e61e5c7e5b8d3f433004122a6a966592a8768889951fe21ef1d210 \ No newline at end of file diff --git a/internal/ent/csvgenerated/csv_generated.go b/internal/ent/csvgenerated/csv_generated.go index e7dfee7eb6..b85151d202 100644 --- a/internal/ent/csvgenerated/csv_generated.go +++ b/internal/ent/csvgenerated/csv_generated.go @@ -7,7 +7,6 @@ import ( "strings" "github.com/theopenlane/core/internal/ent/generated" - "github.com/theopenlane/core/internal/ent/generated/predicate" "github.com/theopenlane/core/internal/ent/generated/actionplan" "github.com/theopenlane/core/internal/ent/generated/asset" "github.com/theopenlane/core/internal/ent/generated/control" @@ -17,6 +16,7 @@ import ( "github.com/theopenlane/core/internal/ent/generated/identityholder" "github.com/theopenlane/core/internal/ent/generated/internalpolicy" "github.com/theopenlane/core/internal/ent/generated/platform" + "github.com/theopenlane/core/internal/ent/generated/predicate" "github.com/theopenlane/core/internal/ent/generated/procedure" "github.com/theopenlane/core/internal/ent/generated/risk" "github.com/theopenlane/core/internal/ent/generated/subcontrol" @@ -845,8 +845,7 @@ type CSVSchemaInfo struct { var CSVReferenceRegistry = map[string]CSVSchemaInfo{ "APIToken": { SchemaName: "APIToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "ActionPlan": { SchemaName: "ActionPlan", @@ -1000,8 +999,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Contact": { SchemaName: "Contact", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Control": { SchemaName: "Control", @@ -1074,28 +1072,23 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ControlImplementation": { SchemaName: "ControlImplementation", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "ControlObjective": { SchemaName: "ControlObjective", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "CustomDomain": { SchemaName: "CustomDomain", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "CustomTypeEnum": { SchemaName: "CustomTypeEnum", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DNSVerification": { SchemaName: "DNSVerification", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DirectoryAccount": { SchemaName: "DirectoryAccount", @@ -1112,38 +1105,31 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "DirectoryGroup": { SchemaName: "DirectoryGroup", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DirectoryMembership": { SchemaName: "DirectoryMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DirectorySyncRun": { SchemaName: "DirectorySyncRun", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Discussion": { SchemaName: "Discussion", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DocumentData": { SchemaName: "DocumentData", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "EmailBranding": { SchemaName: "EmailBranding", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "EmailTemplate": { SchemaName: "EmailTemplate", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Entity": { SchemaName: "Entity", @@ -1184,13 +1170,11 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "EntityType": { SchemaName: "EntityType", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Event": { SchemaName: "Event", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Evidence": { SchemaName: "Evidence", @@ -1207,43 +1191,35 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Export": { SchemaName: "Export", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "File": { SchemaName: "File", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Finding": { SchemaName: "Finding", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "FindingControl": { SchemaName: "FindingControl", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Group": { SchemaName: "Group", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "GroupMembership": { SchemaName: "GroupMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "GroupSetting": { SchemaName: "GroupSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Hush": { SchemaName: "Hush", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "IdentityHolder": { SchemaName: "IdentityHolder", @@ -1313,88 +1289,71 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Invite": { SchemaName: "Invite", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobResult": { SchemaName: "JobResult", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobRunner": { SchemaName: "JobRunner", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobRunnerRegistrationToken": { SchemaName: "JobRunnerRegistrationToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobRunnerToken": { SchemaName: "JobRunnerToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobTemplate": { SchemaName: "JobTemplate", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "MappableDomain": { SchemaName: "MappableDomain", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "MappedControl": { SchemaName: "MappedControl", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Narrative": { SchemaName: "Narrative", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Notification": { SchemaName: "Notification", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "NotificationPreference": { SchemaName: "NotificationPreference", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "NotificationTemplate": { SchemaName: "NotificationTemplate", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Onboarding": { SchemaName: "Onboarding", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "OrgMembership": { SchemaName: "OrgMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Organization": { SchemaName: "Organization", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "OrganizationSetting": { SchemaName: "OrganizationSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "PersonalAccessToken": { SchemaName: "PersonalAccessToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Platform": { SchemaName: "Platform", @@ -1557,8 +1516,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ProgramMembership": { SchemaName: "ProgramMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Remediation": { SchemaName: "Remediation", @@ -1665,8 +1623,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "SLADefinition": { SchemaName: "SLADefinition", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Scan": { SchemaName: "Scan", @@ -1744,13 +1701,11 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ScheduledJobRun": { SchemaName: "ScheduledJobRun", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Standard": { SchemaName: "Standard", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Subcontrol": { SchemaName: "Subcontrol", @@ -1823,28 +1778,23 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Subprocessor": { SchemaName: "Subprocessor", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Subscriber": { SchemaName: "Subscriber", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "SystemDetail": { SchemaName: "SystemDetail", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TFASetting": { SchemaName: "TFASetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TagDefinition": { SchemaName: "TagDefinition", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Task": { SchemaName: "Task", @@ -1877,63 +1827,51 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Template": { SchemaName: "Template", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenter": { SchemaName: "TrustCenter", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterCompliance": { SchemaName: "TrustCenterCompliance", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterDoc": { SchemaName: "TrustCenterDoc", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterEntity": { SchemaName: "TrustCenterEntity", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterFAQ": { SchemaName: "TrustCenterFAQ", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterNDARequest": { SchemaName: "TrustCenterNDARequest", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterSetting": { SchemaName: "TrustCenterSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterSubprocessor": { SchemaName: "TrustCenterSubprocessor", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterWatermarkConfig": { SchemaName: "TrustCenterWatermarkConfig", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "User": { SchemaName: "User", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "UserSetting": { SchemaName: "UserSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "VendorRiskScore": { SchemaName: "VendorRiskScore", @@ -1950,8 +1888,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "VendorScoringConfig": { SchemaName: "VendorScoringConfig", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Vulnerability": { SchemaName: "Vulnerability", @@ -1968,8 +1905,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "WorkflowDefinition": { SchemaName: "WorkflowDefinition", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, } @@ -2000,7 +1936,7 @@ func (APITokenCSVInput) CSVInputWrapper() {} // APITokenCSVUpdateInput wraps UpdateAPITokenInput with CSV reference columns for bulk updates. type APITokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateAPITokenInput } @@ -2009,10 +1945,10 @@ func (APITokenCSVUpdateInput) CSVInputWrapper() {} // ActionPlanCSVInput wraps CreateActionPlanInput with CSV reference columns. type ActionPlanCSVInput struct { - Input generated.CreateActionPlanInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + Input generated.CreateActionPlanInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks ActionPlanCSVInput for CSV header preprocessing. @@ -2021,11 +1957,11 @@ func (ActionPlanCSVInput) CSVInputWrapper() {} // ActionPlanCSVUpdateInput wraps UpdateActionPlanInput with CSV reference columns for bulk updates. type ActionPlanCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateActionPlanInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + ID string `csv:"ID"` + Input generated.UpdateActionPlanInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks ActionPlanCSVUpdateInput for CSV header preprocessing. @@ -2033,7 +1969,7 @@ func (ActionPlanCSVUpdateInput) CSVInputWrapper() {} // AssessmentCSVInput wraps CreateAssessmentInput with CSV reference columns. type AssessmentCSVInput struct { - Input generated.CreateAssessmentInput + Input generated.CreateAssessmentInput AssessmentTemplateRef string `csv:"AssessmentTemplateRef"` } @@ -2043,8 +1979,8 @@ func (AssessmentCSVInput) CSVInputWrapper() {} // AssessmentCSVUpdateInput wraps UpdateAssessmentInput with CSV reference columns for bulk updates. type AssessmentCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateAssessmentInput + ID string `csv:"ID"` + Input generated.UpdateAssessmentInput AssessmentTemplateRef string `csv:"AssessmentTemplateRef"` } @@ -2053,9 +1989,9 @@ func (AssessmentCSVUpdateInput) CSVInputWrapper() {} // AssessmentResponseCSVInput wraps CreateAssessmentResponseInput with CSV reference columns. type AssessmentResponseCSVInput struct { - Input generated.CreateAssessmentResponseInput + Input generated.CreateAssessmentResponseInput AssessmentIdentityHolderEmail string `csv:"AssessmentIdentityHolderEmail"` - AssessmentResponseEntityName string `csv:"AssessmentResponseEntityName"` + AssessmentResponseEntityName string `csv:"AssessmentResponseEntityName"` } // CSVInputWrapper marks AssessmentResponseCSVInput for CSV header preprocessing. @@ -2063,10 +1999,10 @@ func (AssessmentResponseCSVInput) CSVInputWrapper() {} // AssetCSVInput wraps CreateAssetInput with CSV reference columns. type AssetCSVInput struct { - Input generated.CreateAssetInput + Input generated.CreateAssetInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - SourcePlatformName string `csv:"SourcePlatformName"` + SourcePlatformName string `csv:"SourcePlatformName"` } // CSVInputWrapper marks AssetCSVInput for CSV header preprocessing. @@ -2075,11 +2011,11 @@ func (AssetCSVInput) CSVInputWrapper() {} // AssetCSVUpdateInput wraps UpdateAssetInput with CSV reference columns for bulk updates. type AssetCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateAssetInput + ID string `csv:"ID"` + Input generated.UpdateAssetInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - SourcePlatformName string `csv:"SourcePlatformName"` + SourcePlatformName string `csv:"SourcePlatformName"` } // CSVInputWrapper marks AssetCSVUpdateInput for CSV header preprocessing. @@ -2087,9 +2023,9 @@ func (AssetCSVUpdateInput) CSVInputWrapper() {} // CampaignCSVInput wraps CreateCampaignInput with CSV reference columns. type CampaignCSVInput struct { - Input generated.CreateCampaignInput - CampaignEntityName string `csv:"CampaignEntityName"` - CampaignTemplateRef string `csv:"CampaignTemplateRef"` + Input generated.CreateCampaignInput + CampaignEntityName string `csv:"CampaignEntityName"` + CampaignTemplateRef string `csv:"CampaignTemplateRef"` InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } @@ -2100,10 +2036,10 @@ func (CampaignCSVInput) CSVInputWrapper() {} // CampaignCSVUpdateInput wraps UpdateCampaignInput with CSV reference columns for bulk updates. type CampaignCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateCampaignInput - CampaignEntityName string `csv:"CampaignEntityName"` - CampaignTemplateRef string `csv:"CampaignTemplateRef"` + ID string `csv:"ID"` + Input generated.UpdateCampaignInput + CampaignEntityName string `csv:"CampaignEntityName"` + CampaignTemplateRef string `csv:"CampaignTemplateRef"` InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } @@ -2113,7 +2049,7 @@ func (CampaignCSVUpdateInput) CSVInputWrapper() {} // CampaignTargetCSVInput wraps CreateCampaignTargetInput with CSV reference columns. type CampaignTargetCSVInput struct { - Input generated.CreateCampaignTargetInput + Input generated.CreateCampaignTargetInput CampaignTargetGroupName string `csv:"CampaignTargetGroupName"` CampaignTargetUserEmail string `csv:"CampaignTargetUserEmail"` } @@ -2124,8 +2060,8 @@ func (CampaignTargetCSVInput) CSVInputWrapper() {} // CampaignTargetCSVUpdateInput wraps UpdateCampaignTargetInput with CSV reference columns for bulk updates. type CampaignTargetCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateCampaignTargetInput + ID string `csv:"ID"` + Input generated.UpdateCampaignTargetInput CampaignTargetGroupName string `csv:"CampaignTargetGroupName"` CampaignTargetUserEmail string `csv:"CampaignTargetUserEmail"` } @@ -2144,7 +2080,7 @@ func (ContactCSVInput) CSVInputWrapper() {} // ContactCSVUpdateInput wraps UpdateContactInput with CSV reference columns for bulk updates. type ContactCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateContactInput } @@ -2153,15 +2089,15 @@ func (ContactCSVUpdateInput) CSVInputWrapper() {} // ControlCSVInput wraps CreateControlInput with CSV reference columns. type ControlCSVInput struct { - Input generated.CreateControlInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + Input generated.CreateControlInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks ControlCSVInput for CSV header preprocessing. @@ -2170,16 +2106,16 @@ func (ControlCSVInput) CSVInputWrapper() {} // ControlCSVUpdateInput wraps UpdateControlInput with CSV reference columns for bulk updates. type ControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateControlInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + ID string `csv:"ID"` + Input generated.UpdateControlInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks ControlCSVUpdateInput for CSV header preprocessing. @@ -2196,7 +2132,7 @@ func (ControlImplementationCSVInput) CSVInputWrapper() {} // ControlImplementationCSVUpdateInput wraps UpdateControlImplementationInput with CSV reference columns for bulk updates. type ControlImplementationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateControlImplementationInput } @@ -2214,7 +2150,7 @@ func (ControlObjectiveCSVInput) CSVInputWrapper() {} // ControlObjectiveCSVUpdateInput wraps UpdateControlObjectiveInput with CSV reference columns for bulk updates. type ControlObjectiveCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateControlObjectiveInput } @@ -2232,7 +2168,7 @@ func (CustomDomainCSVInput) CSVInputWrapper() {} // CustomDomainCSVUpdateInput wraps UpdateCustomDomainInput with CSV reference columns for bulk updates. type CustomDomainCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateCustomDomainInput } @@ -2250,7 +2186,7 @@ func (CustomTypeEnumCSVInput) CSVInputWrapper() {} // CustomTypeEnumCSVUpdateInput wraps UpdateCustomTypeEnumInput with CSV reference columns for bulk updates. type CustomTypeEnumCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateCustomTypeEnumInput } @@ -2268,7 +2204,7 @@ func (DNSVerificationCSVInput) CSVInputWrapper() {} // DNSVerificationCSVUpdateInput wraps UpdateDNSVerificationInput with CSV reference columns for bulk updates. type DNSVerificationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDNSVerificationInput } @@ -2277,7 +2213,7 @@ func (DNSVerificationCSVUpdateInput) CSVInputWrapper() {} // DirectoryAccountCSVInput wraps CreateDirectoryAccountInput with CSV reference columns. type DirectoryAccountCSVInput struct { - Input generated.CreateDirectoryAccountInput + Input generated.CreateDirectoryAccountInput DirectoryAccountIdentityHolderEmail string `csv:"DirectoryAccountIdentityHolderEmail"` } @@ -2287,8 +2223,8 @@ func (DirectoryAccountCSVInput) CSVInputWrapper() {} // DirectoryAccountCSVUpdateInput wraps UpdateDirectoryAccountInput with CSV reference columns for bulk updates. type DirectoryAccountCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateDirectoryAccountInput + ID string `csv:"ID"` + Input generated.UpdateDirectoryAccountInput DirectoryAccountIdentityHolderEmail string `csv:"DirectoryAccountIdentityHolderEmail"` } @@ -2306,7 +2242,7 @@ func (DirectoryGroupCSVInput) CSVInputWrapper() {} // DirectoryGroupCSVUpdateInput wraps UpdateDirectoryGroupInput with CSV reference columns for bulk updates. type DirectoryGroupCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectoryGroupInput } @@ -2324,7 +2260,7 @@ func (DirectoryMembershipCSVInput) CSVInputWrapper() {} // DirectoryMembershipCSVUpdateInput wraps UpdateDirectoryMembershipInput with CSV reference columns for bulk updates. type DirectoryMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectoryMembershipInput } @@ -2342,7 +2278,7 @@ func (DirectorySyncRunCSVInput) CSVInputWrapper() {} // DirectorySyncRunCSVUpdateInput wraps UpdateDirectorySyncRunInput with CSV reference columns for bulk updates. type DirectorySyncRunCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectorySyncRunInput } @@ -2360,7 +2296,7 @@ func (DiscussionCSVInput) CSVInputWrapper() {} // DiscussionCSVUpdateInput wraps UpdateDiscussionInput with CSV reference columns for bulk updates. type DiscussionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDiscussionInput } @@ -2378,7 +2314,7 @@ func (DocumentDataCSVInput) CSVInputWrapper() {} // DocumentDataCSVUpdateInput wraps UpdateDocumentDataInput with CSV reference columns for bulk updates. type DocumentDataCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDocumentDataInput } @@ -2396,7 +2332,7 @@ func (EmailBrandingCSVInput) CSVInputWrapper() {} // EmailBrandingCSVUpdateInput wraps UpdateEmailBrandingInput with CSV reference columns for bulk updates. type EmailBrandingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEmailBrandingInput } @@ -2414,7 +2350,7 @@ func (EmailTemplateCSVInput) CSVInputWrapper() {} // EmailTemplateCSVUpdateInput wraps UpdateEmailTemplateInput with CSV reference columns for bulk updates. type EmailTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEmailTemplateInput } @@ -2423,11 +2359,11 @@ func (EmailTemplateCSVUpdateInput) CSVInputWrapper() {} // EntityCSVInput wraps CreateEntityInput with CSV reference columns. type EntityCSVInput struct { - Input generated.CreateEntityInput + Input generated.CreateEntityInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks EntityCSVInput for CSV header preprocessing. @@ -2436,12 +2372,12 @@ func (EntityCSVInput) CSVInputWrapper() {} // EntityCSVUpdateInput wraps UpdateEntityInput with CSV reference columns for bulk updates. type EntityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateEntityInput + ID string `csv:"ID"` + Input generated.UpdateEntityInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks EntityCSVUpdateInput for CSV header preprocessing. @@ -2458,7 +2394,7 @@ func (EntityTypeCSVInput) CSVInputWrapper() {} // EntityTypeCSVUpdateInput wraps UpdateEntityTypeInput with CSV reference columns for bulk updates. type EntityTypeCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEntityTypeInput } @@ -2476,7 +2412,7 @@ func (EventCSVInput) CSVInputWrapper() {} // EventCSVUpdateInput wraps UpdateEventInput with CSV reference columns for bulk updates. type EventCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEventInput } @@ -2485,7 +2421,7 @@ func (EventCSVUpdateInput) CSVInputWrapper() {} // EvidenceCSVInput wraps CreateEvidenceInput with CSV reference columns. type EvidenceCSVInput struct { - Input generated.CreateEvidenceInput + Input generated.CreateEvidenceInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -2495,8 +2431,8 @@ func (EvidenceCSVInput) CSVInputWrapper() {} // EvidenceCSVUpdateInput wraps UpdateEvidenceInput with CSV reference columns for bulk updates. type EvidenceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateEvidenceInput + ID string `csv:"ID"` + Input generated.UpdateEvidenceInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -2514,7 +2450,7 @@ func (ExportCSVInput) CSVInputWrapper() {} // ExportCSVUpdateInput wraps UpdateExportInput with CSV reference columns for bulk updates. type ExportCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateExportInput } @@ -2532,7 +2468,7 @@ func (FileCSVInput) CSVInputWrapper() {} // FileCSVUpdateInput wraps UpdateFileInput with CSV reference columns for bulk updates. type FileCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFileInput } @@ -2550,7 +2486,7 @@ func (FindingCSVInput) CSVInputWrapper() {} // FindingCSVUpdateInput wraps UpdateFindingInput with CSV reference columns for bulk updates. type FindingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFindingInput } @@ -2568,7 +2504,7 @@ func (FindingControlCSVInput) CSVInputWrapper() {} // FindingControlCSVUpdateInput wraps UpdateFindingControlInput with CSV reference columns for bulk updates. type FindingControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFindingControlInput } @@ -2586,7 +2522,7 @@ func (GroupCSVInput) CSVInputWrapper() {} // GroupCSVUpdateInput wraps UpdateGroupInput with CSV reference columns for bulk updates. type GroupCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupInput } @@ -2604,7 +2540,7 @@ func (GroupMembershipCSVInput) CSVInputWrapper() {} // GroupMembershipCSVUpdateInput wraps UpdateGroupMembershipInput with CSV reference columns for bulk updates. type GroupMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupMembershipInput } @@ -2622,7 +2558,7 @@ func (GroupSettingCSVInput) CSVInputWrapper() {} // GroupSettingCSVUpdateInput wraps UpdateGroupSettingInput with CSV reference columns for bulk updates. type GroupSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupSettingInput } @@ -2640,7 +2576,7 @@ func (HushCSVInput) CSVInputWrapper() {} // HushCSVUpdateInput wraps UpdateHushInput with CSV reference columns for bulk updates. type HushCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateHushInput } @@ -2649,11 +2585,11 @@ func (HushCSVUpdateInput) CSVInputWrapper() {} // IdentityHolderCSVInput wraps CreateIdentityHolderInput with CSV reference columns. type IdentityHolderCSVInput struct { - Input generated.CreateIdentityHolderInput - EmployerEntityName string `csv:"EmployerEntityName"` + Input generated.CreateIdentityHolderInput + EmployerEntityName string `csv:"EmployerEntityName"` IdentityHolderUserEmail string `csv:"IdentityHolderUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } // CSVInputWrapper marks IdentityHolderCSVInput for CSV header preprocessing. @@ -2662,12 +2598,12 @@ func (IdentityHolderCSVInput) CSVInputWrapper() {} // IdentityHolderCSVUpdateInput wraps UpdateIdentityHolderInput with CSV reference columns for bulk updates. type IdentityHolderCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateIdentityHolderInput - EmployerEntityName string `csv:"EmployerEntityName"` + ID string `csv:"ID"` + Input generated.UpdateIdentityHolderInput + EmployerEntityName string `csv:"EmployerEntityName"` IdentityHolderUserEmail string `csv:"IdentityHolderUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } // CSVInputWrapper marks IdentityHolderCSVUpdateInput for CSV header preprocessing. @@ -2675,10 +2611,10 @@ func (IdentityHolderCSVUpdateInput) CSVInputWrapper() {} // InternalPolicyCSVInput wraps CreateInternalPolicyInput with CSV reference columns. type InternalPolicyCSVInput struct { - Input generated.CreateInternalPolicyInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + Input generated.CreateInternalPolicyInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks InternalPolicyCSVInput for CSV header preprocessing. @@ -2687,11 +2623,11 @@ func (InternalPolicyCSVInput) CSVInputWrapper() {} // InternalPolicyCSVUpdateInput wraps UpdateInternalPolicyInput with CSV reference columns for bulk updates. type InternalPolicyCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateInternalPolicyInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + ID string `csv:"ID"` + Input generated.UpdateInternalPolicyInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks InternalPolicyCSVUpdateInput for CSV header preprocessing. @@ -2708,7 +2644,7 @@ func (InviteCSVInput) CSVInputWrapper() {} // InviteCSVUpdateInput wraps UpdateInviteInput with CSV reference columns for bulk updates. type InviteCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateInviteInput } @@ -2726,7 +2662,7 @@ func (JobResultCSVInput) CSVInputWrapper() {} // JobResultCSVUpdateInput wraps UpdateJobResultInput with CSV reference columns for bulk updates. type JobResultCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobResultInput } @@ -2744,7 +2680,7 @@ func (JobRunnerCSVInput) CSVInputWrapper() {} // JobRunnerCSVUpdateInput wraps UpdateJobRunnerInput with CSV reference columns for bulk updates. type JobRunnerCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerInput } @@ -2762,7 +2698,7 @@ func (JobRunnerRegistrationTokenCSVInput) CSVInputWrapper() {} // JobRunnerRegistrationTokenCSVUpdateInput wraps UpdateJobRunnerRegistrationTokenInput with CSV reference columns for bulk updates. type JobRunnerRegistrationTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerRegistrationTokenInput } @@ -2780,7 +2716,7 @@ func (JobRunnerTokenCSVInput) CSVInputWrapper() {} // JobRunnerTokenCSVUpdateInput wraps UpdateJobRunnerTokenInput with CSV reference columns for bulk updates. type JobRunnerTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerTokenInput } @@ -2798,7 +2734,7 @@ func (JobTemplateCSVInput) CSVInputWrapper() {} // JobTemplateCSVUpdateInput wraps UpdateJobTemplateInput with CSV reference columns for bulk updates. type JobTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobTemplateInput } @@ -2816,7 +2752,7 @@ func (MappableDomainCSVInput) CSVInputWrapper() {} // MappableDomainCSVUpdateInput wraps UpdateMappableDomainInput with CSV reference columns for bulk updates. type MappableDomainCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateMappableDomainInput } @@ -2834,7 +2770,7 @@ func (MappedControlCSVInput) CSVInputWrapper() {} // MappedControlCSVUpdateInput wraps UpdateMappedControlInput with CSV reference columns for bulk updates. type MappedControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateMappedControlInput } @@ -2852,7 +2788,7 @@ func (NarrativeCSVInput) CSVInputWrapper() {} // NarrativeCSVUpdateInput wraps UpdateNarrativeInput with CSV reference columns for bulk updates. type NarrativeCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNarrativeInput } @@ -2870,7 +2806,7 @@ func (NotificationCSVInput) CSVInputWrapper() {} // NotificationCSVUpdateInput wraps UpdateNotificationInput with CSV reference columns for bulk updates. type NotificationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationInput } @@ -2888,7 +2824,7 @@ func (NotificationPreferenceCSVInput) CSVInputWrapper() {} // NotificationPreferenceCSVUpdateInput wraps UpdateNotificationPreferenceInput with CSV reference columns for bulk updates. type NotificationPreferenceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationPreferenceInput } @@ -2906,7 +2842,7 @@ func (NotificationTemplateCSVInput) CSVInputWrapper() {} // NotificationTemplateCSVUpdateInput wraps UpdateNotificationTemplateInput with CSV reference columns for bulk updates. type NotificationTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationTemplateInput } @@ -2932,7 +2868,7 @@ func (OrgMembershipCSVInput) CSVInputWrapper() {} // OrgMembershipCSVUpdateInput wraps UpdateOrgMembershipInput with CSV reference columns for bulk updates. type OrgMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrgMembershipInput } @@ -2950,7 +2886,7 @@ func (OrganizationCSVInput) CSVInputWrapper() {} // OrganizationCSVUpdateInput wraps UpdateOrganizationInput with CSV reference columns for bulk updates. type OrganizationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrganizationInput } @@ -2968,7 +2904,7 @@ func (OrganizationSettingCSVInput) CSVInputWrapper() {} // OrganizationSettingCSVUpdateInput wraps UpdateOrganizationSettingInput with CSV reference columns for bulk updates. type OrganizationSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrganizationSettingInput } @@ -2986,7 +2922,7 @@ func (PersonalAccessTokenCSVInput) CSVInputWrapper() {} // PersonalAccessTokenCSVUpdateInput wraps UpdatePersonalAccessTokenInput with CSV reference columns for bulk updates. type PersonalAccessTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdatePersonalAccessTokenInput } @@ -2995,21 +2931,21 @@ func (PersonalAccessTokenCSVUpdateInput) CSVInputWrapper() {} // PlatformCSVInput wraps CreatePlatformInput with CSV reference columns. type PlatformCSVInput struct { - Input generated.CreatePlatformInput - BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` - BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` - OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` - PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` - SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` - SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` - SourceAssetNames []string `csv:"SourceAssetNames"` - SourceEntityNames []string `csv:"SourceEntityNames"` - SystemDetailNames []string `csv:"SystemDetailNames"` - TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` - TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` + Input generated.CreatePlatformInput + BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` + BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` + OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` + PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` + SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` + SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` + SourceAssetNames []string `csv:"SourceAssetNames"` + SourceEntityNames []string `csv:"SourceEntityNames"` + SystemDetailNames []string `csv:"SystemDetailNames"` + TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` + TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` } // CSVInputWrapper marks PlatformCSVInput for CSV header preprocessing. @@ -3018,22 +2954,22 @@ func (PlatformCSVInput) CSVInputWrapper() {} // PlatformCSVUpdateInput wraps UpdatePlatformInput with CSV reference columns for bulk updates. type PlatformCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdatePlatformInput - BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` - BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` - OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` - PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` - SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` - SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` - SourceAssetNames []string `csv:"SourceAssetNames"` - SourceEntityNames []string `csv:"SourceEntityNames"` - SystemDetailNames []string `csv:"SystemDetailNames"` - TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` - TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` + ID string `csv:"ID"` + Input generated.UpdatePlatformInput + BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` + BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` + OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` + PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` + SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` + SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` + SourceAssetNames []string `csv:"SourceAssetNames"` + SourceEntityNames []string `csv:"SourceEntityNames"` + SystemDetailNames []string `csv:"SystemDetailNames"` + TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` + TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` } // CSVInputWrapper marks PlatformCSVUpdateInput for CSV header preprocessing. @@ -3041,8 +2977,8 @@ func (PlatformCSVUpdateInput) CSVInputWrapper() {} // ProcedureCSVInput wraps CreateProcedureInput with CSV reference columns. type ProcedureCSVInput struct { - Input generated.CreateProcedureInput - ApproverGroupName string `csv:"ApproverGroupName"` + Input generated.CreateProcedureInput + ApproverGroupName string `csv:"ApproverGroupName"` DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } @@ -3052,9 +2988,9 @@ func (ProcedureCSVInput) CSVInputWrapper() {} // ProcedureCSVUpdateInput wraps UpdateProcedureInput with CSV reference columns for bulk updates. type ProcedureCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateProcedureInput - ApproverGroupName string `csv:"ApproverGroupName"` + ID string `csv:"ID"` + Input generated.UpdateProcedureInput + ApproverGroupName string `csv:"ApproverGroupName"` DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } @@ -3063,9 +2999,9 @@ func (ProcedureCSVUpdateInput) CSVInputWrapper() {} // ProgramCSVInput wraps CreateProgramInput with CSV reference columns. type ProgramCSVInput struct { - Input generated.CreateProgramInput - ControlRefCodes []string `csv:"ControlRefCodes"` - ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` + Input generated.CreateProgramInput + ControlRefCodes []string `csv:"ControlRefCodes"` + ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` } // CSVInputWrapper marks ProgramCSVInput for CSV header preprocessing. @@ -3074,10 +3010,10 @@ func (ProgramCSVInput) CSVInputWrapper() {} // ProgramCSVUpdateInput wraps UpdateProgramInput with CSV reference columns for bulk updates. type ProgramCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateProgramInput - ControlRefCodes []string `csv:"ControlRefCodes"` - ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` + ID string `csv:"ID"` + Input generated.UpdateProgramInput + ControlRefCodes []string `csv:"ControlRefCodes"` + ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` } // CSVInputWrapper marks ProgramCSVUpdateInput for CSV header preprocessing. @@ -3094,7 +3030,7 @@ func (ProgramMembershipCSVInput) CSVInputWrapper() {} // ProgramMembershipCSVUpdateInput wraps UpdateProgramMembershipInput with CSV reference columns for bulk updates. type ProgramMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateProgramMembershipInput } @@ -3103,8 +3039,8 @@ func (ProgramMembershipCSVUpdateInput) CSVInputWrapper() {} // RemediationCSVInput wraps CreateRemediationInput with CSV reference columns. type RemediationCSVInput struct { - Input generated.CreateRemediationInput - ControlRefCodes []string `csv:"ControlRefCodes"` + Input generated.CreateRemediationInput + ControlRefCodes []string `csv:"ControlRefCodes"` SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } @@ -3114,9 +3050,9 @@ func (RemediationCSVInput) CSVInputWrapper() {} // RemediationCSVUpdateInput wraps UpdateRemediationInput with CSV reference columns for bulk updates. type RemediationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateRemediationInput - ControlRefCodes []string `csv:"ControlRefCodes"` + ID string `csv:"ID"` + Input generated.UpdateRemediationInput + ControlRefCodes []string `csv:"ControlRefCodes"` SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } @@ -3125,7 +3061,7 @@ func (RemediationCSVUpdateInput) CSVInputWrapper() {} // ReviewCSVInput wraps CreateReviewInput with CSV reference columns. type ReviewCSVInput struct { - Input generated.CreateReviewInput + Input generated.CreateReviewInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3135,8 +3071,8 @@ func (ReviewCSVInput) CSVInputWrapper() {} // ReviewCSVUpdateInput wraps UpdateReviewInput with CSV reference columns for bulk updates. type ReviewCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateReviewInput + ID string `csv:"ID"` + Input generated.UpdateReviewInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3145,15 +3081,15 @@ func (ReviewCSVUpdateInput) CSVInputWrapper() {} // RiskCSVInput wraps CreateRiskInput with CSV reference columns. type RiskCSVInput struct { - Input generated.CreateRiskInput - ActionPlanNames []string `csv:"ActionPlanNames"` - AssetNames []string `csv:"AssetNames"` - ControlRefCodes []string `csv:"ControlRefCodes"` - EntityNames []string `csv:"EntityNames"` - PlatformNames []string `csv:"PlatformNames"` - RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` - StakeholderGroupName string `csv:"StakeholderGroupName"` - SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` + Input generated.CreateRiskInput + ActionPlanNames []string `csv:"ActionPlanNames"` + AssetNames []string `csv:"AssetNames"` + ControlRefCodes []string `csv:"ControlRefCodes"` + EntityNames []string `csv:"EntityNames"` + PlatformNames []string `csv:"PlatformNames"` + RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` + StakeholderGroupName string `csv:"StakeholderGroupName"` + SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } // CSVInputWrapper marks RiskCSVInput for CSV header preprocessing. @@ -3162,16 +3098,16 @@ func (RiskCSVInput) CSVInputWrapper() {} // RiskCSVUpdateInput wraps UpdateRiskInput with CSV reference columns for bulk updates. type RiskCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateRiskInput - ActionPlanNames []string `csv:"ActionPlanNames"` - AssetNames []string `csv:"AssetNames"` - ControlRefCodes []string `csv:"ControlRefCodes"` - EntityNames []string `csv:"EntityNames"` - PlatformNames []string `csv:"PlatformNames"` - RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` - StakeholderGroupName string `csv:"StakeholderGroupName"` - SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` + ID string `csv:"ID"` + Input generated.UpdateRiskInput + ActionPlanNames []string `csv:"ActionPlanNames"` + AssetNames []string `csv:"AssetNames"` + ControlRefCodes []string `csv:"ControlRefCodes"` + EntityNames []string `csv:"EntityNames"` + PlatformNames []string `csv:"PlatformNames"` + RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` + StakeholderGroupName string `csv:"StakeholderGroupName"` + SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } // CSVInputWrapper marks RiskCSVUpdateInput for CSV header preprocessing. @@ -3188,7 +3124,7 @@ func (SLADefinitionCSVInput) CSVInputWrapper() {} // SLADefinitionCSVUpdateInput wraps UpdateSLADefinitionInput with CSV reference columns for bulk updates. type SLADefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSLADefinitionInput } @@ -3197,14 +3133,14 @@ func (SLADefinitionCSVUpdateInput) CSVInputWrapper() {} // ScanCSVInput wraps CreateScanInput with CSV reference columns. type ScanCSVInput struct { - Input generated.CreateScanInput - AssignedToGroupName string `csv:"AssignedToGroupName"` - AssignedToUserEmail string `csv:"AssignedToUserEmail"` + Input generated.CreateScanInput + AssignedToGroupName string `csv:"AssignedToGroupName"` + AssignedToUserEmail string `csv:"AssignedToUserEmail"` GeneratedByPlatformName string `csv:"GeneratedByPlatformName"` - PerformedByGroupName string `csv:"PerformedByGroupName"` - PerformedByUserEmail string `csv:"PerformedByUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + PerformedByGroupName string `csv:"PerformedByGroupName"` + PerformedByUserEmail string `csv:"PerformedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks ScanCSVInput for CSV header preprocessing. @@ -3213,15 +3149,15 @@ func (ScanCSVInput) CSVInputWrapper() {} // ScanCSVUpdateInput wraps UpdateScanInput with CSV reference columns for bulk updates. type ScanCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateScanInput - AssignedToGroupName string `csv:"AssignedToGroupName"` - AssignedToUserEmail string `csv:"AssignedToUserEmail"` + ID string `csv:"ID"` + Input generated.UpdateScanInput + AssignedToGroupName string `csv:"AssignedToGroupName"` + AssignedToUserEmail string `csv:"AssignedToUserEmail"` GeneratedByPlatformName string `csv:"GeneratedByPlatformName"` - PerformedByGroupName string `csv:"PerformedByGroupName"` - PerformedByUserEmail string `csv:"PerformedByUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + PerformedByGroupName string `csv:"PerformedByGroupName"` + PerformedByUserEmail string `csv:"PerformedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks ScanCSVUpdateInput for CSV header preprocessing. @@ -3229,7 +3165,7 @@ func (ScanCSVUpdateInput) CSVInputWrapper() {} // ScheduledJobCSVInput wraps CreateScheduledJobInput with CSV reference columns. type ScheduledJobCSVInput struct { - Input generated.CreateScheduledJobInput + Input generated.CreateScheduledJobInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3239,8 +3175,8 @@ func (ScheduledJobCSVInput) CSVInputWrapper() {} // ScheduledJobCSVUpdateInput wraps UpdateScheduledJobInput with CSV reference columns for bulk updates. type ScheduledJobCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateScheduledJobInput + ID string `csv:"ID"` + Input generated.UpdateScheduledJobInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3258,7 +3194,7 @@ func (ScheduledJobRunCSVInput) CSVInputWrapper() {} // ScheduledJobRunCSVUpdateInput wraps UpdateScheduledJobRunInput with CSV reference columns for bulk updates. type ScheduledJobRunCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateScheduledJobRunInput } @@ -3276,7 +3212,7 @@ func (StandardCSVInput) CSVInputWrapper() {} // StandardCSVUpdateInput wraps UpdateStandardInput with CSV reference columns for bulk updates. type StandardCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateStandardInput } @@ -3285,15 +3221,15 @@ func (StandardCSVUpdateInput) CSVInputWrapper() {} // SubcontrolCSVInput wraps CreateSubcontrolInput with CSV reference columns. type SubcontrolCSVInput struct { - Input generated.CreateSubcontrolInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + Input generated.CreateSubcontrolInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks SubcontrolCSVInput for CSV header preprocessing. @@ -3302,16 +3238,16 @@ func (SubcontrolCSVInput) CSVInputWrapper() {} // SubcontrolCSVUpdateInput wraps UpdateSubcontrolInput with CSV reference columns for bulk updates. type SubcontrolCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateSubcontrolInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + ID string `csv:"ID"` + Input generated.UpdateSubcontrolInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks SubcontrolCSVUpdateInput for CSV header preprocessing. @@ -3328,7 +3264,7 @@ func (SubprocessorCSVInput) CSVInputWrapper() {} // SubprocessorCSVUpdateInput wraps UpdateSubprocessorInput with CSV reference columns for bulk updates. type SubprocessorCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSubprocessorInput } @@ -3346,7 +3282,7 @@ func (SubscriberCSVInput) CSVInputWrapper() {} // SubscriberCSVUpdateInput wraps UpdateSubscriberInput with CSV reference columns for bulk updates. type SubscriberCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSubscriberInput } @@ -3364,7 +3300,7 @@ func (SystemDetailCSVInput) CSVInputWrapper() {} // SystemDetailCSVUpdateInput wraps UpdateSystemDetailInput with CSV reference columns for bulk updates. type SystemDetailCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSystemDetailInput } @@ -3382,7 +3318,7 @@ func (TFASettingCSVInput) CSVInputWrapper() {} // TFASettingCSVUpdateInput wraps UpdateTFASettingInput with CSV reference columns for bulk updates. type TFASettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTFASettingInput } @@ -3400,7 +3336,7 @@ func (TagDefinitionCSVInput) CSVInputWrapper() {} // TagDefinitionCSVUpdateInput wraps UpdateTagDefinitionInput with CSV reference columns for bulk updates. type TagDefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTagDefinitionInput } @@ -3409,9 +3345,9 @@ func (TagDefinitionCSVUpdateInput) CSVInputWrapper() {} // TaskCSVInput wraps CreateTaskInput with CSV reference columns. type TaskCSVInput struct { - Input generated.CreateTaskInput - AssigneeEmail string `csv:"AssigneeEmail"` - AssignerEmail string `csv:"AssignerEmail"` + Input generated.CreateTaskInput + AssigneeEmail string `csv:"AssigneeEmail"` + AssignerEmail string `csv:"AssignerEmail"` ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3421,10 +3357,10 @@ func (TaskCSVInput) CSVInputWrapper() {} // TaskCSVUpdateInput wraps UpdateTaskInput with CSV reference columns for bulk updates. type TaskCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateTaskInput - AssigneeEmail string `csv:"AssigneeEmail"` - AssignerEmail string `csv:"AssignerEmail"` + ID string `csv:"ID"` + Input generated.UpdateTaskInput + AssigneeEmail string `csv:"AssigneeEmail"` + AssignerEmail string `csv:"AssignerEmail"` ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3442,7 +3378,7 @@ func (TemplateCSVInput) CSVInputWrapper() {} // TemplateCSVUpdateInput wraps UpdateTemplateInput with CSV reference columns for bulk updates. type TemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTemplateInput } @@ -3460,7 +3396,7 @@ func (TrustCenterCSVInput) CSVInputWrapper() {} // TrustCenterCSVUpdateInput wraps UpdateTrustCenterInput with CSV reference columns for bulk updates. type TrustCenterCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterInput } @@ -3478,7 +3414,7 @@ func (TrustCenterComplianceCSVInput) CSVInputWrapper() {} // TrustCenterComplianceCSVUpdateInput wraps UpdateTrustCenterComplianceInput with CSV reference columns for bulk updates. type TrustCenterComplianceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterComplianceInput } @@ -3496,7 +3432,7 @@ func (TrustCenterDocCSVInput) CSVInputWrapper() {} // TrustCenterDocCSVUpdateInput wraps UpdateTrustCenterDocInput with CSV reference columns for bulk updates. type TrustCenterDocCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterDocInput } @@ -3514,7 +3450,7 @@ func (TrustCenterEntityCSVInput) CSVInputWrapper() {} // TrustCenterEntityCSVUpdateInput wraps UpdateTrustCenterEntityInput with CSV reference columns for bulk updates. type TrustCenterEntityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterEntityInput } @@ -3532,7 +3468,7 @@ func (TrustCenterFAQCSVInput) CSVInputWrapper() {} // TrustCenterFAQCSVUpdateInput wraps UpdateTrustCenterFAQInput with CSV reference columns for bulk updates. type TrustCenterFAQCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterFAQInput } @@ -3550,7 +3486,7 @@ func (TrustCenterNDARequestCSVInput) CSVInputWrapper() {} // TrustCenterNDARequestCSVUpdateInput wraps UpdateTrustCenterNDARequestInput with CSV reference columns for bulk updates. type TrustCenterNDARequestCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterNDARequestInput } @@ -3568,7 +3504,7 @@ func (TrustCenterSettingCSVInput) CSVInputWrapper() {} // TrustCenterSettingCSVUpdateInput wraps UpdateTrustCenterSettingInput with CSV reference columns for bulk updates. type TrustCenterSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterSettingInput } @@ -3586,7 +3522,7 @@ func (TrustCenterSubprocessorCSVInput) CSVInputWrapper() {} // TrustCenterSubprocessorCSVUpdateInput wraps UpdateTrustCenterSubprocessorInput with CSV reference columns for bulk updates. type TrustCenterSubprocessorCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterSubprocessorInput } @@ -3604,7 +3540,7 @@ func (TrustCenterWatermarkConfigCSVInput) CSVInputWrapper() {} // TrustCenterWatermarkConfigCSVUpdateInput wraps UpdateTrustCenterWatermarkConfigInput with CSV reference columns for bulk updates. type TrustCenterWatermarkConfigCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterWatermarkConfigInput } @@ -3622,7 +3558,7 @@ func (UserCSVInput) CSVInputWrapper() {} // UserCSVUpdateInput wraps UpdateUserInput with CSV reference columns for bulk updates. type UserCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateUserInput } @@ -3640,7 +3576,7 @@ func (UserSettingCSVInput) CSVInputWrapper() {} // UserSettingCSVUpdateInput wraps UpdateUserSettingInput with CSV reference columns for bulk updates. type UserSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateUserSettingInput } @@ -3649,7 +3585,7 @@ func (UserSettingCSVUpdateInput) CSVInputWrapper() {} // VendorRiskScoreCSVInput wraps CreateVendorRiskScoreInput with CSV reference columns. type VendorRiskScoreCSVInput struct { - Input generated.CreateVendorRiskScoreInput + Input generated.CreateVendorRiskScoreInput VendorRiskScoreEntityName string `csv:"VendorRiskScoreEntityName"` } @@ -3659,8 +3595,8 @@ func (VendorRiskScoreCSVInput) CSVInputWrapper() {} // VendorRiskScoreCSVUpdateInput wraps UpdateVendorRiskScoreInput with CSV reference columns for bulk updates. type VendorRiskScoreCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateVendorRiskScoreInput + ID string `csv:"ID"` + Input generated.UpdateVendorRiskScoreInput VendorRiskScoreEntityName string `csv:"VendorRiskScoreEntityName"` } @@ -3678,7 +3614,7 @@ func (VendorScoringConfigCSVInput) CSVInputWrapper() {} // VendorScoringConfigCSVUpdateInput wraps UpdateVendorScoringConfigInput with CSV reference columns for bulk updates. type VendorScoringConfigCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateVendorScoringConfigInput } @@ -3687,7 +3623,7 @@ func (VendorScoringConfigCSVUpdateInput) CSVInputWrapper() {} // VulnerabilityCSVInput wraps CreateVulnerabilityInput with CSV reference columns. type VulnerabilityCSVInput struct { - Input generated.CreateVulnerabilityInput + Input generated.CreateVulnerabilityInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3697,8 +3633,8 @@ func (VulnerabilityCSVInput) CSVInputWrapper() {} // VulnerabilityCSVUpdateInput wraps UpdateVulnerabilityInput with CSV reference columns for bulk updates. type VulnerabilityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateVulnerabilityInput + ID string `csv:"ID"` + Input generated.UpdateVulnerabilityInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3716,7 +3652,7 @@ func (WorkflowDefinitionCSVInput) CSVInputWrapper() {} // WorkflowDefinitionCSVUpdateInput wraps UpdateWorkflowDefinitionInput with CSV reference columns for bulk updates. type WorkflowDefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateWorkflowDefinitionInput } diff --git a/internal/ent/integrationgenerated/integration_mapping_generated.go b/internal/ent/integrationgenerated/integration_mapping_generated.go index fc7f05d402..c16f997a54 100644 --- a/internal/ent/integrationgenerated/integration_mapping_generated.go +++ b/internal/ent/integrationgenerated/integration_mapping_generated.go @@ -6,25 +6,24 @@ import ( "github.com/theopenlane/core/pkg/gala" ) - // IntegrationMappingField describes an integration mapping target field type IntegrationMappingField struct { - InputKey string - GoField string - EntField string - Type string - Required bool + InputKey string + GoField string + EntField string + Type string + Required bool UpsertKey bool LookupKey bool } // IntegrationMappingSchema describes a schema with integration mapping fields type IntegrationMappingSchema struct { - Name string - Fields []IntegrationMappingField - AllowedKeys map[string]struct{} + Name string + Fields []IntegrationMappingField + AllowedKeys map[string]struct{} RequiredKeys []string - UpsertKeys []string + UpsertKeys []string StockPersist bool } @@ -33,45 +32,45 @@ type IntegrationIngestSource string const ( IntegrationIngestSourceOperation IntegrationIngestSource = "operation" - IntegrationIngestSourceWorkflow IntegrationIngestSource = "workflow" - IntegrationIngestSourceWebhook IntegrationIngestSource = "webhook" - IntegrationIngestSourceDirect IntegrationIngestSource = "direct" + IntegrationIngestSourceWorkflow IntegrationIngestSource = "workflow" + IntegrationIngestSourceWebhook IntegrationIngestSource = "webhook" + IntegrationIngestSourceDirect IntegrationIngestSource = "direct" ) // IntegrationIngestMetadata captures source-agnostic execution context for second-stage ingest handlers type IntegrationIngestMetadata struct { - IntegrationID string `json:"integrationId"` - DefinitionID string `json:"definitionId,omitempty"` - Operation string `json:"operation,omitempty"` - Variant string `json:"variant,omitempty"` - Source IntegrationIngestSource `json:"source,omitempty"` - RunID string `json:"runId,omitempty"` - Webhook string `json:"webhook,omitempty"` - WebhookEvent string `json:"webhookEvent,omitempty"` - DeliveryID string `json:"deliveryId,omitempty"` - WorkflowInstanceID string `json:"workflowInstanceId,omitempty"` - WorkflowActionKey string `json:"workflowActionKey,omitempty"` - WorkflowActionIndex int `json:"workflowActionIndex,omitempty"` - WorkflowObjectID string `json:"workflowObjectId,omitempty"` - WorkflowObjectType string `json:"workflowObjectType,omitempty"` + IntegrationID string `json:"integrationId"` + DefinitionID string `json:"definitionId,omitempty"` + Operation string `json:"operation,omitempty"` + Variant string `json:"variant,omitempty"` + Source IntegrationIngestSource `json:"source,omitempty"` + RunID string `json:"runId,omitempty"` + Webhook string `json:"webhook,omitempty"` + WebhookEvent string `json:"webhookEvent,omitempty"` + DeliveryID string `json:"deliveryId,omitempty"` + WorkflowInstanceID string `json:"workflowInstanceId,omitempty"` + WorkflowActionKey string `json:"workflowActionKey,omitempty"` + WorkflowActionIndex int `json:"workflowActionIndex,omitempty"` + WorkflowObjectID string `json:"workflowObjectId,omitempty"` + WorkflowObjectType string `json:"workflowObjectType,omitempty"` } const ( - IntegrationMappingSchemaAsset = "Asset" - IntegrationMappingSchemaContact = "Contact" - IntegrationMappingSchemaDirectoryAccount = "DirectoryAccount" - IntegrationMappingSchemaDirectoryGroup = "DirectoryGroup" + IntegrationMappingSchemaAsset = "Asset" + IntegrationMappingSchemaContact = "Contact" + IntegrationMappingSchemaDirectoryAccount = "DirectoryAccount" + IntegrationMappingSchemaDirectoryGroup = "DirectoryGroup" IntegrationMappingSchemaDirectoryMembership = "DirectoryMembership" - IntegrationMappingSchemaEntity = "Entity" - IntegrationMappingSchemaFinding = "Finding" - IntegrationMappingSchemaRisk = "Risk" - IntegrationMappingSchemaVulnerability = "Vulnerability" + IntegrationMappingSchemaEntity = "Entity" + IntegrationMappingSchemaFinding = "Finding" + IntegrationMappingSchemaRisk = "Risk" + IntegrationMappingSchemaVulnerability = "Vulnerability" ) // IntegrationIngestAssetRequested is the typed second-stage ingest contract for Asset records type IntegrationIngestAssetRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateAssetInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateAssetInput `json:"input"` } // IntegrationIngestAssetRequestedTopic is the typed Gala topic for Asset ingest requests @@ -81,8 +80,8 @@ var IntegrationIngestAssetRequestedTopic = gala.Topic[IntegrationIngestAssetRequ // IntegrationIngestContactRequested is the typed second-stage ingest contract for Contact records type IntegrationIngestContactRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateContactInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateContactInput `json:"input"` } // IntegrationIngestContactRequestedTopic is the typed Gala topic for Contact ingest requests @@ -92,8 +91,8 @@ var IntegrationIngestContactRequestedTopic = gala.Topic[IntegrationIngestContact // IntegrationIngestDirectoryAccountRequested is the typed second-stage ingest contract for DirectoryAccount records type IntegrationIngestDirectoryAccountRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryAccountInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryAccountInput `json:"input"` } // IntegrationIngestDirectoryAccountRequestedTopic is the typed Gala topic for DirectoryAccount ingest requests @@ -103,8 +102,8 @@ var IntegrationIngestDirectoryAccountRequestedTopic = gala.Topic[IntegrationInge // IntegrationIngestDirectoryGroupRequested is the typed second-stage ingest contract for DirectoryGroup records type IntegrationIngestDirectoryGroupRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryGroupInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryGroupInput `json:"input"` } // IntegrationIngestDirectoryGroupRequestedTopic is the typed Gala topic for DirectoryGroup ingest requests @@ -114,8 +113,8 @@ var IntegrationIngestDirectoryGroupRequestedTopic = gala.Topic[IntegrationIngest // IntegrationIngestDirectoryMembershipRequested is the typed second-stage ingest contract for DirectoryMembership records type IntegrationIngestDirectoryMembershipRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryMembershipInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryMembershipInput `json:"input"` } // IntegrationIngestDirectoryMembershipRequestedTopic is the typed Gala topic for DirectoryMembership ingest requests @@ -125,8 +124,8 @@ var IntegrationIngestDirectoryMembershipRequestedTopic = gala.Topic[IntegrationI // IntegrationIngestEntityRequested is the typed second-stage ingest contract for Entity records type IntegrationIngestEntityRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateEntityInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateEntityInput `json:"input"` } // IntegrationIngestEntityRequestedTopic is the typed Gala topic for Entity ingest requests @@ -136,8 +135,8 @@ var IntegrationIngestEntityRequestedTopic = gala.Topic[IntegrationIngestEntityRe // IntegrationIngestFindingRequested is the typed second-stage ingest contract for Finding records type IntegrationIngestFindingRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateFindingInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateFindingInput `json:"input"` } // IntegrationIngestFindingRequestedTopic is the typed Gala topic for Finding ingest requests @@ -148,7 +147,7 @@ var IntegrationIngestFindingRequestedTopic = gala.Topic[IntegrationIngestFinding // IntegrationIngestRiskRequested is the typed second-stage ingest contract for Risk records type IntegrationIngestRiskRequested struct { Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateRiskInput `json:"input"` + Input generated.CreateRiskInput `json:"input"` } // IntegrationIngestRiskRequestedTopic is the typed Gala topic for Risk ingest requests @@ -158,8 +157,8 @@ var IntegrationIngestRiskRequestedTopic = gala.Topic[IntegrationIngestRiskReques // IntegrationIngestVulnerabilityRequested is the typed second-stage ingest contract for Vulnerability records type IntegrationIngestVulnerabilityRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateVulnerabilityInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateVulnerabilityInput `json:"input"` } // IntegrationIngestVulnerabilityRequestedTopic is the typed Gala topic for Vulnerability ingest requests @@ -169,350 +168,350 @@ var IntegrationIngestVulnerabilityRequestedTopic = gala.Topic[IntegrationIngestV // Integration mapping keys for Asset. const ( - IntegrationMappingAssetAccessModelID = "accessModelID" - IntegrationMappingAssetAccessModelName = "accessModelName" - IntegrationMappingAssetAssetDataClassificationID = "assetDataClassificationID" + IntegrationMappingAssetAccessModelID = "accessModelID" + IntegrationMappingAssetAccessModelName = "accessModelName" + IntegrationMappingAssetAssetDataClassificationID = "assetDataClassificationID" IntegrationMappingAssetAssetDataClassificationName = "assetDataClassificationName" - IntegrationMappingAssetAssetSubtypeID = "assetSubtypeID" - IntegrationMappingAssetAssetSubtypeName = "assetSubtypeName" - IntegrationMappingAssetAssetType = "assetType" - IntegrationMappingAssetCategories = "categories" - IntegrationMappingAssetContainsPii = "containsPii" - IntegrationMappingAssetCostCenter = "costCenter" - IntegrationMappingAssetCriticalityID = "criticalityID" - IntegrationMappingAssetCriticalityName = "criticalityName" - IntegrationMappingAssetDescription = "description" - IntegrationMappingAssetDisplayName = "displayName" - IntegrationMappingAssetEncryptionStatusID = "encryptionStatusID" - IntegrationMappingAssetEncryptionStatusName = "encryptionStatusName" - IntegrationMappingAssetEnvironmentID = "environmentID" - IntegrationMappingAssetEnvironmentName = "environmentName" - IntegrationMappingAssetEstimatedMonthlyCost = "estimatedMonthlyCost" - IntegrationMappingAssetIdentifier = "identifier" - IntegrationMappingAssetIntegrationID = "integrationID" - IntegrationMappingAssetInternalNotes = "internalNotes" - IntegrationMappingAssetInternalOwner = "internalOwner" - IntegrationMappingAssetInternalOwnerGroupID = "internalOwnerGroupID" - IntegrationMappingAssetInternalOwnerUserID = "internalOwnerUserID" - IntegrationMappingAssetName = "name" - IntegrationMappingAssetObservedAt = "observedAt" - IntegrationMappingAssetOwnerID = "ownerID" - IntegrationMappingAssetPhysicalLocation = "physicalLocation" - IntegrationMappingAssetPurchaseDate = "purchaseDate" - IntegrationMappingAssetRegion = "region" - IntegrationMappingAssetScopeID = "scopeID" - IntegrationMappingAssetScopeName = "scopeName" - IntegrationMappingAssetSecurityTierID = "securityTierID" - IntegrationMappingAssetSecurityTierName = "securityTierName" - IntegrationMappingAssetSourceIdentifier = "sourceIdentifier" - IntegrationMappingAssetSourceType = "sourceType" - IntegrationMappingAssetSystemInternalID = "systemInternalID" - IntegrationMappingAssetTags = "tags" - IntegrationMappingAssetWebsite = "website" + IntegrationMappingAssetAssetSubtypeID = "assetSubtypeID" + IntegrationMappingAssetAssetSubtypeName = "assetSubtypeName" + IntegrationMappingAssetAssetType = "assetType" + IntegrationMappingAssetCategories = "categories" + IntegrationMappingAssetContainsPii = "containsPii" + IntegrationMappingAssetCostCenter = "costCenter" + IntegrationMappingAssetCriticalityID = "criticalityID" + IntegrationMappingAssetCriticalityName = "criticalityName" + IntegrationMappingAssetDescription = "description" + IntegrationMappingAssetDisplayName = "displayName" + IntegrationMappingAssetEncryptionStatusID = "encryptionStatusID" + IntegrationMappingAssetEncryptionStatusName = "encryptionStatusName" + IntegrationMappingAssetEnvironmentID = "environmentID" + IntegrationMappingAssetEnvironmentName = "environmentName" + IntegrationMappingAssetEstimatedMonthlyCost = "estimatedMonthlyCost" + IntegrationMappingAssetIdentifier = "identifier" + IntegrationMappingAssetIntegrationID = "integrationID" + IntegrationMappingAssetInternalNotes = "internalNotes" + IntegrationMappingAssetInternalOwner = "internalOwner" + IntegrationMappingAssetInternalOwnerGroupID = "internalOwnerGroupID" + IntegrationMappingAssetInternalOwnerUserID = "internalOwnerUserID" + IntegrationMappingAssetName = "name" + IntegrationMappingAssetObservedAt = "observedAt" + IntegrationMappingAssetOwnerID = "ownerID" + IntegrationMappingAssetPhysicalLocation = "physicalLocation" + IntegrationMappingAssetPurchaseDate = "purchaseDate" + IntegrationMappingAssetRegion = "region" + IntegrationMappingAssetScopeID = "scopeID" + IntegrationMappingAssetScopeName = "scopeName" + IntegrationMappingAssetSecurityTierID = "securityTierID" + IntegrationMappingAssetSecurityTierName = "securityTierName" + IntegrationMappingAssetSourceIdentifier = "sourceIdentifier" + IntegrationMappingAssetSourceType = "sourceType" + IntegrationMappingAssetSystemInternalID = "systemInternalID" + IntegrationMappingAssetTags = "tags" + IntegrationMappingAssetWebsite = "website" ) // Integration mapping keys for Contact. const ( - IntegrationMappingContactAddress = "address" - IntegrationMappingContactCompany = "company" - IntegrationMappingContactEmail = "email" - IntegrationMappingContactExternalID = "externalID" - IntegrationMappingContactFullName = "fullName" + IntegrationMappingContactAddress = "address" + IntegrationMappingContactCompany = "company" + IntegrationMappingContactEmail = "email" + IntegrationMappingContactExternalID = "externalID" + IntegrationMappingContactFullName = "fullName" IntegrationMappingContactIntegrationID = "integrationID" - IntegrationMappingContactObservedAt = "observedAt" - IntegrationMappingContactPhoneNumber = "phoneNumber" - IntegrationMappingContactStatus = "status" - IntegrationMappingContactTags = "tags" - IntegrationMappingContactTitle = "title" + IntegrationMappingContactObservedAt = "observedAt" + IntegrationMappingContactPhoneNumber = "phoneNumber" + IntegrationMappingContactStatus = "status" + IntegrationMappingContactTags = "tags" + IntegrationMappingContactTitle = "title" ) // Integration mapping keys for DirectoryAccount. const ( - IntegrationMappingDirectoryAccountAccountType = "accountType" - IntegrationMappingDirectoryAccountAddedAt = "addedAt" - IntegrationMappingDirectoryAccountAvatarRemoteURL = "avatarRemoteURL" - IntegrationMappingDirectoryAccountAvatarUpdatedAt = "avatarUpdatedAt" - IntegrationMappingDirectoryAccountCanonicalEmail = "canonicalEmail" - IntegrationMappingDirectoryAccountDepartment = "department" + IntegrationMappingDirectoryAccountAccountType = "accountType" + IntegrationMappingDirectoryAccountAddedAt = "addedAt" + IntegrationMappingDirectoryAccountAvatarRemoteURL = "avatarRemoteURL" + IntegrationMappingDirectoryAccountAvatarUpdatedAt = "avatarUpdatedAt" + IntegrationMappingDirectoryAccountCanonicalEmail = "canonicalEmail" + IntegrationMappingDirectoryAccountDepartment = "department" IntegrationMappingDirectoryAccountDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryAccountDirectoryName = "directoryName" - IntegrationMappingDirectoryAccountDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryAccountDisplayName = "displayName" - IntegrationMappingDirectoryAccountEnvironmentID = "environmentID" - IntegrationMappingDirectoryAccountEnvironmentName = "environmentName" - IntegrationMappingDirectoryAccountExternalID = "externalID" - IntegrationMappingDirectoryAccountFamilyName = "familyName" - IntegrationMappingDirectoryAccountFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryAccountGivenName = "givenName" - IntegrationMappingDirectoryAccountIdentityHolderID = "identityHolderID" - IntegrationMappingDirectoryAccountIntegrationID = "integrationID" - IntegrationMappingDirectoryAccountJobTitle = "jobTitle" - IntegrationMappingDirectoryAccountLastLoginAt = "lastLoginAt" - IntegrationMappingDirectoryAccountLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryAccountLastSeenIP = "lastSeenIP" - IntegrationMappingDirectoryAccountMetadata = "metadata" - IntegrationMappingDirectoryAccountMfaState = "mfaState" - IntegrationMappingDirectoryAccountObservedAt = "observedAt" - IntegrationMappingDirectoryAccountOrganizationUnit = "organizationUnit" - IntegrationMappingDirectoryAccountPlatformID = "platformID" - IntegrationMappingDirectoryAccountPrimarySource = "primarySource" - IntegrationMappingDirectoryAccountProfile = "profile" - IntegrationMappingDirectoryAccountProfileHash = "profileHash" - IntegrationMappingDirectoryAccountRemovedAt = "removedAt" - IntegrationMappingDirectoryAccountScopeID = "scopeID" - IntegrationMappingDirectoryAccountScopeName = "scopeName" - IntegrationMappingDirectoryAccountSecondaryKey = "secondaryKey" - IntegrationMappingDirectoryAccountSourceVersion = "sourceVersion" - IntegrationMappingDirectoryAccountStatus = "status" - IntegrationMappingDirectoryAccountTags = "tags" + IntegrationMappingDirectoryAccountDirectoryName = "directoryName" + IntegrationMappingDirectoryAccountDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryAccountDisplayName = "displayName" + IntegrationMappingDirectoryAccountEnvironmentID = "environmentID" + IntegrationMappingDirectoryAccountEnvironmentName = "environmentName" + IntegrationMappingDirectoryAccountExternalID = "externalID" + IntegrationMappingDirectoryAccountFamilyName = "familyName" + IntegrationMappingDirectoryAccountFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryAccountGivenName = "givenName" + IntegrationMappingDirectoryAccountIdentityHolderID = "identityHolderID" + IntegrationMappingDirectoryAccountIntegrationID = "integrationID" + IntegrationMappingDirectoryAccountJobTitle = "jobTitle" + IntegrationMappingDirectoryAccountLastLoginAt = "lastLoginAt" + IntegrationMappingDirectoryAccountLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryAccountLastSeenIP = "lastSeenIP" + IntegrationMappingDirectoryAccountMetadata = "metadata" + IntegrationMappingDirectoryAccountMfaState = "mfaState" + IntegrationMappingDirectoryAccountObservedAt = "observedAt" + IntegrationMappingDirectoryAccountOrganizationUnit = "organizationUnit" + IntegrationMappingDirectoryAccountPlatformID = "platformID" + IntegrationMappingDirectoryAccountPrimarySource = "primarySource" + IntegrationMappingDirectoryAccountProfile = "profile" + IntegrationMappingDirectoryAccountProfileHash = "profileHash" + IntegrationMappingDirectoryAccountRemovedAt = "removedAt" + IntegrationMappingDirectoryAccountScopeID = "scopeID" + IntegrationMappingDirectoryAccountScopeName = "scopeName" + IntegrationMappingDirectoryAccountSecondaryKey = "secondaryKey" + IntegrationMappingDirectoryAccountSourceVersion = "sourceVersion" + IntegrationMappingDirectoryAccountStatus = "status" + IntegrationMappingDirectoryAccountTags = "tags" ) // Integration mapping keys for DirectoryGroup. const ( - IntegrationMappingDirectoryGroupAddedAt = "addedAt" - IntegrationMappingDirectoryGroupClassification = "classification" - IntegrationMappingDirectoryGroupDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryGroupDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryGroupDisplayName = "displayName" - IntegrationMappingDirectoryGroupEmail = "email" - IntegrationMappingDirectoryGroupEnvironmentID = "environmentID" - IntegrationMappingDirectoryGroupEnvironmentName = "environmentName" - IntegrationMappingDirectoryGroupExternalID = "externalID" + IntegrationMappingDirectoryGroupAddedAt = "addedAt" + IntegrationMappingDirectoryGroupClassification = "classification" + IntegrationMappingDirectoryGroupDirectoryInstanceID = "directoryInstanceID" + IntegrationMappingDirectoryGroupDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryGroupDisplayName = "displayName" + IntegrationMappingDirectoryGroupEmail = "email" + IntegrationMappingDirectoryGroupEnvironmentID = "environmentID" + IntegrationMappingDirectoryGroupEnvironmentName = "environmentName" + IntegrationMappingDirectoryGroupExternalID = "externalID" IntegrationMappingDirectoryGroupExternalSharingAllowed = "externalSharingAllowed" - IntegrationMappingDirectoryGroupFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryGroupIntegrationID = "integrationID" - IntegrationMappingDirectoryGroupLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryGroupMemberCount = "memberCount" - IntegrationMappingDirectoryGroupMetadata = "metadata" - IntegrationMappingDirectoryGroupObservedAt = "observedAt" - IntegrationMappingDirectoryGroupPlatformID = "platformID" - IntegrationMappingDirectoryGroupProfile = "profile" - IntegrationMappingDirectoryGroupProfileHash = "profileHash" - IntegrationMappingDirectoryGroupRemovedAt = "removedAt" - IntegrationMappingDirectoryGroupScopeID = "scopeID" - IntegrationMappingDirectoryGroupScopeName = "scopeName" - IntegrationMappingDirectoryGroupSourceVersion = "sourceVersion" - IntegrationMappingDirectoryGroupStatus = "status" - IntegrationMappingDirectoryGroupTags = "tags" + IntegrationMappingDirectoryGroupFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryGroupIntegrationID = "integrationID" + IntegrationMappingDirectoryGroupLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryGroupMemberCount = "memberCount" + IntegrationMappingDirectoryGroupMetadata = "metadata" + IntegrationMappingDirectoryGroupObservedAt = "observedAt" + IntegrationMappingDirectoryGroupPlatformID = "platformID" + IntegrationMappingDirectoryGroupProfile = "profile" + IntegrationMappingDirectoryGroupProfileHash = "profileHash" + IntegrationMappingDirectoryGroupRemovedAt = "removedAt" + IntegrationMappingDirectoryGroupScopeID = "scopeID" + IntegrationMappingDirectoryGroupScopeName = "scopeName" + IntegrationMappingDirectoryGroupSourceVersion = "sourceVersion" + IntegrationMappingDirectoryGroupStatus = "status" + IntegrationMappingDirectoryGroupTags = "tags" ) // Integration mapping keys for DirectoryMembership. const ( - IntegrationMappingDirectoryMembershipAddedAt = "addedAt" - IntegrationMappingDirectoryMembershipDirectoryAccountID = "directoryAccountID" - IntegrationMappingDirectoryMembershipDirectoryGroupID = "directoryGroupID" + IntegrationMappingDirectoryMembershipAddedAt = "addedAt" + IntegrationMappingDirectoryMembershipDirectoryAccountID = "directoryAccountID" + IntegrationMappingDirectoryMembershipDirectoryGroupID = "directoryGroupID" IntegrationMappingDirectoryMembershipDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryMembershipDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryMembershipEnvironmentID = "environmentID" - IntegrationMappingDirectoryMembershipEnvironmentName = "environmentName" - IntegrationMappingDirectoryMembershipFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryMembershipIntegrationID = "integrationID" - IntegrationMappingDirectoryMembershipLastConfirmedRunID = "lastConfirmedRunID" - IntegrationMappingDirectoryMembershipLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryMembershipMetadata = "metadata" - IntegrationMappingDirectoryMembershipObservedAt = "observedAt" - IntegrationMappingDirectoryMembershipPlatformID = "platformID" - IntegrationMappingDirectoryMembershipRemovedAt = "removedAt" - IntegrationMappingDirectoryMembershipRole = "role" - IntegrationMappingDirectoryMembershipScopeID = "scopeID" - IntegrationMappingDirectoryMembershipScopeName = "scopeName" - IntegrationMappingDirectoryMembershipSource = "source" + IntegrationMappingDirectoryMembershipDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryMembershipEnvironmentID = "environmentID" + IntegrationMappingDirectoryMembershipEnvironmentName = "environmentName" + IntegrationMappingDirectoryMembershipFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryMembershipIntegrationID = "integrationID" + IntegrationMappingDirectoryMembershipLastConfirmedRunID = "lastConfirmedRunID" + IntegrationMappingDirectoryMembershipLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryMembershipMetadata = "metadata" + IntegrationMappingDirectoryMembershipObservedAt = "observedAt" + IntegrationMappingDirectoryMembershipPlatformID = "platformID" + IntegrationMappingDirectoryMembershipRemovedAt = "removedAt" + IntegrationMappingDirectoryMembershipRole = "role" + IntegrationMappingDirectoryMembershipScopeID = "scopeID" + IntegrationMappingDirectoryMembershipScopeName = "scopeName" + IntegrationMappingDirectoryMembershipSource = "source" ) // Integration mapping keys for Entity. const ( - IntegrationMappingEntityAnnualSpend = "annualSpend" - IntegrationMappingEntityApprovedForUse = "approvedForUse" - IntegrationMappingEntityAutoRenews = "autoRenews" - IntegrationMappingEntityBillingModel = "billingModel" - IntegrationMappingEntityContractEndDate = "contractEndDate" - IntegrationMappingEntityContractRenewalAt = "contractRenewalAt" - IntegrationMappingEntityContractStartDate = "contractStartDate" - IntegrationMappingEntityDisplayName = "displayName" - IntegrationMappingEntityDomains = "domains" - IntegrationMappingEntityEntityRelationshipStateID = "entityRelationshipStateID" - IntegrationMappingEntityEntityRelationshipStateName = "entityRelationshipStateName" - IntegrationMappingEntityEntitySecurityQuestionnaireStatusID = "entitySecurityQuestionnaireStatusID" + IntegrationMappingEntityAnnualSpend = "annualSpend" + IntegrationMappingEntityApprovedForUse = "approvedForUse" + IntegrationMappingEntityAutoRenews = "autoRenews" + IntegrationMappingEntityBillingModel = "billingModel" + IntegrationMappingEntityContractEndDate = "contractEndDate" + IntegrationMappingEntityContractRenewalAt = "contractRenewalAt" + IntegrationMappingEntityContractStartDate = "contractStartDate" + IntegrationMappingEntityDisplayName = "displayName" + IntegrationMappingEntityDomains = "domains" + IntegrationMappingEntityEntityRelationshipStateID = "entityRelationshipStateID" + IntegrationMappingEntityEntityRelationshipStateName = "entityRelationshipStateName" + IntegrationMappingEntityEntitySecurityQuestionnaireStatusID = "entitySecurityQuestionnaireStatusID" IntegrationMappingEntityEntitySecurityQuestionnaireStatusName = "entitySecurityQuestionnaireStatusName" - IntegrationMappingEntityEntitySourceTypeID = "entitySourceTypeID" - IntegrationMappingEntityEntitySourceTypeName = "entitySourceTypeName" - IntegrationMappingEntityEnvironmentID = "environmentID" - IntegrationMappingEntityEnvironmentName = "environmentName" - IntegrationMappingEntityExternalID = "externalID" - IntegrationMappingEntityHasSoc2 = "hasSoc2" - IntegrationMappingEntityInternalNotes = "internalNotes" - IntegrationMappingEntityInternalOwner = "internalOwner" - IntegrationMappingEntityInternalOwnerGroupID = "internalOwnerGroupID" - IntegrationMappingEntityInternalOwnerUserID = "internalOwnerUserID" - IntegrationMappingEntityLastReviewedAt = "lastReviewedAt" - IntegrationMappingEntityLinks = "links" - IntegrationMappingEntityMfaEnforced = "mfaEnforced" - IntegrationMappingEntityMfaSupported = "mfaSupported" - IntegrationMappingEntityName = "name" - IntegrationMappingEntityNextReviewAt = "nextReviewAt" - IntegrationMappingEntityObservedAt = "observedAt" - IntegrationMappingEntityOwnerID = "ownerID" - IntegrationMappingEntityProvidedServices = "providedServices" - IntegrationMappingEntityRenewalRisk = "renewalRisk" - IntegrationMappingEntityReviewFrequency = "reviewFrequency" - IntegrationMappingEntityReviewedBy = "reviewedBy" - IntegrationMappingEntityReviewedByGroupID = "reviewedByGroupID" - IntegrationMappingEntityReviewedByUserID = "reviewedByUserID" - IntegrationMappingEntityRiskRating = "riskRating" - IntegrationMappingEntityRiskScore = "riskScore" - IntegrationMappingEntityScopeID = "scopeID" - IntegrationMappingEntityScopeName = "scopeName" - IntegrationMappingEntitySoc2PeriodEnd = "soc2PeriodEnd" - IntegrationMappingEntitySpendCurrency = "spendCurrency" - IntegrationMappingEntitySsoEnforced = "ssoEnforced" - IntegrationMappingEntityStatus = "status" - IntegrationMappingEntityStatusPageURL = "statusPageURL" - IntegrationMappingEntitySystemInternalID = "systemInternalID" - IntegrationMappingEntityTags = "tags" - IntegrationMappingEntityTerminationNoticeDays = "terminationNoticeDays" - IntegrationMappingEntityTier = "tier" - IntegrationMappingEntityVendorMetadata = "vendorMetadata" + IntegrationMappingEntityEntitySourceTypeID = "entitySourceTypeID" + IntegrationMappingEntityEntitySourceTypeName = "entitySourceTypeName" + IntegrationMappingEntityEnvironmentID = "environmentID" + IntegrationMappingEntityEnvironmentName = "environmentName" + IntegrationMappingEntityExternalID = "externalID" + IntegrationMappingEntityHasSoc2 = "hasSoc2" + IntegrationMappingEntityInternalNotes = "internalNotes" + IntegrationMappingEntityInternalOwner = "internalOwner" + IntegrationMappingEntityInternalOwnerGroupID = "internalOwnerGroupID" + IntegrationMappingEntityInternalOwnerUserID = "internalOwnerUserID" + IntegrationMappingEntityLastReviewedAt = "lastReviewedAt" + IntegrationMappingEntityLinks = "links" + IntegrationMappingEntityMfaEnforced = "mfaEnforced" + IntegrationMappingEntityMfaSupported = "mfaSupported" + IntegrationMappingEntityName = "name" + IntegrationMappingEntityNextReviewAt = "nextReviewAt" + IntegrationMappingEntityObservedAt = "observedAt" + IntegrationMappingEntityOwnerID = "ownerID" + IntegrationMappingEntityProvidedServices = "providedServices" + IntegrationMappingEntityRenewalRisk = "renewalRisk" + IntegrationMappingEntityReviewFrequency = "reviewFrequency" + IntegrationMappingEntityReviewedBy = "reviewedBy" + IntegrationMappingEntityReviewedByGroupID = "reviewedByGroupID" + IntegrationMappingEntityReviewedByUserID = "reviewedByUserID" + IntegrationMappingEntityRiskRating = "riskRating" + IntegrationMappingEntityRiskScore = "riskScore" + IntegrationMappingEntityScopeID = "scopeID" + IntegrationMappingEntityScopeName = "scopeName" + IntegrationMappingEntitySoc2PeriodEnd = "soc2PeriodEnd" + IntegrationMappingEntitySpendCurrency = "spendCurrency" + IntegrationMappingEntitySsoEnforced = "ssoEnforced" + IntegrationMappingEntityStatus = "status" + IntegrationMappingEntityStatusPageURL = "statusPageURL" + IntegrationMappingEntitySystemInternalID = "systemInternalID" + IntegrationMappingEntityTags = "tags" + IntegrationMappingEntityTerminationNoticeDays = "terminationNoticeDays" + IntegrationMappingEntityTier = "tier" + IntegrationMappingEntityVendorMetadata = "vendorMetadata" ) // Integration mapping keys for Finding. const ( - IntegrationMappingFindingAssessmentID = "assessmentID" - IntegrationMappingFindingBlocksProduction = "blocksProduction" - IntegrationMappingFindingCategories = "categories" - IntegrationMappingFindingCategory = "category" - IntegrationMappingFindingDescription = "description" - IntegrationMappingFindingDisplayName = "displayName" - IntegrationMappingFindingEnvironmentID = "environmentID" - IntegrationMappingFindingEnvironmentName = "environmentName" - IntegrationMappingFindingEventTime = "eventTime" - IntegrationMappingFindingExploitability = "exploitability" - IntegrationMappingFindingExternalID = "externalID" - IntegrationMappingFindingExternalOwnerID = "externalOwnerID" - IntegrationMappingFindingExternalURI = "externalURI" - IntegrationMappingFindingFindingClass = "findingClass" - IntegrationMappingFindingFindingStatusID = "findingStatusID" - IntegrationMappingFindingFindingStatusName = "findingStatusName" - IntegrationMappingFindingImpact = "impact" - IntegrationMappingFindingInternalNotes = "internalNotes" - IntegrationMappingFindingMetadata = "metadata" - IntegrationMappingFindingNumericSeverity = "numericSeverity" - IntegrationMappingFindingOpen = "open" - IntegrationMappingFindingOwnerID = "ownerID" - IntegrationMappingFindingPriority = "priority" - IntegrationMappingFindingProduction = "production" - IntegrationMappingFindingPublic = "public" - IntegrationMappingFindingRawPayload = "rawPayload" - IntegrationMappingFindingRecommendation = "recommendation" + IntegrationMappingFindingAssessmentID = "assessmentID" + IntegrationMappingFindingBlocksProduction = "blocksProduction" + IntegrationMappingFindingCategories = "categories" + IntegrationMappingFindingCategory = "category" + IntegrationMappingFindingDescription = "description" + IntegrationMappingFindingDisplayName = "displayName" + IntegrationMappingFindingEnvironmentID = "environmentID" + IntegrationMappingFindingEnvironmentName = "environmentName" + IntegrationMappingFindingEventTime = "eventTime" + IntegrationMappingFindingExploitability = "exploitability" + IntegrationMappingFindingExternalID = "externalID" + IntegrationMappingFindingExternalOwnerID = "externalOwnerID" + IntegrationMappingFindingExternalURI = "externalURI" + IntegrationMappingFindingFindingClass = "findingClass" + IntegrationMappingFindingFindingStatusID = "findingStatusID" + IntegrationMappingFindingFindingStatusName = "findingStatusName" + IntegrationMappingFindingImpact = "impact" + IntegrationMappingFindingInternalNotes = "internalNotes" + IntegrationMappingFindingMetadata = "metadata" + IntegrationMappingFindingNumericSeverity = "numericSeverity" + IntegrationMappingFindingOpen = "open" + IntegrationMappingFindingOwnerID = "ownerID" + IntegrationMappingFindingPriority = "priority" + IntegrationMappingFindingProduction = "production" + IntegrationMappingFindingPublic = "public" + IntegrationMappingFindingRawPayload = "rawPayload" + IntegrationMappingFindingRecommendation = "recommendation" IntegrationMappingFindingRecommendedActions = "recommendedActions" - IntegrationMappingFindingReferences = "references" - IntegrationMappingFindingRemediationSLA = "remediationSLA" - IntegrationMappingFindingReportedAt = "reportedAt" - IntegrationMappingFindingResourceName = "resourceName" - IntegrationMappingFindingScopeID = "scopeID" - IntegrationMappingFindingScopeName = "scopeName" - IntegrationMappingFindingScore = "score" - IntegrationMappingFindingSeverity = "severity" - IntegrationMappingFindingSource = "source" - IntegrationMappingFindingSourceUpdatedAt = "sourceUpdatedAt" - IntegrationMappingFindingState = "state" - IntegrationMappingFindingStepsToReproduce = "stepsToReproduce" - IntegrationMappingFindingSystemInternalID = "systemInternalID" - IntegrationMappingFindingTags = "tags" - IntegrationMappingFindingTargetDetails = "targetDetails" - IntegrationMappingFindingTargets = "targets" - IntegrationMappingFindingValidated = "validated" - IntegrationMappingFindingVector = "vector" + IntegrationMappingFindingReferences = "references" + IntegrationMappingFindingRemediationSLA = "remediationSLA" + IntegrationMappingFindingReportedAt = "reportedAt" + IntegrationMappingFindingResourceName = "resourceName" + IntegrationMappingFindingScopeID = "scopeID" + IntegrationMappingFindingScopeName = "scopeName" + IntegrationMappingFindingScore = "score" + IntegrationMappingFindingSeverity = "severity" + IntegrationMappingFindingSource = "source" + IntegrationMappingFindingSourceUpdatedAt = "sourceUpdatedAt" + IntegrationMappingFindingState = "state" + IntegrationMappingFindingStepsToReproduce = "stepsToReproduce" + IntegrationMappingFindingSystemInternalID = "systemInternalID" + IntegrationMappingFindingTags = "tags" + IntegrationMappingFindingTargetDetails = "targetDetails" + IntegrationMappingFindingTargets = "targets" + IntegrationMappingFindingValidated = "validated" + IntegrationMappingFindingVector = "vector" ) // Integration mapping keys for Risk. const ( - IntegrationMappingRiskBusinessCosts = "businessCosts" + IntegrationMappingRiskBusinessCosts = "businessCosts" IntegrationMappingRiskBusinessCostsJSON = "businessCostsJSON" - IntegrationMappingRiskDetails = "details" - IntegrationMappingRiskDetailsJSON = "detailsJSON" - IntegrationMappingRiskDueDate = "dueDate" - IntegrationMappingRiskEnvironmentID = "environmentID" - IntegrationMappingRiskEnvironmentName = "environmentName" - IntegrationMappingRiskExternalID = "externalID" - IntegrationMappingRiskExternalUUID = "externalUUID" - IntegrationMappingRiskImpact = "impact" - IntegrationMappingRiskIntegrationID = "integrationID" - IntegrationMappingRiskLastReviewedAt = "lastReviewedAt" - IntegrationMappingRiskLikelihood = "likelihood" - IntegrationMappingRiskMitigatedAt = "mitigatedAt" - IntegrationMappingRiskMitigation = "mitigation" - IntegrationMappingRiskMitigationJSON = "mitigationJSON" - IntegrationMappingRiskName = "name" - IntegrationMappingRiskNextReviewDueAt = "nextReviewDueAt" - IntegrationMappingRiskObservedAt = "observedAt" - IntegrationMappingRiskOwnerID = "ownerID" - IntegrationMappingRiskResidualScore = "residualScore" - IntegrationMappingRiskReviewFrequency = "reviewFrequency" - IntegrationMappingRiskReviewRequired = "reviewRequired" - IntegrationMappingRiskRiskCategoryID = "riskCategoryID" - IntegrationMappingRiskRiskCategoryName = "riskCategoryName" - IntegrationMappingRiskRiskDecision = "riskDecision" - IntegrationMappingRiskRiskKindID = "riskKindID" - IntegrationMappingRiskRiskKindName = "riskKindName" - IntegrationMappingRiskScopeID = "scopeID" - IntegrationMappingRiskScopeName = "scopeName" - IntegrationMappingRiskScore = "score" - IntegrationMappingRiskStatus = "status" - IntegrationMappingRiskTags = "tags" + IntegrationMappingRiskDetails = "details" + IntegrationMappingRiskDetailsJSON = "detailsJSON" + IntegrationMappingRiskDueDate = "dueDate" + IntegrationMappingRiskEnvironmentID = "environmentID" + IntegrationMappingRiskEnvironmentName = "environmentName" + IntegrationMappingRiskExternalID = "externalID" + IntegrationMappingRiskExternalUUID = "externalUUID" + IntegrationMappingRiskImpact = "impact" + IntegrationMappingRiskIntegrationID = "integrationID" + IntegrationMappingRiskLastReviewedAt = "lastReviewedAt" + IntegrationMappingRiskLikelihood = "likelihood" + IntegrationMappingRiskMitigatedAt = "mitigatedAt" + IntegrationMappingRiskMitigation = "mitigation" + IntegrationMappingRiskMitigationJSON = "mitigationJSON" + IntegrationMappingRiskName = "name" + IntegrationMappingRiskNextReviewDueAt = "nextReviewDueAt" + IntegrationMappingRiskObservedAt = "observedAt" + IntegrationMappingRiskOwnerID = "ownerID" + IntegrationMappingRiskResidualScore = "residualScore" + IntegrationMappingRiskReviewFrequency = "reviewFrequency" + IntegrationMappingRiskReviewRequired = "reviewRequired" + IntegrationMappingRiskRiskCategoryID = "riskCategoryID" + IntegrationMappingRiskRiskCategoryName = "riskCategoryName" + IntegrationMappingRiskRiskDecision = "riskDecision" + IntegrationMappingRiskRiskKindID = "riskKindID" + IntegrationMappingRiskRiskKindName = "riskKindName" + IntegrationMappingRiskScopeID = "scopeID" + IntegrationMappingRiskScopeName = "scopeName" + IntegrationMappingRiskScore = "score" + IntegrationMappingRiskStatus = "status" + IntegrationMappingRiskTags = "tags" ) // Integration mapping keys for Vulnerability. const ( - IntegrationMappingVulnerabilityAutoDismissedAt = "autoDismissedAt" - IntegrationMappingVulnerabilityBlocking = "blocking" - IntegrationMappingVulnerabilityCategory = "category" - IntegrationMappingVulnerabilityCveID = "cveID" - IntegrationMappingVulnerabilityCweIds = "cweIds" - IntegrationMappingVulnerabilityDependencyScope = "dependencyScope" - IntegrationMappingVulnerabilityDescription = "description" - IntegrationMappingVulnerabilityDiscoveredAt = "discoveredAt" - IntegrationMappingVulnerabilityDismissedAt = "dismissedAt" - IntegrationMappingVulnerabilityDismissedComment = "dismissedComment" - IntegrationMappingVulnerabilityDismissedReason = "dismissedReason" - IntegrationMappingVulnerabilityDisplayName = "displayName" - IntegrationMappingVulnerabilityEnvironmentID = "environmentID" - IntegrationMappingVulnerabilityEnvironmentName = "environmentName" - IntegrationMappingVulnerabilityExploitability = "exploitability" - IntegrationMappingVulnerabilityExternalID = "externalID" - IntegrationMappingVulnerabilityExternalOwnerID = "externalOwnerID" - IntegrationMappingVulnerabilityExternalURI = "externalURI" - IntegrationMappingVulnerabilityFirstPatchedVersion = "firstPatchedVersion" - IntegrationMappingVulnerabilityFixedAt = "fixedAt" - IntegrationMappingVulnerabilityImpact = "impact" - IntegrationMappingVulnerabilityImpacts = "impacts" - IntegrationMappingVulnerabilityInternalNotes = "internalNotes" - IntegrationMappingVulnerabilityManifestPath = "manifestPath" - IntegrationMappingVulnerabilityMetadata = "metadata" - IntegrationMappingVulnerabilityOpen = "open" - IntegrationMappingVulnerabilityOwnerID = "ownerID" - IntegrationMappingVulnerabilityPackageEcosystem = "packageEcosystem" - IntegrationMappingVulnerabilityPackageName = "packageName" - IntegrationMappingVulnerabilityPriority = "priority" - IntegrationMappingVulnerabilityProduction = "production" - IntegrationMappingVulnerabilityPublic = "public" - IntegrationMappingVulnerabilityPublishedAt = "publishedAt" - IntegrationMappingVulnerabilityRawPayload = "rawPayload" - IntegrationMappingVulnerabilityReferences = "references" - IntegrationMappingVulnerabilityRemediationSLA = "remediationSLA" - IntegrationMappingVulnerabilityScopeID = "scopeID" - IntegrationMappingVulnerabilityScopeName = "scopeName" - IntegrationMappingVulnerabilityScore = "score" - IntegrationMappingVulnerabilitySeverity = "severity" - IntegrationMappingVulnerabilitySource = "source" - IntegrationMappingVulnerabilitySourceUpdatedAt = "sourceUpdatedAt" - IntegrationMappingVulnerabilitySummary = "summary" - IntegrationMappingVulnerabilitySystemInternalID = "systemInternalID" - IntegrationMappingVulnerabilityTags = "tags" - IntegrationMappingVulnerabilityValidated = "validated" - IntegrationMappingVulnerabilityVector = "vector" - IntegrationMappingVulnerabilityVulnerabilityStatusID = "vulnerabilityStatusID" + IntegrationMappingVulnerabilityAutoDismissedAt = "autoDismissedAt" + IntegrationMappingVulnerabilityBlocking = "blocking" + IntegrationMappingVulnerabilityCategory = "category" + IntegrationMappingVulnerabilityCveID = "cveID" + IntegrationMappingVulnerabilityCweIds = "cweIds" + IntegrationMappingVulnerabilityDependencyScope = "dependencyScope" + IntegrationMappingVulnerabilityDescription = "description" + IntegrationMappingVulnerabilityDiscoveredAt = "discoveredAt" + IntegrationMappingVulnerabilityDismissedAt = "dismissedAt" + IntegrationMappingVulnerabilityDismissedComment = "dismissedComment" + IntegrationMappingVulnerabilityDismissedReason = "dismissedReason" + IntegrationMappingVulnerabilityDisplayName = "displayName" + IntegrationMappingVulnerabilityEnvironmentID = "environmentID" + IntegrationMappingVulnerabilityEnvironmentName = "environmentName" + IntegrationMappingVulnerabilityExploitability = "exploitability" + IntegrationMappingVulnerabilityExternalID = "externalID" + IntegrationMappingVulnerabilityExternalOwnerID = "externalOwnerID" + IntegrationMappingVulnerabilityExternalURI = "externalURI" + IntegrationMappingVulnerabilityFirstPatchedVersion = "firstPatchedVersion" + IntegrationMappingVulnerabilityFixedAt = "fixedAt" + IntegrationMappingVulnerabilityImpact = "impact" + IntegrationMappingVulnerabilityImpacts = "impacts" + IntegrationMappingVulnerabilityInternalNotes = "internalNotes" + IntegrationMappingVulnerabilityManifestPath = "manifestPath" + IntegrationMappingVulnerabilityMetadata = "metadata" + IntegrationMappingVulnerabilityOpen = "open" + IntegrationMappingVulnerabilityOwnerID = "ownerID" + IntegrationMappingVulnerabilityPackageEcosystem = "packageEcosystem" + IntegrationMappingVulnerabilityPackageName = "packageName" + IntegrationMappingVulnerabilityPriority = "priority" + IntegrationMappingVulnerabilityProduction = "production" + IntegrationMappingVulnerabilityPublic = "public" + IntegrationMappingVulnerabilityPublishedAt = "publishedAt" + IntegrationMappingVulnerabilityRawPayload = "rawPayload" + IntegrationMappingVulnerabilityReferences = "references" + IntegrationMappingVulnerabilityRemediationSLA = "remediationSLA" + IntegrationMappingVulnerabilityScopeID = "scopeID" + IntegrationMappingVulnerabilityScopeName = "scopeName" + IntegrationMappingVulnerabilityScore = "score" + IntegrationMappingVulnerabilitySeverity = "severity" + IntegrationMappingVulnerabilitySource = "source" + IntegrationMappingVulnerabilitySourceUpdatedAt = "sourceUpdatedAt" + IntegrationMappingVulnerabilitySummary = "summary" + IntegrationMappingVulnerabilitySystemInternalID = "systemInternalID" + IntegrationMappingVulnerabilityTags = "tags" + IntegrationMappingVulnerabilityValidated = "validated" + IntegrationMappingVulnerabilityVector = "vector" + IntegrationMappingVulnerabilityVulnerabilityStatusID = "vulnerabilityStatusID" IntegrationMappingVulnerabilityVulnerabilityStatusName = "vulnerabilityStatusName" - IntegrationMappingVulnerabilityVulnerableVersionRange = "vulnerableVersionRange" + IntegrationMappingVulnerabilityVulnerableVersionRange = "vulnerableVersionRange" ) // IntegrationMappingSchemas maps schema names to their mapping metadata @@ -521,407 +520,407 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Asset", Fields: []IntegrationMappingField{ { - InputKey: "accessModelID", - GoField: "AccessModelID", - EntField: "access_model_id", - Type: "string", - Required: false, + InputKey: "accessModelID", + GoField: "AccessModelID", + EntField: "access_model_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "accessModelName", - GoField: "AccessModelName", - EntField: "access_model_name", - Type: "string", - Required: false, + InputKey: "accessModelName", + GoField: "AccessModelName", + EntField: "access_model_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetDataClassificationID", - GoField: "AssetDataClassificationID", - EntField: "asset_data_classification_id", - Type: "string", - Required: false, + InputKey: "assetDataClassificationID", + GoField: "AssetDataClassificationID", + EntField: "asset_data_classification_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetDataClassificationName", - GoField: "AssetDataClassificationName", - EntField: "asset_data_classification_name", - Type: "string", - Required: false, + InputKey: "assetDataClassificationName", + GoField: "AssetDataClassificationName", + EntField: "asset_data_classification_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetSubtypeID", - GoField: "AssetSubtypeID", - EntField: "asset_subtype_id", - Type: "string", - Required: false, + InputKey: "assetSubtypeID", + GoField: "AssetSubtypeID", + EntField: "asset_subtype_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetSubtypeName", - GoField: "AssetSubtypeName", - EntField: "asset_subtype_name", - Type: "string", - Required: false, + InputKey: "assetSubtypeName", + GoField: "AssetSubtypeName", + EntField: "asset_subtype_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetType", - GoField: "AssetType", - EntField: "asset_type", - Type: "string", - Required: true, + InputKey: "assetType", + GoField: "AssetType", + EntField: "asset_type", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "categories", - GoField: "Categories", - EntField: "categories", - Type: "json.RawMessage", - Required: false, + InputKey: "categories", + GoField: "Categories", + EntField: "categories", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "containsPii", - GoField: "ContainsPii", - EntField: "contains_pii", - Type: "bool", - Required: false, + InputKey: "containsPii", + GoField: "ContainsPii", + EntField: "contains_pii", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "costCenter", - GoField: "CostCenter", - EntField: "cost_center", - Type: "string", - Required: false, + InputKey: "costCenter", + GoField: "CostCenter", + EntField: "cost_center", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "criticalityID", - GoField: "CriticalityID", - EntField: "criticality_id", - Type: "string", - Required: false, + InputKey: "criticalityID", + GoField: "CriticalityID", + EntField: "criticality_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "criticalityName", - GoField: "CriticalityName", - EntField: "criticality_name", - Type: "string", - Required: false, + InputKey: "criticalityName", + GoField: "CriticalityName", + EntField: "criticality_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "encryptionStatusID", - GoField: "EncryptionStatusID", - EntField: "encryption_status_id", - Type: "string", - Required: false, + InputKey: "encryptionStatusID", + GoField: "EncryptionStatusID", + EntField: "encryption_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "encryptionStatusName", - GoField: "EncryptionStatusName", - EntField: "encryption_status_name", - Type: "string", - Required: false, + InputKey: "encryptionStatusName", + GoField: "EncryptionStatusName", + EntField: "encryption_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "estimatedMonthlyCost", - GoField: "EstimatedMonthlyCost", - EntField: "estimated_monthly_cost", - Type: "float64", - Required: false, + InputKey: "estimatedMonthlyCost", + GoField: "EstimatedMonthlyCost", + EntField: "estimated_monthly_cost", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "identifier", - GoField: "Identifier", - EntField: "identifier", - Type: "string", - Required: false, + InputKey: "identifier", + GoField: "Identifier", + EntField: "identifier", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwner", - GoField: "InternalOwner", - EntField: "internal_owner", - Type: "string", - Required: false, + InputKey: "internalOwner", + GoField: "InternalOwner", + EntField: "internal_owner", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerGroupID", - GoField: "InternalOwnerGroupID", - EntField: "internal_owner_group_id", - Type: "string", - Required: false, + InputKey: "internalOwnerGroupID", + GoField: "InternalOwnerGroupID", + EntField: "internal_owner_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerUserID", - GoField: "InternalOwnerUserID", - EntField: "internal_owner_user_id", - Type: "string", - Required: false, + InputKey: "internalOwnerUserID", + GoField: "InternalOwnerUserID", + EntField: "internal_owner_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: true, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "physicalLocation", - GoField: "PhysicalLocation", - EntField: "physical_location", - Type: "string", - Required: false, + InputKey: "physicalLocation", + GoField: "PhysicalLocation", + EntField: "physical_location", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "purchaseDate", - GoField: "PurchaseDate", - EntField: "purchase_date", - Type: "time.Time", - Required: false, + InputKey: "purchaseDate", + GoField: "PurchaseDate", + EntField: "purchase_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "region", - GoField: "Region", - EntField: "region", - Type: "string", - Required: false, + InputKey: "region", + GoField: "Region", + EntField: "region", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "securityTierID", - GoField: "SecurityTierID", - EntField: "security_tier_id", - Type: "string", - Required: false, + InputKey: "securityTierID", + GoField: "SecurityTierID", + EntField: "security_tier_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "securityTierName", - GoField: "SecurityTierName", - EntField: "security_tier_name", - Type: "string", - Required: false, + InputKey: "securityTierName", + GoField: "SecurityTierName", + EntField: "security_tier_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceIdentifier", - GoField: "SourceIdentifier", - EntField: "source_identifier", - Type: "string", - Required: false, + InputKey: "sourceIdentifier", + GoField: "SourceIdentifier", + EntField: "source_identifier", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "sourceType", - GoField: "SourceType", - EntField: "source_type", - Type: "string", - Required: true, + InputKey: "sourceType", + GoField: "SourceType", + EntField: "source_type", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "website", - GoField: "Website", - EntField: "website", - Type: "string", - Required: false, + InputKey: "website", + GoField: "Website", + EntField: "website", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "accessModelID": {}, - "accessModelName": {}, - "assetDataClassificationID": {}, + "accessModelID": {}, + "accessModelName": {}, + "assetDataClassificationID": {}, "assetDataClassificationName": {}, - "assetSubtypeID": {}, - "assetSubtypeName": {}, - "assetType": {}, - "categories": {}, - "containsPii": {}, - "costCenter": {}, - "criticalityID": {}, - "criticalityName": {}, - "description": {}, - "displayName": {}, - "encryptionStatusID": {}, - "encryptionStatusName": {}, - "environmentID": {}, - "environmentName": {}, - "estimatedMonthlyCost": {}, - "identifier": {}, - "integrationID": {}, - "internalNotes": {}, - "internalOwner": {}, - "internalOwnerGroupID": {}, - "internalOwnerUserID": {}, - "name": {}, - "observedAt": {}, - "ownerID": {}, - "physicalLocation": {}, - "purchaseDate": {}, - "region": {}, - "scopeID": {}, - "scopeName": {}, - "securityTierID": {}, - "securityTierName": {}, - "sourceIdentifier": {}, - "sourceType": {}, - "systemInternalID": {}, - "tags": {}, - "website": {}, + "assetSubtypeID": {}, + "assetSubtypeName": {}, + "assetType": {}, + "categories": {}, + "containsPii": {}, + "costCenter": {}, + "criticalityID": {}, + "criticalityName": {}, + "description": {}, + "displayName": {}, + "encryptionStatusID": {}, + "encryptionStatusName": {}, + "environmentID": {}, + "environmentName": {}, + "estimatedMonthlyCost": {}, + "identifier": {}, + "integrationID": {}, + "internalNotes": {}, + "internalOwner": {}, + "internalOwnerGroupID": {}, + "internalOwnerUserID": {}, + "name": {}, + "observedAt": {}, + "ownerID": {}, + "physicalLocation": {}, + "purchaseDate": {}, + "region": {}, + "scopeID": {}, + "scopeName": {}, + "securityTierID": {}, + "securityTierName": {}, + "sourceIdentifier": {}, + "sourceType": {}, + "systemInternalID": {}, + "tags": {}, + "website": {}, }, RequiredKeys: []string{ "assetType", @@ -937,117 +936,117 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Contact", Fields: []IntegrationMappingField{ { - InputKey: "address", - GoField: "Address", - EntField: "address", - Type: "string", - Required: false, + InputKey: "address", + GoField: "Address", + EntField: "address", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "company", - GoField: "Company", - EntField: "company", - Type: "string", - Required: false, + InputKey: "company", + GoField: "Company", + EntField: "company", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "email", - GoField: "Email", - EntField: "email", - Type: "string", - Required: false, + InputKey: "email", + GoField: "Email", + EntField: "email", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "fullName", - GoField: "FullName", - EntField: "full_name", - Type: "string", - Required: false, + InputKey: "fullName", + GoField: "FullName", + EntField: "full_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "phoneNumber", - GoField: "PhoneNumber", - EntField: "phone_number", - Type: "string", - Required: false, + InputKey: "phoneNumber", + GoField: "PhoneNumber", + EntField: "phone_number", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "title", - GoField: "Title", - EntField: "title", - Type: "string", - Required: false, + InputKey: "title", + GoField: "Title", + EntField: "title", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "address": {}, - "company": {}, - "email": {}, - "externalID": {}, - "fullName": {}, + "address": {}, + "company": {}, + "email": {}, + "externalID": {}, + "fullName": {}, "integrationID": {}, - "observedAt": {}, - "phoneNumber": {}, - "status": {}, - "tags": {}, - "title": {}, + "observedAt": {}, + "phoneNumber": {}, + "status": {}, + "tags": {}, + "title": {}, }, RequiredKeys: []string{ "status", @@ -1062,377 +1061,377 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryAccount", Fields: []IntegrationMappingField{ { - InputKey: "accountType", - GoField: "AccountType", - EntField: "account_type", - Type: "string", - Required: false, + InputKey: "accountType", + GoField: "AccountType", + EntField: "account_type", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "avatarRemoteURL", - GoField: "AvatarRemoteURL", - EntField: "avatar_remote_url", - Type: "string", - Required: false, + InputKey: "avatarRemoteURL", + GoField: "AvatarRemoteURL", + EntField: "avatar_remote_url", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "avatarUpdatedAt", - GoField: "AvatarUpdatedAt", - EntField: "avatar_updated_at", - Type: "time.Time", - Required: false, + InputKey: "avatarUpdatedAt", + GoField: "AvatarUpdatedAt", + EntField: "avatar_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "canonicalEmail", - GoField: "CanonicalEmail", - EntField: "canonical_email", - Type: "string", - Required: false, + InputKey: "canonicalEmail", + GoField: "CanonicalEmail", + EntField: "canonical_email", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "department", - GoField: "Department", - EntField: "department", - Type: "string", - Required: false, + InputKey: "department", + GoField: "Department", + EntField: "department", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryName", - GoField: "DirectoryName", - EntField: "directory_name", - Type: "string", - Required: false, + InputKey: "directoryName", + GoField: "DirectoryName", + EntField: "directory_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: false, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "familyName", - GoField: "FamilyName", - EntField: "family_name", - Type: "string", - Required: false, + InputKey: "familyName", + GoField: "FamilyName", + EntField: "family_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "givenName", - GoField: "GivenName", - EntField: "given_name", - Type: "string", - Required: false, + InputKey: "givenName", + GoField: "GivenName", + EntField: "given_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "identityHolderID", - GoField: "IdentityHolderID", - EntField: "identity_holder_id", - Type: "string", - Required: false, + InputKey: "identityHolderID", + GoField: "IdentityHolderID", + EntField: "identity_holder_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "jobTitle", - GoField: "JobTitle", - EntField: "job_title", - Type: "string", - Required: false, + InputKey: "jobTitle", + GoField: "JobTitle", + EntField: "job_title", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastLoginAt", - GoField: "LastLoginAt", - EntField: "last_login_at", - Type: "time.Time", - Required: false, + InputKey: "lastLoginAt", + GoField: "LastLoginAt", + EntField: "last_login_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenIP", - GoField: "LastSeenIP", - EntField: "last_seen_ip", - Type: "string", - Required: false, + InputKey: "lastSeenIP", + GoField: "LastSeenIP", + EntField: "last_seen_ip", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaState", - GoField: "MfaState", - EntField: "mfa_state", - Type: "string", - Required: true, + InputKey: "mfaState", + GoField: "MfaState", + EntField: "mfa_state", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "organizationUnit", - GoField: "OrganizationUnit", - EntField: "organization_unit", - Type: "string", - Required: false, + InputKey: "organizationUnit", + GoField: "OrganizationUnit", + EntField: "organization_unit", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "primarySource", - GoField: "PrimarySource", - EntField: "primary_source", - Type: "bool", - Required: true, + InputKey: "primarySource", + GoField: "PrimarySource", + EntField: "primary_source", + Type: "bool", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "profile", - GoField: "Profile", - EntField: "profile", - Type: "json.RawMessage", - Required: false, + InputKey: "profile", + GoField: "Profile", + EntField: "profile", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profileHash", - GoField: "ProfileHash", - EntField: "profile_hash", - Type: "string", - Required: true, + InputKey: "profileHash", + GoField: "ProfileHash", + EntField: "profile_hash", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "secondaryKey", - GoField: "SecondaryKey", - EntField: "secondary_key", - Type: "string", - Required: false, + InputKey: "secondaryKey", + GoField: "SecondaryKey", + EntField: "secondary_key", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceVersion", - GoField: "SourceVersion", - EntField: "source_version", - Type: "string", - Required: false, + InputKey: "sourceVersion", + GoField: "SourceVersion", + EntField: "source_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "accountType": {}, - "addedAt": {}, - "avatarRemoteURL": {}, - "avatarUpdatedAt": {}, - "canonicalEmail": {}, - "department": {}, + "accountType": {}, + "addedAt": {}, + "avatarRemoteURL": {}, + "avatarUpdatedAt": {}, + "canonicalEmail": {}, + "department": {}, "directoryInstanceID": {}, - "directoryName": {}, - "directorySyncRunID": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "familyName": {}, - "firstSeenAt": {}, - "givenName": {}, - "identityHolderID": {}, - "integrationID": {}, - "jobTitle": {}, - "lastLoginAt": {}, - "lastSeenAt": {}, - "lastSeenIP": {}, - "metadata": {}, - "mfaState": {}, - "observedAt": {}, - "organizationUnit": {}, - "platformID": {}, - "primarySource": {}, - "profile": {}, - "profileHash": {}, - "removedAt": {}, - "scopeID": {}, - "scopeName": {}, - "secondaryKey": {}, - "sourceVersion": {}, - "status": {}, - "tags": {}, + "directoryName": {}, + "directorySyncRunID": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "familyName": {}, + "firstSeenAt": {}, + "givenName": {}, + "identityHolderID": {}, + "integrationID": {}, + "jobTitle": {}, + "lastLoginAt": {}, + "lastSeenAt": {}, + "lastSeenIP": {}, + "metadata": {}, + "mfaState": {}, + "observedAt": {}, + "organizationUnit": {}, + "platformID": {}, + "primarySource": {}, + "profile": {}, + "profileHash": {}, + "removedAt": {}, + "scopeID": {}, + "scopeName": {}, + "secondaryKey": {}, + "sourceVersion": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "externalID", @@ -1454,257 +1453,257 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryGroup", Fields: []IntegrationMappingField{ { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "classification", - GoField: "Classification", - EntField: "classification", - Type: "string", - Required: true, + InputKey: "classification", + GoField: "Classification", + EntField: "classification", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: true, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "email", - GoField: "Email", - EntField: "email", - Type: "string", - Required: false, + InputKey: "email", + GoField: "Email", + EntField: "email", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: false, LookupKey: true, }, { - InputKey: "externalSharingAllowed", - GoField: "ExternalSharingAllowed", - EntField: "external_sharing_allowed", - Type: "bool", - Required: false, + InputKey: "externalSharingAllowed", + GoField: "ExternalSharingAllowed", + EntField: "external_sharing_allowed", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: true, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "memberCount", - GoField: "MemberCount", - EntField: "member_count", - Type: "int", - Required: false, + InputKey: "memberCount", + GoField: "MemberCount", + EntField: "member_count", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profile", - GoField: "Profile", - EntField: "profile", - Type: "json.RawMessage", - Required: false, + InputKey: "profile", + GoField: "Profile", + EntField: "profile", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profileHash", - GoField: "ProfileHash", - EntField: "profile_hash", - Type: "string", - Required: true, + InputKey: "profileHash", + GoField: "ProfileHash", + EntField: "profile_hash", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceVersion", - GoField: "SourceVersion", - EntField: "source_version", - Type: "string", - Required: false, + InputKey: "sourceVersion", + GoField: "SourceVersion", + EntField: "source_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "addedAt": {}, - "classification": {}, - "directoryInstanceID": {}, - "directorySyncRunID": {}, - "displayName": {}, - "email": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, + "addedAt": {}, + "classification": {}, + "directoryInstanceID": {}, + "directorySyncRunID": {}, + "displayName": {}, + "email": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, "externalSharingAllowed": {}, - "firstSeenAt": {}, - "integrationID": {}, - "lastSeenAt": {}, - "memberCount": {}, - "metadata": {}, - "observedAt": {}, - "platformID": {}, - "profile": {}, - "profileHash": {}, - "removedAt": {}, - "scopeID": {}, - "scopeName": {}, - "sourceVersion": {}, - "status": {}, - "tags": {}, + "firstSeenAt": {}, + "integrationID": {}, + "lastSeenAt": {}, + "memberCount": {}, + "metadata": {}, + "observedAt": {}, + "platformID": {}, + "profile": {}, + "profileHash": {}, + "removedAt": {}, + "scopeID": {}, + "scopeName": {}, + "sourceVersion": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "classification", @@ -1725,197 +1724,197 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryMembership", Fields: []IntegrationMappingField{ { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryAccountID", - GoField: "DirectoryAccountID", - EntField: "directory_account_id", - Type: "string", - Required: true, + InputKey: "directoryAccountID", + GoField: "DirectoryAccountID", + EntField: "directory_account_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "directoryGroupID", - GoField: "DirectoryGroupID", - EntField: "directory_group_id", - Type: "string", - Required: true, + InputKey: "directoryGroupID", + GoField: "DirectoryGroupID", + EntField: "directory_group_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: true, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: true, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "lastConfirmedRunID", - GoField: "LastConfirmedRunID", - EntField: "last_confirmed_run_id", - Type: "string", - Required: false, + InputKey: "lastConfirmedRunID", + GoField: "LastConfirmedRunID", + EntField: "last_confirmed_run_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "role", - GoField: "Role", - EntField: "role", - Type: "string", - Required: false, + InputKey: "role", + GoField: "Role", + EntField: "role", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "addedAt": {}, - "directoryAccountID": {}, - "directoryGroupID": {}, + "addedAt": {}, + "directoryAccountID": {}, + "directoryGroupID": {}, "directoryInstanceID": {}, - "directorySyncRunID": {}, - "environmentID": {}, - "environmentName": {}, - "firstSeenAt": {}, - "integrationID": {}, - "lastConfirmedRunID": {}, - "lastSeenAt": {}, - "metadata": {}, - "observedAt": {}, - "platformID": {}, - "removedAt": {}, - "role": {}, - "scopeID": {}, - "scopeName": {}, - "source": {}, + "directorySyncRunID": {}, + "environmentID": {}, + "environmentName": {}, + "firstSeenAt": {}, + "integrationID": {}, + "lastConfirmedRunID": {}, + "lastSeenAt": {}, + "metadata": {}, + "observedAt": {}, + "platformID": {}, + "removedAt": {}, + "role": {}, + "scopeID": {}, + "scopeName": {}, + "source": {}, }, RequiredKeys: []string{ "directoryAccountID", @@ -1936,520 +1935,519 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Entity", Fields: []IntegrationMappingField{ { - InputKey: "annualSpend", - GoField: "AnnualSpend", - EntField: "annual_spend", - Type: "float64", - Required: false, + InputKey: "annualSpend", + GoField: "AnnualSpend", + EntField: "annual_spend", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "approvedForUse", - GoField: "ApprovedForUse", - EntField: "approved_for_use", - Type: "bool", - Required: false, + InputKey: "approvedForUse", + GoField: "ApprovedForUse", + EntField: "approved_for_use", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "autoRenews", - GoField: "AutoRenews", - EntField: "auto_renews", - Type: "bool", - Required: false, + InputKey: "autoRenews", + GoField: "AutoRenews", + EntField: "auto_renews", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "billingModel", - GoField: "BillingModel", - EntField: "billing_model", - Type: "string", - Required: false, + InputKey: "billingModel", + GoField: "BillingModel", + EntField: "billing_model", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractEndDate", - GoField: "ContractEndDate", - EntField: "contract_end_date", - Type: "time.Time", - Required: false, + InputKey: "contractEndDate", + GoField: "ContractEndDate", + EntField: "contract_end_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractRenewalAt", - GoField: "ContractRenewalAt", - EntField: "contract_renewal_at", - Type: "time.Time", - Required: false, + InputKey: "contractRenewalAt", + GoField: "ContractRenewalAt", + EntField: "contract_renewal_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractStartDate", - GoField: "ContractStartDate", - EntField: "contract_start_date", - Type: "time.Time", - Required: false, + InputKey: "contractStartDate", + GoField: "ContractStartDate", + EntField: "contract_start_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "domains", - GoField: "Domains", - EntField: "domains", - Type: "json.RawMessage", - Required: false, + InputKey: "domains", + GoField: "Domains", + EntField: "domains", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entityRelationshipStateID", - GoField: "EntityRelationshipStateID", - EntField: "entity_relationship_state_id", - Type: "string", - Required: false, + InputKey: "entityRelationshipStateID", + GoField: "EntityRelationshipStateID", + EntField: "entity_relationship_state_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entityRelationshipStateName", - GoField: "EntityRelationshipStateName", - EntField: "entity_relationship_state_name", - Type: "string", - Required: false, + InputKey: "entityRelationshipStateName", + GoField: "EntityRelationshipStateName", + EntField: "entity_relationship_state_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySecurityQuestionnaireStatusID", - GoField: "EntitySecurityQuestionnaireStatusID", - EntField: "entity_security_questionnaire_status_id", - Type: "string", - Required: false, + InputKey: "entitySecurityQuestionnaireStatusID", + GoField: "EntitySecurityQuestionnaireStatusID", + EntField: "entity_security_questionnaire_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySecurityQuestionnaireStatusName", - GoField: "EntitySecurityQuestionnaireStatusName", - EntField: "entity_security_questionnaire_status_name", - Type: "string", - Required: false, + InputKey: "entitySecurityQuestionnaireStatusName", + GoField: "EntitySecurityQuestionnaireStatusName", + EntField: "entity_security_questionnaire_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySourceTypeID", - GoField: "EntitySourceTypeID", - EntField: "entity_source_type_id", - Type: "string", - Required: false, + InputKey: "entitySourceTypeID", + GoField: "EntitySourceTypeID", + EntField: "entity_source_type_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySourceTypeName", - GoField: "EntitySourceTypeName", - EntField: "entity_source_type_name", - Type: "string", - Required: false, + InputKey: "entitySourceTypeName", + GoField: "EntitySourceTypeName", + EntField: "entity_source_type_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "hasSoc2", - GoField: "HasSoc2", - EntField: "has_soc2", - Type: "bool", - Required: false, + InputKey: "hasSoc2", + GoField: "HasSoc2", + EntField: "has_soc2", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwner", - GoField: "InternalOwner", - EntField: "internal_owner", - Type: "string", - Required: false, + InputKey: "internalOwner", + GoField: "InternalOwner", + EntField: "internal_owner", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerGroupID", - GoField: "InternalOwnerGroupID", - EntField: "internal_owner_group_id", - Type: "string", - Required: false, + InputKey: "internalOwnerGroupID", + GoField: "InternalOwnerGroupID", + EntField: "internal_owner_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerUserID", - GoField: "InternalOwnerUserID", - EntField: "internal_owner_user_id", - Type: "string", - Required: false, + InputKey: "internalOwnerUserID", + GoField: "InternalOwnerUserID", + EntField: "internal_owner_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastReviewedAt", - GoField: "LastReviewedAt", - EntField: "last_reviewed_at", - Type: "time.Time", - Required: false, + InputKey: "lastReviewedAt", + GoField: "LastReviewedAt", + EntField: "last_reviewed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "links", - GoField: "Links", - EntField: "links", - Type: "json.RawMessage", - Required: false, + InputKey: "links", + GoField: "Links", + EntField: "links", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaEnforced", - GoField: "MfaEnforced", - EntField: "mfa_enforced", - Type: "bool", - Required: false, + InputKey: "mfaEnforced", + GoField: "MfaEnforced", + EntField: "mfa_enforced", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaSupported", - GoField: "MfaSupported", - EntField: "mfa_supported", - Type: "bool", - Required: false, + InputKey: "mfaSupported", + GoField: "MfaSupported", + EntField: "mfa_supported", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: false, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "nextReviewAt", - GoField: "NextReviewAt", - EntField: "next_review_at", - Type: "time.Time", - Required: false, + InputKey: "nextReviewAt", + GoField: "NextReviewAt", + EntField: "next_review_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "providedServices", - GoField: "ProvidedServices", - EntField: "provided_services", - Type: "json.RawMessage", - Required: false, + InputKey: "providedServices", + GoField: "ProvidedServices", + EntField: "provided_services", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "renewalRisk", - GoField: "RenewalRisk", - EntField: "renewal_risk", - Type: "string", - Required: false, + InputKey: "renewalRisk", + GoField: "RenewalRisk", + EntField: "renewal_risk", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewFrequency", - GoField: "ReviewFrequency", - EntField: "review_frequency", - Type: "string", - Required: false, + InputKey: "reviewFrequency", + GoField: "ReviewFrequency", + EntField: "review_frequency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedBy", - GoField: "ReviewedBy", - EntField: "reviewed_by", - Type: "string", - Required: false, + InputKey: "reviewedBy", + GoField: "ReviewedBy", + EntField: "reviewed_by", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedByGroupID", - GoField: "ReviewedByGroupID", - EntField: "reviewed_by_group_id", - Type: "string", - Required: false, + InputKey: "reviewedByGroupID", + GoField: "ReviewedByGroupID", + EntField: "reviewed_by_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedByUserID", - GoField: "ReviewedByUserID", - EntField: "reviewed_by_user_id", - Type: "string", - Required: false, + InputKey: "reviewedByUserID", + GoField: "ReviewedByUserID", + EntField: "reviewed_by_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskRating", - GoField: "RiskRating", - EntField: "risk_rating", - Type: "string", - Required: false, + InputKey: "riskRating", + GoField: "RiskRating", + EntField: "risk_rating", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskScore", - GoField: "RiskScore", - EntField: "risk_score", - Type: "int", - Required: false, + InputKey: "riskScore", + GoField: "RiskScore", + EntField: "risk_score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "soc2PeriodEnd", - GoField: "Soc2PeriodEnd", - EntField: "soc2_period_end", - Type: "time.Time", - Required: false, + InputKey: "soc2PeriodEnd", + GoField: "Soc2PeriodEnd", + EntField: "soc2_period_end", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "spendCurrency", - GoField: "SpendCurrency", - EntField: "spend_currency", - Type: "string", - Required: false, + InputKey: "spendCurrency", + GoField: "SpendCurrency", + EntField: "spend_currency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ssoEnforced", - GoField: "SsoEnforced", - EntField: "sso_enforced", - Type: "bool", - Required: false, + InputKey: "ssoEnforced", + GoField: "SsoEnforced", + EntField: "sso_enforced", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: false, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "statusPageURL", - GoField: "StatusPageURL", - EntField: "status_page_url", - Type: "string", - Required: false, + InputKey: "statusPageURL", + GoField: "StatusPageURL", + EntField: "status_page_url", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "terminationNoticeDays", - GoField: "TerminationNoticeDays", - EntField: "termination_notice_days", - Type: "int", - Required: false, + InputKey: "terminationNoticeDays", + GoField: "TerminationNoticeDays", + EntField: "termination_notice_days", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tier", - GoField: "Tier", - EntField: "tier", - Type: "string", - Required: false, + InputKey: "tier", + GoField: "Tier", + EntField: "tier", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vendorMetadata", - GoField: "VendorMetadata", - EntField: "vendor_metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "vendorMetadata", + GoField: "VendorMetadata", + EntField: "vendor_metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "annualSpend": {}, - "approvedForUse": {}, - "autoRenews": {}, - "billingModel": {}, - "contractEndDate": {}, - "contractRenewalAt": {}, - "contractStartDate": {}, - "displayName": {}, - "domains": {}, - "entityRelationshipStateID": {}, - "entityRelationshipStateName": {}, - "entitySecurityQuestionnaireStatusID": {}, + "annualSpend": {}, + "approvedForUse": {}, + "autoRenews": {}, + "billingModel": {}, + "contractEndDate": {}, + "contractRenewalAt": {}, + "contractStartDate": {}, + "displayName": {}, + "domains": {}, + "entityRelationshipStateID": {}, + "entityRelationshipStateName": {}, + "entitySecurityQuestionnaireStatusID": {}, "entitySecurityQuestionnaireStatusName": {}, - "entitySourceTypeID": {}, - "entitySourceTypeName": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "hasSoc2": {}, - "internalNotes": {}, - "internalOwner": {}, - "internalOwnerGroupID": {}, - "internalOwnerUserID": {}, - "lastReviewedAt": {}, - "links": {}, - "mfaEnforced": {}, - "mfaSupported": {}, - "name": {}, - "nextReviewAt": {}, - "observedAt": {}, - "ownerID": {}, - "providedServices": {}, - "renewalRisk": {}, - "reviewFrequency": {}, - "reviewedBy": {}, - "reviewedByGroupID": {}, - "reviewedByUserID": {}, - "riskRating": {}, - "riskScore": {}, - "scopeID": {}, - "scopeName": {}, - "soc2PeriodEnd": {}, - "spendCurrency": {}, - "ssoEnforced": {}, - "status": {}, - "statusPageURL": {}, - "systemInternalID": {}, - "tags": {}, - "terminationNoticeDays": {}, - "tier": {}, - "vendorMetadata": {}, - }, - RequiredKeys: []string{ + "entitySourceTypeID": {}, + "entitySourceTypeName": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "hasSoc2": {}, + "internalNotes": {}, + "internalOwner": {}, + "internalOwnerGroupID": {}, + "internalOwnerUserID": {}, + "lastReviewedAt": {}, + "links": {}, + "mfaEnforced": {}, + "mfaSupported": {}, + "name": {}, + "nextReviewAt": {}, + "observedAt": {}, + "ownerID": {}, + "providedServices": {}, + "renewalRisk": {}, + "reviewFrequency": {}, + "reviewedBy": {}, + "reviewedByGroupID": {}, + "reviewedByUserID": {}, + "riskRating": {}, + "riskScore": {}, + "scopeID": {}, + "scopeName": {}, + "soc2PeriodEnd": {}, + "spendCurrency": {}, + "ssoEnforced": {}, + "status": {}, + "statusPageURL": {}, + "systemInternalID": {}, + "tags": {}, + "terminationNoticeDays": {}, + "tier": {}, + "vendorMetadata": {}, }, + RequiredKeys: []string{}, UpsertKeys: []string{ "externalID", "name", @@ -2460,470 +2458,469 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Finding", Fields: []IntegrationMappingField{ { - InputKey: "assessmentID", - GoField: "AssessmentID", - EntField: "assessment_id", - Type: "string", - Required: false, + InputKey: "assessmentID", + GoField: "AssessmentID", + EntField: "assessment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "blocksProduction", - GoField: "BlocksProduction", - EntField: "blocks_production", - Type: "bool", - Required: false, + InputKey: "blocksProduction", + GoField: "BlocksProduction", + EntField: "blocks_production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "categories", - GoField: "Categories", - EntField: "categories", - Type: "json.RawMessage", - Required: false, + InputKey: "categories", + GoField: "Categories", + EntField: "categories", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "category", - GoField: "Category", - EntField: "category", - Type: "string", - Required: false, + InputKey: "category", + GoField: "Category", + EntField: "category", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "eventTime", - GoField: "EventTime", - EntField: "event_time", - Type: "time.Time", - Required: false, + InputKey: "eventTime", + GoField: "EventTime", + EntField: "event_time", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "exploitability", - GoField: "Exploitability", - EntField: "exploitability", - Type: "float64", - Required: false, + InputKey: "exploitability", + GoField: "Exploitability", + EntField: "exploitability", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalOwnerID", - GoField: "ExternalOwnerID", - EntField: "external_owner_id", - Type: "string", - Required: false, + InputKey: "externalOwnerID", + GoField: "ExternalOwnerID", + EntField: "external_owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalURI", - GoField: "ExternalURI", - EntField: "external_uri", - Type: "string", - Required: false, + InputKey: "externalURI", + GoField: "ExternalURI", + EntField: "external_uri", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingClass", - GoField: "FindingClass", - EntField: "finding_class", - Type: "string", - Required: false, + InputKey: "findingClass", + GoField: "FindingClass", + EntField: "finding_class", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingStatusID", - GoField: "FindingStatusID", - EntField: "finding_status_id", - Type: "string", - Required: false, + InputKey: "findingStatusID", + GoField: "FindingStatusID", + EntField: "finding_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingStatusName", - GoField: "FindingStatusName", - EntField: "finding_status_name", - Type: "string", - Required: false, + InputKey: "findingStatusName", + GoField: "FindingStatusName", + EntField: "finding_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "float64", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "numericSeverity", - GoField: "NumericSeverity", - EntField: "numeric_severity", - Type: "float64", - Required: false, + InputKey: "numericSeverity", + GoField: "NumericSeverity", + EntField: "numeric_severity", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "open", - GoField: "Open", - EntField: "open", - Type: "bool", - Required: false, + InputKey: "open", + GoField: "Open", + EntField: "open", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "priority", - GoField: "Priority", - EntField: "priority", - Type: "string", - Required: false, + InputKey: "priority", + GoField: "Priority", + EntField: "priority", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "production", - GoField: "Production", - EntField: "production", - Type: "bool", - Required: false, + InputKey: "production", + GoField: "Production", + EntField: "production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "public", - GoField: "Public", - EntField: "public", - Type: "bool", - Required: false, + InputKey: "public", + GoField: "Public", + EntField: "public", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "rawPayload", - GoField: "RawPayload", - EntField: "raw_payload", - Type: "json.RawMessage", - Required: false, + InputKey: "rawPayload", + GoField: "RawPayload", + EntField: "raw_payload", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "recommendation", - GoField: "Recommendation", - EntField: "recommendation", - Type: "string", - Required: false, + InputKey: "recommendation", + GoField: "Recommendation", + EntField: "recommendation", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "recommendedActions", - GoField: "RecommendedActions", - EntField: "recommended_actions", - Type: "string", - Required: false, + InputKey: "recommendedActions", + GoField: "RecommendedActions", + EntField: "recommended_actions", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "references", - GoField: "References", - EntField: "references", - Type: "json.RawMessage", - Required: false, + InputKey: "references", + GoField: "References", + EntField: "references", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "remediationSLA", - GoField: "RemediationSLA", - EntField: "remediation_sla", - Type: "int", - Required: false, + InputKey: "remediationSLA", + GoField: "RemediationSLA", + EntField: "remediation_sla", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reportedAt", - GoField: "ReportedAt", - EntField: "reported_at", - Type: "time.Time", - Required: false, + InputKey: "reportedAt", + GoField: "ReportedAt", + EntField: "reported_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "resourceName", - GoField: "ResourceName", - EntField: "resource_name", - Type: "string", - Required: false, + InputKey: "resourceName", + GoField: "ResourceName", + EntField: "resource_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "float64", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "severity", - GoField: "Severity", - EntField: "severity", - Type: "string", - Required: false, + InputKey: "severity", + GoField: "Severity", + EntField: "severity", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceUpdatedAt", - GoField: "SourceUpdatedAt", - EntField: "source_updated_at", - Type: "time.Time", - Required: false, + InputKey: "sourceUpdatedAt", + GoField: "SourceUpdatedAt", + EntField: "source_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "state", - GoField: "State", - EntField: "state", - Type: "string", - Required: false, + InputKey: "state", + GoField: "State", + EntField: "state", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "stepsToReproduce", - GoField: "StepsToReproduce", - EntField: "steps_to_reproduce", - Type: "json.RawMessage", - Required: false, + InputKey: "stepsToReproduce", + GoField: "StepsToReproduce", + EntField: "steps_to_reproduce", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "targetDetails", - GoField: "TargetDetails", - EntField: "target_details", - Type: "json.RawMessage", - Required: false, + InputKey: "targetDetails", + GoField: "TargetDetails", + EntField: "target_details", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "targets", - GoField: "Targets", - EntField: "targets", - Type: "json.RawMessage", - Required: false, + InputKey: "targets", + GoField: "Targets", + EntField: "targets", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "validated", - GoField: "Validated", - EntField: "validated", - Type: "bool", - Required: false, + InputKey: "validated", + GoField: "Validated", + EntField: "validated", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vector", - GoField: "Vector", - EntField: "vector", - Type: "string", - Required: false, + InputKey: "vector", + GoField: "Vector", + EntField: "vector", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "assessmentID": {}, - "blocksProduction": {}, - "categories": {}, - "category": {}, - "description": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "eventTime": {}, - "exploitability": {}, - "externalID": {}, - "externalOwnerID": {}, - "externalURI": {}, - "findingClass": {}, - "findingStatusID": {}, - "findingStatusName": {}, - "impact": {}, - "internalNotes": {}, - "metadata": {}, - "numericSeverity": {}, - "open": {}, - "ownerID": {}, - "priority": {}, - "production": {}, - "public": {}, - "rawPayload": {}, - "recommendation": {}, + "assessmentID": {}, + "blocksProduction": {}, + "categories": {}, + "category": {}, + "description": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "eventTime": {}, + "exploitability": {}, + "externalID": {}, + "externalOwnerID": {}, + "externalURI": {}, + "findingClass": {}, + "findingStatusID": {}, + "findingStatusName": {}, + "impact": {}, + "internalNotes": {}, + "metadata": {}, + "numericSeverity": {}, + "open": {}, + "ownerID": {}, + "priority": {}, + "production": {}, + "public": {}, + "rawPayload": {}, + "recommendation": {}, "recommendedActions": {}, - "references": {}, - "remediationSLA": {}, - "reportedAt": {}, - "resourceName": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "severity": {}, - "source": {}, - "sourceUpdatedAt": {}, - "state": {}, - "stepsToReproduce": {}, - "systemInternalID": {}, - "tags": {}, - "targetDetails": {}, - "targets": {}, - "validated": {}, - "vector": {}, - }, - RequiredKeys: []string{ + "references": {}, + "remediationSLA": {}, + "reportedAt": {}, + "resourceName": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "severity": {}, + "source": {}, + "sourceUpdatedAt": {}, + "state": {}, + "stepsToReproduce": {}, + "systemInternalID": {}, + "tags": {}, + "targetDetails": {}, + "targets": {}, + "validated": {}, + "vector": {}, }, + RequiredKeys: []string{}, UpsertKeys: []string{ "externalID", }, @@ -2933,337 +2930,337 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Risk", Fields: []IntegrationMappingField{ { - InputKey: "businessCosts", - GoField: "BusinessCosts", - EntField: "business_costs", - Type: "string", - Required: false, + InputKey: "businessCosts", + GoField: "BusinessCosts", + EntField: "business_costs", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "businessCostsJSON", - GoField: "BusinessCostsJSON", - EntField: "business_costs_json", - Type: "json.RawMessage", - Required: false, + InputKey: "businessCostsJSON", + GoField: "BusinessCostsJSON", + EntField: "business_costs_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "details", - GoField: "Details", - EntField: "details", - Type: "string", - Required: false, + InputKey: "details", + GoField: "Details", + EntField: "details", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "detailsJSON", - GoField: "DetailsJSON", - EntField: "details_json", - Type: "json.RawMessage", - Required: false, + InputKey: "detailsJSON", + GoField: "DetailsJSON", + EntField: "details_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dueDate", - GoField: "DueDate", - EntField: "due_date", - Type: "time.Time", - Required: false, + InputKey: "dueDate", + GoField: "DueDate", + EntField: "due_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalUUID", - GoField: "ExternalUUID", - EntField: "external_uuid", - Type: "string", - Required: false, + InputKey: "externalUUID", + GoField: "ExternalUUID", + EntField: "external_uuid", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "string", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastReviewedAt", - GoField: "LastReviewedAt", - EntField: "last_reviewed_at", - Type: "time.Time", - Required: false, + InputKey: "lastReviewedAt", + GoField: "LastReviewedAt", + EntField: "last_reviewed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "likelihood", - GoField: "Likelihood", - EntField: "likelihood", - Type: "string", - Required: false, + InputKey: "likelihood", + GoField: "Likelihood", + EntField: "likelihood", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigatedAt", - GoField: "MitigatedAt", - EntField: "mitigated_at", - Type: "time.Time", - Required: false, + InputKey: "mitigatedAt", + GoField: "MitigatedAt", + EntField: "mitigated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigation", - GoField: "Mitigation", - EntField: "mitigation", - Type: "string", - Required: false, + InputKey: "mitigation", + GoField: "Mitigation", + EntField: "mitigation", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigationJSON", - GoField: "MitigationJSON", - EntField: "mitigation_json", - Type: "json.RawMessage", - Required: false, + InputKey: "mitigationJSON", + GoField: "MitigationJSON", + EntField: "mitigation_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: true, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "nextReviewDueAt", - GoField: "NextReviewDueAt", - EntField: "next_review_due_at", - Type: "time.Time", - Required: false, + InputKey: "nextReviewDueAt", + GoField: "NextReviewDueAt", + EntField: "next_review_due_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "residualScore", - GoField: "ResidualScore", - EntField: "residual_score", - Type: "int", - Required: false, + InputKey: "residualScore", + GoField: "ResidualScore", + EntField: "residual_score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewFrequency", - GoField: "ReviewFrequency", - EntField: "review_frequency", - Type: "string", - Required: false, + InputKey: "reviewFrequency", + GoField: "ReviewFrequency", + EntField: "review_frequency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewRequired", - GoField: "ReviewRequired", - EntField: "review_required", - Type: "bool", - Required: false, + InputKey: "reviewRequired", + GoField: "ReviewRequired", + EntField: "review_required", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskCategoryID", - GoField: "RiskCategoryID", - EntField: "risk_category_id", - Type: "string", - Required: false, + InputKey: "riskCategoryID", + GoField: "RiskCategoryID", + EntField: "risk_category_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskCategoryName", - GoField: "RiskCategoryName", - EntField: "risk_category_name", - Type: "string", - Required: false, + InputKey: "riskCategoryName", + GoField: "RiskCategoryName", + EntField: "risk_category_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskDecision", - GoField: "RiskDecision", - EntField: "risk_decision", - Type: "string", - Required: false, + InputKey: "riskDecision", + GoField: "RiskDecision", + EntField: "risk_decision", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskKindID", - GoField: "RiskKindID", - EntField: "risk_kind_id", - Type: "string", - Required: false, + InputKey: "riskKindID", + GoField: "RiskKindID", + EntField: "risk_kind_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskKindName", - GoField: "RiskKindName", - EntField: "risk_kind_name", - Type: "string", - Required: false, + InputKey: "riskKindName", + GoField: "RiskKindName", + EntField: "risk_kind_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "int", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: false, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "businessCosts": {}, + "businessCosts": {}, "businessCostsJSON": {}, - "details": {}, - "detailsJSON": {}, - "dueDate": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "externalUUID": {}, - "impact": {}, - "integrationID": {}, - "lastReviewedAt": {}, - "likelihood": {}, - "mitigatedAt": {}, - "mitigation": {}, - "mitigationJSON": {}, - "name": {}, - "nextReviewDueAt": {}, - "observedAt": {}, - "ownerID": {}, - "residualScore": {}, - "reviewFrequency": {}, - "reviewRequired": {}, - "riskCategoryID": {}, - "riskCategoryName": {}, - "riskDecision": {}, - "riskKindID": {}, - "riskKindName": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "status": {}, - "tags": {}, + "details": {}, + "detailsJSON": {}, + "dueDate": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "externalUUID": {}, + "impact": {}, + "integrationID": {}, + "lastReviewedAt": {}, + "likelihood": {}, + "mitigatedAt": {}, + "mitigation": {}, + "mitigationJSON": {}, + "name": {}, + "nextReviewDueAt": {}, + "observedAt": {}, + "ownerID": {}, + "residualScore": {}, + "reviewFrequency": {}, + "reviewRequired": {}, + "riskCategoryID": {}, + "riskCategoryName": {}, + "riskDecision": {}, + "riskKindID": {}, + "riskKindName": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "name", @@ -3278,507 +3275,507 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Vulnerability", Fields: []IntegrationMappingField{ { - InputKey: "autoDismissedAt", - GoField: "AutoDismissedAt", - EntField: "auto_dismissed_at", - Type: "time.Time", - Required: false, + InputKey: "autoDismissedAt", + GoField: "AutoDismissedAt", + EntField: "auto_dismissed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "blocking", - GoField: "Blocking", - EntField: "blocking", - Type: "bool", - Required: false, + InputKey: "blocking", + GoField: "Blocking", + EntField: "blocking", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "category", - GoField: "Category", - EntField: "category", - Type: "string", - Required: false, + InputKey: "category", + GoField: "Category", + EntField: "category", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "cveID", - GoField: "CveID", - EntField: "cve_id", - Type: "string", - Required: false, + InputKey: "cveID", + GoField: "CveID", + EntField: "cve_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "cweIds", - GoField: "CweIds", - EntField: "cwe_ids", - Type: "json.RawMessage", - Required: false, + InputKey: "cweIds", + GoField: "CweIds", + EntField: "cwe_ids", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dependencyScope", - GoField: "DependencyScope", - EntField: "dependency_scope", - Type: "string", - Required: false, + InputKey: "dependencyScope", + GoField: "DependencyScope", + EntField: "dependency_scope", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "discoveredAt", - GoField: "DiscoveredAt", - EntField: "discovered_at", - Type: "time.Time", - Required: false, + InputKey: "discoveredAt", + GoField: "DiscoveredAt", + EntField: "discovered_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedAt", - GoField: "DismissedAt", - EntField: "dismissed_at", - Type: "time.Time", - Required: false, + InputKey: "dismissedAt", + GoField: "DismissedAt", + EntField: "dismissed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedComment", - GoField: "DismissedComment", - EntField: "dismissed_comment", - Type: "string", - Required: false, + InputKey: "dismissedComment", + GoField: "DismissedComment", + EntField: "dismissed_comment", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedReason", - GoField: "DismissedReason", - EntField: "dismissed_reason", - Type: "string", - Required: false, + InputKey: "dismissedReason", + GoField: "DismissedReason", + EntField: "dismissed_reason", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "exploitability", - GoField: "Exploitability", - EntField: "exploitability", - Type: "float64", - Required: false, + InputKey: "exploitability", + GoField: "Exploitability", + EntField: "exploitability", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalOwnerID", - GoField: "ExternalOwnerID", - EntField: "external_owner_id", - Type: "string", - Required: false, + InputKey: "externalOwnerID", + GoField: "ExternalOwnerID", + EntField: "external_owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalURI", - GoField: "ExternalURI", - EntField: "external_uri", - Type: "string", - Required: false, + InputKey: "externalURI", + GoField: "ExternalURI", + EntField: "external_uri", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstPatchedVersion", - GoField: "FirstPatchedVersion", - EntField: "first_patched_version", - Type: "string", - Required: false, + InputKey: "firstPatchedVersion", + GoField: "FirstPatchedVersion", + EntField: "first_patched_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "fixedAt", - GoField: "FixedAt", - EntField: "fixed_at", - Type: "time.Time", - Required: false, + InputKey: "fixedAt", + GoField: "FixedAt", + EntField: "fixed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "float64", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impacts", - GoField: "Impacts", - EntField: "impacts", - Type: "json.RawMessage", - Required: false, + InputKey: "impacts", + GoField: "Impacts", + EntField: "impacts", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "manifestPath", - GoField: "ManifestPath", - EntField: "manifest_path", - Type: "string", - Required: false, + InputKey: "manifestPath", + GoField: "ManifestPath", + EntField: "manifest_path", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "open", - GoField: "Open", - EntField: "open", - Type: "bool", - Required: false, + InputKey: "open", + GoField: "Open", + EntField: "open", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "packageEcosystem", - GoField: "PackageEcosystem", - EntField: "package_ecosystem", - Type: "string", - Required: false, + InputKey: "packageEcosystem", + GoField: "PackageEcosystem", + EntField: "package_ecosystem", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "packageName", - GoField: "PackageName", - EntField: "package_name", - Type: "string", - Required: false, + InputKey: "packageName", + GoField: "PackageName", + EntField: "package_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "priority", - GoField: "Priority", - EntField: "priority", - Type: "string", - Required: false, + InputKey: "priority", + GoField: "Priority", + EntField: "priority", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "production", - GoField: "Production", - EntField: "production", - Type: "bool", - Required: false, + InputKey: "production", + GoField: "Production", + EntField: "production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "public", - GoField: "Public", - EntField: "public", - Type: "bool", - Required: false, + InputKey: "public", + GoField: "Public", + EntField: "public", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "publishedAt", - GoField: "PublishedAt", - EntField: "published_at", - Type: "time.Time", - Required: false, + InputKey: "publishedAt", + GoField: "PublishedAt", + EntField: "published_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "rawPayload", - GoField: "RawPayload", - EntField: "raw_payload", - Type: "json.RawMessage", - Required: false, + InputKey: "rawPayload", + GoField: "RawPayload", + EntField: "raw_payload", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "references", - GoField: "References", - EntField: "references", - Type: "json.RawMessage", - Required: false, + InputKey: "references", + GoField: "References", + EntField: "references", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "remediationSLA", - GoField: "RemediationSLA", - EntField: "remediation_sla", - Type: "int", - Required: false, + InputKey: "remediationSLA", + GoField: "RemediationSLA", + EntField: "remediation_sla", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "float64", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "severity", - GoField: "Severity", - EntField: "severity", - Type: "string", - Required: false, + InputKey: "severity", + GoField: "Severity", + EntField: "severity", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceUpdatedAt", - GoField: "SourceUpdatedAt", - EntField: "source_updated_at", - Type: "time.Time", - Required: false, + InputKey: "sourceUpdatedAt", + GoField: "SourceUpdatedAt", + EntField: "source_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "summary", - GoField: "Summary", - EntField: "summary", - Type: "string", - Required: false, + InputKey: "summary", + GoField: "Summary", + EntField: "summary", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "validated", - GoField: "Validated", - EntField: "validated", - Type: "bool", - Required: false, + InputKey: "validated", + GoField: "Validated", + EntField: "validated", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vector", - GoField: "Vector", - EntField: "vector", - Type: "string", - Required: false, + InputKey: "vector", + GoField: "Vector", + EntField: "vector", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerabilityStatusID", - GoField: "VulnerabilityStatusID", - EntField: "vulnerability_status_id", - Type: "string", - Required: false, + InputKey: "vulnerabilityStatusID", + GoField: "VulnerabilityStatusID", + EntField: "vulnerability_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerabilityStatusName", - GoField: "VulnerabilityStatusName", - EntField: "vulnerability_status_name", - Type: "string", - Required: false, + InputKey: "vulnerabilityStatusName", + GoField: "VulnerabilityStatusName", + EntField: "vulnerability_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerableVersionRange", - GoField: "VulnerableVersionRange", - EntField: "vulnerable_version_range", - Type: "string", - Required: false, + InputKey: "vulnerableVersionRange", + GoField: "VulnerableVersionRange", + EntField: "vulnerable_version_range", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "autoDismissedAt": {}, - "blocking": {}, - "category": {}, - "cveID": {}, - "cweIds": {}, - "dependencyScope": {}, - "description": {}, - "discoveredAt": {}, - "dismissedAt": {}, - "dismissedComment": {}, - "dismissedReason": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "exploitability": {}, - "externalID": {}, - "externalOwnerID": {}, - "externalURI": {}, - "firstPatchedVersion": {}, - "fixedAt": {}, - "impact": {}, - "impacts": {}, - "internalNotes": {}, - "manifestPath": {}, - "metadata": {}, - "open": {}, - "ownerID": {}, - "packageEcosystem": {}, - "packageName": {}, - "priority": {}, - "production": {}, - "public": {}, - "publishedAt": {}, - "rawPayload": {}, - "references": {}, - "remediationSLA": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "severity": {}, - "source": {}, - "sourceUpdatedAt": {}, - "summary": {}, - "systemInternalID": {}, - "tags": {}, - "validated": {}, - "vector": {}, - "vulnerabilityStatusID": {}, + "autoDismissedAt": {}, + "blocking": {}, + "category": {}, + "cveID": {}, + "cweIds": {}, + "dependencyScope": {}, + "description": {}, + "discoveredAt": {}, + "dismissedAt": {}, + "dismissedComment": {}, + "dismissedReason": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "exploitability": {}, + "externalID": {}, + "externalOwnerID": {}, + "externalURI": {}, + "firstPatchedVersion": {}, + "fixedAt": {}, + "impact": {}, + "impacts": {}, + "internalNotes": {}, + "manifestPath": {}, + "metadata": {}, + "open": {}, + "ownerID": {}, + "packageEcosystem": {}, + "packageName": {}, + "priority": {}, + "production": {}, + "public": {}, + "publishedAt": {}, + "rawPayload": {}, + "references": {}, + "remediationSLA": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "severity": {}, + "source": {}, + "sourceUpdatedAt": {}, + "summary": {}, + "systemInternalID": {}, + "tags": {}, + "validated": {}, + "vector": {}, + "vulnerabilityStatusID": {}, "vulnerabilityStatusName": {}, - "vulnerableVersionRange": {}, + "vulnerableVersionRange": {}, }, RequiredKeys: []string{ "externalID", diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index c3a24540fc..91f68f40fa 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1 +1 @@ -9af2331134bd1b3230b60970f2649ffd9201937f450d8db0b0140ffb634184de \ No newline at end of file +eab8a921204fd4cc26f633a6e1ae7a9802c49402911daa7b85f8bd1059e47167 \ No newline at end of file diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index e67b4a843d..4f0e03b192 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1 +1 @@ -334675bb3463c1f6534753753cfe42ce770441d2078368b06c088a6eaa805fd8 \ No newline at end of file +18f51e3fa7f78093fafbb8429773e46f1baa8fa81e4964f9a621ec8b4f2bd931 \ No newline at end of file diff --git a/internal/graphapi/organization.resolvers.go b/internal/graphapi/organization.resolvers.go index b7203d25eb..9f41e07c1d 100644 --- a/internal/graphapi/organization.resolvers.go +++ b/internal/graphapi/organization.resolvers.go @@ -9,13 +9,12 @@ import ( "context" "github.com/99designs/gqlgen/graphql" - "github.com/theopenlane/iam/auth" - "github.com/theopenlane/core/internal/ent/generated" "github.com/theopenlane/core/internal/ent/generated/organization" "github.com/theopenlane/core/internal/graphapi/common" "github.com/theopenlane/core/internal/graphapi/model" "github.com/theopenlane/core/pkg/logx" + "github.com/theopenlane/iam/auth" ) // CreateOrganization is the resolver for the createOrganization field. diff --git a/internal/integrations/operations/ingest_generated.go b/internal/integrations/operations/ingest_generated.go index 5ea0e459a1..f203dc38fd 100644 --- a/internal/integrations/operations/ingest_generated.go +++ b/internal/integrations/operations/ingest_generated.go @@ -338,11 +338,11 @@ func buildIngestMetadata(integration *ent.Integration, operationName string, rec } if options.WorkflowMeta != nil { - metadata.WorkflowInstanceID = options.WorkflowMeta.InstanceID - metadata.WorkflowActionKey = options.WorkflowMeta.ActionKey + metadata.WorkflowInstanceID = options.WorkflowMeta.InstanceID + metadata.WorkflowActionKey = options.WorkflowMeta.ActionKey metadata.WorkflowActionIndex = options.WorkflowMeta.ActionIndex - metadata.WorkflowObjectID = options.WorkflowMeta.ObjectID - metadata.WorkflowObjectType = string(options.WorkflowMeta.ObjectType) + metadata.WorkflowObjectID = options.WorkflowMeta.ObjectID + metadata.WorkflowObjectType = string(options.WorkflowMeta.ObjectType) } return metadata From 66b9073c580ccab7882238f410a0751613f04c21 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Tue, 14 Apr 2026 20:11:55 +0100 Subject: [PATCH 22/32] task regenerate --- .task/checksum/generate-ent-smart | 2 +- .task/checksum/generate-graphql-smart | 2 +- .../ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- .../checksum/.history_schema_checksum | 2 +- internal/graphapi/checksum/.schema_checksum | 2 +- .../graphapi/query/identityholder.graphql | 888 +++++++++--------- 7 files changed, 436 insertions(+), 464 deletions(-) diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index 1f7a24feed..a96fd988cb 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1 +1 @@ -8b98445e2002594d7bddc337451ab322 +27467e7e23f24c82c87b3a6598bc82c diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index 7a1ef40e97..5913f2890e 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1 +1 @@ -1a7f234a128c15b5ffd9e2ba25d8f689 +2b67f7eb14ed90793a042f6c33026dcc diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index 6172e228bb..3959e674de 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -fcad8eef27804f062d68e13dcad9a5d34c920233d21f202130f5b288896cdece \ No newline at end of file +2bc71dd746cbfd233d79c5ec907005daf194d1ae76645bfb0f48ccfa1c4da96a \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index 87b082b3d5..ba09b78ea1 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -3c63a886697452e80c0e236ea13bb56bf90c922ca0f04f0834c9cb38b7c3758f \ No newline at end of file +ea2e08964eb9f3059acb2d28d9f13c48bab000cda046d89f61ed898f72184f49 \ No newline at end of file diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index c3a24540fc..a6dcccde30 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1 +1 @@ -9af2331134bd1b3230b60970f2649ffd9201937f450d8db0b0140ffb634184de \ No newline at end of file +810d395c15bf9a8433929386cf7cc24eb5ca6f02925a020018d559170c4c86f4 \ No newline at end of file diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index e67b4a843d..e2312cbb50 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1 +1 @@ -334675bb3463c1f6534753753cfe42ce770441d2078368b06c088a6eaa805fd8 \ No newline at end of file +8b8362953ea04a9a20f67cde46aeca3aece6cdad579c161a76d39a5fa54c8ed2 \ No newline at end of file diff --git a/internal/graphapi/query/identityholder.graphql b/internal/graphapi/query/identityholder.graphql index f442df8d95..e645e2835b 100644 --- a/internal/graphapi/query/identityholder.graphql +++ b/internal/graphapi/query/identityholder.graphql @@ -1,467 +1,439 @@ -mutation CreateBulkCSVIdentityHolder($input: Upload!) { - createBulkCSVIdentityHolder(input: $input) { - identityHolders { - alternateEmail - createdAt - createdBy - department - displayID - email - emailAliases - employerEntityID - endDate - environmentID - environmentName - externalReferenceID - externalUserID - fullName - id - identityHolderType - internalOwner - internalOwnerGroupID - internalOwnerUserID - isActive - isOpenlaneUser - location - metadata - ownerID - phoneNumber - scopeID - scopeName - startDate - status - tags - team - title - updatedAt - updatedBy - userID - workflowEligibleMarker - } - } +mutation CreateBulkCSVIdentityHolder ($input: Upload!) { + createBulkCSVIdentityHolder(input: $input) { + identityHolders { + alternateEmail + createdAt + createdBy + department + displayID + email + emailAliases + employerEntityID + endDate + environmentID + environmentName + externalReferenceID + externalUserID + fullName + id + identityHolderType + internalOwner + internalOwnerGroupID + internalOwnerUserID + isActive + isOpenlaneUser + location + metadata + ownerID + phoneNumber + scopeID + scopeName + startDate + status + tags + team + title + updatedAt + updatedBy + userID + workflowEligibleMarker + } + } } - -mutation CreateBulkIdentityHolder($input: [CreateIdentityHolderInput!]) { - createBulkIdentityHolder(input: $input) { - identityHolders { - alternateEmail - createdAt - createdBy - department - displayID - email - emailAliases - employerEntityID - endDate - environmentID - environmentName - externalReferenceID - externalUserID - fullName - id - identityHolderType - internalOwner - internalOwnerGroupID - internalOwnerUserID - isActive - isOpenlaneUser - location - metadata - ownerID - phoneNumber - scopeID - scopeName - startDate - status - tags - team - title - updatedAt - updatedBy - userID - workflowEligibleMarker - } - } +mutation CreateBulkIdentityHolder ($input: [CreateIdentityHolderInput!]) { + createBulkIdentityHolder(input: $input) { + identityHolders { + alternateEmail + createdAt + createdBy + department + displayID + email + emailAliases + employerEntityID + endDate + environmentID + environmentName + externalReferenceID + externalUserID + fullName + id + identityHolderType + internalOwner + internalOwnerGroupID + internalOwnerUserID + isActive + isOpenlaneUser + location + metadata + ownerID + phoneNumber + scopeID + scopeName + startDate + status + tags + team + title + updatedAt + updatedBy + userID + workflowEligibleMarker + } + } } - -mutation CreateIdentityHolder($input: CreateIdentityHolderInput!) { - createIdentityHolder(input: $input) { - identityHolder { - alternateEmail - createdAt - createdBy - department - displayID - email - emailAliases - employerEntityID - endDate - environmentID - environmentName - externalReferenceID - externalUserID - fullName - id - identityHolderType - internalOwner - internalOwnerGroupID - internalOwnerUserID - isActive - isOpenlaneUser - location - metadata - ownerID - phoneNumber - scopeID - scopeName - startDate - status - tags - team - title - updatedAt - updatedBy - userID - workflowEligibleMarker - } - } +mutation CreateIdentityHolder ($input: CreateIdentityHolderInput!) { + createIdentityHolder(input: $input) { + identityHolder { + alternateEmail + createdAt + createdBy + department + displayID + email + emailAliases + employerEntityID + endDate + environmentID + environmentName + externalReferenceID + externalUserID + fullName + id + identityHolderType + internalOwner + internalOwnerGroupID + internalOwnerUserID + isActive + isOpenlaneUser + location + metadata + ownerID + phoneNumber + scopeID + scopeName + startDate + status + tags + team + title + updatedAt + updatedBy + userID + workflowEligibleMarker + } + } } - -mutation DeleteIdentityHolder($deleteIdentityHolderId: ID!) { - deleteIdentityHolder(id: $deleteIdentityHolderId) { - deletedID - } +mutation DeleteIdentityHolder ($deleteIdentityHolderId: ID!) { + deleteIdentityHolder(id: $deleteIdentityHolderId) { + deletedID + } } - -query GetAllIdentityHolders($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [IdentityHolderOrder!]) { - identityHolders( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - alternateEmail - createdAt - createdBy - department - displayID - email - emailAliases - employerEntityID - endDate - environmentID - environmentName - externalReferenceID - externalUserID - fullName - id - identityHolderType - internalOwner - internalOwnerGroupID - internalOwnerUserID - isActive - isOpenlaneUser - location - metadata - ownerID - phoneNumber - scopeID - scopeName - startDate - status - tags - team - title - updatedAt - updatedBy - userID - workflowEligibleMarker - campaigns { - edges { - node { - id - name - status - displayID - } - } - } - directoryAccounts { - edges { - node { - id - integrationID - externalID - canonicalEmail - displayName - directoryName - avatarRemoteURL - avatarLocalFileID - } - } - } - } - } - } +query GetAllIdentityHolders ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [IdentityHolderOrder!]) { + identityHolders(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + alternateEmail + createdAt + createdBy + department + displayID + email + emailAliases + employerEntityID + endDate + environmentID + environmentName + externalReferenceID + externalUserID + fullName + id + identityHolderType + internalOwner + internalOwnerGroupID + internalOwnerUserID + isActive + isOpenlaneUser + location + metadata + ownerID + phoneNumber + scopeID + scopeName + startDate + status + tags + team + title + updatedAt + updatedBy + userID + workflowEligibleMarker + campaigns { + edges { + node { + id + name + status + displayID + } + } + } + directoryAccounts { + edges { + node { + id + integrationID + externalID + canonicalEmail + displayName + directoryName + avatarRemoteURL + avatarLocalFileID + } + } + } + } + } + } } - -query GetIdentityHolderByID($identityHolderId: ID!) { - identityHolder(id: $identityHolderId) { - alternateEmail - createdAt - createdBy - department - displayID - email - emailAliases - employerEntityID - endDate - environmentID - environmentName - externalReferenceID - externalUserID - fullName - id - identityHolderType - internalOwner - internalOwnerGroupID - internalOwnerUserID - isActive - isOpenlaneUser - location - metadata - ownerID - phoneNumber - scopeID - scopeName - startDate - status - tags - team - title - updatedAt - updatedBy - userID - workflowEligibleMarker - campaigns { - edges { - node { - id - name - status - displayID - } - } - } - directoryAccounts { - edges { - node { - id - integrationID - externalID - canonicalEmail - displayName - directoryName - avatarRemoteURL - avatarLocalFileID - } - } - } - } +query GetIdentityHolderByID ($identityHolderId: ID!) { + identityHolder(id: $identityHolderId) { + alternateEmail + createdAt + createdBy + department + displayID + email + emailAliases + employerEntityID + endDate + environmentID + environmentName + externalReferenceID + externalUserID + fullName + id + identityHolderType + internalOwner + internalOwnerGroupID + internalOwnerUserID + isActive + isOpenlaneUser + location + metadata + ownerID + phoneNumber + scopeID + scopeName + startDate + status + tags + team + title + updatedAt + updatedBy + userID + workflowEligibleMarker + campaigns { + edges { + node { + id + name + status + displayID + } + } + } + directoryAccounts { + edges { + node { + id + integrationID + externalID + canonicalEmail + displayName + directoryName + avatarRemoteURL + avatarLocalFileID + } + } + } + } } - -query GetIdentityHolderDirectoryAccounts($identityHolderId: ID!, $first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [DirectoryAccountOrder!], $where: DirectoryAccountWhereInput) { - identityHolder(id: $identityHolderId) { - id - email - fullName - directoryAccounts( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - where: $where - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - accountType - addedAt - avatarLocalFileID - avatarRemoteURL - avatarUpdatedAt - canonicalEmail - createdAt - createdBy - department - directoryInstanceID - directoryName - directorySyncRunID - displayID - displayName - environmentID - environmentName - externalID - familyName - firstSeenAt - givenName - id - identityHolderID - integrationID - jobTitle - lastLoginAt - lastSeenAt - lastSeenIP - metadata - mfaState - observedAt - organizationUnit - ownerID - platformID - primarySource - profile - profileHash - rawProfileFileID - removedAt - scopeID - scopeName - secondaryKey - sourceVersion - status - tags - updatedAt - updatedBy - } - } - } - } +query GetIdentityHolderDirectoryAccounts ($identityHolderId: ID!, $first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [DirectoryAccountOrder!], $where: DirectoryAccountWhereInput) { + identityHolder(id: $identityHolderId) { + id + email + fullName + directoryAccounts(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy, where: $where) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + accountType + addedAt + avatarLocalFileID + avatarRemoteURL + avatarUpdatedAt + canonicalEmail + createdAt + createdBy + department + directoryInstanceID + directoryName + directorySyncRunID + displayID + displayName + environmentID + environmentName + externalID + familyName + firstSeenAt + givenName + id + identityHolderID + integrationID + jobTitle + lastLoginAt + lastSeenAt + lastSeenIP + metadata + mfaState + observedAt + organizationUnit + ownerID + platformID + primarySource + profile + profileHash + rawProfileFileID + removedAt + scopeID + scopeName + secondaryKey + sourceVersion + status + tags + updatedAt + updatedBy + } + } + } + } } - -query GetIdentityHolders($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [IdentityHolderOrder!], $where: IdentityHolderWhereInput) { - identityHolders( - first: $first - last: $last - after: $after - before: $before - orderBy: $orderBy - where: $where - ) { - totalCount - pageInfo { - startCursor - endCursor - hasPreviousPage - hasNextPage - } - edges { - node { - alternateEmail - createdAt - createdBy - department - displayID - email - emailAliases - employerEntityID - endDate - environmentID - environmentName - externalReferenceID - externalUserID - fullName - id - identityHolderType - internalOwner - internalOwnerGroupID - internalOwnerUserID - isActive - isOpenlaneUser - location - metadata - ownerID - phoneNumber - scopeID - scopeName - startDate - status - tags - team - title - updatedAt - updatedBy - userID - workflowEligibleMarker - campaigns { - edges { - node { - id - name - status - displayID - } - } - } - } - } - } +query GetIdentityHolders ($first: Int, $last: Int, $after: Cursor, $before: Cursor, $orderBy: [IdentityHolderOrder!], $where: IdentityHolderWhereInput) { + identityHolders(first: $first, last: $last, after: $after, before: $before, orderBy: $orderBy, where: $where) { + totalCount + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + node { + alternateEmail + createdAt + createdBy + department + displayID + email + emailAliases + employerEntityID + endDate + environmentID + environmentName + externalReferenceID + externalUserID + fullName + id + identityHolderType + internalOwner + internalOwnerGroupID + internalOwnerUserID + isActive + isOpenlaneUser + location + metadata + ownerID + phoneNumber + scopeID + scopeName + startDate + status + tags + team + title + updatedAt + updatedBy + userID + workflowEligibleMarker + campaigns { + edges { + node { + id + name + status + displayID + } + } + } + } + } + } } - -mutation UpdateIdentityHolder($updateIdentityHolderId: ID!, $input: UpdateIdentityHolderInput!) { - updateIdentityHolder(id: $updateIdentityHolderId, input: $input) { - identityHolder { - alternateEmail - createdAt - createdBy - department - displayID - email - emailAliases - employerEntityID - endDate - environmentID - environmentName - externalReferenceID - externalUserID - fullName - id - identityHolderType - internalOwner - internalOwnerGroupID - internalOwnerUserID - isActive - isOpenlaneUser - location - metadata - ownerID - phoneNumber - scopeID - scopeName - startDate - status - tags - team - title - updatedAt - updatedBy - userID - workflowEligibleMarker - } - } +mutation UpdateIdentityHolder ($updateIdentityHolderId: ID!, $input: UpdateIdentityHolderInput!) { + updateIdentityHolder(id: $updateIdentityHolderId, input: $input) { + identityHolder { + alternateEmail + createdAt + createdBy + department + displayID + email + emailAliases + employerEntityID + endDate + environmentID + environmentName + externalReferenceID + externalUserID + fullName + id + identityHolderType + internalOwner + internalOwnerGroupID + internalOwnerUserID + isActive + isOpenlaneUser + location + metadata + ownerID + phoneNumber + scopeID + scopeName + startDate + status + tags + team + title + updatedAt + updatedBy + userID + workflowEligibleMarker + } + } } From 7045b09c129e00f185c5431cba0d97100e2e0593 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Wed, 15 Apr 2026 14:45:40 +0100 Subject: [PATCH 23/32] task regenerate --- .task/checksum/generate-ent-smart | 2 +- .task/checksum/generate-graphql-smart | 2 +- ...15134507_organization_setting_pending_deletion_at.sql} | 0 ..._organization_setting_pending_deletion_at_history.sql} | 0 db/migrations-goose-postgres/atlas.sum | 4 +++- ...15134438_organization_setting_pending_deletion_at.sql} | 0 ..._organization_setting_pending_deletion_at_history.sql} | 0 db/migrations/atlas.sum | 4 +++- internal/ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- internal/graphapi/checksum/.history_schema_checksum | 2 +- internal/graphapi/checksum/.schema_checksum | 2 +- internal/graphapi/clientschema/checksum/.schema_checksum | 8 +------- .../historyschema/checksum/.history_schema_checksum | 8 +------- internal/graphapi/testclient/checksum/.client_checksum | 8 +------- 15 files changed, 15 insertions(+), 29 deletions(-) rename db/migrations-goose-postgres/{20260414184205_organization_setting_pending_deletion_at.sql => 20260415134507_organization_setting_pending_deletion_at.sql} (100%) rename db/migrations-goose-postgres/{20260414184219_organization_setting_pending_deletion_at_history.sql => 20260415134516_organization_setting_pending_deletion_at_history.sql} (100%) rename db/migrations/{20260414184139_organization_setting_pending_deletion_at.sql => 20260415134438_organization_setting_pending_deletion_at.sql} (100%) rename db/migrations/{20260414184151_organization_setting_pending_deletion_at_history.sql => 20260415134452_organization_setting_pending_deletion_at_history.sql} (100%) diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index 9a0e4e334a..74740f58ff 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1 +1 @@ -2205155eb89e6bff7f80240b5dc043 +8dcfffab519e54b889e2ca5610fbe98d diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index 233c995426..4eac47e9ec 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1 +1 @@ -1f5f776910b19d14e8775c83ac7a770 +b563aeba490e126291ff26c82545b039 diff --git a/db/migrations-goose-postgres/20260414184205_organization_setting_pending_deletion_at.sql b/db/migrations-goose-postgres/20260415134507_organization_setting_pending_deletion_at.sql similarity index 100% rename from db/migrations-goose-postgres/20260414184205_organization_setting_pending_deletion_at.sql rename to db/migrations-goose-postgres/20260415134507_organization_setting_pending_deletion_at.sql diff --git a/db/migrations-goose-postgres/20260414184219_organization_setting_pending_deletion_at_history.sql b/db/migrations-goose-postgres/20260415134516_organization_setting_pending_deletion_at_history.sql similarity index 100% rename from db/migrations-goose-postgres/20260414184219_organization_setting_pending_deletion_at_history.sql rename to db/migrations-goose-postgres/20260415134516_organization_setting_pending_deletion_at_history.sql diff --git a/db/migrations-goose-postgres/atlas.sum b/db/migrations-goose-postgres/atlas.sum index 04e0bf9444..46a9294c11 100644 --- a/db/migrations-goose-postgres/atlas.sum +++ b/db/migrations-goose-postgres/atlas.sum @@ -1,4 +1,4 @@ -h1:9sdp3wRsIXdHw8ocUty8LF9EfoeUvwfQCEwfqDQxsIc= +h1:8ee8utT3topjWco0E4LLforxMsyfPeyXn9B5wJo41eU= 20251229183203_init.sql h1:g/05irCXoqKFObJV2PPLuvDRqma+da41VPsZ5fXQgfE= 20251229183205_init_history.sql h1:P/q2kAHb8zfNMOWzYkKtPbOwoh9GdJUQljSNAiPEjYI= 20251231045229_workflow.sql h1:uUPRLO4yw2y//fPGeqIXRrL+fiEN1TRGkF4wHiqPaPk= @@ -111,3 +111,5 @@ h1:9sdp3wRsIXdHw8ocUty8LF9EfoeUvwfQCEwfqDQxsIc= 20260414152907_nonuniqueuuid.sql h1:btv/8OgYI99xrvUDoG/1Zf99veC+OwHKDQshJ7CQebY= 20260415112252_evidence_review.sql h1:V1w2ro9FzgMlXbsUh8qjK3B/A0W2rcJvD2dj49IT+kU= 20260415112303_evidence_review_history.sql h1:mKLSwKoGyWn+HeYtuk1F0Cw8JxZJpCt8Or+sG0bmnW8= +20260415134507_organization_setting_pending_deletion_at.sql h1:pN9Y9vppJ/R4j9NoK5nHPeI4PZMv5bmV82JoVuSn9Cw= +20260415134516_organization_setting_pending_deletion_at_history.sql h1:ca2X4FxSKBJPeLFK15GtAcqfZ+wpQL4yL82Qv09lUAI= diff --git a/db/migrations/20260414184139_organization_setting_pending_deletion_at.sql b/db/migrations/20260415134438_organization_setting_pending_deletion_at.sql similarity index 100% rename from db/migrations/20260414184139_organization_setting_pending_deletion_at.sql rename to db/migrations/20260415134438_organization_setting_pending_deletion_at.sql diff --git a/db/migrations/20260414184151_organization_setting_pending_deletion_at_history.sql b/db/migrations/20260415134452_organization_setting_pending_deletion_at_history.sql similarity index 100% rename from db/migrations/20260414184151_organization_setting_pending_deletion_at_history.sql rename to db/migrations/20260415134452_organization_setting_pending_deletion_at_history.sql diff --git a/db/migrations/atlas.sum b/db/migrations/atlas.sum index 9e305d566a..8434cd0145 100644 --- a/db/migrations/atlas.sum +++ b/db/migrations/atlas.sum @@ -1,4 +1,4 @@ -h1:yPrRgEc088xMs8tKVmLWBu5JySAPEvuo4WPHbPTiH7U= +h1:vi4SkSvFWZ85c7x/4UY6YPoHzHGZyPTHLWbFPAKFP7A= 20251229183159_init.sql h1:3uf/ftr28zW8YUD9qAaY2GESQHC7pYmkhlI6oDWUCKU= 20251229183201_init_history.sql h1:1tFSeCDWvZgb2Ctw80C/s3tqVPNLADQw9fSDACzL8WA= 20251231045221_workflow.sql h1:5bLq4cHh2kxUV7xajK5bq5McKKpr88HmufYauTdsgUw= @@ -111,3 +111,5 @@ h1:yPrRgEc088xMs8tKVmLWBu5JySAPEvuo4WPHbPTiH7U= 20260414152900_nonuniqueuuid.sql h1:YXD/kcWFbLsrcdrJq17Bf8I+BU0sbMMjgjNbtB7Uouk= 20260415112222_evidence_review.sql h1:VuI9hxlbN7U0hFIoc9k76jIN+KHBS7eIB2eYelx/RUM= 20260415112236_evidence_review_history.sql h1:5J5MNnvzhKVCIrybURqftnx9F5Esndi6A71ZPwocoUg= +20260415134438_organization_setting_pending_deletion_at.sql h1:4l1qhzup6ibwKLGLy9fF0WUC19PkSyEyQkDcwSheBEM= +20260415134452_organization_setting_pending_deletion_at_history.sql h1:8+62jBh7hO3tLnqOf7+qBjXDwIx+uGHcIND6f7rrTH8= diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index 7b56a2027a..5de1fab853 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -8377d3fa2e7f39b80b0f80d361efc392e9f079c2f3d5307bddddc52c0b1c63e7 \ No newline at end of file +6f5b2b4ab46ac8875a1a944810f25e9b376960320d79f1ad049102341d6d1508 \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index 1f96652d5a..048a2541e7 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -ad463d25c7b88c297ace01a2139250c8b47383518db30d0411810c8a99eb6e9f \ No newline at end of file +0a6ae34affde2b61da32807ec709da437e471dc4fff0499402dc11616c346397 \ No newline at end of file diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index 767584e93f..f4f8877045 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1 +1 @@ -bb693d414ec9dda2a8d4ad277e5dd6c5f15e5e3d899328e4e2f76e0ddfb875ac \ No newline at end of file +168627e6cac4c298bb510d81386cf63c238d9f6a0f601e15915d66e7858ad9ea \ No newline at end of file diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index f81e0b8d80..41b9984228 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1 +1 @@ -9839e92fe67f99307d2282ca0f063d79538ba1ede3e9b34e621e3ac9e7e1669b \ No newline at end of file +acdf16ce47f481477a7f874e2842e9085b1ae0911b906dca040e2ff28f04b17d \ No newline at end of file diff --git a/internal/graphapi/clientschema/checksum/.schema_checksum b/internal/graphapi/clientschema/checksum/.schema_checksum index dea2217adb..e6e67dc4a0 100644 --- a/internal/graphapi/clientschema/checksum/.schema_checksum +++ b/internal/graphapi/clientschema/checksum/.schema_checksum @@ -1,7 +1 @@ -<<<<<<< HEAD -3338538a13ee5d2cd8c157ca623347ce0c96d5370b57219e48d1d20abdf3b864 -||||||| 37de8da3c -4cbce0579c287b6a141b5689df9ea436c3e64cc32189d3d9db7b68e6be961b47 -======= -5ad441a5a15004a1f5f1014209ac7c6a26261ee7cc57bebdd64d2791118fcb1a ->>>>>>> origin/main +a6f23706589b9aac5ec68ae1177a32407e3584d43c88b6bdf1761012bab26cc4 \ No newline at end of file diff --git a/internal/graphapi/historyschema/checksum/.history_schema_checksum b/internal/graphapi/historyschema/checksum/.history_schema_checksum index 4752929979..1eb8d16a82 100644 --- a/internal/graphapi/historyschema/checksum/.history_schema_checksum +++ b/internal/graphapi/historyschema/checksum/.history_schema_checksum @@ -1,7 +1 @@ -<<<<<<< HEAD -1bc7cdbb9bb2d1e0d5cc474e9279a425c079c06be0d9411a143dd6327dd56480 -||||||| 37de8da3c -ded39f0d7e1128219e1139f576fd1bcea5fa4c87ffa34585783b39c066bd4e36 -======= -3c28fad6f2f6116a70df66f2d5ef4c8d5b378d4f89bb90deb604e47e1dbdd8ca ->>>>>>> origin/main +00b0f9e6561e65a90322a5eedf995b4ba722e1625a4d79ecbf3aeea774d13157 \ No newline at end of file diff --git a/internal/graphapi/testclient/checksum/.client_checksum b/internal/graphapi/testclient/checksum/.client_checksum index fbf2c74dda..94611f695e 100644 --- a/internal/graphapi/testclient/checksum/.client_checksum +++ b/internal/graphapi/testclient/checksum/.client_checksum @@ -1,7 +1 @@ -<<<<<<< HEAD -56713e11649d69210950a3f694fe8efb2db138be67b1c1cc6e0324b92e4bb09d -||||||| 37de8da3c -51a24de4bc8c025f20507060a8908a46e9cd602b3815accd72a1841f45b0aa26 -======= -619a2fc4010cc2645890f83b694599e5c50b0ef30cdfacc507648b792e06e1b3 ->>>>>>> origin/main +f6a52784dae4c0516795045928c787d9cc75a94a36bd5b0c29c2cdc36d6ab510 \ No newline at end of file From 8b290094d32c9dc4683c8c5a252648bc9e5c20ca Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Wed, 15 Apr 2026 17:33:23 +0100 Subject: [PATCH 24/32] bump gomarkdown up to fix vuln --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2c2d30c5cd..047e8afd5d 100644 --- a/go.mod +++ b/go.mod @@ -48,7 +48,7 @@ require ( github.com/gocarina/gocsv v0.0.0-20240520201108-78e41c74b4b1 github.com/goccy/go-yaml v1.19.2 github.com/golang-jwt/jwt/v5 v5.3.1 - github.com/gomarkdown/markdown v0.0.0-20260217112301-37c66b85d6ab + github.com/gomarkdown/markdown v0.0.0-20260411013819-759bbc3e3207 github.com/google/go-github/v84 v84.0.0 github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 diff --git a/go.sum b/go.sum index a752da05d3..163e07135f 100644 --- a/go.sum +++ b/go.sum @@ -312,8 +312,8 @@ github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUv github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/gomarkdown/markdown v0.0.0-20260217112301-37c66b85d6ab h1:VYNivV7P8IRHUam2swVUNkhIdp0LRRFKe4hXNnoZKTc= -github.com/gomarkdown/markdown v0.0.0-20260217112301-37c66b85d6ab/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= +github.com/gomarkdown/markdown v0.0.0-20260411013819-759bbc3e3207 h1:p7t34F7K4OCRQblcDhNJnP46Uaarz3z2cLcvOZYxWn8= +github.com/gomarkdown/markdown v0.0.0-20260411013819-759bbc3e3207/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= github.com/google/cel-go v0.27.0 h1:e7ih85+4qVrBuqQWTW4FKSqZYokVuc3HnhH5keboFTo= github.com/google/cel-go v0.27.0/go.mod h1:tTJ11FWqnhw5KKpnWpvW9CJC3Y9GK4EIS0WXnBbebzw= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= From bb433be7df57609eeb3890fdcd98924f6ef97e0b Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Wed, 15 Apr 2026 19:34:22 +0100 Subject: [PATCH 25/32] task regenerate --- .task/checksum/generate-graphql-smart | 2 +- internal/ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- internal/graphapi/checksum/.history_schema_checksum | 2 +- internal/graphapi/checksum/.schema_checksum | 2 +- internal/graphapi/clientschema/checksum/.schema_checksum | 2 +- .../graphapi/historyschema/checksum/.history_schema_checksum | 2 +- internal/graphapi/testclient/checksum/.client_checksum | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index ad613c5ae4..83e20b9c8c 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1 +1 @@ -12962a65daa96858436ddc5ab7e1504e +e3022ebd4e0db8a44460d16f9164bce5 diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index a8790f8f03..d4f308dbf6 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -71434179a5ad10caed7fabf528bcdcc9bec5ce03b425b66c66b2b1034c654a9e \ No newline at end of file +72ad4a8a44d2eaa79047b711c22a8ad63561a9135ea32403ec3ab40839888975 \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index be74cc7c49..b9a6d019fe 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -d6ab508c9091731765993d63a4644d543db1c74f2a41c0eea915ac0b4c59f5c9 \ No newline at end of file +182a6595811d9a00531ca84c311c7c91532cca31c9f3e4bd5bc11c4495789e0c \ No newline at end of file diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index 10e0a0c9b8..488c9b7ac1 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1 +1 @@ -9107d46ce0a234bc6a827510c2e4ceeb7d45e80db73d6ea3839161a6785c927a \ No newline at end of file +b564823024c810618bd7de8f8f8f63b84face272e24b2071ee8dafa1a2221ab6 \ No newline at end of file diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index 766c68bea4..96ba5c0d41 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1 +1 @@ -67abfd8b49ed5ab795e16aa6ae65b6b04f6d3bb120d421cac5aa9fdeb4af153e \ No newline at end of file +46298d8d254cd2a6825fb78f75ae013e3ce19002f17f73aab80c6bad4761799f \ No newline at end of file diff --git a/internal/graphapi/clientschema/checksum/.schema_checksum b/internal/graphapi/clientschema/checksum/.schema_checksum index 15f7fdb2a4..8e7a401797 100644 --- a/internal/graphapi/clientschema/checksum/.schema_checksum +++ b/internal/graphapi/clientschema/checksum/.schema_checksum @@ -1 +1 @@ -acffec81e34b33d2a7e0357abbe820a47bf92fe6ede7630bf15373246c348571 \ No newline at end of file +e0a4f0322c80823135a3eab3e5e96d0c5f74d29626475bb55a9415c855caf0c0 \ No newline at end of file diff --git a/internal/graphapi/historyschema/checksum/.history_schema_checksum b/internal/graphapi/historyschema/checksum/.history_schema_checksum index e02eb375be..9c675cf4c5 100644 --- a/internal/graphapi/historyschema/checksum/.history_schema_checksum +++ b/internal/graphapi/historyschema/checksum/.history_schema_checksum @@ -1 +1 @@ -6a2386ce3b7c1a0e4bfc591f3ab72e87b2b55f6e879f5a9009d3cb524918a47e \ No newline at end of file +4bf53909692ecfc912e7caf04312b6813d33c1b8e6a16be821eb4a06309f3a00 \ No newline at end of file diff --git a/internal/graphapi/testclient/checksum/.client_checksum b/internal/graphapi/testclient/checksum/.client_checksum index b4f2ce2226..6ffbc34aaf 100644 --- a/internal/graphapi/testclient/checksum/.client_checksum +++ b/internal/graphapi/testclient/checksum/.client_checksum @@ -1 +1 @@ -d5446e225bc007810d8d6f0537719fcdc4984f10e046e7d6b38302efe67560bd \ No newline at end of file +9ebd835f54b02d5c884020c98e3fa964c75e0f8ed43da180a4814e5df1f44c78 \ No newline at end of file From f63c433ccabe0c58ab0a1b912d0ee246f5fd60c3 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Thu, 16 Apr 2026 19:42:08 +0100 Subject: [PATCH 26/32] task regenerate --- .task/checksum/generate-ent-smart | 2 +- .task/checksum/generate-graphql-smart | 2 +- ...anization_setting_pending_deletion_at.sql} | 0 ...n_setting_pending_deletion_at_history.sql} | 0 db/migrations-goose-postgres/atlas.sum | 4 +- ...anization_setting_pending_deletion_at.sql} | 0 ...n_setting_pending_deletion_at_history.sql} | 0 db/migrations/atlas.sum | 4 +- .../ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- internal/ent/csvgenerated/csv_generated.go | 718 ++- .../integration_mapping_generated.go | 4441 ++++++++--------- .../checksum/.history_schema_checksum | 2 +- internal/graphapi/checksum/.schema_checksum | 2 +- .../operations/ingest_generated.go | 8 +- 15 files changed, 2562 insertions(+), 2625 deletions(-) rename db/migrations-goose-postgres/{20260415134507_organization_setting_pending_deletion_at.sql => 20260416184015_organization_setting_pending_deletion_at.sql} (100%) rename db/migrations-goose-postgres/{20260415134516_organization_setting_pending_deletion_at_history.sql => 20260416184023_organization_setting_pending_deletion_at_history.sql} (100%) rename db/migrations/{20260415134438_organization_setting_pending_deletion_at.sql => 20260416183955_organization_setting_pending_deletion_at.sql} (100%) rename db/migrations/{20260415134452_organization_setting_pending_deletion_at_history.sql => 20260416184004_organization_setting_pending_deletion_at_history.sql} (100%) diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index 34900c29fc..5a6946acf4 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1 +1 @@ -3de521d0aafd9df04f3838fd1349ee18 +e1caaa55467895bed4714eadd6847759 diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index 0032806096..63eeae3145 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1 +1 @@ -94ce339301fbe2c3f3c3477e76f0170c +f43c81fe9653ceb2f11b4cbff1a26da diff --git a/db/migrations-goose-postgres/20260415134507_organization_setting_pending_deletion_at.sql b/db/migrations-goose-postgres/20260416184015_organization_setting_pending_deletion_at.sql similarity index 100% rename from db/migrations-goose-postgres/20260415134507_organization_setting_pending_deletion_at.sql rename to db/migrations-goose-postgres/20260416184015_organization_setting_pending_deletion_at.sql diff --git a/db/migrations-goose-postgres/20260415134516_organization_setting_pending_deletion_at_history.sql b/db/migrations-goose-postgres/20260416184023_organization_setting_pending_deletion_at_history.sql similarity index 100% rename from db/migrations-goose-postgres/20260415134516_organization_setting_pending_deletion_at_history.sql rename to db/migrations-goose-postgres/20260416184023_organization_setting_pending_deletion_at_history.sql diff --git a/db/migrations-goose-postgres/atlas.sum b/db/migrations-goose-postgres/atlas.sum index 90f3f7de2f..a60d79f7d2 100644 --- a/db/migrations-goose-postgres/atlas.sum +++ b/db/migrations-goose-postgres/atlas.sum @@ -1,4 +1,4 @@ -h1:9/sZ2QVc+2tro1EExagLmBAhHiKA94EwoOwOjqELKE8= +h1:prVpiocuouNna2w1m4+hd00CH4jKzi6NurI57dnSsL4= 20251229183203_init.sql h1:g/05irCXoqKFObJV2PPLuvDRqma+da41VPsZ5fXQgfE= 20251229183205_init_history.sql h1:P/q2kAHb8zfNMOWzYkKtPbOwoh9GdJUQljSNAiPEjYI= 20251231045229_workflow.sql h1:uUPRLO4yw2y//fPGeqIXRrL+fiEN1TRGkF4wHiqPaPk= @@ -113,3 +113,5 @@ h1:9/sZ2QVc+2tro1EExagLmBAhHiKA94EwoOwOjqELKE8= 20260415112303_evidence_review_history.sql h1:mKLSwKoGyWn+HeYtuk1F0Cw8JxZJpCt8Or+sG0bmnW8= 20260416163449_index_update.sql h1:QpSTH9HSaPF8iiJCrveaPfA/OBHJ9lZ54hLo6zUiIJY= 20260416163452_index_update_history.sql h1:irWaOs6FtOos55C1N14kV7ko7ors6dEPVMpcC6kdvYc= +20260416184015_organization_setting_pending_deletion_at.sql h1:m8iI7jTEyHDp1rCYgEgnTmxaC6rxaqCFRioOBwWJw5E= +20260416184023_organization_setting_pending_deletion_at_history.sql h1:yBvEvbhOQrXXRja5MJcyrciOGnSqSYnFuQwymUF0YF0= diff --git a/db/migrations/20260415134438_organization_setting_pending_deletion_at.sql b/db/migrations/20260416183955_organization_setting_pending_deletion_at.sql similarity index 100% rename from db/migrations/20260415134438_organization_setting_pending_deletion_at.sql rename to db/migrations/20260416183955_organization_setting_pending_deletion_at.sql diff --git a/db/migrations/20260415134452_organization_setting_pending_deletion_at_history.sql b/db/migrations/20260416184004_organization_setting_pending_deletion_at_history.sql similarity index 100% rename from db/migrations/20260415134452_organization_setting_pending_deletion_at_history.sql rename to db/migrations/20260416184004_organization_setting_pending_deletion_at_history.sql diff --git a/db/migrations/atlas.sum b/db/migrations/atlas.sum index ce14c1e729..a240f76a13 100644 --- a/db/migrations/atlas.sum +++ b/db/migrations/atlas.sum @@ -1,4 +1,4 @@ -h1:3eWRpqaDab5ahUFqxvVT+SmGI2vtlEniTuf2PF4WUKI= +h1:/68s1nswhl/9OSrmKn3xn6ZZsVGXs1eK2FUbDllTVoo= 20251229183159_init.sql h1:3uf/ftr28zW8YUD9qAaY2GESQHC7pYmkhlI6oDWUCKU= 20251229183201_init_history.sql h1:1tFSeCDWvZgb2Ctw80C/s3tqVPNLADQw9fSDACzL8WA= 20251231045221_workflow.sql h1:5bLq4cHh2kxUV7xajK5bq5McKKpr88HmufYauTdsgUw= @@ -113,3 +113,5 @@ h1:3eWRpqaDab5ahUFqxvVT+SmGI2vtlEniTuf2PF4WUKI= 20260415112236_evidence_review_history.sql h1:5J5MNnvzhKVCIrybURqftnx9F5Esndi6A71ZPwocoUg= 20260416163442_index_update.sql h1:g/520tENIvsf3o4Hdb++FO2qZJ8m+rJpW33mWm6K5jk= 20260416163445_index_update_history.sql h1:gwBbHRnaG4f4z784vVKYK7RfWyS6H2yIq2Ol+8l7YoA= +20260416183955_organization_setting_pending_deletion_at.sql h1:855QRH1Z/Q23JlK4RtSHFMtRuYhe+Q5fpiji2yDiUyM= +20260416184004_organization_setting_pending_deletion_at_history.sql h1:aTfxBtTG8td1eOvM/1hD5d0qG52gq6ImxP3w6LvNH3o= diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index 1f89851be7..fd571e5cf1 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -2dce8972acf6b333715335fbcce1e2ac6f1a9f999f90a8584b019fdeb4d0b284 \ No newline at end of file +bd5340663951bc6b2eb07b2ac0dccfc220baca38caac96e23c8a04c08d0bbbea \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index 2812af369d..b59ae24871 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -0688510a9a4b2016b0df3c196ab64bba8e12642ff7189f6dab54a20d2ebc75f9 \ No newline at end of file +1a1b2a8f1ab443971b925f4822c7f01c431d33e883c363f8aba7f8d69bde2007 \ No newline at end of file diff --git a/internal/ent/csvgenerated/csv_generated.go b/internal/ent/csvgenerated/csv_generated.go index e7dfee7eb6..b85151d202 100644 --- a/internal/ent/csvgenerated/csv_generated.go +++ b/internal/ent/csvgenerated/csv_generated.go @@ -7,7 +7,6 @@ import ( "strings" "github.com/theopenlane/core/internal/ent/generated" - "github.com/theopenlane/core/internal/ent/generated/predicate" "github.com/theopenlane/core/internal/ent/generated/actionplan" "github.com/theopenlane/core/internal/ent/generated/asset" "github.com/theopenlane/core/internal/ent/generated/control" @@ -17,6 +16,7 @@ import ( "github.com/theopenlane/core/internal/ent/generated/identityholder" "github.com/theopenlane/core/internal/ent/generated/internalpolicy" "github.com/theopenlane/core/internal/ent/generated/platform" + "github.com/theopenlane/core/internal/ent/generated/predicate" "github.com/theopenlane/core/internal/ent/generated/procedure" "github.com/theopenlane/core/internal/ent/generated/risk" "github.com/theopenlane/core/internal/ent/generated/subcontrol" @@ -845,8 +845,7 @@ type CSVSchemaInfo struct { var CSVReferenceRegistry = map[string]CSVSchemaInfo{ "APIToken": { SchemaName: "APIToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "ActionPlan": { SchemaName: "ActionPlan", @@ -1000,8 +999,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Contact": { SchemaName: "Contact", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Control": { SchemaName: "Control", @@ -1074,28 +1072,23 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ControlImplementation": { SchemaName: "ControlImplementation", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "ControlObjective": { SchemaName: "ControlObjective", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "CustomDomain": { SchemaName: "CustomDomain", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "CustomTypeEnum": { SchemaName: "CustomTypeEnum", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DNSVerification": { SchemaName: "DNSVerification", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DirectoryAccount": { SchemaName: "DirectoryAccount", @@ -1112,38 +1105,31 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "DirectoryGroup": { SchemaName: "DirectoryGroup", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DirectoryMembership": { SchemaName: "DirectoryMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DirectorySyncRun": { SchemaName: "DirectorySyncRun", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Discussion": { SchemaName: "Discussion", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "DocumentData": { SchemaName: "DocumentData", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "EmailBranding": { SchemaName: "EmailBranding", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "EmailTemplate": { SchemaName: "EmailTemplate", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Entity": { SchemaName: "Entity", @@ -1184,13 +1170,11 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "EntityType": { SchemaName: "EntityType", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Event": { SchemaName: "Event", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Evidence": { SchemaName: "Evidence", @@ -1207,43 +1191,35 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Export": { SchemaName: "Export", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "File": { SchemaName: "File", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Finding": { SchemaName: "Finding", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "FindingControl": { SchemaName: "FindingControl", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Group": { SchemaName: "Group", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "GroupMembership": { SchemaName: "GroupMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "GroupSetting": { SchemaName: "GroupSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Hush": { SchemaName: "Hush", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "IdentityHolder": { SchemaName: "IdentityHolder", @@ -1313,88 +1289,71 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Invite": { SchemaName: "Invite", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobResult": { SchemaName: "JobResult", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobRunner": { SchemaName: "JobRunner", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobRunnerRegistrationToken": { SchemaName: "JobRunnerRegistrationToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobRunnerToken": { SchemaName: "JobRunnerToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "JobTemplate": { SchemaName: "JobTemplate", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "MappableDomain": { SchemaName: "MappableDomain", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "MappedControl": { SchemaName: "MappedControl", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Narrative": { SchemaName: "Narrative", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Notification": { SchemaName: "Notification", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "NotificationPreference": { SchemaName: "NotificationPreference", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "NotificationTemplate": { SchemaName: "NotificationTemplate", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Onboarding": { SchemaName: "Onboarding", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "OrgMembership": { SchemaName: "OrgMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Organization": { SchemaName: "Organization", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "OrganizationSetting": { SchemaName: "OrganizationSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "PersonalAccessToken": { SchemaName: "PersonalAccessToken", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Platform": { SchemaName: "Platform", @@ -1557,8 +1516,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ProgramMembership": { SchemaName: "ProgramMembership", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Remediation": { SchemaName: "Remediation", @@ -1665,8 +1623,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "SLADefinition": { SchemaName: "SLADefinition", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Scan": { SchemaName: "Scan", @@ -1744,13 +1701,11 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "ScheduledJobRun": { SchemaName: "ScheduledJobRun", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Standard": { SchemaName: "Standard", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Subcontrol": { SchemaName: "Subcontrol", @@ -1823,28 +1778,23 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Subprocessor": { SchemaName: "Subprocessor", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Subscriber": { SchemaName: "Subscriber", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "SystemDetail": { SchemaName: "SystemDetail", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TFASetting": { SchemaName: "TFASetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TagDefinition": { SchemaName: "TagDefinition", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Task": { SchemaName: "Task", @@ -1877,63 +1827,51 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "Template": { SchemaName: "Template", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenter": { SchemaName: "TrustCenter", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterCompliance": { SchemaName: "TrustCenterCompliance", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterDoc": { SchemaName: "TrustCenterDoc", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterEntity": { SchemaName: "TrustCenterEntity", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterFAQ": { SchemaName: "TrustCenterFAQ", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterNDARequest": { SchemaName: "TrustCenterNDARequest", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterSetting": { SchemaName: "TrustCenterSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterSubprocessor": { SchemaName: "TrustCenterSubprocessor", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "TrustCenterWatermarkConfig": { SchemaName: "TrustCenterWatermarkConfig", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "User": { SchemaName: "User", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "UserSetting": { SchemaName: "UserSetting", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "VendorRiskScore": { SchemaName: "VendorRiskScore", @@ -1950,8 +1888,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "VendorScoringConfig": { SchemaName: "VendorScoringConfig", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, "Vulnerability": { SchemaName: "Vulnerability", @@ -1968,8 +1905,7 @@ var CSVReferenceRegistry = map[string]CSVSchemaInfo{ }, "WorkflowDefinition": { SchemaName: "WorkflowDefinition", - Rules: []CSVReferenceRule{ - }, + Rules: []CSVReferenceRule{}, }, } @@ -2000,7 +1936,7 @@ func (APITokenCSVInput) CSVInputWrapper() {} // APITokenCSVUpdateInput wraps UpdateAPITokenInput with CSV reference columns for bulk updates. type APITokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateAPITokenInput } @@ -2009,10 +1945,10 @@ func (APITokenCSVUpdateInput) CSVInputWrapper() {} // ActionPlanCSVInput wraps CreateActionPlanInput with CSV reference columns. type ActionPlanCSVInput struct { - Input generated.CreateActionPlanInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + Input generated.CreateActionPlanInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks ActionPlanCSVInput for CSV header preprocessing. @@ -2021,11 +1957,11 @@ func (ActionPlanCSVInput) CSVInputWrapper() {} // ActionPlanCSVUpdateInput wraps UpdateActionPlanInput with CSV reference columns for bulk updates. type ActionPlanCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateActionPlanInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + ID string `csv:"ID"` + Input generated.UpdateActionPlanInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks ActionPlanCSVUpdateInput for CSV header preprocessing. @@ -2033,7 +1969,7 @@ func (ActionPlanCSVUpdateInput) CSVInputWrapper() {} // AssessmentCSVInput wraps CreateAssessmentInput with CSV reference columns. type AssessmentCSVInput struct { - Input generated.CreateAssessmentInput + Input generated.CreateAssessmentInput AssessmentTemplateRef string `csv:"AssessmentTemplateRef"` } @@ -2043,8 +1979,8 @@ func (AssessmentCSVInput) CSVInputWrapper() {} // AssessmentCSVUpdateInput wraps UpdateAssessmentInput with CSV reference columns for bulk updates. type AssessmentCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateAssessmentInput + ID string `csv:"ID"` + Input generated.UpdateAssessmentInput AssessmentTemplateRef string `csv:"AssessmentTemplateRef"` } @@ -2053,9 +1989,9 @@ func (AssessmentCSVUpdateInput) CSVInputWrapper() {} // AssessmentResponseCSVInput wraps CreateAssessmentResponseInput with CSV reference columns. type AssessmentResponseCSVInput struct { - Input generated.CreateAssessmentResponseInput + Input generated.CreateAssessmentResponseInput AssessmentIdentityHolderEmail string `csv:"AssessmentIdentityHolderEmail"` - AssessmentResponseEntityName string `csv:"AssessmentResponseEntityName"` + AssessmentResponseEntityName string `csv:"AssessmentResponseEntityName"` } // CSVInputWrapper marks AssessmentResponseCSVInput for CSV header preprocessing. @@ -2063,10 +1999,10 @@ func (AssessmentResponseCSVInput) CSVInputWrapper() {} // AssetCSVInput wraps CreateAssetInput with CSV reference columns. type AssetCSVInput struct { - Input generated.CreateAssetInput + Input generated.CreateAssetInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - SourcePlatformName string `csv:"SourcePlatformName"` + SourcePlatformName string `csv:"SourcePlatformName"` } // CSVInputWrapper marks AssetCSVInput for CSV header preprocessing. @@ -2075,11 +2011,11 @@ func (AssetCSVInput) CSVInputWrapper() {} // AssetCSVUpdateInput wraps UpdateAssetInput with CSV reference columns for bulk updates. type AssetCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateAssetInput + ID string `csv:"ID"` + Input generated.UpdateAssetInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - SourcePlatformName string `csv:"SourcePlatformName"` + SourcePlatformName string `csv:"SourcePlatformName"` } // CSVInputWrapper marks AssetCSVUpdateInput for CSV header preprocessing. @@ -2087,9 +2023,9 @@ func (AssetCSVUpdateInput) CSVInputWrapper() {} // CampaignCSVInput wraps CreateCampaignInput with CSV reference columns. type CampaignCSVInput struct { - Input generated.CreateCampaignInput - CampaignEntityName string `csv:"CampaignEntityName"` - CampaignTemplateRef string `csv:"CampaignTemplateRef"` + Input generated.CreateCampaignInput + CampaignEntityName string `csv:"CampaignEntityName"` + CampaignTemplateRef string `csv:"CampaignTemplateRef"` InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } @@ -2100,10 +2036,10 @@ func (CampaignCSVInput) CSVInputWrapper() {} // CampaignCSVUpdateInput wraps UpdateCampaignInput with CSV reference columns for bulk updates. type CampaignCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateCampaignInput - CampaignEntityName string `csv:"CampaignEntityName"` - CampaignTemplateRef string `csv:"CampaignTemplateRef"` + ID string `csv:"ID"` + Input generated.UpdateCampaignInput + CampaignEntityName string `csv:"CampaignEntityName"` + CampaignTemplateRef string `csv:"CampaignTemplateRef"` InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } @@ -2113,7 +2049,7 @@ func (CampaignCSVUpdateInput) CSVInputWrapper() {} // CampaignTargetCSVInput wraps CreateCampaignTargetInput with CSV reference columns. type CampaignTargetCSVInput struct { - Input generated.CreateCampaignTargetInput + Input generated.CreateCampaignTargetInput CampaignTargetGroupName string `csv:"CampaignTargetGroupName"` CampaignTargetUserEmail string `csv:"CampaignTargetUserEmail"` } @@ -2124,8 +2060,8 @@ func (CampaignTargetCSVInput) CSVInputWrapper() {} // CampaignTargetCSVUpdateInput wraps UpdateCampaignTargetInput with CSV reference columns for bulk updates. type CampaignTargetCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateCampaignTargetInput + ID string `csv:"ID"` + Input generated.UpdateCampaignTargetInput CampaignTargetGroupName string `csv:"CampaignTargetGroupName"` CampaignTargetUserEmail string `csv:"CampaignTargetUserEmail"` } @@ -2144,7 +2080,7 @@ func (ContactCSVInput) CSVInputWrapper() {} // ContactCSVUpdateInput wraps UpdateContactInput with CSV reference columns for bulk updates. type ContactCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateContactInput } @@ -2153,15 +2089,15 @@ func (ContactCSVUpdateInput) CSVInputWrapper() {} // ControlCSVInput wraps CreateControlInput with CSV reference columns. type ControlCSVInput struct { - Input generated.CreateControlInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + Input generated.CreateControlInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks ControlCSVInput for CSV header preprocessing. @@ -2170,16 +2106,16 @@ func (ControlCSVInput) CSVInputWrapper() {} // ControlCSVUpdateInput wraps UpdateControlInput with CSV reference columns for bulk updates. type ControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateControlInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + ID string `csv:"ID"` + Input generated.UpdateControlInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks ControlCSVUpdateInput for CSV header preprocessing. @@ -2196,7 +2132,7 @@ func (ControlImplementationCSVInput) CSVInputWrapper() {} // ControlImplementationCSVUpdateInput wraps UpdateControlImplementationInput with CSV reference columns for bulk updates. type ControlImplementationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateControlImplementationInput } @@ -2214,7 +2150,7 @@ func (ControlObjectiveCSVInput) CSVInputWrapper() {} // ControlObjectiveCSVUpdateInput wraps UpdateControlObjectiveInput with CSV reference columns for bulk updates. type ControlObjectiveCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateControlObjectiveInput } @@ -2232,7 +2168,7 @@ func (CustomDomainCSVInput) CSVInputWrapper() {} // CustomDomainCSVUpdateInput wraps UpdateCustomDomainInput with CSV reference columns for bulk updates. type CustomDomainCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateCustomDomainInput } @@ -2250,7 +2186,7 @@ func (CustomTypeEnumCSVInput) CSVInputWrapper() {} // CustomTypeEnumCSVUpdateInput wraps UpdateCustomTypeEnumInput with CSV reference columns for bulk updates. type CustomTypeEnumCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateCustomTypeEnumInput } @@ -2268,7 +2204,7 @@ func (DNSVerificationCSVInput) CSVInputWrapper() {} // DNSVerificationCSVUpdateInput wraps UpdateDNSVerificationInput with CSV reference columns for bulk updates. type DNSVerificationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDNSVerificationInput } @@ -2277,7 +2213,7 @@ func (DNSVerificationCSVUpdateInput) CSVInputWrapper() {} // DirectoryAccountCSVInput wraps CreateDirectoryAccountInput with CSV reference columns. type DirectoryAccountCSVInput struct { - Input generated.CreateDirectoryAccountInput + Input generated.CreateDirectoryAccountInput DirectoryAccountIdentityHolderEmail string `csv:"DirectoryAccountIdentityHolderEmail"` } @@ -2287,8 +2223,8 @@ func (DirectoryAccountCSVInput) CSVInputWrapper() {} // DirectoryAccountCSVUpdateInput wraps UpdateDirectoryAccountInput with CSV reference columns for bulk updates. type DirectoryAccountCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateDirectoryAccountInput + ID string `csv:"ID"` + Input generated.UpdateDirectoryAccountInput DirectoryAccountIdentityHolderEmail string `csv:"DirectoryAccountIdentityHolderEmail"` } @@ -2306,7 +2242,7 @@ func (DirectoryGroupCSVInput) CSVInputWrapper() {} // DirectoryGroupCSVUpdateInput wraps UpdateDirectoryGroupInput with CSV reference columns for bulk updates. type DirectoryGroupCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectoryGroupInput } @@ -2324,7 +2260,7 @@ func (DirectoryMembershipCSVInput) CSVInputWrapper() {} // DirectoryMembershipCSVUpdateInput wraps UpdateDirectoryMembershipInput with CSV reference columns for bulk updates. type DirectoryMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectoryMembershipInput } @@ -2342,7 +2278,7 @@ func (DirectorySyncRunCSVInput) CSVInputWrapper() {} // DirectorySyncRunCSVUpdateInput wraps UpdateDirectorySyncRunInput with CSV reference columns for bulk updates. type DirectorySyncRunCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDirectorySyncRunInput } @@ -2360,7 +2296,7 @@ func (DiscussionCSVInput) CSVInputWrapper() {} // DiscussionCSVUpdateInput wraps UpdateDiscussionInput with CSV reference columns for bulk updates. type DiscussionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDiscussionInput } @@ -2378,7 +2314,7 @@ func (DocumentDataCSVInput) CSVInputWrapper() {} // DocumentDataCSVUpdateInput wraps UpdateDocumentDataInput with CSV reference columns for bulk updates. type DocumentDataCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateDocumentDataInput } @@ -2396,7 +2332,7 @@ func (EmailBrandingCSVInput) CSVInputWrapper() {} // EmailBrandingCSVUpdateInput wraps UpdateEmailBrandingInput with CSV reference columns for bulk updates. type EmailBrandingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEmailBrandingInput } @@ -2414,7 +2350,7 @@ func (EmailTemplateCSVInput) CSVInputWrapper() {} // EmailTemplateCSVUpdateInput wraps UpdateEmailTemplateInput with CSV reference columns for bulk updates. type EmailTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEmailTemplateInput } @@ -2423,11 +2359,11 @@ func (EmailTemplateCSVUpdateInput) CSVInputWrapper() {} // EntityCSVInput wraps CreateEntityInput with CSV reference columns. type EntityCSVInput struct { - Input generated.CreateEntityInput + Input generated.CreateEntityInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks EntityCSVInput for CSV header preprocessing. @@ -2436,12 +2372,12 @@ func (EntityCSVInput) CSVInputWrapper() {} // EntityCSVUpdateInput wraps UpdateEntityInput with CSV reference columns for bulk updates. type EntityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateEntityInput + ID string `csv:"ID"` + Input generated.UpdateEntityInput InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks EntityCSVUpdateInput for CSV header preprocessing. @@ -2458,7 +2394,7 @@ func (EntityTypeCSVInput) CSVInputWrapper() {} // EntityTypeCSVUpdateInput wraps UpdateEntityTypeInput with CSV reference columns for bulk updates. type EntityTypeCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEntityTypeInput } @@ -2476,7 +2412,7 @@ func (EventCSVInput) CSVInputWrapper() {} // EventCSVUpdateInput wraps UpdateEventInput with CSV reference columns for bulk updates. type EventCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateEventInput } @@ -2485,7 +2421,7 @@ func (EventCSVUpdateInput) CSVInputWrapper() {} // EvidenceCSVInput wraps CreateEvidenceInput with CSV reference columns. type EvidenceCSVInput struct { - Input generated.CreateEvidenceInput + Input generated.CreateEvidenceInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -2495,8 +2431,8 @@ func (EvidenceCSVInput) CSVInputWrapper() {} // EvidenceCSVUpdateInput wraps UpdateEvidenceInput with CSV reference columns for bulk updates. type EvidenceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateEvidenceInput + ID string `csv:"ID"` + Input generated.UpdateEvidenceInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -2514,7 +2450,7 @@ func (ExportCSVInput) CSVInputWrapper() {} // ExportCSVUpdateInput wraps UpdateExportInput with CSV reference columns for bulk updates. type ExportCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateExportInput } @@ -2532,7 +2468,7 @@ func (FileCSVInput) CSVInputWrapper() {} // FileCSVUpdateInput wraps UpdateFileInput with CSV reference columns for bulk updates. type FileCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFileInput } @@ -2550,7 +2486,7 @@ func (FindingCSVInput) CSVInputWrapper() {} // FindingCSVUpdateInput wraps UpdateFindingInput with CSV reference columns for bulk updates. type FindingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFindingInput } @@ -2568,7 +2504,7 @@ func (FindingControlCSVInput) CSVInputWrapper() {} // FindingControlCSVUpdateInput wraps UpdateFindingControlInput with CSV reference columns for bulk updates. type FindingControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateFindingControlInput } @@ -2586,7 +2522,7 @@ func (GroupCSVInput) CSVInputWrapper() {} // GroupCSVUpdateInput wraps UpdateGroupInput with CSV reference columns for bulk updates. type GroupCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupInput } @@ -2604,7 +2540,7 @@ func (GroupMembershipCSVInput) CSVInputWrapper() {} // GroupMembershipCSVUpdateInput wraps UpdateGroupMembershipInput with CSV reference columns for bulk updates. type GroupMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupMembershipInput } @@ -2622,7 +2558,7 @@ func (GroupSettingCSVInput) CSVInputWrapper() {} // GroupSettingCSVUpdateInput wraps UpdateGroupSettingInput with CSV reference columns for bulk updates. type GroupSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateGroupSettingInput } @@ -2640,7 +2576,7 @@ func (HushCSVInput) CSVInputWrapper() {} // HushCSVUpdateInput wraps UpdateHushInput with CSV reference columns for bulk updates. type HushCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateHushInput } @@ -2649,11 +2585,11 @@ func (HushCSVUpdateInput) CSVInputWrapper() {} // IdentityHolderCSVInput wraps CreateIdentityHolderInput with CSV reference columns. type IdentityHolderCSVInput struct { - Input generated.CreateIdentityHolderInput - EmployerEntityName string `csv:"EmployerEntityName"` + Input generated.CreateIdentityHolderInput + EmployerEntityName string `csv:"EmployerEntityName"` IdentityHolderUserEmail string `csv:"IdentityHolderUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } // CSVInputWrapper marks IdentityHolderCSVInput for CSV header preprocessing. @@ -2662,12 +2598,12 @@ func (IdentityHolderCSVInput) CSVInputWrapper() {} // IdentityHolderCSVUpdateInput wraps UpdateIdentityHolderInput with CSV reference columns for bulk updates. type IdentityHolderCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateIdentityHolderInput - EmployerEntityName string `csv:"EmployerEntityName"` + ID string `csv:"ID"` + Input generated.UpdateIdentityHolderInput + EmployerEntityName string `csv:"EmployerEntityName"` IdentityHolderUserEmail string `csv:"IdentityHolderUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` } // CSVInputWrapper marks IdentityHolderCSVUpdateInput for CSV header preprocessing. @@ -2675,10 +2611,10 @@ func (IdentityHolderCSVUpdateInput) CSVInputWrapper() {} // InternalPolicyCSVInput wraps CreateInternalPolicyInput with CSV reference columns. type InternalPolicyCSVInput struct { - Input generated.CreateInternalPolicyInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + Input generated.CreateInternalPolicyInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks InternalPolicyCSVInput for CSV header preprocessing. @@ -2687,11 +2623,11 @@ func (InternalPolicyCSVInput) CSVInputWrapper() {} // InternalPolicyCSVUpdateInput wraps UpdateInternalPolicyInput with CSV reference columns for bulk updates. type InternalPolicyCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateInternalPolicyInput - ApproverGroupName string `csv:"ApproverGroupName"` - ControlRefCodes []string `csv:"ControlRefCodes"` - DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` + ID string `csv:"ID"` + Input generated.UpdateInternalPolicyInput + ApproverGroupName string `csv:"ApproverGroupName"` + ControlRefCodes []string `csv:"ControlRefCodes"` + DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } // CSVInputWrapper marks InternalPolicyCSVUpdateInput for CSV header preprocessing. @@ -2708,7 +2644,7 @@ func (InviteCSVInput) CSVInputWrapper() {} // InviteCSVUpdateInput wraps UpdateInviteInput with CSV reference columns for bulk updates. type InviteCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateInviteInput } @@ -2726,7 +2662,7 @@ func (JobResultCSVInput) CSVInputWrapper() {} // JobResultCSVUpdateInput wraps UpdateJobResultInput with CSV reference columns for bulk updates. type JobResultCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobResultInput } @@ -2744,7 +2680,7 @@ func (JobRunnerCSVInput) CSVInputWrapper() {} // JobRunnerCSVUpdateInput wraps UpdateJobRunnerInput with CSV reference columns for bulk updates. type JobRunnerCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerInput } @@ -2762,7 +2698,7 @@ func (JobRunnerRegistrationTokenCSVInput) CSVInputWrapper() {} // JobRunnerRegistrationTokenCSVUpdateInput wraps UpdateJobRunnerRegistrationTokenInput with CSV reference columns for bulk updates. type JobRunnerRegistrationTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerRegistrationTokenInput } @@ -2780,7 +2716,7 @@ func (JobRunnerTokenCSVInput) CSVInputWrapper() {} // JobRunnerTokenCSVUpdateInput wraps UpdateJobRunnerTokenInput with CSV reference columns for bulk updates. type JobRunnerTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobRunnerTokenInput } @@ -2798,7 +2734,7 @@ func (JobTemplateCSVInput) CSVInputWrapper() {} // JobTemplateCSVUpdateInput wraps UpdateJobTemplateInput with CSV reference columns for bulk updates. type JobTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateJobTemplateInput } @@ -2816,7 +2752,7 @@ func (MappableDomainCSVInput) CSVInputWrapper() {} // MappableDomainCSVUpdateInput wraps UpdateMappableDomainInput with CSV reference columns for bulk updates. type MappableDomainCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateMappableDomainInput } @@ -2834,7 +2770,7 @@ func (MappedControlCSVInput) CSVInputWrapper() {} // MappedControlCSVUpdateInput wraps UpdateMappedControlInput with CSV reference columns for bulk updates. type MappedControlCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateMappedControlInput } @@ -2852,7 +2788,7 @@ func (NarrativeCSVInput) CSVInputWrapper() {} // NarrativeCSVUpdateInput wraps UpdateNarrativeInput with CSV reference columns for bulk updates. type NarrativeCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNarrativeInput } @@ -2870,7 +2806,7 @@ func (NotificationCSVInput) CSVInputWrapper() {} // NotificationCSVUpdateInput wraps UpdateNotificationInput with CSV reference columns for bulk updates. type NotificationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationInput } @@ -2888,7 +2824,7 @@ func (NotificationPreferenceCSVInput) CSVInputWrapper() {} // NotificationPreferenceCSVUpdateInput wraps UpdateNotificationPreferenceInput with CSV reference columns for bulk updates. type NotificationPreferenceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationPreferenceInput } @@ -2906,7 +2842,7 @@ func (NotificationTemplateCSVInput) CSVInputWrapper() {} // NotificationTemplateCSVUpdateInput wraps UpdateNotificationTemplateInput with CSV reference columns for bulk updates. type NotificationTemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateNotificationTemplateInput } @@ -2932,7 +2868,7 @@ func (OrgMembershipCSVInput) CSVInputWrapper() {} // OrgMembershipCSVUpdateInput wraps UpdateOrgMembershipInput with CSV reference columns for bulk updates. type OrgMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrgMembershipInput } @@ -2950,7 +2886,7 @@ func (OrganizationCSVInput) CSVInputWrapper() {} // OrganizationCSVUpdateInput wraps UpdateOrganizationInput with CSV reference columns for bulk updates. type OrganizationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrganizationInput } @@ -2968,7 +2904,7 @@ func (OrganizationSettingCSVInput) CSVInputWrapper() {} // OrganizationSettingCSVUpdateInput wraps UpdateOrganizationSettingInput with CSV reference columns for bulk updates. type OrganizationSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateOrganizationSettingInput } @@ -2986,7 +2922,7 @@ func (PersonalAccessTokenCSVInput) CSVInputWrapper() {} // PersonalAccessTokenCSVUpdateInput wraps UpdatePersonalAccessTokenInput with CSV reference columns for bulk updates. type PersonalAccessTokenCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdatePersonalAccessTokenInput } @@ -2995,21 +2931,21 @@ func (PersonalAccessTokenCSVUpdateInput) CSVInputWrapper() {} // PlatformCSVInput wraps CreatePlatformInput with CSV reference columns. type PlatformCSVInput struct { - Input generated.CreatePlatformInput - BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` - BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` - OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` - PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` - SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` - SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` - SourceAssetNames []string `csv:"SourceAssetNames"` - SourceEntityNames []string `csv:"SourceEntityNames"` - SystemDetailNames []string `csv:"SystemDetailNames"` - TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` - TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` + Input generated.CreatePlatformInput + BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` + BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` + OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` + PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` + SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` + SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` + SourceAssetNames []string `csv:"SourceAssetNames"` + SourceEntityNames []string `csv:"SourceEntityNames"` + SystemDetailNames []string `csv:"SystemDetailNames"` + TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` + TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` } // CSVInputWrapper marks PlatformCSVInput for CSV header preprocessing. @@ -3018,22 +2954,22 @@ func (PlatformCSVInput) CSVInputWrapper() {} // PlatformCSVUpdateInput wraps UpdatePlatformInput with CSV reference columns for bulk updates. type PlatformCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdatePlatformInput - BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` - BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` - InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` - InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` - OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` - OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` - PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` - SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` - SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` - SourceAssetNames []string `csv:"SourceAssetNames"` - SourceEntityNames []string `csv:"SourceEntityNames"` - SystemDetailNames []string `csv:"SystemDetailNames"` - TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` - TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` + ID string `csv:"ID"` + Input generated.UpdatePlatformInput + BusinessOwnerGroupName string `csv:"BusinessOwnerGroupName"` + BusinessOwnerUserEmail string `csv:"BusinessOwnerUserEmail"` + InternalOwnerGroupName string `csv:"InternalOwnerGroupName"` + InternalOwnerUserEmail string `csv:"InternalOwnerUserEmail"` + OutOfScopeAssetNames []string `csv:"OutOfScopeAssetNames"` + OutOfScopeVendorNames []string `csv:"OutOfScopeVendorNames"` + PlatformOwnerEmail string `csv:"PlatformOwnerEmail"` + SecurityOwnerGroupName string `csv:"SecurityOwnerGroupName"` + SecurityOwnerUserEmail string `csv:"SecurityOwnerUserEmail"` + SourceAssetNames []string `csv:"SourceAssetNames"` + SourceEntityNames []string `csv:"SourceEntityNames"` + SystemDetailNames []string `csv:"SystemDetailNames"` + TechnicalOwnerGroupName string `csv:"TechnicalOwnerGroupName"` + TechnicalOwnerUserEmail string `csv:"TechnicalOwnerUserEmail"` } // CSVInputWrapper marks PlatformCSVUpdateInput for CSV header preprocessing. @@ -3041,8 +2977,8 @@ func (PlatformCSVUpdateInput) CSVInputWrapper() {} // ProcedureCSVInput wraps CreateProcedureInput with CSV reference columns. type ProcedureCSVInput struct { - Input generated.CreateProcedureInput - ApproverGroupName string `csv:"ApproverGroupName"` + Input generated.CreateProcedureInput + ApproverGroupName string `csv:"ApproverGroupName"` DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } @@ -3052,9 +2988,9 @@ func (ProcedureCSVInput) CSVInputWrapper() {} // ProcedureCSVUpdateInput wraps UpdateProcedureInput with CSV reference columns for bulk updates. type ProcedureCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateProcedureInput - ApproverGroupName string `csv:"ApproverGroupName"` + ID string `csv:"ID"` + Input generated.UpdateProcedureInput + ApproverGroupName string `csv:"ApproverGroupName"` DocumentDelegateGroupName string `csv:"DocumentDelegateGroupName"` } @@ -3063,9 +2999,9 @@ func (ProcedureCSVUpdateInput) CSVInputWrapper() {} // ProgramCSVInput wraps CreateProgramInput with CSV reference columns. type ProgramCSVInput struct { - Input generated.CreateProgramInput - ControlRefCodes []string `csv:"ControlRefCodes"` - ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` + Input generated.CreateProgramInput + ControlRefCodes []string `csv:"ControlRefCodes"` + ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` } // CSVInputWrapper marks ProgramCSVInput for CSV header preprocessing. @@ -3074,10 +3010,10 @@ func (ProgramCSVInput) CSVInputWrapper() {} // ProgramCSVUpdateInput wraps UpdateProgramInput with CSV reference columns for bulk updates. type ProgramCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateProgramInput - ControlRefCodes []string `csv:"ControlRefCodes"` - ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` + ID string `csv:"ID"` + Input generated.UpdateProgramInput + ControlRefCodes []string `csv:"ControlRefCodes"` + ProgramOwnerEmail string `csv:"ProgramOwnerEmail"` } // CSVInputWrapper marks ProgramCSVUpdateInput for CSV header preprocessing. @@ -3094,7 +3030,7 @@ func (ProgramMembershipCSVInput) CSVInputWrapper() {} // ProgramMembershipCSVUpdateInput wraps UpdateProgramMembershipInput with CSV reference columns for bulk updates. type ProgramMembershipCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateProgramMembershipInput } @@ -3103,8 +3039,8 @@ func (ProgramMembershipCSVUpdateInput) CSVInputWrapper() {} // RemediationCSVInput wraps CreateRemediationInput with CSV reference columns. type RemediationCSVInput struct { - Input generated.CreateRemediationInput - ControlRefCodes []string `csv:"ControlRefCodes"` + Input generated.CreateRemediationInput + ControlRefCodes []string `csv:"ControlRefCodes"` SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } @@ -3114,9 +3050,9 @@ func (RemediationCSVInput) CSVInputWrapper() {} // RemediationCSVUpdateInput wraps UpdateRemediationInput with CSV reference columns for bulk updates. type RemediationCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateRemediationInput - ControlRefCodes []string `csv:"ControlRefCodes"` + ID string `csv:"ID"` + Input generated.UpdateRemediationInput + ControlRefCodes []string `csv:"ControlRefCodes"` SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } @@ -3125,7 +3061,7 @@ func (RemediationCSVUpdateInput) CSVInputWrapper() {} // ReviewCSVInput wraps CreateReviewInput with CSV reference columns. type ReviewCSVInput struct { - Input generated.CreateReviewInput + Input generated.CreateReviewInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3135,8 +3071,8 @@ func (ReviewCSVInput) CSVInputWrapper() {} // ReviewCSVUpdateInput wraps UpdateReviewInput with CSV reference columns for bulk updates. type ReviewCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateReviewInput + ID string `csv:"ID"` + Input generated.UpdateReviewInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3145,15 +3081,15 @@ func (ReviewCSVUpdateInput) CSVInputWrapper() {} // RiskCSVInput wraps CreateRiskInput with CSV reference columns. type RiskCSVInput struct { - Input generated.CreateRiskInput - ActionPlanNames []string `csv:"ActionPlanNames"` - AssetNames []string `csv:"AssetNames"` - ControlRefCodes []string `csv:"ControlRefCodes"` - EntityNames []string `csv:"EntityNames"` - PlatformNames []string `csv:"PlatformNames"` - RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` - StakeholderGroupName string `csv:"StakeholderGroupName"` - SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` + Input generated.CreateRiskInput + ActionPlanNames []string `csv:"ActionPlanNames"` + AssetNames []string `csv:"AssetNames"` + ControlRefCodes []string `csv:"ControlRefCodes"` + EntityNames []string `csv:"EntityNames"` + PlatformNames []string `csv:"PlatformNames"` + RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` + StakeholderGroupName string `csv:"StakeholderGroupName"` + SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } // CSVInputWrapper marks RiskCSVInput for CSV header preprocessing. @@ -3162,16 +3098,16 @@ func (RiskCSVInput) CSVInputWrapper() {} // RiskCSVUpdateInput wraps UpdateRiskInput with CSV reference columns for bulk updates. type RiskCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateRiskInput - ActionPlanNames []string `csv:"ActionPlanNames"` - AssetNames []string `csv:"AssetNames"` - ControlRefCodes []string `csv:"ControlRefCodes"` - EntityNames []string `csv:"EntityNames"` - PlatformNames []string `csv:"PlatformNames"` - RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` - StakeholderGroupName string `csv:"StakeholderGroupName"` - SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` + ID string `csv:"ID"` + Input generated.UpdateRiskInput + ActionPlanNames []string `csv:"ActionPlanNames"` + AssetNames []string `csv:"AssetNames"` + ControlRefCodes []string `csv:"ControlRefCodes"` + EntityNames []string `csv:"EntityNames"` + PlatformNames []string `csv:"PlatformNames"` + RiskDelegateGroupName string `csv:"RiskDelegateGroupName"` + StakeholderGroupName string `csv:"StakeholderGroupName"` + SubcontrolRefCodes []string `csv:"SubcontrolRefCodes"` } // CSVInputWrapper marks RiskCSVUpdateInput for CSV header preprocessing. @@ -3188,7 +3124,7 @@ func (SLADefinitionCSVInput) CSVInputWrapper() {} // SLADefinitionCSVUpdateInput wraps UpdateSLADefinitionInput with CSV reference columns for bulk updates. type SLADefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSLADefinitionInput } @@ -3197,14 +3133,14 @@ func (SLADefinitionCSVUpdateInput) CSVInputWrapper() {} // ScanCSVInput wraps CreateScanInput with CSV reference columns. type ScanCSVInput struct { - Input generated.CreateScanInput - AssignedToGroupName string `csv:"AssignedToGroupName"` - AssignedToUserEmail string `csv:"AssignedToUserEmail"` + Input generated.CreateScanInput + AssignedToGroupName string `csv:"AssignedToGroupName"` + AssignedToUserEmail string `csv:"AssignedToUserEmail"` GeneratedByPlatformName string `csv:"GeneratedByPlatformName"` - PerformedByGroupName string `csv:"PerformedByGroupName"` - PerformedByUserEmail string `csv:"PerformedByUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + PerformedByGroupName string `csv:"PerformedByGroupName"` + PerformedByUserEmail string `csv:"PerformedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks ScanCSVInput for CSV header preprocessing. @@ -3213,15 +3149,15 @@ func (ScanCSVInput) CSVInputWrapper() {} // ScanCSVUpdateInput wraps UpdateScanInput with CSV reference columns for bulk updates. type ScanCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateScanInput - AssignedToGroupName string `csv:"AssignedToGroupName"` - AssignedToUserEmail string `csv:"AssignedToUserEmail"` + ID string `csv:"ID"` + Input generated.UpdateScanInput + AssignedToGroupName string `csv:"AssignedToGroupName"` + AssignedToUserEmail string `csv:"AssignedToUserEmail"` GeneratedByPlatformName string `csv:"GeneratedByPlatformName"` - PerformedByGroupName string `csv:"PerformedByGroupName"` - PerformedByUserEmail string `csv:"PerformedByUserEmail"` - ReviewedByGroupName string `csv:"ReviewedByGroupName"` - ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` + PerformedByGroupName string `csv:"PerformedByGroupName"` + PerformedByUserEmail string `csv:"PerformedByUserEmail"` + ReviewedByGroupName string `csv:"ReviewedByGroupName"` + ReviewedByUserEmail string `csv:"ReviewedByUserEmail"` } // CSVInputWrapper marks ScanCSVUpdateInput for CSV header preprocessing. @@ -3229,7 +3165,7 @@ func (ScanCSVUpdateInput) CSVInputWrapper() {} // ScheduledJobCSVInput wraps CreateScheduledJobInput with CSV reference columns. type ScheduledJobCSVInput struct { - Input generated.CreateScheduledJobInput + Input generated.CreateScheduledJobInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3239,8 +3175,8 @@ func (ScheduledJobCSVInput) CSVInputWrapper() {} // ScheduledJobCSVUpdateInput wraps UpdateScheduledJobInput with CSV reference columns for bulk updates. type ScheduledJobCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateScheduledJobInput + ID string `csv:"ID"` + Input generated.UpdateScheduledJobInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3258,7 +3194,7 @@ func (ScheduledJobRunCSVInput) CSVInputWrapper() {} // ScheduledJobRunCSVUpdateInput wraps UpdateScheduledJobRunInput with CSV reference columns for bulk updates. type ScheduledJobRunCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateScheduledJobRunInput } @@ -3276,7 +3212,7 @@ func (StandardCSVInput) CSVInputWrapper() {} // StandardCSVUpdateInput wraps UpdateStandardInput with CSV reference columns for bulk updates. type StandardCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateStandardInput } @@ -3285,15 +3221,15 @@ func (StandardCSVUpdateInput) CSVInputWrapper() {} // SubcontrolCSVInput wraps CreateSubcontrolInput with CSV reference columns. type SubcontrolCSVInput struct { - Input generated.CreateSubcontrolInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + Input generated.CreateSubcontrolInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks SubcontrolCSVInput for CSV header preprocessing. @@ -3302,16 +3238,16 @@ func (SubcontrolCSVInput) CSVInputWrapper() {} // SubcontrolCSVUpdateInput wraps UpdateSubcontrolInput with CSV reference columns for bulk updates. type SubcontrolCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateSubcontrolInput - ActionPlanNames []string `csv:"ActionPlanNames"` - ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` - ControlObjectiveNames []string `csv:"ControlObjectiveNames"` - ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` - PolicyNames []string `csv:"PolicyNames"` - ProcedureNames []string `csv:"ProcedureNames"` - ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` - RiskNames []string `csv:"RiskNames"` + ID string `csv:"ID"` + Input generated.UpdateSubcontrolInput + ActionPlanNames []string `csv:"ActionPlanNames"` + ControlDelegateGroupName string `csv:"ControlDelegateGroupName"` + ControlObjectiveNames []string `csv:"ControlObjectiveNames"` + ControlOwnerGroupName string `csv:"ControlOwnerGroupName"` + PolicyNames []string `csv:"PolicyNames"` + ProcedureNames []string `csv:"ProcedureNames"` + ResponsiblePartyEntityName string `csv:"ResponsiblePartyEntityName"` + RiskNames []string `csv:"RiskNames"` } // CSVInputWrapper marks SubcontrolCSVUpdateInput for CSV header preprocessing. @@ -3328,7 +3264,7 @@ func (SubprocessorCSVInput) CSVInputWrapper() {} // SubprocessorCSVUpdateInput wraps UpdateSubprocessorInput with CSV reference columns for bulk updates. type SubprocessorCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSubprocessorInput } @@ -3346,7 +3282,7 @@ func (SubscriberCSVInput) CSVInputWrapper() {} // SubscriberCSVUpdateInput wraps UpdateSubscriberInput with CSV reference columns for bulk updates. type SubscriberCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSubscriberInput } @@ -3364,7 +3300,7 @@ func (SystemDetailCSVInput) CSVInputWrapper() {} // SystemDetailCSVUpdateInput wraps UpdateSystemDetailInput with CSV reference columns for bulk updates. type SystemDetailCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateSystemDetailInput } @@ -3382,7 +3318,7 @@ func (TFASettingCSVInput) CSVInputWrapper() {} // TFASettingCSVUpdateInput wraps UpdateTFASettingInput with CSV reference columns for bulk updates. type TFASettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTFASettingInput } @@ -3400,7 +3336,7 @@ func (TagDefinitionCSVInput) CSVInputWrapper() {} // TagDefinitionCSVUpdateInput wraps UpdateTagDefinitionInput with CSV reference columns for bulk updates. type TagDefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTagDefinitionInput } @@ -3409,9 +3345,9 @@ func (TagDefinitionCSVUpdateInput) CSVInputWrapper() {} // TaskCSVInput wraps CreateTaskInput with CSV reference columns. type TaskCSVInput struct { - Input generated.CreateTaskInput - AssigneeEmail string `csv:"AssigneeEmail"` - AssignerEmail string `csv:"AssignerEmail"` + Input generated.CreateTaskInput + AssigneeEmail string `csv:"AssigneeEmail"` + AssignerEmail string `csv:"AssignerEmail"` ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3421,10 +3357,10 @@ func (TaskCSVInput) CSVInputWrapper() {} // TaskCSVUpdateInput wraps UpdateTaskInput with CSV reference columns for bulk updates. type TaskCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateTaskInput - AssigneeEmail string `csv:"AssigneeEmail"` - AssignerEmail string `csv:"AssignerEmail"` + ID string `csv:"ID"` + Input generated.UpdateTaskInput + AssigneeEmail string `csv:"AssigneeEmail"` + AssignerEmail string `csv:"AssignerEmail"` ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3442,7 +3378,7 @@ func (TemplateCSVInput) CSVInputWrapper() {} // TemplateCSVUpdateInput wraps UpdateTemplateInput with CSV reference columns for bulk updates. type TemplateCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTemplateInput } @@ -3460,7 +3396,7 @@ func (TrustCenterCSVInput) CSVInputWrapper() {} // TrustCenterCSVUpdateInput wraps UpdateTrustCenterInput with CSV reference columns for bulk updates. type TrustCenterCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterInput } @@ -3478,7 +3414,7 @@ func (TrustCenterComplianceCSVInput) CSVInputWrapper() {} // TrustCenterComplianceCSVUpdateInput wraps UpdateTrustCenterComplianceInput with CSV reference columns for bulk updates. type TrustCenterComplianceCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterComplianceInput } @@ -3496,7 +3432,7 @@ func (TrustCenterDocCSVInput) CSVInputWrapper() {} // TrustCenterDocCSVUpdateInput wraps UpdateTrustCenterDocInput with CSV reference columns for bulk updates. type TrustCenterDocCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterDocInput } @@ -3514,7 +3450,7 @@ func (TrustCenterEntityCSVInput) CSVInputWrapper() {} // TrustCenterEntityCSVUpdateInput wraps UpdateTrustCenterEntityInput with CSV reference columns for bulk updates. type TrustCenterEntityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterEntityInput } @@ -3532,7 +3468,7 @@ func (TrustCenterFAQCSVInput) CSVInputWrapper() {} // TrustCenterFAQCSVUpdateInput wraps UpdateTrustCenterFAQInput with CSV reference columns for bulk updates. type TrustCenterFAQCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterFAQInput } @@ -3550,7 +3486,7 @@ func (TrustCenterNDARequestCSVInput) CSVInputWrapper() {} // TrustCenterNDARequestCSVUpdateInput wraps UpdateTrustCenterNDARequestInput with CSV reference columns for bulk updates. type TrustCenterNDARequestCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterNDARequestInput } @@ -3568,7 +3504,7 @@ func (TrustCenterSettingCSVInput) CSVInputWrapper() {} // TrustCenterSettingCSVUpdateInput wraps UpdateTrustCenterSettingInput with CSV reference columns for bulk updates. type TrustCenterSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterSettingInput } @@ -3586,7 +3522,7 @@ func (TrustCenterSubprocessorCSVInput) CSVInputWrapper() {} // TrustCenterSubprocessorCSVUpdateInput wraps UpdateTrustCenterSubprocessorInput with CSV reference columns for bulk updates. type TrustCenterSubprocessorCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterSubprocessorInput } @@ -3604,7 +3540,7 @@ func (TrustCenterWatermarkConfigCSVInput) CSVInputWrapper() {} // TrustCenterWatermarkConfigCSVUpdateInput wraps UpdateTrustCenterWatermarkConfigInput with CSV reference columns for bulk updates. type TrustCenterWatermarkConfigCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateTrustCenterWatermarkConfigInput } @@ -3622,7 +3558,7 @@ func (UserCSVInput) CSVInputWrapper() {} // UserCSVUpdateInput wraps UpdateUserInput with CSV reference columns for bulk updates. type UserCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateUserInput } @@ -3640,7 +3576,7 @@ func (UserSettingCSVInput) CSVInputWrapper() {} // UserSettingCSVUpdateInput wraps UpdateUserSettingInput with CSV reference columns for bulk updates. type UserSettingCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateUserSettingInput } @@ -3649,7 +3585,7 @@ func (UserSettingCSVUpdateInput) CSVInputWrapper() {} // VendorRiskScoreCSVInput wraps CreateVendorRiskScoreInput with CSV reference columns. type VendorRiskScoreCSVInput struct { - Input generated.CreateVendorRiskScoreInput + Input generated.CreateVendorRiskScoreInput VendorRiskScoreEntityName string `csv:"VendorRiskScoreEntityName"` } @@ -3659,8 +3595,8 @@ func (VendorRiskScoreCSVInput) CSVInputWrapper() {} // VendorRiskScoreCSVUpdateInput wraps UpdateVendorRiskScoreInput with CSV reference columns for bulk updates. type VendorRiskScoreCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateVendorRiskScoreInput + ID string `csv:"ID"` + Input generated.UpdateVendorRiskScoreInput VendorRiskScoreEntityName string `csv:"VendorRiskScoreEntityName"` } @@ -3678,7 +3614,7 @@ func (VendorScoringConfigCSVInput) CSVInputWrapper() {} // VendorScoringConfigCSVUpdateInput wraps UpdateVendorScoringConfigInput with CSV reference columns for bulk updates. type VendorScoringConfigCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateVendorScoringConfigInput } @@ -3687,7 +3623,7 @@ func (VendorScoringConfigCSVUpdateInput) CSVInputWrapper() {} // VulnerabilityCSVInput wraps CreateVulnerabilityInput with CSV reference columns. type VulnerabilityCSVInput struct { - Input generated.CreateVulnerabilityInput + Input generated.CreateVulnerabilityInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3697,8 +3633,8 @@ func (VulnerabilityCSVInput) CSVInputWrapper() {} // VulnerabilityCSVUpdateInput wraps UpdateVulnerabilityInput with CSV reference columns for bulk updates. type VulnerabilityCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` - Input generated.UpdateVulnerabilityInput + ID string `csv:"ID"` + Input generated.UpdateVulnerabilityInput ControlRefCodes []string `csv:"ControlRefCodes"` } @@ -3716,7 +3652,7 @@ func (WorkflowDefinitionCSVInput) CSVInputWrapper() {} // WorkflowDefinitionCSVUpdateInput wraps UpdateWorkflowDefinitionInput with CSV reference columns for bulk updates. type WorkflowDefinitionCSVUpdateInput struct { // ID is the entity ID to update - ID string `csv:"ID"` + ID string `csv:"ID"` Input generated.UpdateWorkflowDefinitionInput } diff --git a/internal/ent/integrationgenerated/integration_mapping_generated.go b/internal/ent/integrationgenerated/integration_mapping_generated.go index fc7f05d402..c16f997a54 100644 --- a/internal/ent/integrationgenerated/integration_mapping_generated.go +++ b/internal/ent/integrationgenerated/integration_mapping_generated.go @@ -6,25 +6,24 @@ import ( "github.com/theopenlane/core/pkg/gala" ) - // IntegrationMappingField describes an integration mapping target field type IntegrationMappingField struct { - InputKey string - GoField string - EntField string - Type string - Required bool + InputKey string + GoField string + EntField string + Type string + Required bool UpsertKey bool LookupKey bool } // IntegrationMappingSchema describes a schema with integration mapping fields type IntegrationMappingSchema struct { - Name string - Fields []IntegrationMappingField - AllowedKeys map[string]struct{} + Name string + Fields []IntegrationMappingField + AllowedKeys map[string]struct{} RequiredKeys []string - UpsertKeys []string + UpsertKeys []string StockPersist bool } @@ -33,45 +32,45 @@ type IntegrationIngestSource string const ( IntegrationIngestSourceOperation IntegrationIngestSource = "operation" - IntegrationIngestSourceWorkflow IntegrationIngestSource = "workflow" - IntegrationIngestSourceWebhook IntegrationIngestSource = "webhook" - IntegrationIngestSourceDirect IntegrationIngestSource = "direct" + IntegrationIngestSourceWorkflow IntegrationIngestSource = "workflow" + IntegrationIngestSourceWebhook IntegrationIngestSource = "webhook" + IntegrationIngestSourceDirect IntegrationIngestSource = "direct" ) // IntegrationIngestMetadata captures source-agnostic execution context for second-stage ingest handlers type IntegrationIngestMetadata struct { - IntegrationID string `json:"integrationId"` - DefinitionID string `json:"definitionId,omitempty"` - Operation string `json:"operation,omitempty"` - Variant string `json:"variant,omitempty"` - Source IntegrationIngestSource `json:"source,omitempty"` - RunID string `json:"runId,omitempty"` - Webhook string `json:"webhook,omitempty"` - WebhookEvent string `json:"webhookEvent,omitempty"` - DeliveryID string `json:"deliveryId,omitempty"` - WorkflowInstanceID string `json:"workflowInstanceId,omitempty"` - WorkflowActionKey string `json:"workflowActionKey,omitempty"` - WorkflowActionIndex int `json:"workflowActionIndex,omitempty"` - WorkflowObjectID string `json:"workflowObjectId,omitempty"` - WorkflowObjectType string `json:"workflowObjectType,omitempty"` + IntegrationID string `json:"integrationId"` + DefinitionID string `json:"definitionId,omitempty"` + Operation string `json:"operation,omitempty"` + Variant string `json:"variant,omitempty"` + Source IntegrationIngestSource `json:"source,omitempty"` + RunID string `json:"runId,omitempty"` + Webhook string `json:"webhook,omitempty"` + WebhookEvent string `json:"webhookEvent,omitempty"` + DeliveryID string `json:"deliveryId,omitempty"` + WorkflowInstanceID string `json:"workflowInstanceId,omitempty"` + WorkflowActionKey string `json:"workflowActionKey,omitempty"` + WorkflowActionIndex int `json:"workflowActionIndex,omitempty"` + WorkflowObjectID string `json:"workflowObjectId,omitempty"` + WorkflowObjectType string `json:"workflowObjectType,omitempty"` } const ( - IntegrationMappingSchemaAsset = "Asset" - IntegrationMappingSchemaContact = "Contact" - IntegrationMappingSchemaDirectoryAccount = "DirectoryAccount" - IntegrationMappingSchemaDirectoryGroup = "DirectoryGroup" + IntegrationMappingSchemaAsset = "Asset" + IntegrationMappingSchemaContact = "Contact" + IntegrationMappingSchemaDirectoryAccount = "DirectoryAccount" + IntegrationMappingSchemaDirectoryGroup = "DirectoryGroup" IntegrationMappingSchemaDirectoryMembership = "DirectoryMembership" - IntegrationMappingSchemaEntity = "Entity" - IntegrationMappingSchemaFinding = "Finding" - IntegrationMappingSchemaRisk = "Risk" - IntegrationMappingSchemaVulnerability = "Vulnerability" + IntegrationMappingSchemaEntity = "Entity" + IntegrationMappingSchemaFinding = "Finding" + IntegrationMappingSchemaRisk = "Risk" + IntegrationMappingSchemaVulnerability = "Vulnerability" ) // IntegrationIngestAssetRequested is the typed second-stage ingest contract for Asset records type IntegrationIngestAssetRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateAssetInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateAssetInput `json:"input"` } // IntegrationIngestAssetRequestedTopic is the typed Gala topic for Asset ingest requests @@ -81,8 +80,8 @@ var IntegrationIngestAssetRequestedTopic = gala.Topic[IntegrationIngestAssetRequ // IntegrationIngestContactRequested is the typed second-stage ingest contract for Contact records type IntegrationIngestContactRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateContactInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateContactInput `json:"input"` } // IntegrationIngestContactRequestedTopic is the typed Gala topic for Contact ingest requests @@ -92,8 +91,8 @@ var IntegrationIngestContactRequestedTopic = gala.Topic[IntegrationIngestContact // IntegrationIngestDirectoryAccountRequested is the typed second-stage ingest contract for DirectoryAccount records type IntegrationIngestDirectoryAccountRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryAccountInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryAccountInput `json:"input"` } // IntegrationIngestDirectoryAccountRequestedTopic is the typed Gala topic for DirectoryAccount ingest requests @@ -103,8 +102,8 @@ var IntegrationIngestDirectoryAccountRequestedTopic = gala.Topic[IntegrationInge // IntegrationIngestDirectoryGroupRequested is the typed second-stage ingest contract for DirectoryGroup records type IntegrationIngestDirectoryGroupRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryGroupInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryGroupInput `json:"input"` } // IntegrationIngestDirectoryGroupRequestedTopic is the typed Gala topic for DirectoryGroup ingest requests @@ -114,8 +113,8 @@ var IntegrationIngestDirectoryGroupRequestedTopic = gala.Topic[IntegrationIngest // IntegrationIngestDirectoryMembershipRequested is the typed second-stage ingest contract for DirectoryMembership records type IntegrationIngestDirectoryMembershipRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateDirectoryMembershipInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateDirectoryMembershipInput `json:"input"` } // IntegrationIngestDirectoryMembershipRequestedTopic is the typed Gala topic for DirectoryMembership ingest requests @@ -125,8 +124,8 @@ var IntegrationIngestDirectoryMembershipRequestedTopic = gala.Topic[IntegrationI // IntegrationIngestEntityRequested is the typed second-stage ingest contract for Entity records type IntegrationIngestEntityRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateEntityInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateEntityInput `json:"input"` } // IntegrationIngestEntityRequestedTopic is the typed Gala topic for Entity ingest requests @@ -136,8 +135,8 @@ var IntegrationIngestEntityRequestedTopic = gala.Topic[IntegrationIngestEntityRe // IntegrationIngestFindingRequested is the typed second-stage ingest contract for Finding records type IntegrationIngestFindingRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateFindingInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateFindingInput `json:"input"` } // IntegrationIngestFindingRequestedTopic is the typed Gala topic for Finding ingest requests @@ -148,7 +147,7 @@ var IntegrationIngestFindingRequestedTopic = gala.Topic[IntegrationIngestFinding // IntegrationIngestRiskRequested is the typed second-stage ingest contract for Risk records type IntegrationIngestRiskRequested struct { Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateRiskInput `json:"input"` + Input generated.CreateRiskInput `json:"input"` } // IntegrationIngestRiskRequestedTopic is the typed Gala topic for Risk ingest requests @@ -158,8 +157,8 @@ var IntegrationIngestRiskRequestedTopic = gala.Topic[IntegrationIngestRiskReques // IntegrationIngestVulnerabilityRequested is the typed second-stage ingest contract for Vulnerability records type IntegrationIngestVulnerabilityRequested struct { - Metadata IntegrationIngestMetadata `json:"metadata"` - Input generated.CreateVulnerabilityInput `json:"input"` + Metadata IntegrationIngestMetadata `json:"metadata"` + Input generated.CreateVulnerabilityInput `json:"input"` } // IntegrationIngestVulnerabilityRequestedTopic is the typed Gala topic for Vulnerability ingest requests @@ -169,350 +168,350 @@ var IntegrationIngestVulnerabilityRequestedTopic = gala.Topic[IntegrationIngestV // Integration mapping keys for Asset. const ( - IntegrationMappingAssetAccessModelID = "accessModelID" - IntegrationMappingAssetAccessModelName = "accessModelName" - IntegrationMappingAssetAssetDataClassificationID = "assetDataClassificationID" + IntegrationMappingAssetAccessModelID = "accessModelID" + IntegrationMappingAssetAccessModelName = "accessModelName" + IntegrationMappingAssetAssetDataClassificationID = "assetDataClassificationID" IntegrationMappingAssetAssetDataClassificationName = "assetDataClassificationName" - IntegrationMappingAssetAssetSubtypeID = "assetSubtypeID" - IntegrationMappingAssetAssetSubtypeName = "assetSubtypeName" - IntegrationMappingAssetAssetType = "assetType" - IntegrationMappingAssetCategories = "categories" - IntegrationMappingAssetContainsPii = "containsPii" - IntegrationMappingAssetCostCenter = "costCenter" - IntegrationMappingAssetCriticalityID = "criticalityID" - IntegrationMappingAssetCriticalityName = "criticalityName" - IntegrationMappingAssetDescription = "description" - IntegrationMappingAssetDisplayName = "displayName" - IntegrationMappingAssetEncryptionStatusID = "encryptionStatusID" - IntegrationMappingAssetEncryptionStatusName = "encryptionStatusName" - IntegrationMappingAssetEnvironmentID = "environmentID" - IntegrationMappingAssetEnvironmentName = "environmentName" - IntegrationMappingAssetEstimatedMonthlyCost = "estimatedMonthlyCost" - IntegrationMappingAssetIdentifier = "identifier" - IntegrationMappingAssetIntegrationID = "integrationID" - IntegrationMappingAssetInternalNotes = "internalNotes" - IntegrationMappingAssetInternalOwner = "internalOwner" - IntegrationMappingAssetInternalOwnerGroupID = "internalOwnerGroupID" - IntegrationMappingAssetInternalOwnerUserID = "internalOwnerUserID" - IntegrationMappingAssetName = "name" - IntegrationMappingAssetObservedAt = "observedAt" - IntegrationMappingAssetOwnerID = "ownerID" - IntegrationMappingAssetPhysicalLocation = "physicalLocation" - IntegrationMappingAssetPurchaseDate = "purchaseDate" - IntegrationMappingAssetRegion = "region" - IntegrationMappingAssetScopeID = "scopeID" - IntegrationMappingAssetScopeName = "scopeName" - IntegrationMappingAssetSecurityTierID = "securityTierID" - IntegrationMappingAssetSecurityTierName = "securityTierName" - IntegrationMappingAssetSourceIdentifier = "sourceIdentifier" - IntegrationMappingAssetSourceType = "sourceType" - IntegrationMappingAssetSystemInternalID = "systemInternalID" - IntegrationMappingAssetTags = "tags" - IntegrationMappingAssetWebsite = "website" + IntegrationMappingAssetAssetSubtypeID = "assetSubtypeID" + IntegrationMappingAssetAssetSubtypeName = "assetSubtypeName" + IntegrationMappingAssetAssetType = "assetType" + IntegrationMappingAssetCategories = "categories" + IntegrationMappingAssetContainsPii = "containsPii" + IntegrationMappingAssetCostCenter = "costCenter" + IntegrationMappingAssetCriticalityID = "criticalityID" + IntegrationMappingAssetCriticalityName = "criticalityName" + IntegrationMappingAssetDescription = "description" + IntegrationMappingAssetDisplayName = "displayName" + IntegrationMappingAssetEncryptionStatusID = "encryptionStatusID" + IntegrationMappingAssetEncryptionStatusName = "encryptionStatusName" + IntegrationMappingAssetEnvironmentID = "environmentID" + IntegrationMappingAssetEnvironmentName = "environmentName" + IntegrationMappingAssetEstimatedMonthlyCost = "estimatedMonthlyCost" + IntegrationMappingAssetIdentifier = "identifier" + IntegrationMappingAssetIntegrationID = "integrationID" + IntegrationMappingAssetInternalNotes = "internalNotes" + IntegrationMappingAssetInternalOwner = "internalOwner" + IntegrationMappingAssetInternalOwnerGroupID = "internalOwnerGroupID" + IntegrationMappingAssetInternalOwnerUserID = "internalOwnerUserID" + IntegrationMappingAssetName = "name" + IntegrationMappingAssetObservedAt = "observedAt" + IntegrationMappingAssetOwnerID = "ownerID" + IntegrationMappingAssetPhysicalLocation = "physicalLocation" + IntegrationMappingAssetPurchaseDate = "purchaseDate" + IntegrationMappingAssetRegion = "region" + IntegrationMappingAssetScopeID = "scopeID" + IntegrationMappingAssetScopeName = "scopeName" + IntegrationMappingAssetSecurityTierID = "securityTierID" + IntegrationMappingAssetSecurityTierName = "securityTierName" + IntegrationMappingAssetSourceIdentifier = "sourceIdentifier" + IntegrationMappingAssetSourceType = "sourceType" + IntegrationMappingAssetSystemInternalID = "systemInternalID" + IntegrationMappingAssetTags = "tags" + IntegrationMappingAssetWebsite = "website" ) // Integration mapping keys for Contact. const ( - IntegrationMappingContactAddress = "address" - IntegrationMappingContactCompany = "company" - IntegrationMappingContactEmail = "email" - IntegrationMappingContactExternalID = "externalID" - IntegrationMappingContactFullName = "fullName" + IntegrationMappingContactAddress = "address" + IntegrationMappingContactCompany = "company" + IntegrationMappingContactEmail = "email" + IntegrationMappingContactExternalID = "externalID" + IntegrationMappingContactFullName = "fullName" IntegrationMappingContactIntegrationID = "integrationID" - IntegrationMappingContactObservedAt = "observedAt" - IntegrationMappingContactPhoneNumber = "phoneNumber" - IntegrationMappingContactStatus = "status" - IntegrationMappingContactTags = "tags" - IntegrationMappingContactTitle = "title" + IntegrationMappingContactObservedAt = "observedAt" + IntegrationMappingContactPhoneNumber = "phoneNumber" + IntegrationMappingContactStatus = "status" + IntegrationMappingContactTags = "tags" + IntegrationMappingContactTitle = "title" ) // Integration mapping keys for DirectoryAccount. const ( - IntegrationMappingDirectoryAccountAccountType = "accountType" - IntegrationMappingDirectoryAccountAddedAt = "addedAt" - IntegrationMappingDirectoryAccountAvatarRemoteURL = "avatarRemoteURL" - IntegrationMappingDirectoryAccountAvatarUpdatedAt = "avatarUpdatedAt" - IntegrationMappingDirectoryAccountCanonicalEmail = "canonicalEmail" - IntegrationMappingDirectoryAccountDepartment = "department" + IntegrationMappingDirectoryAccountAccountType = "accountType" + IntegrationMappingDirectoryAccountAddedAt = "addedAt" + IntegrationMappingDirectoryAccountAvatarRemoteURL = "avatarRemoteURL" + IntegrationMappingDirectoryAccountAvatarUpdatedAt = "avatarUpdatedAt" + IntegrationMappingDirectoryAccountCanonicalEmail = "canonicalEmail" + IntegrationMappingDirectoryAccountDepartment = "department" IntegrationMappingDirectoryAccountDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryAccountDirectoryName = "directoryName" - IntegrationMappingDirectoryAccountDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryAccountDisplayName = "displayName" - IntegrationMappingDirectoryAccountEnvironmentID = "environmentID" - IntegrationMappingDirectoryAccountEnvironmentName = "environmentName" - IntegrationMappingDirectoryAccountExternalID = "externalID" - IntegrationMappingDirectoryAccountFamilyName = "familyName" - IntegrationMappingDirectoryAccountFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryAccountGivenName = "givenName" - IntegrationMappingDirectoryAccountIdentityHolderID = "identityHolderID" - IntegrationMappingDirectoryAccountIntegrationID = "integrationID" - IntegrationMappingDirectoryAccountJobTitle = "jobTitle" - IntegrationMappingDirectoryAccountLastLoginAt = "lastLoginAt" - IntegrationMappingDirectoryAccountLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryAccountLastSeenIP = "lastSeenIP" - IntegrationMappingDirectoryAccountMetadata = "metadata" - IntegrationMappingDirectoryAccountMfaState = "mfaState" - IntegrationMappingDirectoryAccountObservedAt = "observedAt" - IntegrationMappingDirectoryAccountOrganizationUnit = "organizationUnit" - IntegrationMappingDirectoryAccountPlatformID = "platformID" - IntegrationMappingDirectoryAccountPrimarySource = "primarySource" - IntegrationMappingDirectoryAccountProfile = "profile" - IntegrationMappingDirectoryAccountProfileHash = "profileHash" - IntegrationMappingDirectoryAccountRemovedAt = "removedAt" - IntegrationMappingDirectoryAccountScopeID = "scopeID" - IntegrationMappingDirectoryAccountScopeName = "scopeName" - IntegrationMappingDirectoryAccountSecondaryKey = "secondaryKey" - IntegrationMappingDirectoryAccountSourceVersion = "sourceVersion" - IntegrationMappingDirectoryAccountStatus = "status" - IntegrationMappingDirectoryAccountTags = "tags" + IntegrationMappingDirectoryAccountDirectoryName = "directoryName" + IntegrationMappingDirectoryAccountDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryAccountDisplayName = "displayName" + IntegrationMappingDirectoryAccountEnvironmentID = "environmentID" + IntegrationMappingDirectoryAccountEnvironmentName = "environmentName" + IntegrationMappingDirectoryAccountExternalID = "externalID" + IntegrationMappingDirectoryAccountFamilyName = "familyName" + IntegrationMappingDirectoryAccountFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryAccountGivenName = "givenName" + IntegrationMappingDirectoryAccountIdentityHolderID = "identityHolderID" + IntegrationMappingDirectoryAccountIntegrationID = "integrationID" + IntegrationMappingDirectoryAccountJobTitle = "jobTitle" + IntegrationMappingDirectoryAccountLastLoginAt = "lastLoginAt" + IntegrationMappingDirectoryAccountLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryAccountLastSeenIP = "lastSeenIP" + IntegrationMappingDirectoryAccountMetadata = "metadata" + IntegrationMappingDirectoryAccountMfaState = "mfaState" + IntegrationMappingDirectoryAccountObservedAt = "observedAt" + IntegrationMappingDirectoryAccountOrganizationUnit = "organizationUnit" + IntegrationMappingDirectoryAccountPlatformID = "platformID" + IntegrationMappingDirectoryAccountPrimarySource = "primarySource" + IntegrationMappingDirectoryAccountProfile = "profile" + IntegrationMappingDirectoryAccountProfileHash = "profileHash" + IntegrationMappingDirectoryAccountRemovedAt = "removedAt" + IntegrationMappingDirectoryAccountScopeID = "scopeID" + IntegrationMappingDirectoryAccountScopeName = "scopeName" + IntegrationMappingDirectoryAccountSecondaryKey = "secondaryKey" + IntegrationMappingDirectoryAccountSourceVersion = "sourceVersion" + IntegrationMappingDirectoryAccountStatus = "status" + IntegrationMappingDirectoryAccountTags = "tags" ) // Integration mapping keys for DirectoryGroup. const ( - IntegrationMappingDirectoryGroupAddedAt = "addedAt" - IntegrationMappingDirectoryGroupClassification = "classification" - IntegrationMappingDirectoryGroupDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryGroupDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryGroupDisplayName = "displayName" - IntegrationMappingDirectoryGroupEmail = "email" - IntegrationMappingDirectoryGroupEnvironmentID = "environmentID" - IntegrationMappingDirectoryGroupEnvironmentName = "environmentName" - IntegrationMappingDirectoryGroupExternalID = "externalID" + IntegrationMappingDirectoryGroupAddedAt = "addedAt" + IntegrationMappingDirectoryGroupClassification = "classification" + IntegrationMappingDirectoryGroupDirectoryInstanceID = "directoryInstanceID" + IntegrationMappingDirectoryGroupDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryGroupDisplayName = "displayName" + IntegrationMappingDirectoryGroupEmail = "email" + IntegrationMappingDirectoryGroupEnvironmentID = "environmentID" + IntegrationMappingDirectoryGroupEnvironmentName = "environmentName" + IntegrationMappingDirectoryGroupExternalID = "externalID" IntegrationMappingDirectoryGroupExternalSharingAllowed = "externalSharingAllowed" - IntegrationMappingDirectoryGroupFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryGroupIntegrationID = "integrationID" - IntegrationMappingDirectoryGroupLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryGroupMemberCount = "memberCount" - IntegrationMappingDirectoryGroupMetadata = "metadata" - IntegrationMappingDirectoryGroupObservedAt = "observedAt" - IntegrationMappingDirectoryGroupPlatformID = "platformID" - IntegrationMappingDirectoryGroupProfile = "profile" - IntegrationMappingDirectoryGroupProfileHash = "profileHash" - IntegrationMappingDirectoryGroupRemovedAt = "removedAt" - IntegrationMappingDirectoryGroupScopeID = "scopeID" - IntegrationMappingDirectoryGroupScopeName = "scopeName" - IntegrationMappingDirectoryGroupSourceVersion = "sourceVersion" - IntegrationMappingDirectoryGroupStatus = "status" - IntegrationMappingDirectoryGroupTags = "tags" + IntegrationMappingDirectoryGroupFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryGroupIntegrationID = "integrationID" + IntegrationMappingDirectoryGroupLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryGroupMemberCount = "memberCount" + IntegrationMappingDirectoryGroupMetadata = "metadata" + IntegrationMappingDirectoryGroupObservedAt = "observedAt" + IntegrationMappingDirectoryGroupPlatformID = "platformID" + IntegrationMappingDirectoryGroupProfile = "profile" + IntegrationMappingDirectoryGroupProfileHash = "profileHash" + IntegrationMappingDirectoryGroupRemovedAt = "removedAt" + IntegrationMappingDirectoryGroupScopeID = "scopeID" + IntegrationMappingDirectoryGroupScopeName = "scopeName" + IntegrationMappingDirectoryGroupSourceVersion = "sourceVersion" + IntegrationMappingDirectoryGroupStatus = "status" + IntegrationMappingDirectoryGroupTags = "tags" ) // Integration mapping keys for DirectoryMembership. const ( - IntegrationMappingDirectoryMembershipAddedAt = "addedAt" - IntegrationMappingDirectoryMembershipDirectoryAccountID = "directoryAccountID" - IntegrationMappingDirectoryMembershipDirectoryGroupID = "directoryGroupID" + IntegrationMappingDirectoryMembershipAddedAt = "addedAt" + IntegrationMappingDirectoryMembershipDirectoryAccountID = "directoryAccountID" + IntegrationMappingDirectoryMembershipDirectoryGroupID = "directoryGroupID" IntegrationMappingDirectoryMembershipDirectoryInstanceID = "directoryInstanceID" - IntegrationMappingDirectoryMembershipDirectorySyncRunID = "directorySyncRunID" - IntegrationMappingDirectoryMembershipEnvironmentID = "environmentID" - IntegrationMappingDirectoryMembershipEnvironmentName = "environmentName" - IntegrationMappingDirectoryMembershipFirstSeenAt = "firstSeenAt" - IntegrationMappingDirectoryMembershipIntegrationID = "integrationID" - IntegrationMappingDirectoryMembershipLastConfirmedRunID = "lastConfirmedRunID" - IntegrationMappingDirectoryMembershipLastSeenAt = "lastSeenAt" - IntegrationMappingDirectoryMembershipMetadata = "metadata" - IntegrationMappingDirectoryMembershipObservedAt = "observedAt" - IntegrationMappingDirectoryMembershipPlatformID = "platformID" - IntegrationMappingDirectoryMembershipRemovedAt = "removedAt" - IntegrationMappingDirectoryMembershipRole = "role" - IntegrationMappingDirectoryMembershipScopeID = "scopeID" - IntegrationMappingDirectoryMembershipScopeName = "scopeName" - IntegrationMappingDirectoryMembershipSource = "source" + IntegrationMappingDirectoryMembershipDirectorySyncRunID = "directorySyncRunID" + IntegrationMappingDirectoryMembershipEnvironmentID = "environmentID" + IntegrationMappingDirectoryMembershipEnvironmentName = "environmentName" + IntegrationMappingDirectoryMembershipFirstSeenAt = "firstSeenAt" + IntegrationMappingDirectoryMembershipIntegrationID = "integrationID" + IntegrationMappingDirectoryMembershipLastConfirmedRunID = "lastConfirmedRunID" + IntegrationMappingDirectoryMembershipLastSeenAt = "lastSeenAt" + IntegrationMappingDirectoryMembershipMetadata = "metadata" + IntegrationMappingDirectoryMembershipObservedAt = "observedAt" + IntegrationMappingDirectoryMembershipPlatformID = "platformID" + IntegrationMappingDirectoryMembershipRemovedAt = "removedAt" + IntegrationMappingDirectoryMembershipRole = "role" + IntegrationMappingDirectoryMembershipScopeID = "scopeID" + IntegrationMappingDirectoryMembershipScopeName = "scopeName" + IntegrationMappingDirectoryMembershipSource = "source" ) // Integration mapping keys for Entity. const ( - IntegrationMappingEntityAnnualSpend = "annualSpend" - IntegrationMappingEntityApprovedForUse = "approvedForUse" - IntegrationMappingEntityAutoRenews = "autoRenews" - IntegrationMappingEntityBillingModel = "billingModel" - IntegrationMappingEntityContractEndDate = "contractEndDate" - IntegrationMappingEntityContractRenewalAt = "contractRenewalAt" - IntegrationMappingEntityContractStartDate = "contractStartDate" - IntegrationMappingEntityDisplayName = "displayName" - IntegrationMappingEntityDomains = "domains" - IntegrationMappingEntityEntityRelationshipStateID = "entityRelationshipStateID" - IntegrationMappingEntityEntityRelationshipStateName = "entityRelationshipStateName" - IntegrationMappingEntityEntitySecurityQuestionnaireStatusID = "entitySecurityQuestionnaireStatusID" + IntegrationMappingEntityAnnualSpend = "annualSpend" + IntegrationMappingEntityApprovedForUse = "approvedForUse" + IntegrationMappingEntityAutoRenews = "autoRenews" + IntegrationMappingEntityBillingModel = "billingModel" + IntegrationMappingEntityContractEndDate = "contractEndDate" + IntegrationMappingEntityContractRenewalAt = "contractRenewalAt" + IntegrationMappingEntityContractStartDate = "contractStartDate" + IntegrationMappingEntityDisplayName = "displayName" + IntegrationMappingEntityDomains = "domains" + IntegrationMappingEntityEntityRelationshipStateID = "entityRelationshipStateID" + IntegrationMappingEntityEntityRelationshipStateName = "entityRelationshipStateName" + IntegrationMappingEntityEntitySecurityQuestionnaireStatusID = "entitySecurityQuestionnaireStatusID" IntegrationMappingEntityEntitySecurityQuestionnaireStatusName = "entitySecurityQuestionnaireStatusName" - IntegrationMappingEntityEntitySourceTypeID = "entitySourceTypeID" - IntegrationMappingEntityEntitySourceTypeName = "entitySourceTypeName" - IntegrationMappingEntityEnvironmentID = "environmentID" - IntegrationMappingEntityEnvironmentName = "environmentName" - IntegrationMappingEntityExternalID = "externalID" - IntegrationMappingEntityHasSoc2 = "hasSoc2" - IntegrationMappingEntityInternalNotes = "internalNotes" - IntegrationMappingEntityInternalOwner = "internalOwner" - IntegrationMappingEntityInternalOwnerGroupID = "internalOwnerGroupID" - IntegrationMappingEntityInternalOwnerUserID = "internalOwnerUserID" - IntegrationMappingEntityLastReviewedAt = "lastReviewedAt" - IntegrationMappingEntityLinks = "links" - IntegrationMappingEntityMfaEnforced = "mfaEnforced" - IntegrationMappingEntityMfaSupported = "mfaSupported" - IntegrationMappingEntityName = "name" - IntegrationMappingEntityNextReviewAt = "nextReviewAt" - IntegrationMappingEntityObservedAt = "observedAt" - IntegrationMappingEntityOwnerID = "ownerID" - IntegrationMappingEntityProvidedServices = "providedServices" - IntegrationMappingEntityRenewalRisk = "renewalRisk" - IntegrationMappingEntityReviewFrequency = "reviewFrequency" - IntegrationMappingEntityReviewedBy = "reviewedBy" - IntegrationMappingEntityReviewedByGroupID = "reviewedByGroupID" - IntegrationMappingEntityReviewedByUserID = "reviewedByUserID" - IntegrationMappingEntityRiskRating = "riskRating" - IntegrationMappingEntityRiskScore = "riskScore" - IntegrationMappingEntityScopeID = "scopeID" - IntegrationMappingEntityScopeName = "scopeName" - IntegrationMappingEntitySoc2PeriodEnd = "soc2PeriodEnd" - IntegrationMappingEntitySpendCurrency = "spendCurrency" - IntegrationMappingEntitySsoEnforced = "ssoEnforced" - IntegrationMappingEntityStatus = "status" - IntegrationMappingEntityStatusPageURL = "statusPageURL" - IntegrationMappingEntitySystemInternalID = "systemInternalID" - IntegrationMappingEntityTags = "tags" - IntegrationMappingEntityTerminationNoticeDays = "terminationNoticeDays" - IntegrationMappingEntityTier = "tier" - IntegrationMappingEntityVendorMetadata = "vendorMetadata" + IntegrationMappingEntityEntitySourceTypeID = "entitySourceTypeID" + IntegrationMappingEntityEntitySourceTypeName = "entitySourceTypeName" + IntegrationMappingEntityEnvironmentID = "environmentID" + IntegrationMappingEntityEnvironmentName = "environmentName" + IntegrationMappingEntityExternalID = "externalID" + IntegrationMappingEntityHasSoc2 = "hasSoc2" + IntegrationMappingEntityInternalNotes = "internalNotes" + IntegrationMappingEntityInternalOwner = "internalOwner" + IntegrationMappingEntityInternalOwnerGroupID = "internalOwnerGroupID" + IntegrationMappingEntityInternalOwnerUserID = "internalOwnerUserID" + IntegrationMappingEntityLastReviewedAt = "lastReviewedAt" + IntegrationMappingEntityLinks = "links" + IntegrationMappingEntityMfaEnforced = "mfaEnforced" + IntegrationMappingEntityMfaSupported = "mfaSupported" + IntegrationMappingEntityName = "name" + IntegrationMappingEntityNextReviewAt = "nextReviewAt" + IntegrationMappingEntityObservedAt = "observedAt" + IntegrationMappingEntityOwnerID = "ownerID" + IntegrationMappingEntityProvidedServices = "providedServices" + IntegrationMappingEntityRenewalRisk = "renewalRisk" + IntegrationMappingEntityReviewFrequency = "reviewFrequency" + IntegrationMappingEntityReviewedBy = "reviewedBy" + IntegrationMappingEntityReviewedByGroupID = "reviewedByGroupID" + IntegrationMappingEntityReviewedByUserID = "reviewedByUserID" + IntegrationMappingEntityRiskRating = "riskRating" + IntegrationMappingEntityRiskScore = "riskScore" + IntegrationMappingEntityScopeID = "scopeID" + IntegrationMappingEntityScopeName = "scopeName" + IntegrationMappingEntitySoc2PeriodEnd = "soc2PeriodEnd" + IntegrationMappingEntitySpendCurrency = "spendCurrency" + IntegrationMappingEntitySsoEnforced = "ssoEnforced" + IntegrationMappingEntityStatus = "status" + IntegrationMappingEntityStatusPageURL = "statusPageURL" + IntegrationMappingEntitySystemInternalID = "systemInternalID" + IntegrationMappingEntityTags = "tags" + IntegrationMappingEntityTerminationNoticeDays = "terminationNoticeDays" + IntegrationMappingEntityTier = "tier" + IntegrationMappingEntityVendorMetadata = "vendorMetadata" ) // Integration mapping keys for Finding. const ( - IntegrationMappingFindingAssessmentID = "assessmentID" - IntegrationMappingFindingBlocksProduction = "blocksProduction" - IntegrationMappingFindingCategories = "categories" - IntegrationMappingFindingCategory = "category" - IntegrationMappingFindingDescription = "description" - IntegrationMappingFindingDisplayName = "displayName" - IntegrationMappingFindingEnvironmentID = "environmentID" - IntegrationMappingFindingEnvironmentName = "environmentName" - IntegrationMappingFindingEventTime = "eventTime" - IntegrationMappingFindingExploitability = "exploitability" - IntegrationMappingFindingExternalID = "externalID" - IntegrationMappingFindingExternalOwnerID = "externalOwnerID" - IntegrationMappingFindingExternalURI = "externalURI" - IntegrationMappingFindingFindingClass = "findingClass" - IntegrationMappingFindingFindingStatusID = "findingStatusID" - IntegrationMappingFindingFindingStatusName = "findingStatusName" - IntegrationMappingFindingImpact = "impact" - IntegrationMappingFindingInternalNotes = "internalNotes" - IntegrationMappingFindingMetadata = "metadata" - IntegrationMappingFindingNumericSeverity = "numericSeverity" - IntegrationMappingFindingOpen = "open" - IntegrationMappingFindingOwnerID = "ownerID" - IntegrationMappingFindingPriority = "priority" - IntegrationMappingFindingProduction = "production" - IntegrationMappingFindingPublic = "public" - IntegrationMappingFindingRawPayload = "rawPayload" - IntegrationMappingFindingRecommendation = "recommendation" + IntegrationMappingFindingAssessmentID = "assessmentID" + IntegrationMappingFindingBlocksProduction = "blocksProduction" + IntegrationMappingFindingCategories = "categories" + IntegrationMappingFindingCategory = "category" + IntegrationMappingFindingDescription = "description" + IntegrationMappingFindingDisplayName = "displayName" + IntegrationMappingFindingEnvironmentID = "environmentID" + IntegrationMappingFindingEnvironmentName = "environmentName" + IntegrationMappingFindingEventTime = "eventTime" + IntegrationMappingFindingExploitability = "exploitability" + IntegrationMappingFindingExternalID = "externalID" + IntegrationMappingFindingExternalOwnerID = "externalOwnerID" + IntegrationMappingFindingExternalURI = "externalURI" + IntegrationMappingFindingFindingClass = "findingClass" + IntegrationMappingFindingFindingStatusID = "findingStatusID" + IntegrationMappingFindingFindingStatusName = "findingStatusName" + IntegrationMappingFindingImpact = "impact" + IntegrationMappingFindingInternalNotes = "internalNotes" + IntegrationMappingFindingMetadata = "metadata" + IntegrationMappingFindingNumericSeverity = "numericSeverity" + IntegrationMappingFindingOpen = "open" + IntegrationMappingFindingOwnerID = "ownerID" + IntegrationMappingFindingPriority = "priority" + IntegrationMappingFindingProduction = "production" + IntegrationMappingFindingPublic = "public" + IntegrationMappingFindingRawPayload = "rawPayload" + IntegrationMappingFindingRecommendation = "recommendation" IntegrationMappingFindingRecommendedActions = "recommendedActions" - IntegrationMappingFindingReferences = "references" - IntegrationMappingFindingRemediationSLA = "remediationSLA" - IntegrationMappingFindingReportedAt = "reportedAt" - IntegrationMappingFindingResourceName = "resourceName" - IntegrationMappingFindingScopeID = "scopeID" - IntegrationMappingFindingScopeName = "scopeName" - IntegrationMappingFindingScore = "score" - IntegrationMappingFindingSeverity = "severity" - IntegrationMappingFindingSource = "source" - IntegrationMappingFindingSourceUpdatedAt = "sourceUpdatedAt" - IntegrationMappingFindingState = "state" - IntegrationMappingFindingStepsToReproduce = "stepsToReproduce" - IntegrationMappingFindingSystemInternalID = "systemInternalID" - IntegrationMappingFindingTags = "tags" - IntegrationMappingFindingTargetDetails = "targetDetails" - IntegrationMappingFindingTargets = "targets" - IntegrationMappingFindingValidated = "validated" - IntegrationMappingFindingVector = "vector" + IntegrationMappingFindingReferences = "references" + IntegrationMappingFindingRemediationSLA = "remediationSLA" + IntegrationMappingFindingReportedAt = "reportedAt" + IntegrationMappingFindingResourceName = "resourceName" + IntegrationMappingFindingScopeID = "scopeID" + IntegrationMappingFindingScopeName = "scopeName" + IntegrationMappingFindingScore = "score" + IntegrationMappingFindingSeverity = "severity" + IntegrationMappingFindingSource = "source" + IntegrationMappingFindingSourceUpdatedAt = "sourceUpdatedAt" + IntegrationMappingFindingState = "state" + IntegrationMappingFindingStepsToReproduce = "stepsToReproduce" + IntegrationMappingFindingSystemInternalID = "systemInternalID" + IntegrationMappingFindingTags = "tags" + IntegrationMappingFindingTargetDetails = "targetDetails" + IntegrationMappingFindingTargets = "targets" + IntegrationMappingFindingValidated = "validated" + IntegrationMappingFindingVector = "vector" ) // Integration mapping keys for Risk. const ( - IntegrationMappingRiskBusinessCosts = "businessCosts" + IntegrationMappingRiskBusinessCosts = "businessCosts" IntegrationMappingRiskBusinessCostsJSON = "businessCostsJSON" - IntegrationMappingRiskDetails = "details" - IntegrationMappingRiskDetailsJSON = "detailsJSON" - IntegrationMappingRiskDueDate = "dueDate" - IntegrationMappingRiskEnvironmentID = "environmentID" - IntegrationMappingRiskEnvironmentName = "environmentName" - IntegrationMappingRiskExternalID = "externalID" - IntegrationMappingRiskExternalUUID = "externalUUID" - IntegrationMappingRiskImpact = "impact" - IntegrationMappingRiskIntegrationID = "integrationID" - IntegrationMappingRiskLastReviewedAt = "lastReviewedAt" - IntegrationMappingRiskLikelihood = "likelihood" - IntegrationMappingRiskMitigatedAt = "mitigatedAt" - IntegrationMappingRiskMitigation = "mitigation" - IntegrationMappingRiskMitigationJSON = "mitigationJSON" - IntegrationMappingRiskName = "name" - IntegrationMappingRiskNextReviewDueAt = "nextReviewDueAt" - IntegrationMappingRiskObservedAt = "observedAt" - IntegrationMappingRiskOwnerID = "ownerID" - IntegrationMappingRiskResidualScore = "residualScore" - IntegrationMappingRiskReviewFrequency = "reviewFrequency" - IntegrationMappingRiskReviewRequired = "reviewRequired" - IntegrationMappingRiskRiskCategoryID = "riskCategoryID" - IntegrationMappingRiskRiskCategoryName = "riskCategoryName" - IntegrationMappingRiskRiskDecision = "riskDecision" - IntegrationMappingRiskRiskKindID = "riskKindID" - IntegrationMappingRiskRiskKindName = "riskKindName" - IntegrationMappingRiskScopeID = "scopeID" - IntegrationMappingRiskScopeName = "scopeName" - IntegrationMappingRiskScore = "score" - IntegrationMappingRiskStatus = "status" - IntegrationMappingRiskTags = "tags" + IntegrationMappingRiskDetails = "details" + IntegrationMappingRiskDetailsJSON = "detailsJSON" + IntegrationMappingRiskDueDate = "dueDate" + IntegrationMappingRiskEnvironmentID = "environmentID" + IntegrationMappingRiskEnvironmentName = "environmentName" + IntegrationMappingRiskExternalID = "externalID" + IntegrationMappingRiskExternalUUID = "externalUUID" + IntegrationMappingRiskImpact = "impact" + IntegrationMappingRiskIntegrationID = "integrationID" + IntegrationMappingRiskLastReviewedAt = "lastReviewedAt" + IntegrationMappingRiskLikelihood = "likelihood" + IntegrationMappingRiskMitigatedAt = "mitigatedAt" + IntegrationMappingRiskMitigation = "mitigation" + IntegrationMappingRiskMitigationJSON = "mitigationJSON" + IntegrationMappingRiskName = "name" + IntegrationMappingRiskNextReviewDueAt = "nextReviewDueAt" + IntegrationMappingRiskObservedAt = "observedAt" + IntegrationMappingRiskOwnerID = "ownerID" + IntegrationMappingRiskResidualScore = "residualScore" + IntegrationMappingRiskReviewFrequency = "reviewFrequency" + IntegrationMappingRiskReviewRequired = "reviewRequired" + IntegrationMappingRiskRiskCategoryID = "riskCategoryID" + IntegrationMappingRiskRiskCategoryName = "riskCategoryName" + IntegrationMappingRiskRiskDecision = "riskDecision" + IntegrationMappingRiskRiskKindID = "riskKindID" + IntegrationMappingRiskRiskKindName = "riskKindName" + IntegrationMappingRiskScopeID = "scopeID" + IntegrationMappingRiskScopeName = "scopeName" + IntegrationMappingRiskScore = "score" + IntegrationMappingRiskStatus = "status" + IntegrationMappingRiskTags = "tags" ) // Integration mapping keys for Vulnerability. const ( - IntegrationMappingVulnerabilityAutoDismissedAt = "autoDismissedAt" - IntegrationMappingVulnerabilityBlocking = "blocking" - IntegrationMappingVulnerabilityCategory = "category" - IntegrationMappingVulnerabilityCveID = "cveID" - IntegrationMappingVulnerabilityCweIds = "cweIds" - IntegrationMappingVulnerabilityDependencyScope = "dependencyScope" - IntegrationMappingVulnerabilityDescription = "description" - IntegrationMappingVulnerabilityDiscoveredAt = "discoveredAt" - IntegrationMappingVulnerabilityDismissedAt = "dismissedAt" - IntegrationMappingVulnerabilityDismissedComment = "dismissedComment" - IntegrationMappingVulnerabilityDismissedReason = "dismissedReason" - IntegrationMappingVulnerabilityDisplayName = "displayName" - IntegrationMappingVulnerabilityEnvironmentID = "environmentID" - IntegrationMappingVulnerabilityEnvironmentName = "environmentName" - IntegrationMappingVulnerabilityExploitability = "exploitability" - IntegrationMappingVulnerabilityExternalID = "externalID" - IntegrationMappingVulnerabilityExternalOwnerID = "externalOwnerID" - IntegrationMappingVulnerabilityExternalURI = "externalURI" - IntegrationMappingVulnerabilityFirstPatchedVersion = "firstPatchedVersion" - IntegrationMappingVulnerabilityFixedAt = "fixedAt" - IntegrationMappingVulnerabilityImpact = "impact" - IntegrationMappingVulnerabilityImpacts = "impacts" - IntegrationMappingVulnerabilityInternalNotes = "internalNotes" - IntegrationMappingVulnerabilityManifestPath = "manifestPath" - IntegrationMappingVulnerabilityMetadata = "metadata" - IntegrationMappingVulnerabilityOpen = "open" - IntegrationMappingVulnerabilityOwnerID = "ownerID" - IntegrationMappingVulnerabilityPackageEcosystem = "packageEcosystem" - IntegrationMappingVulnerabilityPackageName = "packageName" - IntegrationMappingVulnerabilityPriority = "priority" - IntegrationMappingVulnerabilityProduction = "production" - IntegrationMappingVulnerabilityPublic = "public" - IntegrationMappingVulnerabilityPublishedAt = "publishedAt" - IntegrationMappingVulnerabilityRawPayload = "rawPayload" - IntegrationMappingVulnerabilityReferences = "references" - IntegrationMappingVulnerabilityRemediationSLA = "remediationSLA" - IntegrationMappingVulnerabilityScopeID = "scopeID" - IntegrationMappingVulnerabilityScopeName = "scopeName" - IntegrationMappingVulnerabilityScore = "score" - IntegrationMappingVulnerabilitySeverity = "severity" - IntegrationMappingVulnerabilitySource = "source" - IntegrationMappingVulnerabilitySourceUpdatedAt = "sourceUpdatedAt" - IntegrationMappingVulnerabilitySummary = "summary" - IntegrationMappingVulnerabilitySystemInternalID = "systemInternalID" - IntegrationMappingVulnerabilityTags = "tags" - IntegrationMappingVulnerabilityValidated = "validated" - IntegrationMappingVulnerabilityVector = "vector" - IntegrationMappingVulnerabilityVulnerabilityStatusID = "vulnerabilityStatusID" + IntegrationMappingVulnerabilityAutoDismissedAt = "autoDismissedAt" + IntegrationMappingVulnerabilityBlocking = "blocking" + IntegrationMappingVulnerabilityCategory = "category" + IntegrationMappingVulnerabilityCveID = "cveID" + IntegrationMappingVulnerabilityCweIds = "cweIds" + IntegrationMappingVulnerabilityDependencyScope = "dependencyScope" + IntegrationMappingVulnerabilityDescription = "description" + IntegrationMappingVulnerabilityDiscoveredAt = "discoveredAt" + IntegrationMappingVulnerabilityDismissedAt = "dismissedAt" + IntegrationMappingVulnerabilityDismissedComment = "dismissedComment" + IntegrationMappingVulnerabilityDismissedReason = "dismissedReason" + IntegrationMappingVulnerabilityDisplayName = "displayName" + IntegrationMappingVulnerabilityEnvironmentID = "environmentID" + IntegrationMappingVulnerabilityEnvironmentName = "environmentName" + IntegrationMappingVulnerabilityExploitability = "exploitability" + IntegrationMappingVulnerabilityExternalID = "externalID" + IntegrationMappingVulnerabilityExternalOwnerID = "externalOwnerID" + IntegrationMappingVulnerabilityExternalURI = "externalURI" + IntegrationMappingVulnerabilityFirstPatchedVersion = "firstPatchedVersion" + IntegrationMappingVulnerabilityFixedAt = "fixedAt" + IntegrationMappingVulnerabilityImpact = "impact" + IntegrationMappingVulnerabilityImpacts = "impacts" + IntegrationMappingVulnerabilityInternalNotes = "internalNotes" + IntegrationMappingVulnerabilityManifestPath = "manifestPath" + IntegrationMappingVulnerabilityMetadata = "metadata" + IntegrationMappingVulnerabilityOpen = "open" + IntegrationMappingVulnerabilityOwnerID = "ownerID" + IntegrationMappingVulnerabilityPackageEcosystem = "packageEcosystem" + IntegrationMappingVulnerabilityPackageName = "packageName" + IntegrationMappingVulnerabilityPriority = "priority" + IntegrationMappingVulnerabilityProduction = "production" + IntegrationMappingVulnerabilityPublic = "public" + IntegrationMappingVulnerabilityPublishedAt = "publishedAt" + IntegrationMappingVulnerabilityRawPayload = "rawPayload" + IntegrationMappingVulnerabilityReferences = "references" + IntegrationMappingVulnerabilityRemediationSLA = "remediationSLA" + IntegrationMappingVulnerabilityScopeID = "scopeID" + IntegrationMappingVulnerabilityScopeName = "scopeName" + IntegrationMappingVulnerabilityScore = "score" + IntegrationMappingVulnerabilitySeverity = "severity" + IntegrationMappingVulnerabilitySource = "source" + IntegrationMappingVulnerabilitySourceUpdatedAt = "sourceUpdatedAt" + IntegrationMappingVulnerabilitySummary = "summary" + IntegrationMappingVulnerabilitySystemInternalID = "systemInternalID" + IntegrationMappingVulnerabilityTags = "tags" + IntegrationMappingVulnerabilityValidated = "validated" + IntegrationMappingVulnerabilityVector = "vector" + IntegrationMappingVulnerabilityVulnerabilityStatusID = "vulnerabilityStatusID" IntegrationMappingVulnerabilityVulnerabilityStatusName = "vulnerabilityStatusName" - IntegrationMappingVulnerabilityVulnerableVersionRange = "vulnerableVersionRange" + IntegrationMappingVulnerabilityVulnerableVersionRange = "vulnerableVersionRange" ) // IntegrationMappingSchemas maps schema names to their mapping metadata @@ -521,407 +520,407 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Asset", Fields: []IntegrationMappingField{ { - InputKey: "accessModelID", - GoField: "AccessModelID", - EntField: "access_model_id", - Type: "string", - Required: false, + InputKey: "accessModelID", + GoField: "AccessModelID", + EntField: "access_model_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "accessModelName", - GoField: "AccessModelName", - EntField: "access_model_name", - Type: "string", - Required: false, + InputKey: "accessModelName", + GoField: "AccessModelName", + EntField: "access_model_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetDataClassificationID", - GoField: "AssetDataClassificationID", - EntField: "asset_data_classification_id", - Type: "string", - Required: false, + InputKey: "assetDataClassificationID", + GoField: "AssetDataClassificationID", + EntField: "asset_data_classification_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetDataClassificationName", - GoField: "AssetDataClassificationName", - EntField: "asset_data_classification_name", - Type: "string", - Required: false, + InputKey: "assetDataClassificationName", + GoField: "AssetDataClassificationName", + EntField: "asset_data_classification_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetSubtypeID", - GoField: "AssetSubtypeID", - EntField: "asset_subtype_id", - Type: "string", - Required: false, + InputKey: "assetSubtypeID", + GoField: "AssetSubtypeID", + EntField: "asset_subtype_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetSubtypeName", - GoField: "AssetSubtypeName", - EntField: "asset_subtype_name", - Type: "string", - Required: false, + InputKey: "assetSubtypeName", + GoField: "AssetSubtypeName", + EntField: "asset_subtype_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "assetType", - GoField: "AssetType", - EntField: "asset_type", - Type: "string", - Required: true, + InputKey: "assetType", + GoField: "AssetType", + EntField: "asset_type", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "categories", - GoField: "Categories", - EntField: "categories", - Type: "json.RawMessage", - Required: false, + InputKey: "categories", + GoField: "Categories", + EntField: "categories", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "containsPii", - GoField: "ContainsPii", - EntField: "contains_pii", - Type: "bool", - Required: false, + InputKey: "containsPii", + GoField: "ContainsPii", + EntField: "contains_pii", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "costCenter", - GoField: "CostCenter", - EntField: "cost_center", - Type: "string", - Required: false, + InputKey: "costCenter", + GoField: "CostCenter", + EntField: "cost_center", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "criticalityID", - GoField: "CriticalityID", - EntField: "criticality_id", - Type: "string", - Required: false, + InputKey: "criticalityID", + GoField: "CriticalityID", + EntField: "criticality_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "criticalityName", - GoField: "CriticalityName", - EntField: "criticality_name", - Type: "string", - Required: false, + InputKey: "criticalityName", + GoField: "CriticalityName", + EntField: "criticality_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "encryptionStatusID", - GoField: "EncryptionStatusID", - EntField: "encryption_status_id", - Type: "string", - Required: false, + InputKey: "encryptionStatusID", + GoField: "EncryptionStatusID", + EntField: "encryption_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "encryptionStatusName", - GoField: "EncryptionStatusName", - EntField: "encryption_status_name", - Type: "string", - Required: false, + InputKey: "encryptionStatusName", + GoField: "EncryptionStatusName", + EntField: "encryption_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "estimatedMonthlyCost", - GoField: "EstimatedMonthlyCost", - EntField: "estimated_monthly_cost", - Type: "float64", - Required: false, + InputKey: "estimatedMonthlyCost", + GoField: "EstimatedMonthlyCost", + EntField: "estimated_monthly_cost", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "identifier", - GoField: "Identifier", - EntField: "identifier", - Type: "string", - Required: false, + InputKey: "identifier", + GoField: "Identifier", + EntField: "identifier", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwner", - GoField: "InternalOwner", - EntField: "internal_owner", - Type: "string", - Required: false, + InputKey: "internalOwner", + GoField: "InternalOwner", + EntField: "internal_owner", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerGroupID", - GoField: "InternalOwnerGroupID", - EntField: "internal_owner_group_id", - Type: "string", - Required: false, + InputKey: "internalOwnerGroupID", + GoField: "InternalOwnerGroupID", + EntField: "internal_owner_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerUserID", - GoField: "InternalOwnerUserID", - EntField: "internal_owner_user_id", - Type: "string", - Required: false, + InputKey: "internalOwnerUserID", + GoField: "InternalOwnerUserID", + EntField: "internal_owner_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: true, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "physicalLocation", - GoField: "PhysicalLocation", - EntField: "physical_location", - Type: "string", - Required: false, + InputKey: "physicalLocation", + GoField: "PhysicalLocation", + EntField: "physical_location", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "purchaseDate", - GoField: "PurchaseDate", - EntField: "purchase_date", - Type: "time.Time", - Required: false, + InputKey: "purchaseDate", + GoField: "PurchaseDate", + EntField: "purchase_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "region", - GoField: "Region", - EntField: "region", - Type: "string", - Required: false, + InputKey: "region", + GoField: "Region", + EntField: "region", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "securityTierID", - GoField: "SecurityTierID", - EntField: "security_tier_id", - Type: "string", - Required: false, + InputKey: "securityTierID", + GoField: "SecurityTierID", + EntField: "security_tier_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "securityTierName", - GoField: "SecurityTierName", - EntField: "security_tier_name", - Type: "string", - Required: false, + InputKey: "securityTierName", + GoField: "SecurityTierName", + EntField: "security_tier_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceIdentifier", - GoField: "SourceIdentifier", - EntField: "source_identifier", - Type: "string", - Required: false, + InputKey: "sourceIdentifier", + GoField: "SourceIdentifier", + EntField: "source_identifier", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "sourceType", - GoField: "SourceType", - EntField: "source_type", - Type: "string", - Required: true, + InputKey: "sourceType", + GoField: "SourceType", + EntField: "source_type", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "website", - GoField: "Website", - EntField: "website", - Type: "string", - Required: false, + InputKey: "website", + GoField: "Website", + EntField: "website", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "accessModelID": {}, - "accessModelName": {}, - "assetDataClassificationID": {}, + "accessModelID": {}, + "accessModelName": {}, + "assetDataClassificationID": {}, "assetDataClassificationName": {}, - "assetSubtypeID": {}, - "assetSubtypeName": {}, - "assetType": {}, - "categories": {}, - "containsPii": {}, - "costCenter": {}, - "criticalityID": {}, - "criticalityName": {}, - "description": {}, - "displayName": {}, - "encryptionStatusID": {}, - "encryptionStatusName": {}, - "environmentID": {}, - "environmentName": {}, - "estimatedMonthlyCost": {}, - "identifier": {}, - "integrationID": {}, - "internalNotes": {}, - "internalOwner": {}, - "internalOwnerGroupID": {}, - "internalOwnerUserID": {}, - "name": {}, - "observedAt": {}, - "ownerID": {}, - "physicalLocation": {}, - "purchaseDate": {}, - "region": {}, - "scopeID": {}, - "scopeName": {}, - "securityTierID": {}, - "securityTierName": {}, - "sourceIdentifier": {}, - "sourceType": {}, - "systemInternalID": {}, - "tags": {}, - "website": {}, + "assetSubtypeID": {}, + "assetSubtypeName": {}, + "assetType": {}, + "categories": {}, + "containsPii": {}, + "costCenter": {}, + "criticalityID": {}, + "criticalityName": {}, + "description": {}, + "displayName": {}, + "encryptionStatusID": {}, + "encryptionStatusName": {}, + "environmentID": {}, + "environmentName": {}, + "estimatedMonthlyCost": {}, + "identifier": {}, + "integrationID": {}, + "internalNotes": {}, + "internalOwner": {}, + "internalOwnerGroupID": {}, + "internalOwnerUserID": {}, + "name": {}, + "observedAt": {}, + "ownerID": {}, + "physicalLocation": {}, + "purchaseDate": {}, + "region": {}, + "scopeID": {}, + "scopeName": {}, + "securityTierID": {}, + "securityTierName": {}, + "sourceIdentifier": {}, + "sourceType": {}, + "systemInternalID": {}, + "tags": {}, + "website": {}, }, RequiredKeys: []string{ "assetType", @@ -937,117 +936,117 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Contact", Fields: []IntegrationMappingField{ { - InputKey: "address", - GoField: "Address", - EntField: "address", - Type: "string", - Required: false, + InputKey: "address", + GoField: "Address", + EntField: "address", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "company", - GoField: "Company", - EntField: "company", - Type: "string", - Required: false, + InputKey: "company", + GoField: "Company", + EntField: "company", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "email", - GoField: "Email", - EntField: "email", - Type: "string", - Required: false, + InputKey: "email", + GoField: "Email", + EntField: "email", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "fullName", - GoField: "FullName", - EntField: "full_name", - Type: "string", - Required: false, + InputKey: "fullName", + GoField: "FullName", + EntField: "full_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "phoneNumber", - GoField: "PhoneNumber", - EntField: "phone_number", - Type: "string", - Required: false, + InputKey: "phoneNumber", + GoField: "PhoneNumber", + EntField: "phone_number", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "title", - GoField: "Title", - EntField: "title", - Type: "string", - Required: false, + InputKey: "title", + GoField: "Title", + EntField: "title", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "address": {}, - "company": {}, - "email": {}, - "externalID": {}, - "fullName": {}, + "address": {}, + "company": {}, + "email": {}, + "externalID": {}, + "fullName": {}, "integrationID": {}, - "observedAt": {}, - "phoneNumber": {}, - "status": {}, - "tags": {}, - "title": {}, + "observedAt": {}, + "phoneNumber": {}, + "status": {}, + "tags": {}, + "title": {}, }, RequiredKeys: []string{ "status", @@ -1062,377 +1061,377 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryAccount", Fields: []IntegrationMappingField{ { - InputKey: "accountType", - GoField: "AccountType", - EntField: "account_type", - Type: "string", - Required: false, + InputKey: "accountType", + GoField: "AccountType", + EntField: "account_type", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "avatarRemoteURL", - GoField: "AvatarRemoteURL", - EntField: "avatar_remote_url", - Type: "string", - Required: false, + InputKey: "avatarRemoteURL", + GoField: "AvatarRemoteURL", + EntField: "avatar_remote_url", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "avatarUpdatedAt", - GoField: "AvatarUpdatedAt", - EntField: "avatar_updated_at", - Type: "time.Time", - Required: false, + InputKey: "avatarUpdatedAt", + GoField: "AvatarUpdatedAt", + EntField: "avatar_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "canonicalEmail", - GoField: "CanonicalEmail", - EntField: "canonical_email", - Type: "string", - Required: false, + InputKey: "canonicalEmail", + GoField: "CanonicalEmail", + EntField: "canonical_email", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "department", - GoField: "Department", - EntField: "department", - Type: "string", - Required: false, + InputKey: "department", + GoField: "Department", + EntField: "department", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryName", - GoField: "DirectoryName", - EntField: "directory_name", - Type: "string", - Required: false, + InputKey: "directoryName", + GoField: "DirectoryName", + EntField: "directory_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: false, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "familyName", - GoField: "FamilyName", - EntField: "family_name", - Type: "string", - Required: false, + InputKey: "familyName", + GoField: "FamilyName", + EntField: "family_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "givenName", - GoField: "GivenName", - EntField: "given_name", - Type: "string", - Required: false, + InputKey: "givenName", + GoField: "GivenName", + EntField: "given_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "identityHolderID", - GoField: "IdentityHolderID", - EntField: "identity_holder_id", - Type: "string", - Required: false, + InputKey: "identityHolderID", + GoField: "IdentityHolderID", + EntField: "identity_holder_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "jobTitle", - GoField: "JobTitle", - EntField: "job_title", - Type: "string", - Required: false, + InputKey: "jobTitle", + GoField: "JobTitle", + EntField: "job_title", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastLoginAt", - GoField: "LastLoginAt", - EntField: "last_login_at", - Type: "time.Time", - Required: false, + InputKey: "lastLoginAt", + GoField: "LastLoginAt", + EntField: "last_login_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenIP", - GoField: "LastSeenIP", - EntField: "last_seen_ip", - Type: "string", - Required: false, + InputKey: "lastSeenIP", + GoField: "LastSeenIP", + EntField: "last_seen_ip", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaState", - GoField: "MfaState", - EntField: "mfa_state", - Type: "string", - Required: true, + InputKey: "mfaState", + GoField: "MfaState", + EntField: "mfa_state", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "organizationUnit", - GoField: "OrganizationUnit", - EntField: "organization_unit", - Type: "string", - Required: false, + InputKey: "organizationUnit", + GoField: "OrganizationUnit", + EntField: "organization_unit", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "primarySource", - GoField: "PrimarySource", - EntField: "primary_source", - Type: "bool", - Required: true, + InputKey: "primarySource", + GoField: "PrimarySource", + EntField: "primary_source", + Type: "bool", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "profile", - GoField: "Profile", - EntField: "profile", - Type: "json.RawMessage", - Required: false, + InputKey: "profile", + GoField: "Profile", + EntField: "profile", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profileHash", - GoField: "ProfileHash", - EntField: "profile_hash", - Type: "string", - Required: true, + InputKey: "profileHash", + GoField: "ProfileHash", + EntField: "profile_hash", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "secondaryKey", - GoField: "SecondaryKey", - EntField: "secondary_key", - Type: "string", - Required: false, + InputKey: "secondaryKey", + GoField: "SecondaryKey", + EntField: "secondary_key", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceVersion", - GoField: "SourceVersion", - EntField: "source_version", - Type: "string", - Required: false, + InputKey: "sourceVersion", + GoField: "SourceVersion", + EntField: "source_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "accountType": {}, - "addedAt": {}, - "avatarRemoteURL": {}, - "avatarUpdatedAt": {}, - "canonicalEmail": {}, - "department": {}, + "accountType": {}, + "addedAt": {}, + "avatarRemoteURL": {}, + "avatarUpdatedAt": {}, + "canonicalEmail": {}, + "department": {}, "directoryInstanceID": {}, - "directoryName": {}, - "directorySyncRunID": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "familyName": {}, - "firstSeenAt": {}, - "givenName": {}, - "identityHolderID": {}, - "integrationID": {}, - "jobTitle": {}, - "lastLoginAt": {}, - "lastSeenAt": {}, - "lastSeenIP": {}, - "metadata": {}, - "mfaState": {}, - "observedAt": {}, - "organizationUnit": {}, - "platformID": {}, - "primarySource": {}, - "profile": {}, - "profileHash": {}, - "removedAt": {}, - "scopeID": {}, - "scopeName": {}, - "secondaryKey": {}, - "sourceVersion": {}, - "status": {}, - "tags": {}, + "directoryName": {}, + "directorySyncRunID": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "familyName": {}, + "firstSeenAt": {}, + "givenName": {}, + "identityHolderID": {}, + "integrationID": {}, + "jobTitle": {}, + "lastLoginAt": {}, + "lastSeenAt": {}, + "lastSeenIP": {}, + "metadata": {}, + "mfaState": {}, + "observedAt": {}, + "organizationUnit": {}, + "platformID": {}, + "primarySource": {}, + "profile": {}, + "profileHash": {}, + "removedAt": {}, + "scopeID": {}, + "scopeName": {}, + "secondaryKey": {}, + "sourceVersion": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "externalID", @@ -1454,257 +1453,257 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryGroup", Fields: []IntegrationMappingField{ { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "classification", - GoField: "Classification", - EntField: "classification", - Type: "string", - Required: true, + InputKey: "classification", + GoField: "Classification", + EntField: "classification", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: true, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "email", - GoField: "Email", - EntField: "email", - Type: "string", - Required: false, + InputKey: "email", + GoField: "Email", + EntField: "email", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: false, LookupKey: true, }, { - InputKey: "externalSharingAllowed", - GoField: "ExternalSharingAllowed", - EntField: "external_sharing_allowed", - Type: "bool", - Required: false, + InputKey: "externalSharingAllowed", + GoField: "ExternalSharingAllowed", + EntField: "external_sharing_allowed", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: true, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "memberCount", - GoField: "MemberCount", - EntField: "member_count", - Type: "int", - Required: false, + InputKey: "memberCount", + GoField: "MemberCount", + EntField: "member_count", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profile", - GoField: "Profile", - EntField: "profile", - Type: "json.RawMessage", - Required: false, + InputKey: "profile", + GoField: "Profile", + EntField: "profile", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "profileHash", - GoField: "ProfileHash", - EntField: "profile_hash", - Type: "string", - Required: true, + InputKey: "profileHash", + GoField: "ProfileHash", + EntField: "profile_hash", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceVersion", - GoField: "SourceVersion", - EntField: "source_version", - Type: "string", - Required: false, + InputKey: "sourceVersion", + GoField: "SourceVersion", + EntField: "source_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: true, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "addedAt": {}, - "classification": {}, - "directoryInstanceID": {}, - "directorySyncRunID": {}, - "displayName": {}, - "email": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, + "addedAt": {}, + "classification": {}, + "directoryInstanceID": {}, + "directorySyncRunID": {}, + "displayName": {}, + "email": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, "externalSharingAllowed": {}, - "firstSeenAt": {}, - "integrationID": {}, - "lastSeenAt": {}, - "memberCount": {}, - "metadata": {}, - "observedAt": {}, - "platformID": {}, - "profile": {}, - "profileHash": {}, - "removedAt": {}, - "scopeID": {}, - "scopeName": {}, - "sourceVersion": {}, - "status": {}, - "tags": {}, + "firstSeenAt": {}, + "integrationID": {}, + "lastSeenAt": {}, + "memberCount": {}, + "metadata": {}, + "observedAt": {}, + "platformID": {}, + "profile": {}, + "profileHash": {}, + "removedAt": {}, + "scopeID": {}, + "scopeName": {}, + "sourceVersion": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "classification", @@ -1725,197 +1724,197 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "DirectoryMembership", Fields: []IntegrationMappingField{ { - InputKey: "addedAt", - GoField: "AddedAt", - EntField: "added_at", - Type: "time.Time", - Required: false, + InputKey: "addedAt", + GoField: "AddedAt", + EntField: "added_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directoryAccountID", - GoField: "DirectoryAccountID", - EntField: "directory_account_id", - Type: "string", - Required: true, + InputKey: "directoryAccountID", + GoField: "DirectoryAccountID", + EntField: "directory_account_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "directoryGroupID", - GoField: "DirectoryGroupID", - EntField: "directory_group_id", - Type: "string", - Required: true, + InputKey: "directoryGroupID", + GoField: "DirectoryGroupID", + EntField: "directory_group_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "directoryInstanceID", - GoField: "DirectoryInstanceID", - EntField: "directory_instance_id", - Type: "string", - Required: false, + InputKey: "directoryInstanceID", + GoField: "DirectoryInstanceID", + EntField: "directory_instance_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "directorySyncRunID", - GoField: "DirectorySyncRunID", - EntField: "directory_sync_run_id", - Type: "string", - Required: true, + InputKey: "directorySyncRunID", + GoField: "DirectorySyncRunID", + EntField: "directory_sync_run_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstSeenAt", - GoField: "FirstSeenAt", - EntField: "first_seen_at", - Type: "time.Time", - Required: false, + InputKey: "firstSeenAt", + GoField: "FirstSeenAt", + EntField: "first_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: true, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "lastConfirmedRunID", - GoField: "LastConfirmedRunID", - EntField: "last_confirmed_run_id", - Type: "string", - Required: false, + InputKey: "lastConfirmedRunID", + GoField: "LastConfirmedRunID", + EntField: "last_confirmed_run_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastSeenAt", - GoField: "LastSeenAt", - EntField: "last_seen_at", - Type: "time.Time", - Required: false, + InputKey: "lastSeenAt", + GoField: "LastSeenAt", + EntField: "last_seen_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: true, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: true, UpsertKey: false, LookupKey: false, }, { - InputKey: "platformID", - GoField: "PlatformID", - EntField: "platform_id", - Type: "string", - Required: false, + InputKey: "platformID", + GoField: "PlatformID", + EntField: "platform_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "removedAt", - GoField: "RemovedAt", - EntField: "removed_at", - Type: "time.Time", - Required: false, + InputKey: "removedAt", + GoField: "RemovedAt", + EntField: "removed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "role", - GoField: "Role", - EntField: "role", - Type: "string", - Required: false, + InputKey: "role", + GoField: "Role", + EntField: "role", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "addedAt": {}, - "directoryAccountID": {}, - "directoryGroupID": {}, + "addedAt": {}, + "directoryAccountID": {}, + "directoryGroupID": {}, "directoryInstanceID": {}, - "directorySyncRunID": {}, - "environmentID": {}, - "environmentName": {}, - "firstSeenAt": {}, - "integrationID": {}, - "lastConfirmedRunID": {}, - "lastSeenAt": {}, - "metadata": {}, - "observedAt": {}, - "platformID": {}, - "removedAt": {}, - "role": {}, - "scopeID": {}, - "scopeName": {}, - "source": {}, + "directorySyncRunID": {}, + "environmentID": {}, + "environmentName": {}, + "firstSeenAt": {}, + "integrationID": {}, + "lastConfirmedRunID": {}, + "lastSeenAt": {}, + "metadata": {}, + "observedAt": {}, + "platformID": {}, + "removedAt": {}, + "role": {}, + "scopeID": {}, + "scopeName": {}, + "source": {}, }, RequiredKeys: []string{ "directoryAccountID", @@ -1936,520 +1935,519 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Entity", Fields: []IntegrationMappingField{ { - InputKey: "annualSpend", - GoField: "AnnualSpend", - EntField: "annual_spend", - Type: "float64", - Required: false, + InputKey: "annualSpend", + GoField: "AnnualSpend", + EntField: "annual_spend", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "approvedForUse", - GoField: "ApprovedForUse", - EntField: "approved_for_use", - Type: "bool", - Required: false, + InputKey: "approvedForUse", + GoField: "ApprovedForUse", + EntField: "approved_for_use", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "autoRenews", - GoField: "AutoRenews", - EntField: "auto_renews", - Type: "bool", - Required: false, + InputKey: "autoRenews", + GoField: "AutoRenews", + EntField: "auto_renews", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "billingModel", - GoField: "BillingModel", - EntField: "billing_model", - Type: "string", - Required: false, + InputKey: "billingModel", + GoField: "BillingModel", + EntField: "billing_model", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractEndDate", - GoField: "ContractEndDate", - EntField: "contract_end_date", - Type: "time.Time", - Required: false, + InputKey: "contractEndDate", + GoField: "ContractEndDate", + EntField: "contract_end_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractRenewalAt", - GoField: "ContractRenewalAt", - EntField: "contract_renewal_at", - Type: "time.Time", - Required: false, + InputKey: "contractRenewalAt", + GoField: "ContractRenewalAt", + EntField: "contract_renewal_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "contractStartDate", - GoField: "ContractStartDate", - EntField: "contract_start_date", - Type: "time.Time", - Required: false, + InputKey: "contractStartDate", + GoField: "ContractStartDate", + EntField: "contract_start_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "domains", - GoField: "Domains", - EntField: "domains", - Type: "json.RawMessage", - Required: false, + InputKey: "domains", + GoField: "Domains", + EntField: "domains", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entityRelationshipStateID", - GoField: "EntityRelationshipStateID", - EntField: "entity_relationship_state_id", - Type: "string", - Required: false, + InputKey: "entityRelationshipStateID", + GoField: "EntityRelationshipStateID", + EntField: "entity_relationship_state_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entityRelationshipStateName", - GoField: "EntityRelationshipStateName", - EntField: "entity_relationship_state_name", - Type: "string", - Required: false, + InputKey: "entityRelationshipStateName", + GoField: "EntityRelationshipStateName", + EntField: "entity_relationship_state_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySecurityQuestionnaireStatusID", - GoField: "EntitySecurityQuestionnaireStatusID", - EntField: "entity_security_questionnaire_status_id", - Type: "string", - Required: false, + InputKey: "entitySecurityQuestionnaireStatusID", + GoField: "EntitySecurityQuestionnaireStatusID", + EntField: "entity_security_questionnaire_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySecurityQuestionnaireStatusName", - GoField: "EntitySecurityQuestionnaireStatusName", - EntField: "entity_security_questionnaire_status_name", - Type: "string", - Required: false, + InputKey: "entitySecurityQuestionnaireStatusName", + GoField: "EntitySecurityQuestionnaireStatusName", + EntField: "entity_security_questionnaire_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySourceTypeID", - GoField: "EntitySourceTypeID", - EntField: "entity_source_type_id", - Type: "string", - Required: false, + InputKey: "entitySourceTypeID", + GoField: "EntitySourceTypeID", + EntField: "entity_source_type_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "entitySourceTypeName", - GoField: "EntitySourceTypeName", - EntField: "entity_source_type_name", - Type: "string", - Required: false, + InputKey: "entitySourceTypeName", + GoField: "EntitySourceTypeName", + EntField: "entity_source_type_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "hasSoc2", - GoField: "HasSoc2", - EntField: "has_soc2", - Type: "bool", - Required: false, + InputKey: "hasSoc2", + GoField: "HasSoc2", + EntField: "has_soc2", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwner", - GoField: "InternalOwner", - EntField: "internal_owner", - Type: "string", - Required: false, + InputKey: "internalOwner", + GoField: "InternalOwner", + EntField: "internal_owner", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerGroupID", - GoField: "InternalOwnerGroupID", - EntField: "internal_owner_group_id", - Type: "string", - Required: false, + InputKey: "internalOwnerGroupID", + GoField: "InternalOwnerGroupID", + EntField: "internal_owner_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalOwnerUserID", - GoField: "InternalOwnerUserID", - EntField: "internal_owner_user_id", - Type: "string", - Required: false, + InputKey: "internalOwnerUserID", + GoField: "InternalOwnerUserID", + EntField: "internal_owner_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastReviewedAt", - GoField: "LastReviewedAt", - EntField: "last_reviewed_at", - Type: "time.Time", - Required: false, + InputKey: "lastReviewedAt", + GoField: "LastReviewedAt", + EntField: "last_reviewed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "links", - GoField: "Links", - EntField: "links", - Type: "json.RawMessage", - Required: false, + InputKey: "links", + GoField: "Links", + EntField: "links", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaEnforced", - GoField: "MfaEnforced", - EntField: "mfa_enforced", - Type: "bool", - Required: false, + InputKey: "mfaEnforced", + GoField: "MfaEnforced", + EntField: "mfa_enforced", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mfaSupported", - GoField: "MfaSupported", - EntField: "mfa_supported", - Type: "bool", - Required: false, + InputKey: "mfaSupported", + GoField: "MfaSupported", + EntField: "mfa_supported", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: false, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: false, UpsertKey: true, LookupKey: false, }, { - InputKey: "nextReviewAt", - GoField: "NextReviewAt", - EntField: "next_review_at", - Type: "time.Time", - Required: false, + InputKey: "nextReviewAt", + GoField: "NextReviewAt", + EntField: "next_review_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "providedServices", - GoField: "ProvidedServices", - EntField: "provided_services", - Type: "json.RawMessage", - Required: false, + InputKey: "providedServices", + GoField: "ProvidedServices", + EntField: "provided_services", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "renewalRisk", - GoField: "RenewalRisk", - EntField: "renewal_risk", - Type: "string", - Required: false, + InputKey: "renewalRisk", + GoField: "RenewalRisk", + EntField: "renewal_risk", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewFrequency", - GoField: "ReviewFrequency", - EntField: "review_frequency", - Type: "string", - Required: false, + InputKey: "reviewFrequency", + GoField: "ReviewFrequency", + EntField: "review_frequency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedBy", - GoField: "ReviewedBy", - EntField: "reviewed_by", - Type: "string", - Required: false, + InputKey: "reviewedBy", + GoField: "ReviewedBy", + EntField: "reviewed_by", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedByGroupID", - GoField: "ReviewedByGroupID", - EntField: "reviewed_by_group_id", - Type: "string", - Required: false, + InputKey: "reviewedByGroupID", + GoField: "ReviewedByGroupID", + EntField: "reviewed_by_group_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewedByUserID", - GoField: "ReviewedByUserID", - EntField: "reviewed_by_user_id", - Type: "string", - Required: false, + InputKey: "reviewedByUserID", + GoField: "ReviewedByUserID", + EntField: "reviewed_by_user_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskRating", - GoField: "RiskRating", - EntField: "risk_rating", - Type: "string", - Required: false, + InputKey: "riskRating", + GoField: "RiskRating", + EntField: "risk_rating", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskScore", - GoField: "RiskScore", - EntField: "risk_score", - Type: "int", - Required: false, + InputKey: "riskScore", + GoField: "RiskScore", + EntField: "risk_score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "soc2PeriodEnd", - GoField: "Soc2PeriodEnd", - EntField: "soc2_period_end", - Type: "time.Time", - Required: false, + InputKey: "soc2PeriodEnd", + GoField: "Soc2PeriodEnd", + EntField: "soc2_period_end", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "spendCurrency", - GoField: "SpendCurrency", - EntField: "spend_currency", - Type: "string", - Required: false, + InputKey: "spendCurrency", + GoField: "SpendCurrency", + EntField: "spend_currency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ssoEnforced", - GoField: "SsoEnforced", - EntField: "sso_enforced", - Type: "bool", - Required: false, + InputKey: "ssoEnforced", + GoField: "SsoEnforced", + EntField: "sso_enforced", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: false, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "statusPageURL", - GoField: "StatusPageURL", - EntField: "status_page_url", - Type: "string", - Required: false, + InputKey: "statusPageURL", + GoField: "StatusPageURL", + EntField: "status_page_url", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "terminationNoticeDays", - GoField: "TerminationNoticeDays", - EntField: "termination_notice_days", - Type: "int", - Required: false, + InputKey: "terminationNoticeDays", + GoField: "TerminationNoticeDays", + EntField: "termination_notice_days", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tier", - GoField: "Tier", - EntField: "tier", - Type: "string", - Required: false, + InputKey: "tier", + GoField: "Tier", + EntField: "tier", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vendorMetadata", - GoField: "VendorMetadata", - EntField: "vendor_metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "vendorMetadata", + GoField: "VendorMetadata", + EntField: "vendor_metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "annualSpend": {}, - "approvedForUse": {}, - "autoRenews": {}, - "billingModel": {}, - "contractEndDate": {}, - "contractRenewalAt": {}, - "contractStartDate": {}, - "displayName": {}, - "domains": {}, - "entityRelationshipStateID": {}, - "entityRelationshipStateName": {}, - "entitySecurityQuestionnaireStatusID": {}, + "annualSpend": {}, + "approvedForUse": {}, + "autoRenews": {}, + "billingModel": {}, + "contractEndDate": {}, + "contractRenewalAt": {}, + "contractStartDate": {}, + "displayName": {}, + "domains": {}, + "entityRelationshipStateID": {}, + "entityRelationshipStateName": {}, + "entitySecurityQuestionnaireStatusID": {}, "entitySecurityQuestionnaireStatusName": {}, - "entitySourceTypeID": {}, - "entitySourceTypeName": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "hasSoc2": {}, - "internalNotes": {}, - "internalOwner": {}, - "internalOwnerGroupID": {}, - "internalOwnerUserID": {}, - "lastReviewedAt": {}, - "links": {}, - "mfaEnforced": {}, - "mfaSupported": {}, - "name": {}, - "nextReviewAt": {}, - "observedAt": {}, - "ownerID": {}, - "providedServices": {}, - "renewalRisk": {}, - "reviewFrequency": {}, - "reviewedBy": {}, - "reviewedByGroupID": {}, - "reviewedByUserID": {}, - "riskRating": {}, - "riskScore": {}, - "scopeID": {}, - "scopeName": {}, - "soc2PeriodEnd": {}, - "spendCurrency": {}, - "ssoEnforced": {}, - "status": {}, - "statusPageURL": {}, - "systemInternalID": {}, - "tags": {}, - "terminationNoticeDays": {}, - "tier": {}, - "vendorMetadata": {}, - }, - RequiredKeys: []string{ + "entitySourceTypeID": {}, + "entitySourceTypeName": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "hasSoc2": {}, + "internalNotes": {}, + "internalOwner": {}, + "internalOwnerGroupID": {}, + "internalOwnerUserID": {}, + "lastReviewedAt": {}, + "links": {}, + "mfaEnforced": {}, + "mfaSupported": {}, + "name": {}, + "nextReviewAt": {}, + "observedAt": {}, + "ownerID": {}, + "providedServices": {}, + "renewalRisk": {}, + "reviewFrequency": {}, + "reviewedBy": {}, + "reviewedByGroupID": {}, + "reviewedByUserID": {}, + "riskRating": {}, + "riskScore": {}, + "scopeID": {}, + "scopeName": {}, + "soc2PeriodEnd": {}, + "spendCurrency": {}, + "ssoEnforced": {}, + "status": {}, + "statusPageURL": {}, + "systemInternalID": {}, + "tags": {}, + "terminationNoticeDays": {}, + "tier": {}, + "vendorMetadata": {}, }, + RequiredKeys: []string{}, UpsertKeys: []string{ "externalID", "name", @@ -2460,470 +2458,469 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Finding", Fields: []IntegrationMappingField{ { - InputKey: "assessmentID", - GoField: "AssessmentID", - EntField: "assessment_id", - Type: "string", - Required: false, + InputKey: "assessmentID", + GoField: "AssessmentID", + EntField: "assessment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "blocksProduction", - GoField: "BlocksProduction", - EntField: "blocks_production", - Type: "bool", - Required: false, + InputKey: "blocksProduction", + GoField: "BlocksProduction", + EntField: "blocks_production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "categories", - GoField: "Categories", - EntField: "categories", - Type: "json.RawMessage", - Required: false, + InputKey: "categories", + GoField: "Categories", + EntField: "categories", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "category", - GoField: "Category", - EntField: "category", - Type: "string", - Required: false, + InputKey: "category", + GoField: "Category", + EntField: "category", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "eventTime", - GoField: "EventTime", - EntField: "event_time", - Type: "time.Time", - Required: false, + InputKey: "eventTime", + GoField: "EventTime", + EntField: "event_time", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "exploitability", - GoField: "Exploitability", - EntField: "exploitability", - Type: "float64", - Required: false, + InputKey: "exploitability", + GoField: "Exploitability", + EntField: "exploitability", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalOwnerID", - GoField: "ExternalOwnerID", - EntField: "external_owner_id", - Type: "string", - Required: false, + InputKey: "externalOwnerID", + GoField: "ExternalOwnerID", + EntField: "external_owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalURI", - GoField: "ExternalURI", - EntField: "external_uri", - Type: "string", - Required: false, + InputKey: "externalURI", + GoField: "ExternalURI", + EntField: "external_uri", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingClass", - GoField: "FindingClass", - EntField: "finding_class", - Type: "string", - Required: false, + InputKey: "findingClass", + GoField: "FindingClass", + EntField: "finding_class", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingStatusID", - GoField: "FindingStatusID", - EntField: "finding_status_id", - Type: "string", - Required: false, + InputKey: "findingStatusID", + GoField: "FindingStatusID", + EntField: "finding_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "findingStatusName", - GoField: "FindingStatusName", - EntField: "finding_status_name", - Type: "string", - Required: false, + InputKey: "findingStatusName", + GoField: "FindingStatusName", + EntField: "finding_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "float64", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "numericSeverity", - GoField: "NumericSeverity", - EntField: "numeric_severity", - Type: "float64", - Required: false, + InputKey: "numericSeverity", + GoField: "NumericSeverity", + EntField: "numeric_severity", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "open", - GoField: "Open", - EntField: "open", - Type: "bool", - Required: false, + InputKey: "open", + GoField: "Open", + EntField: "open", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "priority", - GoField: "Priority", - EntField: "priority", - Type: "string", - Required: false, + InputKey: "priority", + GoField: "Priority", + EntField: "priority", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "production", - GoField: "Production", - EntField: "production", - Type: "bool", - Required: false, + InputKey: "production", + GoField: "Production", + EntField: "production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "public", - GoField: "Public", - EntField: "public", - Type: "bool", - Required: false, + InputKey: "public", + GoField: "Public", + EntField: "public", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "rawPayload", - GoField: "RawPayload", - EntField: "raw_payload", - Type: "json.RawMessage", - Required: false, + InputKey: "rawPayload", + GoField: "RawPayload", + EntField: "raw_payload", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "recommendation", - GoField: "Recommendation", - EntField: "recommendation", - Type: "string", - Required: false, + InputKey: "recommendation", + GoField: "Recommendation", + EntField: "recommendation", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "recommendedActions", - GoField: "RecommendedActions", - EntField: "recommended_actions", - Type: "string", - Required: false, + InputKey: "recommendedActions", + GoField: "RecommendedActions", + EntField: "recommended_actions", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "references", - GoField: "References", - EntField: "references", - Type: "json.RawMessage", - Required: false, + InputKey: "references", + GoField: "References", + EntField: "references", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "remediationSLA", - GoField: "RemediationSLA", - EntField: "remediation_sla", - Type: "int", - Required: false, + InputKey: "remediationSLA", + GoField: "RemediationSLA", + EntField: "remediation_sla", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reportedAt", - GoField: "ReportedAt", - EntField: "reported_at", - Type: "time.Time", - Required: false, + InputKey: "reportedAt", + GoField: "ReportedAt", + EntField: "reported_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "resourceName", - GoField: "ResourceName", - EntField: "resource_name", - Type: "string", - Required: false, + InputKey: "resourceName", + GoField: "ResourceName", + EntField: "resource_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "float64", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "severity", - GoField: "Severity", - EntField: "severity", - Type: "string", - Required: false, + InputKey: "severity", + GoField: "Severity", + EntField: "severity", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceUpdatedAt", - GoField: "SourceUpdatedAt", - EntField: "source_updated_at", - Type: "time.Time", - Required: false, + InputKey: "sourceUpdatedAt", + GoField: "SourceUpdatedAt", + EntField: "source_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "state", - GoField: "State", - EntField: "state", - Type: "string", - Required: false, + InputKey: "state", + GoField: "State", + EntField: "state", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "stepsToReproduce", - GoField: "StepsToReproduce", - EntField: "steps_to_reproduce", - Type: "json.RawMessage", - Required: false, + InputKey: "stepsToReproduce", + GoField: "StepsToReproduce", + EntField: "steps_to_reproduce", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "targetDetails", - GoField: "TargetDetails", - EntField: "target_details", - Type: "json.RawMessage", - Required: false, + InputKey: "targetDetails", + GoField: "TargetDetails", + EntField: "target_details", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "targets", - GoField: "Targets", - EntField: "targets", - Type: "json.RawMessage", - Required: false, + InputKey: "targets", + GoField: "Targets", + EntField: "targets", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "validated", - GoField: "Validated", - EntField: "validated", - Type: "bool", - Required: false, + InputKey: "validated", + GoField: "Validated", + EntField: "validated", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vector", - GoField: "Vector", - EntField: "vector", - Type: "string", - Required: false, + InputKey: "vector", + GoField: "Vector", + EntField: "vector", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "assessmentID": {}, - "blocksProduction": {}, - "categories": {}, - "category": {}, - "description": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "eventTime": {}, - "exploitability": {}, - "externalID": {}, - "externalOwnerID": {}, - "externalURI": {}, - "findingClass": {}, - "findingStatusID": {}, - "findingStatusName": {}, - "impact": {}, - "internalNotes": {}, - "metadata": {}, - "numericSeverity": {}, - "open": {}, - "ownerID": {}, - "priority": {}, - "production": {}, - "public": {}, - "rawPayload": {}, - "recommendation": {}, + "assessmentID": {}, + "blocksProduction": {}, + "categories": {}, + "category": {}, + "description": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "eventTime": {}, + "exploitability": {}, + "externalID": {}, + "externalOwnerID": {}, + "externalURI": {}, + "findingClass": {}, + "findingStatusID": {}, + "findingStatusName": {}, + "impact": {}, + "internalNotes": {}, + "metadata": {}, + "numericSeverity": {}, + "open": {}, + "ownerID": {}, + "priority": {}, + "production": {}, + "public": {}, + "rawPayload": {}, + "recommendation": {}, "recommendedActions": {}, - "references": {}, - "remediationSLA": {}, - "reportedAt": {}, - "resourceName": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "severity": {}, - "source": {}, - "sourceUpdatedAt": {}, - "state": {}, - "stepsToReproduce": {}, - "systemInternalID": {}, - "tags": {}, - "targetDetails": {}, - "targets": {}, - "validated": {}, - "vector": {}, - }, - RequiredKeys: []string{ + "references": {}, + "remediationSLA": {}, + "reportedAt": {}, + "resourceName": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "severity": {}, + "source": {}, + "sourceUpdatedAt": {}, + "state": {}, + "stepsToReproduce": {}, + "systemInternalID": {}, + "tags": {}, + "targetDetails": {}, + "targets": {}, + "validated": {}, + "vector": {}, }, + RequiredKeys: []string{}, UpsertKeys: []string{ "externalID", }, @@ -2933,337 +2930,337 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Risk", Fields: []IntegrationMappingField{ { - InputKey: "businessCosts", - GoField: "BusinessCosts", - EntField: "business_costs", - Type: "string", - Required: false, + InputKey: "businessCosts", + GoField: "BusinessCosts", + EntField: "business_costs", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "businessCostsJSON", - GoField: "BusinessCostsJSON", - EntField: "business_costs_json", - Type: "json.RawMessage", - Required: false, + InputKey: "businessCostsJSON", + GoField: "BusinessCostsJSON", + EntField: "business_costs_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "details", - GoField: "Details", - EntField: "details", - Type: "string", - Required: false, + InputKey: "details", + GoField: "Details", + EntField: "details", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "detailsJSON", - GoField: "DetailsJSON", - EntField: "details_json", - Type: "json.RawMessage", - Required: false, + InputKey: "detailsJSON", + GoField: "DetailsJSON", + EntField: "details_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dueDate", - GoField: "DueDate", - EntField: "due_date", - Type: "time.Time", - Required: false, + InputKey: "dueDate", + GoField: "DueDate", + EntField: "due_date", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: false, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: false, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalUUID", - GoField: "ExternalUUID", - EntField: "external_uuid", - Type: "string", - Required: false, + InputKey: "externalUUID", + GoField: "ExternalUUID", + EntField: "external_uuid", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "string", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "integrationID", - GoField: "IntegrationID", - EntField: "integration_id", - Type: "string", - Required: false, + InputKey: "integrationID", + GoField: "IntegrationID", + EntField: "integration_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "lastReviewedAt", - GoField: "LastReviewedAt", - EntField: "last_reviewed_at", - Type: "time.Time", - Required: false, + InputKey: "lastReviewedAt", + GoField: "LastReviewedAt", + EntField: "last_reviewed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "likelihood", - GoField: "Likelihood", - EntField: "likelihood", - Type: "string", - Required: false, + InputKey: "likelihood", + GoField: "Likelihood", + EntField: "likelihood", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigatedAt", - GoField: "MitigatedAt", - EntField: "mitigated_at", - Type: "time.Time", - Required: false, + InputKey: "mitigatedAt", + GoField: "MitigatedAt", + EntField: "mitigated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigation", - GoField: "Mitigation", - EntField: "mitigation", - Type: "string", - Required: false, + InputKey: "mitigation", + GoField: "Mitigation", + EntField: "mitigation", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "mitigationJSON", - GoField: "MitigationJSON", - EntField: "mitigation_json", - Type: "json.RawMessage", - Required: false, + InputKey: "mitigationJSON", + GoField: "MitigationJSON", + EntField: "mitigation_json", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "name", - GoField: "Name", - EntField: "name", - Type: "string", - Required: true, + InputKey: "name", + GoField: "Name", + EntField: "name", + Type: "string", + Required: true, UpsertKey: true, LookupKey: false, }, { - InputKey: "nextReviewDueAt", - GoField: "NextReviewDueAt", - EntField: "next_review_due_at", - Type: "time.Time", - Required: false, + InputKey: "nextReviewDueAt", + GoField: "NextReviewDueAt", + EntField: "next_review_due_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "observedAt", - GoField: "ObservedAt", - EntField: "observed_at", - Type: "time.Time", - Required: false, + InputKey: "observedAt", + GoField: "ObservedAt", + EntField: "observed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "residualScore", - GoField: "ResidualScore", - EntField: "residual_score", - Type: "int", - Required: false, + InputKey: "residualScore", + GoField: "ResidualScore", + EntField: "residual_score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewFrequency", - GoField: "ReviewFrequency", - EntField: "review_frequency", - Type: "string", - Required: false, + InputKey: "reviewFrequency", + GoField: "ReviewFrequency", + EntField: "review_frequency", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "reviewRequired", - GoField: "ReviewRequired", - EntField: "review_required", - Type: "bool", - Required: false, + InputKey: "reviewRequired", + GoField: "ReviewRequired", + EntField: "review_required", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskCategoryID", - GoField: "RiskCategoryID", - EntField: "risk_category_id", - Type: "string", - Required: false, + InputKey: "riskCategoryID", + GoField: "RiskCategoryID", + EntField: "risk_category_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskCategoryName", - GoField: "RiskCategoryName", - EntField: "risk_category_name", - Type: "string", - Required: false, + InputKey: "riskCategoryName", + GoField: "RiskCategoryName", + EntField: "risk_category_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskDecision", - GoField: "RiskDecision", - EntField: "risk_decision", - Type: "string", - Required: false, + InputKey: "riskDecision", + GoField: "RiskDecision", + EntField: "risk_decision", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskKindID", - GoField: "RiskKindID", - EntField: "risk_kind_id", - Type: "string", - Required: false, + InputKey: "riskKindID", + GoField: "RiskKindID", + EntField: "risk_kind_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "riskKindName", - GoField: "RiskKindName", - EntField: "risk_kind_name", - Type: "string", - Required: false, + InputKey: "riskKindName", + GoField: "RiskKindName", + EntField: "risk_kind_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "int", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "status", - GoField: "Status", - EntField: "status", - Type: "string", - Required: false, + InputKey: "status", + GoField: "Status", + EntField: "status", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "businessCosts": {}, + "businessCosts": {}, "businessCostsJSON": {}, - "details": {}, - "detailsJSON": {}, - "dueDate": {}, - "environmentID": {}, - "environmentName": {}, - "externalID": {}, - "externalUUID": {}, - "impact": {}, - "integrationID": {}, - "lastReviewedAt": {}, - "likelihood": {}, - "mitigatedAt": {}, - "mitigation": {}, - "mitigationJSON": {}, - "name": {}, - "nextReviewDueAt": {}, - "observedAt": {}, - "ownerID": {}, - "residualScore": {}, - "reviewFrequency": {}, - "reviewRequired": {}, - "riskCategoryID": {}, - "riskCategoryName": {}, - "riskDecision": {}, - "riskKindID": {}, - "riskKindName": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "status": {}, - "tags": {}, + "details": {}, + "detailsJSON": {}, + "dueDate": {}, + "environmentID": {}, + "environmentName": {}, + "externalID": {}, + "externalUUID": {}, + "impact": {}, + "integrationID": {}, + "lastReviewedAt": {}, + "likelihood": {}, + "mitigatedAt": {}, + "mitigation": {}, + "mitigationJSON": {}, + "name": {}, + "nextReviewDueAt": {}, + "observedAt": {}, + "ownerID": {}, + "residualScore": {}, + "reviewFrequency": {}, + "reviewRequired": {}, + "riskCategoryID": {}, + "riskCategoryName": {}, + "riskDecision": {}, + "riskKindID": {}, + "riskKindName": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "status": {}, + "tags": {}, }, RequiredKeys: []string{ "name", @@ -3278,507 +3275,507 @@ var IntegrationMappingSchemas = map[string]IntegrationMappingSchema{ Name: "Vulnerability", Fields: []IntegrationMappingField{ { - InputKey: "autoDismissedAt", - GoField: "AutoDismissedAt", - EntField: "auto_dismissed_at", - Type: "time.Time", - Required: false, + InputKey: "autoDismissedAt", + GoField: "AutoDismissedAt", + EntField: "auto_dismissed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "blocking", - GoField: "Blocking", - EntField: "blocking", - Type: "bool", - Required: false, + InputKey: "blocking", + GoField: "Blocking", + EntField: "blocking", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "category", - GoField: "Category", - EntField: "category", - Type: "string", - Required: false, + InputKey: "category", + GoField: "Category", + EntField: "category", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "cveID", - GoField: "CveID", - EntField: "cve_id", - Type: "string", - Required: false, + InputKey: "cveID", + GoField: "CveID", + EntField: "cve_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "cweIds", - GoField: "CweIds", - EntField: "cwe_ids", - Type: "json.RawMessage", - Required: false, + InputKey: "cweIds", + GoField: "CweIds", + EntField: "cwe_ids", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dependencyScope", - GoField: "DependencyScope", - EntField: "dependency_scope", - Type: "string", - Required: false, + InputKey: "dependencyScope", + GoField: "DependencyScope", + EntField: "dependency_scope", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "description", - GoField: "Description", - EntField: "description", - Type: "string", - Required: false, + InputKey: "description", + GoField: "Description", + EntField: "description", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "discoveredAt", - GoField: "DiscoveredAt", - EntField: "discovered_at", - Type: "time.Time", - Required: false, + InputKey: "discoveredAt", + GoField: "DiscoveredAt", + EntField: "discovered_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedAt", - GoField: "DismissedAt", - EntField: "dismissed_at", - Type: "time.Time", - Required: false, + InputKey: "dismissedAt", + GoField: "DismissedAt", + EntField: "dismissed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedComment", - GoField: "DismissedComment", - EntField: "dismissed_comment", - Type: "string", - Required: false, + InputKey: "dismissedComment", + GoField: "DismissedComment", + EntField: "dismissed_comment", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "dismissedReason", - GoField: "DismissedReason", - EntField: "dismissed_reason", - Type: "string", - Required: false, + InputKey: "dismissedReason", + GoField: "DismissedReason", + EntField: "dismissed_reason", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "displayName", - GoField: "DisplayName", - EntField: "display_name", - Type: "string", - Required: false, + InputKey: "displayName", + GoField: "DisplayName", + EntField: "display_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentID", - GoField: "EnvironmentID", - EntField: "environment_id", - Type: "string", - Required: false, + InputKey: "environmentID", + GoField: "EnvironmentID", + EntField: "environment_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "environmentName", - GoField: "EnvironmentName", - EntField: "environment_name", - Type: "string", - Required: false, + InputKey: "environmentName", + GoField: "EnvironmentName", + EntField: "environment_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "exploitability", - GoField: "Exploitability", - EntField: "exploitability", - Type: "float64", - Required: false, + InputKey: "exploitability", + GoField: "Exploitability", + EntField: "exploitability", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalID", - GoField: "ExternalID", - EntField: "external_id", - Type: "string", - Required: true, + InputKey: "externalID", + GoField: "ExternalID", + EntField: "external_id", + Type: "string", + Required: true, UpsertKey: true, LookupKey: true, }, { - InputKey: "externalOwnerID", - GoField: "ExternalOwnerID", - EntField: "external_owner_id", - Type: "string", - Required: false, + InputKey: "externalOwnerID", + GoField: "ExternalOwnerID", + EntField: "external_owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "externalURI", - GoField: "ExternalURI", - EntField: "external_uri", - Type: "string", - Required: false, + InputKey: "externalURI", + GoField: "ExternalURI", + EntField: "external_uri", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "firstPatchedVersion", - GoField: "FirstPatchedVersion", - EntField: "first_patched_version", - Type: "string", - Required: false, + InputKey: "firstPatchedVersion", + GoField: "FirstPatchedVersion", + EntField: "first_patched_version", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "fixedAt", - GoField: "FixedAt", - EntField: "fixed_at", - Type: "time.Time", - Required: false, + InputKey: "fixedAt", + GoField: "FixedAt", + EntField: "fixed_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impact", - GoField: "Impact", - EntField: "impact", - Type: "float64", - Required: false, + InputKey: "impact", + GoField: "Impact", + EntField: "impact", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "impacts", - GoField: "Impacts", - EntField: "impacts", - Type: "json.RawMessage", - Required: false, + InputKey: "impacts", + GoField: "Impacts", + EntField: "impacts", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "internalNotes", - GoField: "InternalNotes", - EntField: "internal_notes", - Type: "string", - Required: false, + InputKey: "internalNotes", + GoField: "InternalNotes", + EntField: "internal_notes", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "manifestPath", - GoField: "ManifestPath", - EntField: "manifest_path", - Type: "string", - Required: false, + InputKey: "manifestPath", + GoField: "ManifestPath", + EntField: "manifest_path", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "metadata", - GoField: "Metadata", - EntField: "metadata", - Type: "json.RawMessage", - Required: false, + InputKey: "metadata", + GoField: "Metadata", + EntField: "metadata", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "open", - GoField: "Open", - EntField: "open", - Type: "bool", - Required: false, + InputKey: "open", + GoField: "Open", + EntField: "open", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "ownerID", - GoField: "OwnerID", - EntField: "owner_id", - Type: "string", - Required: false, + InputKey: "ownerID", + GoField: "OwnerID", + EntField: "owner_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "packageEcosystem", - GoField: "PackageEcosystem", - EntField: "package_ecosystem", - Type: "string", - Required: false, + InputKey: "packageEcosystem", + GoField: "PackageEcosystem", + EntField: "package_ecosystem", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "packageName", - GoField: "PackageName", - EntField: "package_name", - Type: "string", - Required: false, + InputKey: "packageName", + GoField: "PackageName", + EntField: "package_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "priority", - GoField: "Priority", - EntField: "priority", - Type: "string", - Required: false, + InputKey: "priority", + GoField: "Priority", + EntField: "priority", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "production", - GoField: "Production", - EntField: "production", - Type: "bool", - Required: false, + InputKey: "production", + GoField: "Production", + EntField: "production", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "public", - GoField: "Public", - EntField: "public", - Type: "bool", - Required: false, + InputKey: "public", + GoField: "Public", + EntField: "public", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "publishedAt", - GoField: "PublishedAt", - EntField: "published_at", - Type: "time.Time", - Required: false, + InputKey: "publishedAt", + GoField: "PublishedAt", + EntField: "published_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "rawPayload", - GoField: "RawPayload", - EntField: "raw_payload", - Type: "json.RawMessage", - Required: false, + InputKey: "rawPayload", + GoField: "RawPayload", + EntField: "raw_payload", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "references", - GoField: "References", - EntField: "references", - Type: "json.RawMessage", - Required: false, + InputKey: "references", + GoField: "References", + EntField: "references", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "remediationSLA", - GoField: "RemediationSLA", - EntField: "remediation_sla", - Type: "int", - Required: false, + InputKey: "remediationSLA", + GoField: "RemediationSLA", + EntField: "remediation_sla", + Type: "int", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeID", - GoField: "ScopeID", - EntField: "scope_id", - Type: "string", - Required: false, + InputKey: "scopeID", + GoField: "ScopeID", + EntField: "scope_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "scopeName", - GoField: "ScopeName", - EntField: "scope_name", - Type: "string", - Required: false, + InputKey: "scopeName", + GoField: "ScopeName", + EntField: "scope_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "score", - GoField: "Score", - EntField: "score", - Type: "float64", - Required: false, + InputKey: "score", + GoField: "Score", + EntField: "score", + Type: "float64", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "severity", - GoField: "Severity", - EntField: "severity", - Type: "string", - Required: false, + InputKey: "severity", + GoField: "Severity", + EntField: "severity", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "source", - GoField: "Source", - EntField: "source", - Type: "string", - Required: false, + InputKey: "source", + GoField: "Source", + EntField: "source", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "sourceUpdatedAt", - GoField: "SourceUpdatedAt", - EntField: "source_updated_at", - Type: "time.Time", - Required: false, + InputKey: "sourceUpdatedAt", + GoField: "SourceUpdatedAt", + EntField: "source_updated_at", + Type: "time.Time", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "summary", - GoField: "Summary", - EntField: "summary", - Type: "string", - Required: false, + InputKey: "summary", + GoField: "Summary", + EntField: "summary", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "systemInternalID", - GoField: "SystemInternalID", - EntField: "system_internal_id", - Type: "string", - Required: false, + InputKey: "systemInternalID", + GoField: "SystemInternalID", + EntField: "system_internal_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "tags", - GoField: "Tags", - EntField: "tags", - Type: "json.RawMessage", - Required: false, + InputKey: "tags", + GoField: "Tags", + EntField: "tags", + Type: "json.RawMessage", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "validated", - GoField: "Validated", - EntField: "validated", - Type: "bool", - Required: false, + InputKey: "validated", + GoField: "Validated", + EntField: "validated", + Type: "bool", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vector", - GoField: "Vector", - EntField: "vector", - Type: "string", - Required: false, + InputKey: "vector", + GoField: "Vector", + EntField: "vector", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerabilityStatusID", - GoField: "VulnerabilityStatusID", - EntField: "vulnerability_status_id", - Type: "string", - Required: false, + InputKey: "vulnerabilityStatusID", + GoField: "VulnerabilityStatusID", + EntField: "vulnerability_status_id", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerabilityStatusName", - GoField: "VulnerabilityStatusName", - EntField: "vulnerability_status_name", - Type: "string", - Required: false, + InputKey: "vulnerabilityStatusName", + GoField: "VulnerabilityStatusName", + EntField: "vulnerability_status_name", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, { - InputKey: "vulnerableVersionRange", - GoField: "VulnerableVersionRange", - EntField: "vulnerable_version_range", - Type: "string", - Required: false, + InputKey: "vulnerableVersionRange", + GoField: "VulnerableVersionRange", + EntField: "vulnerable_version_range", + Type: "string", + Required: false, UpsertKey: false, LookupKey: false, }, }, AllowedKeys: map[string]struct{}{ - "autoDismissedAt": {}, - "blocking": {}, - "category": {}, - "cveID": {}, - "cweIds": {}, - "dependencyScope": {}, - "description": {}, - "discoveredAt": {}, - "dismissedAt": {}, - "dismissedComment": {}, - "dismissedReason": {}, - "displayName": {}, - "environmentID": {}, - "environmentName": {}, - "exploitability": {}, - "externalID": {}, - "externalOwnerID": {}, - "externalURI": {}, - "firstPatchedVersion": {}, - "fixedAt": {}, - "impact": {}, - "impacts": {}, - "internalNotes": {}, - "manifestPath": {}, - "metadata": {}, - "open": {}, - "ownerID": {}, - "packageEcosystem": {}, - "packageName": {}, - "priority": {}, - "production": {}, - "public": {}, - "publishedAt": {}, - "rawPayload": {}, - "references": {}, - "remediationSLA": {}, - "scopeID": {}, - "scopeName": {}, - "score": {}, - "severity": {}, - "source": {}, - "sourceUpdatedAt": {}, - "summary": {}, - "systemInternalID": {}, - "tags": {}, - "validated": {}, - "vector": {}, - "vulnerabilityStatusID": {}, + "autoDismissedAt": {}, + "blocking": {}, + "category": {}, + "cveID": {}, + "cweIds": {}, + "dependencyScope": {}, + "description": {}, + "discoveredAt": {}, + "dismissedAt": {}, + "dismissedComment": {}, + "dismissedReason": {}, + "displayName": {}, + "environmentID": {}, + "environmentName": {}, + "exploitability": {}, + "externalID": {}, + "externalOwnerID": {}, + "externalURI": {}, + "firstPatchedVersion": {}, + "fixedAt": {}, + "impact": {}, + "impacts": {}, + "internalNotes": {}, + "manifestPath": {}, + "metadata": {}, + "open": {}, + "ownerID": {}, + "packageEcosystem": {}, + "packageName": {}, + "priority": {}, + "production": {}, + "public": {}, + "publishedAt": {}, + "rawPayload": {}, + "references": {}, + "remediationSLA": {}, + "scopeID": {}, + "scopeName": {}, + "score": {}, + "severity": {}, + "source": {}, + "sourceUpdatedAt": {}, + "summary": {}, + "systemInternalID": {}, + "tags": {}, + "validated": {}, + "vector": {}, + "vulnerabilityStatusID": {}, "vulnerabilityStatusName": {}, - "vulnerableVersionRange": {}, + "vulnerableVersionRange": {}, }, RequiredKeys: []string{ "externalID", diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index 56b1f39fcc..4dc515792d 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1 +1 @@ -08b48255cd81222abc5f61905ee73c3c7d6180dc70978066b92ce7f3ef385318 \ No newline at end of file +d4acade72a0292c872d76e8b19667b5ff20d25f0f843a998bd42da00bb4ec3f9 \ No newline at end of file diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index c39746af48..262174d347 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1 +1 @@ -b138f52594f435fb2bb740c7ee3a829d43684efc3d1ba9ee18f5a34d65b3664a \ No newline at end of file +24211d45b13ebcb60a14005f754b75b99185cbd59c83fb1459dd396357978011 \ No newline at end of file diff --git a/internal/integrations/operations/ingest_generated.go b/internal/integrations/operations/ingest_generated.go index 5ea0e459a1..f203dc38fd 100644 --- a/internal/integrations/operations/ingest_generated.go +++ b/internal/integrations/operations/ingest_generated.go @@ -338,11 +338,11 @@ func buildIngestMetadata(integration *ent.Integration, operationName string, rec } if options.WorkflowMeta != nil { - metadata.WorkflowInstanceID = options.WorkflowMeta.InstanceID - metadata.WorkflowActionKey = options.WorkflowMeta.ActionKey + metadata.WorkflowInstanceID = options.WorkflowMeta.InstanceID + metadata.WorkflowActionKey = options.WorkflowMeta.ActionKey metadata.WorkflowActionIndex = options.WorkflowMeta.ActionIndex - metadata.WorkflowObjectID = options.WorkflowMeta.ObjectID - metadata.WorkflowObjectType = string(options.WorkflowMeta.ObjectType) + metadata.WorkflowObjectID = options.WorkflowMeta.ObjectID + metadata.WorkflowObjectType = string(options.WorkflowMeta.ObjectType) } return metadata From 79f8bd1a0645451adfa834f111a23207aba1f850 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Mon, 20 Apr 2026 14:11:13 +0100 Subject: [PATCH 27/32] task db:create --- .task/checksum/generate-ent-smart | 2 +- .task/checksum/generate-graphql-smart | 2 +- ...25531_organization_setting_pending_deletion_at.sql} | 0 ...ganization_setting_pending_deletion_at_history.sql} | 0 db/migrations-goose-postgres/atlas.sum | 4 +++- ...25504_organization_setting_pending_deletion_at.sql} | 0 ...ganization_setting_pending_deletion_at_history.sql} | 0 db/migrations/atlas.sum | 4 +++- internal/ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- internal/ent/schema/organizationsetting.go | 10 +--------- internal/graphapi/checksum/.history_schema_checksum | 2 +- internal/graphapi/checksum/.schema_checksum | 2 +- .../graphapi/clientschema/checksum/.schema_checksum | 2 +- .../historyschema/checksum/.history_schema_checksum | 2 +- internal/graphapi/testclient/checksum/.client_checksum | 2 +- 16 files changed, 16 insertions(+), 20 deletions(-) rename db/migrations-goose-postgres/{20260416184015_organization_setting_pending_deletion_at.sql => 20260420125531_organization_setting_pending_deletion_at.sql} (100%) rename db/migrations-goose-postgres/{20260416184023_organization_setting_pending_deletion_at_history.sql => 20260420125541_organization_setting_pending_deletion_at_history.sql} (100%) rename db/migrations/{20260416183955_organization_setting_pending_deletion_at.sql => 20260420125504_organization_setting_pending_deletion_at.sql} (100%) rename db/migrations/{20260416184004_organization_setting_pending_deletion_at_history.sql => 20260420125516_organization_setting_pending_deletion_at_history.sql} (100%) diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index 4437b7d355..f40fbfa41f 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1 +1 @@ -c532c06aa054e80e1b50e8587e9f6d3c +f99e2ee8a4dac19acb8ea69415044944 diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index 100d9308ab..1bffb27672 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1 +1 @@ -fae2179e5d16db0bfc8f38b22657a8da +3bfa8d13572857a2aa090c50ab2080b5 diff --git a/db/migrations-goose-postgres/20260416184015_organization_setting_pending_deletion_at.sql b/db/migrations-goose-postgres/20260420125531_organization_setting_pending_deletion_at.sql similarity index 100% rename from db/migrations-goose-postgres/20260416184015_organization_setting_pending_deletion_at.sql rename to db/migrations-goose-postgres/20260420125531_organization_setting_pending_deletion_at.sql diff --git a/db/migrations-goose-postgres/20260416184023_organization_setting_pending_deletion_at_history.sql b/db/migrations-goose-postgres/20260420125541_organization_setting_pending_deletion_at_history.sql similarity index 100% rename from db/migrations-goose-postgres/20260416184023_organization_setting_pending_deletion_at_history.sql rename to db/migrations-goose-postgres/20260420125541_organization_setting_pending_deletion_at_history.sql diff --git a/db/migrations-goose-postgres/atlas.sum b/db/migrations-goose-postgres/atlas.sum index 4fb88e4004..3218e81e8f 100644 --- a/db/migrations-goose-postgres/atlas.sum +++ b/db/migrations-goose-postgres/atlas.sum @@ -1,4 +1,4 @@ -h1:93l9wk61QpyU3p0afFNY3K2AaiUwydnW7LeEjfUxNY8= +h1:77tJi+/yyYPSk3oV8CW/QkVbTTgRmF5QDakJNM1zb2Y= 20251229183203_init.sql h1:g/05irCXoqKFObJV2PPLuvDRqma+da41VPsZ5fXQgfE= 20251229183205_init_history.sql h1:P/q2kAHb8zfNMOWzYkKtPbOwoh9GdJUQljSNAiPEjYI= 20251231045229_workflow.sql h1:uUPRLO4yw2y//fPGeqIXRrL+fiEN1TRGkF4wHiqPaPk= @@ -117,3 +117,5 @@ h1:93l9wk61QpyU3p0afFNY3K2AaiUwydnW7LeEjfUxNY8= 20260417045841_integrations_directory_accounts_history.sql h1:X+BkbIMBENfr2PKUb39JwoJLw/EVNEuMgZoT6Ftz6q4= 20260417200313_file_category_and_name.sql h1:XpUXRyLZswyLIG8Xqk+yR6jIonIVncp4beFnffrwm50= 20260417200323_file_category_and_name_history.sql h1:KW0FYnvmQQ5DQiAsgtB/xQSokP3N6UHi1yC6Oi4LOXU= +20260420125531_organization_setting_pending_deletion_at.sql h1:3JbK+6fXYvRJ3RPtN3s1GkdZASupXGQCLAxA600bzW8= +20260420125541_organization_setting_pending_deletion_at_history.sql h1:f2IWz2YuqDja9t1SM/sGZLo2EJFHHh5Cm2M1G4yCrdg= diff --git a/db/migrations/20260416183955_organization_setting_pending_deletion_at.sql b/db/migrations/20260420125504_organization_setting_pending_deletion_at.sql similarity index 100% rename from db/migrations/20260416183955_organization_setting_pending_deletion_at.sql rename to db/migrations/20260420125504_organization_setting_pending_deletion_at.sql diff --git a/db/migrations/20260416184004_organization_setting_pending_deletion_at_history.sql b/db/migrations/20260420125516_organization_setting_pending_deletion_at_history.sql similarity index 100% rename from db/migrations/20260416184004_organization_setting_pending_deletion_at_history.sql rename to db/migrations/20260420125516_organization_setting_pending_deletion_at_history.sql diff --git a/db/migrations/atlas.sum b/db/migrations/atlas.sum index 3a0355ef59..bb649a6501 100644 --- a/db/migrations/atlas.sum +++ b/db/migrations/atlas.sum @@ -1,4 +1,4 @@ -h1:eqT50oHZlb2TX3kOKima//k24jZ65HcwqxuRMVoPCb4= +h1:O9JQFdGfzaYL5Ily7YexSO4xjN+W24fPmXWtLmZuo74= 20251229183159_init.sql h1:3uf/ftr28zW8YUD9qAaY2GESQHC7pYmkhlI6oDWUCKU= 20251229183201_init_history.sql h1:1tFSeCDWvZgb2Ctw80C/s3tqVPNLADQw9fSDACzL8WA= 20251231045221_workflow.sql h1:5bLq4cHh2kxUV7xajK5bq5McKKpr88HmufYauTdsgUw= @@ -117,3 +117,5 @@ h1:eqT50oHZlb2TX3kOKima//k24jZ65HcwqxuRMVoPCb4= 20260417045833_integrations_directory_accounts_history.sql h1:/1iTo0qzLR0WCNtTkzHjf7PWacJ08ptOQRV6LVrNBLQ= 20260417200247_file_category_and_name.sql h1:CeHehsDn2+g81Om5s0kF1Pkg+KNkAw2j826hjR7R5RM= 20260417200300_file_category_and_name_history.sql h1:gp5j8slOUzZeenBswbm4a2D3nvV1XaT5nZs7cvB8Jtg= +20260420125504_organization_setting_pending_deletion_at.sql h1:eKiagvLL7IOpb2cztyekrwGGyBxGS8fiaWnC4VT5DZY= +20260420125516_organization_setting_pending_deletion_at_history.sql h1:mzIOLV8TnvSEx3GISsL/PbLw5aKz63FR8u/OHp8QjMA= diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index 94b9acc7a5..c9c8af22c2 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -efd48930f2cba0fb370a288c49bf5916d22899ab03e7c7e06b5a02e5b69d7722 \ No newline at end of file +5383d273d15cd2455bd74d852628a66ecf7d87c1afacb7533ed5b4a3332b6037 \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index 4211e16abb..131e5844a9 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -f2b07aa110f1340e2d85b9713ca56d0f4b381d8f6bd01f12a5e5a867230255eb \ No newline at end of file +9ce7c2084f00b4af78cf8a3cde59c65d1416f758f3ce841a9edd2be5000f359b \ No newline at end of file diff --git a/internal/ent/schema/organizationsetting.go b/internal/ent/schema/organizationsetting.go index 20c140670e..4455b9b0ce 100644 --- a/internal/ent/schema/organizationsetting.go +++ b/internal/ent/schema/organizationsetting.go @@ -9,6 +9,7 @@ import ( "entgo.io/ent/schema" "entgo.io/ent/schema/field" "github.com/gertd/go-pluralize" + "github.com/theopenlane/entx" "github.com/theopenlane/iam/entfga" "github.com/theopenlane/utils/keygen" @@ -20,15 +21,6 @@ import ( "github.com/theopenlane/core/internal/ent/privacy/policy" "github.com/theopenlane/core/internal/ent/privacy/rule" "github.com/theopenlane/core/internal/ent/validator" -<<<<<<< HEAD -||||||| cba4c23b0 - "github.com/theopenlane/iam/entfga" - "github.com/theopenlane/utils/keygen" -======= - "github.com/theopenlane/entx" - "github.com/theopenlane/iam/entfga" - "github.com/theopenlane/utils/keygen" ->>>>>>> origin/main ) // OrganizationSetting holds the schema definition for the OrganizationSetting entity diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index 97610cdba0..c7bdb883e4 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1 +1 @@ -bcacda1d4a8ae92761e174060987fc3e4c19e4ceb516fda184b843f341d99024 \ No newline at end of file +f4ca0bfb0fb63424a42b78ed286694f118605606076c11f44ab02aa7ccac041a \ No newline at end of file diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index 944dd57de0..d87df52e32 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1 +1 @@ -80ece101f316c2a37b7372a287c42b9428e7d27d13710a2952abe31846130966 \ No newline at end of file +13feeecbdabe4887a93acc4d09fd8cb80fb02bbd72f213720c87ce8a7e6ed8b3 \ No newline at end of file diff --git a/internal/graphapi/clientschema/checksum/.schema_checksum b/internal/graphapi/clientschema/checksum/.schema_checksum index 90531923ac..5b6f1556ff 100644 --- a/internal/graphapi/clientschema/checksum/.schema_checksum +++ b/internal/graphapi/clientschema/checksum/.schema_checksum @@ -1 +1 @@ -3f46a2a6114edde5f486dc0ad3ac3116abafe6f2882629f9e94462d5c674d307 \ No newline at end of file +74cf6ee6818a955a8783a5b8cad609796d0473931b141be43b4bacf9c2745dba \ No newline at end of file diff --git a/internal/graphapi/historyschema/checksum/.history_schema_checksum b/internal/graphapi/historyschema/checksum/.history_schema_checksum index 7856002b04..9ec071f8b9 100644 --- a/internal/graphapi/historyschema/checksum/.history_schema_checksum +++ b/internal/graphapi/historyschema/checksum/.history_schema_checksum @@ -1 +1 @@ -e153490787d9e7f6680c52c3c0ea8969b2b80c4ff771416230884b8f7b1aacc1 \ No newline at end of file +4356fe8000c4c7c46902f55a4bfdc9ad5d831e9ede3ebcc31c2b48c2be73c21f \ No newline at end of file diff --git a/internal/graphapi/testclient/checksum/.client_checksum b/internal/graphapi/testclient/checksum/.client_checksum index a735330e23..7eb3b394f2 100644 --- a/internal/graphapi/testclient/checksum/.client_checksum +++ b/internal/graphapi/testclient/checksum/.client_checksum @@ -1 +1 @@ -976870bcf0c3692e8dc11a7c4316491508de431311ec08d9458376127c5c53e2 \ No newline at end of file +3998faa6ed22210cc800e888a96b333c7a8a31150d4a2f26ef4aa460a70b94ac \ No newline at end of file From 30494b0e3ba58d91ed4afd4ab69d421d7f5dbf55 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Wed, 22 Apr 2026 10:46:37 +0100 Subject: [PATCH 28/32] task regenerate --- .task/checksum/generate-graphql-smart | 2 +- internal/graphapi/checksum/.schema_checksum | 2 +- internal/graphapi/clientschema/checksum/.schema_checksum | 2 +- internal/graphapi/testclient/checksum/.client_checksum | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index 835b4c272a..5d80bc4f76 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1 +1 @@ -54e5e3c3d76e71451c97ad7b4abc414b +b8cb49a1f7026bae64ba9508641c4fc2 diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index 7b207d0454..ce19ffc1eb 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1 +1 @@ -0e0d528d43e2b315b075769dcc2e52bdfb95ac22ea6fd9f07ce1e49784f1a439 \ No newline at end of file +6f9f349d9e89b8a8850935f2d7d4975b66654dde98e5eba4d2484a049cedeac7 \ No newline at end of file diff --git a/internal/graphapi/clientschema/checksum/.schema_checksum b/internal/graphapi/clientschema/checksum/.schema_checksum index 727a115b82..a22bb276db 100644 --- a/internal/graphapi/clientschema/checksum/.schema_checksum +++ b/internal/graphapi/clientschema/checksum/.schema_checksum @@ -1 +1 @@ -393a9c38fb15931d5b869494f3f67b034fbb60e5021d1032f13dc89aa0c36919 \ No newline at end of file +f84c7d2d274ac44db953a38f4d62b994c33b3ea88c0ea12f51d9bea7425801e6 \ No newline at end of file diff --git a/internal/graphapi/testclient/checksum/.client_checksum b/internal/graphapi/testclient/checksum/.client_checksum index 7876a16261..051f129d98 100644 --- a/internal/graphapi/testclient/checksum/.client_checksum +++ b/internal/graphapi/testclient/checksum/.client_checksum @@ -1 +1 @@ -5220d33ee0d466f36e0033c0645d2d72608e0aa2505455071af32e1701e19c47 \ No newline at end of file +579f0fc1090104e3d7dbb99fb7ab53c18ecb5cfb25fb0cc540171aca4db7b420 \ No newline at end of file From 3fcbad0bf8df29e00527ccf00414005b8b7f5da9 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Fri, 24 Apr 2026 19:05:17 +0100 Subject: [PATCH 29/32] Update internal/ent/hooks/customenums.go Co-authored-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> Signed-off-by: Lanre Adelowo --- internal/ent/hooks/customenums.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ent/hooks/customenums.go b/internal/ent/hooks/customenums.go index 9c314cffe8..6ff15d723e 100644 --- a/internal/ent/hooks/customenums.go +++ b/internal/ent/hooks/customenums.go @@ -251,7 +251,7 @@ func HookCustomTypeEnumDelete() ent.Hook { } // skip the "in use" error/check when deleting via organization cascade - // the organization edge cleanup would deletion order properly via cascades + // the organization edge cleanup needs to cascade deletes if ctx.Value(contextx.SkipCustomEnumInUseCheck) == true { return next.Mutate(ctx, m) } From 21afdbe7433bac6066e402ccb930f685b7d150cd Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Fri, 24 Apr 2026 21:53:28 +0100 Subject: [PATCH 30/32] try entc fix --- .task/checksum/generate-ent-smart | 2 +- .../ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- internal/ent/generate/entc.go | 28 ++++++++++--------- .../operations/ingest_generated.go | 8 +++++- 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index f40fbfa41f..7e25d00233 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1 +1 @@ -f99e2ee8a4dac19acb8ea69415044944 +c1498f21dae0f13a9355fafccc0912f9 diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index c9c8af22c2..8edd253836 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -5383d273d15cd2455bd74d852628a66ecf7d87c1afacb7533ed5b4a3332b6037 \ No newline at end of file +a9db6ae1eced0927a48c4fd737389f20ba8a3a453b1016c9cd7a0f555960abe5 \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index 131e5844a9..a14a13abae 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -9ce7c2084f00b4af78cf8a3cde59c65d1416f758f3ce841a9edd2be5000f359b \ No newline at end of file +d230408aa1e95c6d9ba14b2107ec5f22332b2e67f63b751f7e8d00fc31cff748 \ No newline at end of file diff --git a/internal/ent/generate/entc.go b/internal/ent/generate/entc.go index 66eadc8bd5..522215c328 100644 --- a/internal/ent/generate/entc.go +++ b/internal/ent/generate/entc.go @@ -18,19 +18,6 @@ import ( _ "github.com/jackc/pgx/v5" "gocloud.dev/secrets" - "github.com/theopenlane/core/common/enums/exportenums" - "github.com/theopenlane/core/internal/ent/entconfig" - "github.com/theopenlane/core/internal/ent/filecategorygen" - "github.com/theopenlane/core/internal/ent/historygenerated" - "github.com/theopenlane/core/internal/ent/validator" - "github.com/theopenlane/core/internal/entitlements/genfeatures" - "github.com/theopenlane/core/internal/genhelpers" - "github.com/theopenlane/core/internal/graphapi/directives" - "github.com/theopenlane/core/internal/objects" - "github.com/theopenlane/core/pkg/entitlements" - "github.com/theopenlane/core/pkg/gala" - "github.com/theopenlane/core/pkg/shortlinks" - "github.com/theopenlane/core/pkg/summarizer" "github.com/theopenlane/emailtemplates" "github.com/theopenlane/entx" "github.com/theopenlane/entx/accessmap" @@ -44,6 +31,20 @@ import ( "github.com/theopenlane/iam/sessions" "github.com/theopenlane/iam/tokens" "github.com/theopenlane/iam/totp" + + "github.com/theopenlane/core/common/enums/exportenums" + "github.com/theopenlane/core/internal/ent/entconfig" + "github.com/theopenlane/core/internal/ent/filecategorygen" + "github.com/theopenlane/core/internal/ent/historygenerated" + "github.com/theopenlane/core/internal/ent/validator" + "github.com/theopenlane/core/internal/entitlements/genfeatures" + "github.com/theopenlane/core/internal/genhelpers" + "github.com/theopenlane/core/internal/graphapi/directives" + "github.com/theopenlane/core/internal/objects" + "github.com/theopenlane/core/pkg/entitlements" + "github.com/theopenlane/core/pkg/gala" + "github.com/theopenlane/core/pkg/shortlinks" + "github.com/theopenlane/core/pkg/summarizer" ) var ( @@ -359,6 +360,7 @@ func runParallelPostGenHooks(g *gen.Graph) { integrationmapping.WithDoPackage("github.com/samber/do/v2"), integrationmapping.WithLoPackage("github.com/samber/lo"), integrationmapping.WithJsonxPackage("github.com/theopenlane/core/pkg/jsonx"), + integrationmapping.WithLogxPackage("github.com/theopenlane/core/pkg/logx"), ).Hook(), accessMapExt.Hook(), fileCategoryGen.Hook(), diff --git a/internal/integrations/operations/ingest_generated.go b/internal/integrations/operations/ingest_generated.go index f203dc38fd..316b35a694 100644 --- a/internal/integrations/operations/ingest_generated.go +++ b/internal/integrations/operations/ingest_generated.go @@ -4,6 +4,7 @@ package operations import ( "context" "encoding/json" + "strings" "github.com/samber/do/v2" "github.com/samber/lo" @@ -11,6 +12,7 @@ import ( ent "github.com/theopenlane/core/internal/ent/generated" "github.com/theopenlane/core/internal/ent/integrationgenerated" "github.com/theopenlane/core/pkg/gala" + "github.com/theopenlane/core/pkg/logx" "github.com/theopenlane/utils/contextx" ) @@ -239,6 +241,8 @@ func emitTyped[TInput any, TEvent any]( ) error { var input TInput if err := json.Unmarshal(payload, &input); err != nil { + logx.FromContext(ctx).Error().Str("topic", string(topic.Name)).Str("integration", integration.Family).Err(err).Msg("integrations: error emitting type") + return ErrIngestMappedDocumentInvalid } @@ -260,6 +264,8 @@ func persistTyped[TInput any]( ) error { var input TInput if err := json.Unmarshal(payload, &input); err != nil { + logx.FromContext(ctx).Error().Err(err).Msg("integrations: error persisting type") + return ErrIngestMappedDocumentInvalid } @@ -350,7 +356,7 @@ func buildIngestMetadata(integration *ent.Integration, operationName string, rec // buildIngestHeaders assembles Gala message headers for one ingest record func buildIngestHeaders(record mappedIngestRecord, metadata integrationgenerated.IntegrationIngestMetadata) gala.Headers { - tags := []string{record.Schema} + tags := []string{metadata.DefinitionID, "schema_" + strings.ToLower(record.Schema)} if metadata.Source != "" { tags = append(tags, string(metadata.Source)) } From f2393219d9c383d01086a2ef6018e8fb1483814e Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Fri, 24 Apr 2026 22:21:27 +0100 Subject: [PATCH 31/32] fix merge conflict --- .task/checksum/generate-ent-smart | 2 +- .task/checksum/generate-graphql-smart | 2 +- internal/ent/checksum/.history_schema_checksum | 2 +- internal/ent/checksum/.schema_checksum | 2 +- internal/ent/generated/entity/entity.go | 2 +- internal/ent/generated/migrate/schema.go | 2 +- internal/ent/historygenerated/entityhistory/entityhistory.go | 2 +- internal/ent/historygenerated/migrate/schema.go | 2 +- internal/graphapi/checksum/.history_schema_checksum | 2 +- internal/graphapi/checksum/.schema_checksum | 2 +- internal/httpserve/specs/openlane.openapi.json | 2 +- internal/httpserve/specs/openlane.openapi.yaml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.task/checksum/generate-ent-smart b/.task/checksum/generate-ent-smart index 7e25d00233..8bd2929c36 100644 --- a/.task/checksum/generate-ent-smart +++ b/.task/checksum/generate-ent-smart @@ -1 +1 @@ -c1498f21dae0f13a9355fafccc0912f9 +5a715b91ca7219cba80e2f8aac01ad6f diff --git a/.task/checksum/generate-graphql-smart b/.task/checksum/generate-graphql-smart index 5d80bc4f76..61971606d9 100644 --- a/.task/checksum/generate-graphql-smart +++ b/.task/checksum/generate-graphql-smart @@ -1 +1 @@ -b8cb49a1f7026bae64ba9508641c4fc2 +fa663ecfd53a07e36e31ea824f492e20 diff --git a/internal/ent/checksum/.history_schema_checksum b/internal/ent/checksum/.history_schema_checksum index 8edd253836..6daacc2d45 100644 --- a/internal/ent/checksum/.history_schema_checksum +++ b/internal/ent/checksum/.history_schema_checksum @@ -1 +1 @@ -a9db6ae1eced0927a48c4fd737389f20ba8a3a453b1016c9cd7a0f555960abe5 \ No newline at end of file +6a207b60daf10323cef10cb80efeffd0f8fd304aca7e3bdb9622c80038270c99 \ No newline at end of file diff --git a/internal/ent/checksum/.schema_checksum b/internal/ent/checksum/.schema_checksum index a14a13abae..dc0ccd9ca0 100644 --- a/internal/ent/checksum/.schema_checksum +++ b/internal/ent/checksum/.schema_checksum @@ -1 +1 @@ -d230408aa1e95c6d9ba14b2107ec5f22332b2e67f63b751f7e8d00fc31cff748 \ No newline at end of file +2aff7ebf2013e6ced212b25fc3fa7ad3b1e5113f5220b789b9316e8bc8d32444 \ No newline at end of file diff --git a/internal/ent/generated/entity/entity.go b/internal/ent/generated/entity/entity.go index 1a14f3ab2b..43de6dbdd7 100644 --- a/internal/ent/generated/entity/entity.go +++ b/internal/ent/generated/entity/entity.go @@ -644,7 +644,7 @@ func StatusValidator(s enums.EntityStatus) error { } } -const DefaultTier enums.VendorTier = "STANDARD" +const DefaultTier enums.VendorTier = "LOW" // TierValidator is a validator for the "tier" field enum values. It is called by the builders before save. func TierValidator(t enums.VendorTier) error { diff --git a/internal/ent/generated/migrate/schema.go b/internal/ent/generated/migrate/schema.go index 817b6711e1..d9872c8fa3 100644 --- a/internal/ent/generated/migrate/schema.go +++ b/internal/ent/generated/migrate/schema.go @@ -2209,7 +2209,7 @@ var ( {Name: "risk_rating", Type: field.TypeString, Nullable: true}, {Name: "risk_score", Type: field.TypeInt, Nullable: true}, {Name: "risk_score_coverage", Type: field.TypeInt, Nullable: true}, - {Name: "tier", Type: field.TypeEnum, Nullable: true, Enums: []string{"CRITICAL", "HIGH", "STANDARD", "LOW"}, Default: "STANDARD"}, + {Name: "tier", Type: field.TypeEnum, Nullable: true, Enums: []string{"CRITICAL", "HIGH", "STANDARD", "LOW"}, Default: "LOW"}, {Name: "review_frequency", Type: field.TypeEnum, Nullable: true, Enums: []string{"YEARLY", "QUARTERLY", "BIANNUALLY", "MONTHLY", "NONE"}, Default: "YEARLY"}, {Name: "next_review_at", Type: field.TypeTime, Nullable: true}, {Name: "contract_renewal_at", Type: field.TypeTime, Nullable: true}, diff --git a/internal/ent/historygenerated/entityhistory/entityhistory.go b/internal/ent/historygenerated/entityhistory/entityhistory.go index 4401ac26cf..95cf63c24b 100644 --- a/internal/ent/historygenerated/entityhistory/entityhistory.go +++ b/internal/ent/historygenerated/entityhistory/entityhistory.go @@ -304,7 +304,7 @@ func StatusValidator(s enums.EntityStatus) error { } } -const DefaultTier enums.VendorTier = "STANDARD" +const DefaultTier enums.VendorTier = "LOW" // TierValidator is a validator for the "tier" field enum values. It is called by the builders before save. func TierValidator(t enums.VendorTier) error { diff --git a/internal/ent/historygenerated/migrate/schema.go b/internal/ent/historygenerated/migrate/schema.go index ca6a0c1f1f..f6267e2220 100644 --- a/internal/ent/historygenerated/migrate/schema.go +++ b/internal/ent/historygenerated/migrate/schema.go @@ -964,7 +964,7 @@ var ( {Name: "risk_rating", Type: field.TypeString, Nullable: true}, {Name: "risk_score", Type: field.TypeInt, Nullable: true}, {Name: "risk_score_coverage", Type: field.TypeInt, Nullable: true}, - {Name: "tier", Type: field.TypeEnum, Nullable: true, Enums: []string{"CRITICAL", "HIGH", "STANDARD", "LOW"}, Default: "STANDARD"}, + {Name: "tier", Type: field.TypeEnum, Nullable: true, Enums: []string{"CRITICAL", "HIGH", "STANDARD", "LOW"}, Default: "LOW"}, {Name: "review_frequency", Type: field.TypeEnum, Nullable: true, Enums: []string{"YEARLY", "QUARTERLY", "BIANNUALLY", "MONTHLY", "NONE"}, Default: "YEARLY"}, {Name: "next_review_at", Type: field.TypeTime, Nullable: true}, {Name: "contract_renewal_at", Type: field.TypeTime, Nullable: true}, diff --git a/internal/graphapi/checksum/.history_schema_checksum b/internal/graphapi/checksum/.history_schema_checksum index c7bdb883e4..060ade269a 100644 --- a/internal/graphapi/checksum/.history_schema_checksum +++ b/internal/graphapi/checksum/.history_schema_checksum @@ -1 +1 @@ -f4ca0bfb0fb63424a42b78ed286694f118605606076c11f44ab02aa7ccac041a \ No newline at end of file +947c0b1732674b99aa75bd490565fa19ad342c11b323c89ccd656ddbdd5b9868 \ No newline at end of file diff --git a/internal/graphapi/checksum/.schema_checksum b/internal/graphapi/checksum/.schema_checksum index ce19ffc1eb..980f5cea95 100644 --- a/internal/graphapi/checksum/.schema_checksum +++ b/internal/graphapi/checksum/.schema_checksum @@ -1 +1 @@ -6f9f349d9e89b8a8850935f2d7d4975b66654dde98e5eba4d2484a049cedeac7 \ No newline at end of file +e139e4383429611be882aa6eae8a7ffd55c2113d5a167d37713110f400f0a28e \ No newline at end of file diff --git a/internal/httpserve/specs/openlane.openapi.json b/internal/httpserve/specs/openlane.openapi.json index 0f1051cf65..7c2eba8ff9 100644 --- a/internal/httpserve/specs/openlane.openapi.json +++ b/internal/httpserve/specs/openlane.openapi.json @@ -3426,7 +3426,7 @@ "examples": { "error": { "value": { - "error": "googleapi: Error 401: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project., unauthorized", + "error": "Get \"https://www.googleapis.com/oauth2/v2/userinfo?alt=json\u0026prettyPrint=false\": dial tcp: lookup www.googleapis.com: no such host", "error_code": "INVALID_INPUT", "success": false } diff --git a/internal/httpserve/specs/openlane.openapi.yaml b/internal/httpserve/specs/openlane.openapi.yaml index d16b44fec7..a13d8cfbb4 100644 --- a/internal/httpserve/specs/openlane.openapi.yaml +++ b/internal/httpserve/specs/openlane.openapi.yaml @@ -2462,7 +2462,7 @@ paths: examples: error: value: - error: 'googleapi: Error 401: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project., unauthorized' + error: 'Get "https://www.googleapis.com/oauth2/v2/userinfo?alt=json&prettyPrint=false": dial tcp: lookup www.googleapis.com: no such host' error_code: INVALID_INPUT success: false schema: From b07add76899865d14421c2b4cae2e8c297727eea Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Mon, 27 Apr 2026 18:37:47 +0100 Subject: [PATCH 32/32] fix tests --- cli/go.mod | 2 +- cli/go.sum | 4 +--- common/go.mod | 2 +- common/go.sum | 4 +--- .../httpserve/specs/openlane.openapi.json | 2 +- .../httpserve/specs/openlane.openapi.yaml | 2 +- .../operations/ingest_generated_test.go | 24 ++++++++++++++----- 7 files changed, 24 insertions(+), 16 deletions(-) diff --git a/cli/go.mod b/cli/go.mod index 6cb6a2eddb..b1254ffc71 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -62,7 +62,7 @@ require ( github.com/lestrrat-go/jwx/v3 v3.1.0 // indirect github.com/lestrrat-go/option/v2 v2.0.0 // indirect github.com/mattn/go-colorable v0.1.14 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-isatty v0.0.21 // indirect github.com/mattn/go-runewidth v0.0.19 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect diff --git a/cli/go.sum b/cli/go.sum index 78442b460c..e9580d670a 100644 --- a/cli/go.sum +++ b/cli/go.sum @@ -122,8 +122,7 @@ github.com/lestrrat-go/option/v2 v2.0.0 h1:XxrcaJESE1fokHy3FpaQ/cXW8ZsIdWcdFzzLO github.com/lestrrat-go/option/v2 v2.0.0/go.mod h1:oSySsmzMoR0iRzCDCaUfsCzxQHUEuhOViQObyy7S6Vg= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.21 h1:xYae+lCNBP7QuW4PUnNG61ffM4hVIfm+zUzDuSzYLGs= github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw= github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -239,7 +238,6 @@ golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7 golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.42.0 h1:UiKe+zDFmJobeJ5ggPwOshJIVt6/Ft0rcfrXZDLWAWY= diff --git a/common/go.mod b/common/go.mod index b8e72666bc..e630f92330 100644 --- a/common/go.mod +++ b/common/go.mod @@ -49,7 +49,7 @@ require ( github.com/jackc/pgx/v5 v5.9.2 // indirect github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/mattn/go-colorable v0.1.14 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-isatty v0.0.21 // indirect github.com/mattn/go-sqlite3 v1.14.32 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/muhlemmer/gu v0.3.1 // indirect diff --git a/common/go.sum b/common/go.sum index 0f5adaedb8..c589c2c976 100644 --- a/common/go.sum +++ b/common/go.sum @@ -85,8 +85,7 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.21 h1:xYae+lCNBP7QuW4PUnNG61ffM4hVIfm+zUzDuSzYLGs= github.com/mattn/go-sqlite3 v1.14.32 h1:JD12Ag3oLy1zQA+BNn74xRgaBbdhbNIDYvQUEuuErjs= github.com/mattn/go-sqlite3 v1.14.32/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= @@ -198,7 +197,6 @@ golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg= diff --git a/internal/httpserve/specs/openlane.openapi.json b/internal/httpserve/specs/openlane.openapi.json index 7c2eba8ff9..0f1051cf65 100644 --- a/internal/httpserve/specs/openlane.openapi.json +++ b/internal/httpserve/specs/openlane.openapi.json @@ -3426,7 +3426,7 @@ "examples": { "error": { "value": { - "error": "Get \"https://www.googleapis.com/oauth2/v2/userinfo?alt=json\u0026prettyPrint=false\": dial tcp: lookup www.googleapis.com: no such host", + "error": "googleapi: Error 401: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project., unauthorized", "error_code": "INVALID_INPUT", "success": false } diff --git a/internal/httpserve/specs/openlane.openapi.yaml b/internal/httpserve/specs/openlane.openapi.yaml index a13d8cfbb4..d16b44fec7 100644 --- a/internal/httpserve/specs/openlane.openapi.yaml +++ b/internal/httpserve/specs/openlane.openapi.yaml @@ -2462,7 +2462,7 @@ paths: examples: error: value: - error: 'Get "https://www.googleapis.com/oauth2/v2/userinfo?alt=json&prettyPrint=false": dial tcp: lookup www.googleapis.com: no such host' + error: 'googleapi: Error 401: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project., unauthorized' error_code: INVALID_INPUT success: false schema: diff --git a/internal/integrations/operations/ingest_generated_test.go b/internal/integrations/operations/ingest_generated_test.go index a09bf7327e..a1514f49db 100644 --- a/internal/integrations/operations/ingest_generated_test.go +++ b/internal/integrations/operations/ingest_generated_test.go @@ -182,8 +182,17 @@ func TestBuildIngestHeaders(t *testing.T) { if _, ok := headers.Properties["delivery_id"]; ok { t.Fatal("expected delivery_id to be omitted when empty") } - if len(headers.Tags) != 2 { - t.Fatalf("expected 2 tags, got %d", len(headers.Tags)) + if len(headers.Tags) != 3 { + t.Fatalf("expected 3 tags, got %d: %v", len(headers.Tags), headers.Tags) + } + if headers.Tags[0] != "def-001" { + t.Fatalf("expected first tag %q, got %q", "def-001", headers.Tags[0]) + } + if headers.Tags[1] != "schema_finding" { + t.Fatalf("expected second tag %q, got %q", "schema_finding", headers.Tags[1]) + } + if headers.Tags[2] != string(integrationgenerated.IntegrationIngestSourceWebhook) { + t.Fatalf("expected third tag %q, got %q", string(integrationgenerated.IntegrationIngestSourceWebhook), headers.Tags[2]) } }) @@ -195,11 +204,14 @@ func TestBuildIngestHeaders(t *testing.T) { headers := buildIngestHeaders(record, metadata) - if len(headers.Tags) != 1 { - t.Fatalf("expected 1 tag, got %d: %v", len(headers.Tags), headers.Tags) + if len(headers.Tags) != 2 { + t.Fatalf("expected 2 tags, got %d: %v", len(headers.Tags), headers.Tags) + } + if headers.Tags[0] != "" { + t.Fatalf("expected first tag to be empty definition id, got %q", headers.Tags[0]) } - if headers.Tags[0] != "asset" { - t.Fatalf("expected tag %q, got %q", "asset", headers.Tags[0]) + if headers.Tags[1] != "schema_asset" { + t.Fatalf("expected second tag %q, got %q", "schema_asset", headers.Tags[1]) } }) }