Files
probo/pkg/server/api/console/v1/graphql/organization.graphql
Bryan Frimin 4b64e59da4 Introduce access-review source snapshot and normalize naming
Decouple each campaign from the live access-review sources it was started
with by introducing a per-campaign source snapshot table
(access_review_campaign_sources). The snapshot captures the source name,
category, and connector at start time, so a review remains coherent even
after the underlying source is edited or deleted. Fetch tracking becomes
an append-only log (access_review_campaign_source_fetch_attempts) that
preserves every attempt with its own status and error rather than
overwriting a single row.

Rename the shared access-review tables and enums to use a consistent
access_review_ prefix throughout:

  access_entries          → access_review_entries
  access_sources          → access_review_sources
  access_source_category  → access_review_source_category
  access_entry_*          → access_review_entry_*

The same rename propagates to every coredata type, service, GraphQL
schema, MCP specification, CLI command, frontend component, and e2e test.
The accessreview package gains dedicated actions.go and policies.go files
for its own IAM policy set, mirroring the agentrun package pattern.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-06-15 15:33:22 +02:00

369 lines
9.6 KiB
GraphQL

type OrganizationContext {
organizationId: ID!
product: String
architecture: String
team: String
processes: String
customers: String
}
enum ProfileState
@goModel(model: "go.probo.inc/probo/pkg/coredata.ProfileState") {
ACTIVE @goEnum(value: "go.probo.inc/probo/pkg/coredata.ProfileStateActive")
INACTIVE
@goEnum(value: "go.probo.inc/probo/pkg/coredata.ProfileStateInactive")
}
type Profile implements Node {
id: ID!
fullName: String!
emailAddress: EmailAddr!
state: ProfileState!
additionalEmailAddresses: [EmailAddr!]!
kind: String
position: String
contractStartDate: Datetime
contractEndDate: Datetime
createdAt: Datetime!
updatedAt: Datetime!
permission(action: String!): Boolean! @goField(forceResolver: true)
}
enum ProfileOrderField
@goModel(model: "go.probo.inc/probo/pkg/coredata.MembershipProfileOrderField") {
FULL_NAME
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.MembershipProfileOrderFieldFullName"
)
CREATED_AT
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.MembershipProfileOrderFieldCreatedAt"
)
EMAIL_ADDRESS
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.MembershipProfileOrderFieldEmailAddress"
)
KIND @goEnum(value: "go.probo.inc/probo/pkg/coredata.MembershipProfileOrderFieldKind")
}
input ProfileOrder
@goModel(
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.ProfileOrderBy"
) {
direction: OrderDirection!
field: ProfileOrderField!
}
input ProfileFilter {
contractEnded: Boolean
state: ProfileState
}
type ProfileConnection
@goModel(
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.ProfileConnection"
) {
totalCount: Int! @goField(forceResolver: true)
edges: [ProfileEdge!]!
pageInfo: PageInfo!
}
type ProfileEdge {
cursor: CursorKey!
node: Profile!
}
input UpdateOrganizationContextInput {
organizationId: ID!
product: String @goField(omittable: true)
architecture: String @goField(omittable: true)
team: String @goField(omittable: true)
processes: String @goField(omittable: true)
customers: String @goField(omittable: true)
}
type UpdateOrganizationContextPayload {
context: OrganizationContext!
}
type Organization implements Node {
id: ID!
name: String!
logo: File @goField(forceResolver: true)
horizontalLogo: File @goField(forceResolver: true)
description: String
websiteUrl: String
email: String
headquarterAddress: String
context: OrganizationContext @goField(forceResolver: true)
profiles(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: ProfileOrder
filter: ProfileFilter
): ProfileConnection! @goField(forceResolver: true)
measureCategories: [String!]! @goField(forceResolver: true)
accessReviewSources(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: AccessReviewSourceOrder
): AccessReviewSourceConnection! @goField(forceResolver: true)
accessReviewCampaigns(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: AccessReviewCampaignOrder
): AccessReviewCampaignConnection! @goField(forceResolver: true)
assetListDocument: Document @goField(forceResolver: true)
assets(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: AssetOrder
): AssetConnection! @goField(forceResolver: true)
dataListDocument: Document @goField(forceResolver: true)
data(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: DatumOrder
): DatumConnection! @goField(forceResolver: true)
audits(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: AuditOrder
): AuditConnection! @goField(forceResolver: true)
findingsDocument: Document @goField(forceResolver: true)
findings(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: FindingOrder
filter: FindingFilter
): FindingConnection @goField(forceResolver: true)
auditLogEntries(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: AuditLogEntryOrder
filter: AuditLogEntryFilter
): AuditLogEntryConnection! @goField(forceResolver: true)
slackConnections(
first: Int
after: CursorKey
last: Int
before: CursorKey
): SlackConnectionConnection! @goField(forceResolver: true)
slackOAuth2Scopes: [String!]! @goField(forceResolver: true)
connectors(filter: ConnectorFilter): [Connector!]! @goField(forceResolver: true)
controls(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: ControlOrder
filter: ControlFilter
): ControlConnection! @goField(forceResolver: true)
statementsOfApplicability(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: StatementOfApplicabilityOrder
): StatementOfApplicabilityConnection! @goField(forceResolver: true)
dataProtectionImpactAssessments(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: DataProtectionImpactAssessmentOrder
): DataProtectionImpactAssessmentConnection! @goField(forceResolver: true)
dataProtectionImpactAssessmentsDocument: Document
@goField(forceResolver: true)
transferImpactAssessments(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: TransferImpactAssessmentOrder
): TransferImpactAssessmentConnection! @goField(forceResolver: true)
transferImpactAssessmentsDocument: Document @goField(forceResolver: true)
documents(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: DocumentOrder
filter: DocumentFilter
): DocumentConnection! @goField(forceResolver: true)
frameworks(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: FrameworkOrder
): FrameworkConnection! @goField(forceResolver: true)
measures(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: MeasureOrder
filter: MeasureFilter
): MeasureConnection! @goField(forceResolver: true)
obligationsDocument: Document @goField(forceResolver: true)
obligations(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: ObligationOrder
): ObligationConnection! @goField(forceResolver: true)
processingActivities(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: ProcessingActivityOrder
): ProcessingActivityConnection! @goField(forceResolver: true)
processingActivitiesDocument: Document @goField(forceResolver: true)
rightsRequests(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: RightsRequestOrder
): RightsRequestConnection! @goField(forceResolver: true)
risks(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: RiskOrder
filter: RiskFilter
): RiskConnection! @goField(forceResolver: true)
risksDocument: Document @goField(forceResolver: true)
riskAssessments(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: RiskAssessmentOrder
): RiskAssessmentConnection! @goField(forceResolver: true)
riskAssessmentScenarios(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: RiskAssessmentScenarioOrder
): RiskAssessmentScenarioConnection @goField(forceResolver: true)
tasks(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: TaskOrder
): TaskConnection! @goField(forceResolver: true)
agentRuns(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: AgentRunOrder
): AgentRunConnection! @goField(forceResolver: true)
trustCenter: TrustCenter @goField(forceResolver: true)
customDomain: CustomDomain @goField(forceResolver: true)
trustCenterFiles(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: TrustCenterFileOrder
): TrustCenterFileConnection! @goField(forceResolver: true)
cookieBanners(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: CookieBannerOrder
): CookieBannerConnection @goField(forceResolver: true)
thirdParties(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: ThirdPartyOrder
filter: ThirdPartyFilter
): ThirdPartyConnection! @goField(forceResolver: true)
thirdPartiesDocument: Document @goField(forceResolver: true)
webhookSubscriptions(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: WebhookSubscriptionOrder
): WebhookSubscriptionConnection! @goField(forceResolver: true)
createdAt: Datetime!
updatedAt: Datetime!
permission(action: String!): Boolean! @goField(forceResolver: true)
}
extend type Mutation {
updateOrganizationContext(
input: UpdateOrganizationContextInput!
): UpdateOrganizationContextPayload!
}