Remove meeting feature

Drop meetings and meeting_attendees tables, remove all meeting-related
code across GraphQL, MCP, CLI, N8N, webhooks, frontend, and e2e tests.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-04-16 17:57:34 +02:00
parent c32aff5e9e
commit 6c5c1fa818
45 changed files with 24 additions and 4906 deletions

View File

@@ -62,11 +62,11 @@ func NewCmdCreate(f *cmdutil.Factory) *cobra.Command {
cmd := &cobra.Command{
Use: "create",
Short: "Create a webhook subscription",
Example: ` # Create a webhook for all meeting events
prb webhook create --url https://example.com/webhook --event MEETING_CREATED --event MEETING_UPDATED
Example: ` # Create a webhook for vendor events
prb webhook create --url https://example.com/webhook --event VENDOR_CREATED --event VENDOR_UPDATED
# Create a webhook for all supported events
prb webhook create --url https://example.com/webhook --event MEETING_CREATED --event MEETING_UPDATED --event MEETING_DELETED --event VENDOR_CREATED --event VENDOR_UPDATED --event VENDOR_DELETED`,
prb webhook create --url https://example.com/webhook --event VENDOR_CREATED --event VENDOR_UPDATED --event VENDOR_DELETED --event USER_CREATED --event USER_UPDATED --event USER_DELETED --event OBLIGATION_CREATED --event OBLIGATION_UPDATED --event OBLIGATION_DELETED`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
for _, e := range flagEvents {

View File

@@ -89,8 +89,6 @@ func ResourceTypeName(entityType uint16) string {
return "Membership"
case TrustCenterFileEntityType:
return "TrustCenterFile"
case MeetingEntityType:
return "Meeting"
case DataProtectionImpactAssessmentEntityType:
return "DataProtectionImpactAssessment"
case TransferImpactAssessmentEntityType:

View File

@@ -68,7 +68,7 @@ const (
SAMLConfigurationEntityType uint16 = 42
PersonalAPIKeyEntityType uint16 = 43
_ uint16 = 44 // PersonalAPIKeyMembershipEntityType - removed
MeetingEntityType uint16 = 45
_ uint16 = 45 // MeetingEntityType - removed
DataProtectionImpactAssessmentEntityType uint16 = 46
TransferImpactAssessmentEntityType uint16 = 47
RightsRequestEntityType uint16 = 48
@@ -196,8 +196,6 @@ func NewEntityFromID(id gid.GID) (any, bool) {
return &SAMLConfiguration{ID: id}, true
case PersonalAPIKeyEntityType:
return &PersonalAPIKey{ID: id}, true
case MeetingEntityType:
return &Meeting{ID: id}, true
case DataProtectionImpactAssessmentEntityType:
return &DataProtectionImpactAssessment{ID: id}, true
case TransferImpactAssessmentEntityType:

View File

@@ -1,306 +0,0 @@
// Copyright (c) 2025-2026 Probo Inc <hello@getprobo.com>.
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
package coredata
import (
"context"
"errors"
"fmt"
"maps"
"time"
"github.com/jackc/pgx/v5"
"go.gearno.de/kit/pg"
"go.probo.inc/probo/pkg/gid"
"go.probo.inc/probo/pkg/page"
)
type (
Meeting struct {
ID gid.GID `db:"id"`
OrganizationID gid.GID `db:"organization_id"`
Name string `db:"name"`
Date time.Time `db:"date"`
Minutes *string `db:"minutes"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
Meetings []*Meeting
)
func (m Meeting) CursorKey(orderBy MeetingOrderField) page.CursorKey {
switch orderBy {
case MeetingOrderFieldCreatedAt:
return page.NewCursorKey(m.ID, m.CreatedAt)
case MeetingOrderFieldDate:
return page.NewCursorKey(m.ID, m.Date)
case MeetingOrderFieldName:
return page.NewCursorKey(m.ID, m.Name)
}
panic(fmt.Sprintf("unsupported order by: %s", orderBy))
}
// AuthorizationAttributes returns the authorization attributes for policy evaluation.
func (m *Meeting) AuthorizationAttributes(ctx context.Context, conn pg.Querier) (map[string]string, error) {
q := `SELECT organization_id FROM meetings WHERE id = $1 LIMIT 1;`
var organizationID gid.GID
if err := conn.QueryRow(ctx, q, m.ID).Scan(&organizationID); err != nil {
if errors.Is(err, pgx.ErrNoRows) {
return nil, ErrResourceNotFound
}
return nil, fmt.Errorf("cannot query meeting authorization attributes: %w", err)
}
return map[string]string{"organization_id": organizationID.String()}, nil
}
func (m *Meeting) LoadByID(
ctx context.Context,
conn pg.Querier,
scope Scoper,
meetingID gid.GID,
) error {
q := `
SELECT
id,
organization_id,
name,
date,
minutes,
created_at,
updated_at
FROM
meetings
WHERE
%s
AND id = @meeting_id
LIMIT 1;
`
q = fmt.Sprintf(q, scope.SQLFragment())
args := pgx.StrictNamedArgs{"meeting_id": meetingID}
maps.Copy(args, scope.SQLArguments())
rows, err := conn.Query(ctx, q, args)
if err != nil {
return fmt.Errorf("cannot query meetings: %w", err)
}
meeting, err := pgx.CollectExactlyOneRow(rows, pgx.RowToStructByName[Meeting])
if err != nil {
if errors.Is(err, pgx.ErrNoRows) {
return ErrResourceNotFound
}
return fmt.Errorf("cannot collect meeting: %w", err)
}
*m = meeting
return nil
}
func (m *Meetings) LoadByOrganizationID(
ctx context.Context,
conn pg.Querier,
scope Scoper,
organizationID gid.GID,
cursor *page.Cursor[MeetingOrderField],
) error {
q := `
SELECT
id,
organization_id,
name,
date,
minutes,
created_at,
updated_at
FROM
meetings
WHERE
%s
AND organization_id = @organization_id
AND %s
`
q = fmt.Sprintf(q, scope.SQLFragment(), cursor.SQLFragment())
args := pgx.NamedArgs{"organization_id": organizationID}
maps.Copy(args, scope.SQLArguments())
maps.Copy(args, cursor.SQLArguments())
rows, err := conn.Query(ctx, q, args)
if err != nil {
return fmt.Errorf("cannot query meetings: %w", err)
}
meetings, err := pgx.CollectRows(rows, pgx.RowToAddrOfStructByName[Meeting])
if err != nil {
return fmt.Errorf("cannot collect meetings: %w", err)
}
*m = meetings
return nil
}
func (m *Meetings) CountByOrganizationID(
ctx context.Context,
conn pg.Querier,
scope Scoper,
organizationID gid.GID,
) (int, error) {
q := `
SELECT
COUNT(*)
FROM
meetings
WHERE
%s
AND organization_id = @organization_id
`
q = fmt.Sprintf(q, scope.SQLFragment())
args := pgx.StrictNamedArgs{
"organization_id": organizationID,
}
maps.Copy(args, scope.SQLArguments())
row := conn.QueryRow(ctx, q, args)
var count int
if err := row.Scan(&count); err != nil {
return 0, fmt.Errorf("cannot count meetings: %w", err)
}
return count, nil
}
func (m *Meeting) Insert(
ctx context.Context,
conn pg.Tx,
scope Scoper,
) error {
q := `
INSERT INTO
meetings (
tenant_id,
id,
organization_id,
name,
date,
minutes,
created_at,
updated_at
)
VALUES (
@tenant_id,
@meeting_id,
@organization_id,
@name,
@date,
@minutes,
@created_at,
@updated_at
);
`
args := pgx.StrictNamedArgs{
"tenant_id": scope.GetTenantID(),
"meeting_id": m.ID,
"organization_id": m.OrganizationID,
"name": m.Name,
"date": m.Date,
"minutes": m.Minutes,
"created_at": m.CreatedAt,
"updated_at": m.UpdatedAt,
}
_, err := conn.Exec(ctx, q, args)
if err != nil {
return fmt.Errorf("cannot insert meeting: %w", err)
}
return nil
}
func (m *Meeting) Update(
ctx context.Context,
conn pg.Tx,
scope Scoper,
) error {
q := `
UPDATE meetings
SET
name = @name,
date = @date,
minutes = @minutes,
updated_at = @updated_at
WHERE %s
AND id = @meeting_id
`
q = fmt.Sprintf(q, scope.SQLFragment())
args := pgx.StrictNamedArgs{
"meeting_id": m.ID,
"name": m.Name,
"date": m.Date,
"minutes": m.Minutes,
"updated_at": m.UpdatedAt,
}
maps.Copy(args, scope.SQLArguments())
result, err := conn.Exec(ctx, q, args)
if err != nil {
return fmt.Errorf("cannot update meeting: %w", err)
}
if result.RowsAffected() == 0 {
return ErrResourceNotFound
}
return nil
}
func (m *Meeting) Delete(
ctx context.Context,
conn pg.Tx,
scope Scoper,
) error {
q := `
DELETE FROM meetings
WHERE %s
AND id = @meeting_id
`
q = fmt.Sprintf(q, scope.SQLFragment())
args := pgx.StrictNamedArgs{
"meeting_id": m.ID,
}
maps.Copy(args, scope.SQLArguments())
result, err := conn.Exec(ctx, q, args)
if err != nil {
return fmt.Errorf("cannot delete meeting: %w", err)
}
if result.RowsAffected() == 0 {
return ErrResourceNotFound
}
return nil
}

View File

@@ -1,82 +0,0 @@
// Copyright (c) 2025-2026 Probo Inc <hello@getprobo.com>.
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
package coredata
import (
"context"
"fmt"
"time"
"github.com/jackc/pgx/v5"
"go.gearno.de/kit/pg"
"go.probo.inc/probo/pkg/gid"
)
type (
MeetingAttendee struct {
MeetingID gid.GID `db:"meeting_id"`
OrganizationID gid.GID `db:"organization_id"`
AttendeeID gid.GID `db:"attendee_profile_id"`
CreatedAt time.Time `db:"created_at"`
}
MeetingAttendees []*MeetingAttendee
)
func (ma *MeetingAttendees) Merge(
ctx context.Context,
conn pg.Querier,
scope Scoper,
meetingID gid.GID,
organizationID gid.GID,
attendeeIDs []gid.GID,
) error {
q := `
WITH attendee_ids AS (
SELECT
unnest(@attendee_ids::text[]) AS attendee_profile_id,
@tenant_id AS tenant_id,
@meeting_id AS meeting_id,
@organization_id AS organization_id,
@created_at::timestamptz AS created_at
)
MERGE INTO meeting_attendees AS tgt
USING attendee_ids AS src
ON tgt.tenant_id = src.tenant_id
AND tgt.meeting_id = src.meeting_id
AND tgt.attendee_profile_id = src.attendee_profile_id
WHEN NOT MATCHED THEN
INSERT (tenant_id, meeting_id, attendee_profile_id, organization_id, created_at)
VALUES (src.tenant_id, src.meeting_id, src.attendee_profile_id, src.organization_id, src.created_at)
WHEN NOT MATCHED BY SOURCE
AND tgt.tenant_id = @tenant_id AND tgt.meeting_id = @meeting_id
THEN DELETE
`
args := pgx.StrictNamedArgs{
"tenant_id": scope.GetTenantID(),
"meeting_id": meetingID,
"organization_id": organizationID,
"created_at": time.Now(),
"attendee_ids": attendeeIDs,
}
_, err := conn.Exec(ctx, q, args)
if err != nil {
return fmt.Errorf("cannot merge meeting attendees: %w", err)
}
return nil
}

View File

@@ -1,57 +0,0 @@
// Copyright (c) 2025-2026 Probo Inc <hello@getprobo.com>.
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
package coredata
import (
"fmt"
)
type (
MeetingOrderField string
)
const (
MeetingOrderFieldDate MeetingOrderField = "DATE"
MeetingOrderFieldName MeetingOrderField = "NAME"
MeetingOrderFieldCreatedAt MeetingOrderField = "CREATED_AT"
)
func (p MeetingOrderField) Column() string {
return string(p)
}
func (p MeetingOrderField) String() string {
return string(p)
}
func (p MeetingOrderField) IsValid() bool {
switch p {
case MeetingOrderFieldDate, MeetingOrderFieldName, MeetingOrderFieldCreatedAt:
return true
}
return false
}
func (p MeetingOrderField) MarshalText() ([]byte, error) {
return []byte(p.String()), nil
}
func (p *MeetingOrderField) UnmarshalText(text []byte) error {
*p = MeetingOrderField(text)
if !p.IsValid() {
return fmt.Errorf("%s is not a valid MeetingOrderField", string(text))
}
return nil
}

View File

@@ -718,122 +718,6 @@ WHERE
return count, nil
}
func (p *MembershipProfiles) LoadByMeetingID(
ctx context.Context,
conn pg.Querier,
scope Scoper,
meetingID gid.GID,
) error {
q := `
WITH attendees AS (
SELECT
p.id,
p.tenant_id,
p.identity_id,
p.organization_id,
i.email_address,
p.source,
p.state,
p.full_name,
p.kind,
p.additional_email_addresses,
p.position,
p.contract_start_date,
p.contract_end_date,
p.user_name,
p.external_id,
p.nickname,
p.locale,
p.timezone,
p.profile_url,
p.preferred_language,
p.given_name,
p.family_name,
p.formatted_name,
p.middle_name,
p.honorific_prefix,
p.honorific_suffix,
p.employee_number,
p.department,
p.cost_center,
p.enterprise_organization,
p.division,
p.manager_value,
p.created_at,
p.updated_at,
ma.created_at AS attendee_created_at
FROM
iam_membership_profiles p
INNER JOIN identities i
ON i.id = p.identity_id
INNER JOIN
meeting_attendees ma ON p.id = ma.attendee_profile_id
WHERE
ma.meeting_id = @meeting_id
)
SELECT
id,
identity_id,
organization_id,
kind,
email_address,
source,
state,
full_name,
additional_email_addresses,
position,
contract_start_date,
contract_end_date,
'' AS organization_name,
user_name,
external_id,
nickname,
locale,
timezone,
profile_url,
preferred_language,
given_name,
family_name,
formatted_name,
middle_name,
honorific_prefix,
honorific_suffix,
employee_number,
department,
cost_center,
enterprise_organization,
division,
manager_value,
created_at,
updated_at
FROM
attendees
WHERE
%s
ORDER BY
attendee_created_at ASC
`
q = fmt.Sprintf(q, scope.SQLFragment())
args := pgx.NamedArgs{"meeting_id": meetingID}
maps.Copy(args, scope.SQLArguments())
rows, err := conn.Query(ctx, q, args)
if err != nil {
return fmt.Errorf("cannot query profiles: %w", err)
}
profiles, err := pgx.CollectRows(rows, pgx.RowToAddrOfStructByName[MembershipProfile])
if err != nil {
return fmt.Errorf("cannot collect profiles: %w", err)
}
*p = profiles
return nil
}
func (p *MembershipProfiles) LoadAwaitingSigning(
ctx context.Context,
conn pg.Querier,

View File

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

View File

@@ -23,9 +23,6 @@ import (
type WebhookEventType string
const (
WebhookEventTypeMeetingCreated WebhookEventType = "meeting:created"
WebhookEventTypeMeetingUpdated WebhookEventType = "meeting:updated"
WebhookEventTypeMeetingDeleted WebhookEventType = "meeting:deleted"
WebhookEventTypeVendorCreated WebhookEventType = "vendor:created"
WebhookEventTypeVendorUpdated WebhookEventType = "vendor:updated"
WebhookEventTypeVendorDeleted WebhookEventType = "vendor:deleted"
@@ -43,8 +40,7 @@ func (w WebhookEventType) String() string {
func (w WebhookEventType) IsValid() bool {
switch w {
case WebhookEventTypeMeetingCreated, WebhookEventTypeMeetingUpdated, WebhookEventTypeMeetingDeleted,
WebhookEventTypeVendorCreated, WebhookEventTypeVendorUpdated, WebhookEventTypeVendorDeleted,
case WebhookEventTypeVendorCreated, WebhookEventTypeVendorUpdated, WebhookEventTypeVendorDeleted,
WebhookEventTypeUserCreated, WebhookEventTypeUserUpdated, WebhookEventTypeUserDeleted,
WebhookEventTypeObligationCreated, WebhookEventTypeObligationUpdated, WebhookEventTypeObligationDeleted:
return true

View File

@@ -294,13 +294,6 @@ const (
ActionFileGet = "core:file:get"
ActionFileDownloadUrl = "core:file:download-url"
// Meeting actions
ActionMeetingList = "core:meeting:list"
ActionMeetingGet = "core:meeting:get"
ActionMeetingCreate = "core:meeting:create"
ActionMeetingUpdate = "core:meeting:update"
ActionMeetingDelete = "core:meeting:delete"
// Connector actions
ActionConnectorInitiate = "core:connector:initiate"

View File

@@ -1,338 +0,0 @@
// Copyright (c) 2025-2026 Probo Inc <hello@getprobo.com>.
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
package probo
import (
"context"
"fmt"
"time"
"go.gearno.de/kit/pg"
"go.probo.inc/probo/pkg/coredata"
"go.probo.inc/probo/pkg/gid"
"go.probo.inc/probo/pkg/page"
"go.probo.inc/probo/pkg/validator"
"go.probo.inc/probo/pkg/webhook"
webhooktypes "go.probo.inc/probo/pkg/webhook/types"
)
type MeetingService struct {
svc *TenantService
}
type (
CreateMeetingRequest struct {
OrganizationID gid.GID
Name string
Date time.Time
AttendeeIDs []gid.GID
Minutes *string
}
UpdateMeetingRequest struct {
MeetingID gid.GID
Name *string
Date *time.Time
AttendeeIDs []gid.GID
Minutes **string
}
)
const (
MinutesMaxLength = 50_000
)
func (cmr *CreateMeetingRequest) Validate() error {
v := validator.New()
v.Check(cmr.OrganizationID, "organization_id", validator.Required(), validator.GID(coredata.OrganizationEntityType))
v.Check(cmr.Name, "name", validator.SafeTextNoNewLine(TitleMaxLength))
v.Check(cmr.Date, "date", validator.Required())
v.CheckEach(cmr.AttendeeIDs, "attendee_ids", func(index int, item any) {
v.Check(item, fmt.Sprintf("attendee_ids[%d]", index), validator.Required(), validator.GID(coredata.MembershipProfileEntityType))
})
v.Check(cmr.Minutes, "minutes", validator.SafeText(MinutesMaxLength))
return v.Error()
}
func (umr *UpdateMeetingRequest) Validate() error {
v := validator.New()
v.Check(umr.MeetingID, "meeting_id", validator.Required(), validator.GID(coredata.MeetingEntityType))
v.Check(umr.Name, "name", validator.SafeTextNoNewLine(TitleMaxLength))
v.CheckEach(umr.AttendeeIDs, "attendee_ids", func(index int, item any) {
v.Check(item, fmt.Sprintf("attendee_ids[%d]", index), validator.Required(), validator.GID(coredata.MembershipProfileEntityType))
})
v.Check(umr.Minutes, "minutes", validator.SafeText(MinutesMaxLength))
return v.Error()
}
func (s MeetingService) ListForOrganizationID(
ctx context.Context,
organizationID gid.GID,
cursor *page.Cursor[coredata.MeetingOrderField],
) (*page.Page[*coredata.Meeting, coredata.MeetingOrderField], error) {
var meetings coredata.Meetings
organization := &coredata.Organization{}
err := s.svc.pg.WithConn(
ctx,
func(ctx context.Context, conn pg.Querier) error {
if err := organization.LoadByID(ctx, conn, s.svc.scope, organizationID); err != nil {
return fmt.Errorf("cannot load organization: %w", err)
}
err := meetings.LoadByOrganizationID(
ctx,
conn,
s.svc.scope,
organization.ID,
cursor,
)
if err != nil {
return fmt.Errorf("cannot load meetings: %w", err)
}
return nil
},
)
if err != nil {
return nil, err
}
return page.NewPage(meetings, cursor), nil
}
func (s MeetingService) CountForOrganizationID(
ctx context.Context,
organizationID gid.GID,
) (int, error) {
var count int
err := s.svc.pg.WithConn(
ctx,
func(ctx context.Context, conn pg.Querier) (err error) {
meetings := &coredata.Meetings{}
count, err = meetings.CountByOrganizationID(ctx, conn, s.svc.scope, organizationID)
if err != nil {
return fmt.Errorf("cannot count meetings: %w", err)
}
return nil
},
)
if err != nil {
return 0, err
}
return count, nil
}
func (s MeetingService) Get(
ctx context.Context,
meetingID gid.GID,
) (*coredata.Meeting, error) {
meeting := &coredata.Meeting{}
err := s.svc.pg.WithConn(
ctx,
func(ctx context.Context, conn pg.Querier) error {
return meeting.LoadByID(ctx, conn, s.svc.scope, meetingID)
},
)
if err != nil {
return nil, err
}
return meeting, nil
}
func (s MeetingService) Create(
ctx context.Context,
req CreateMeetingRequest,
) (*coredata.Meeting, error) {
if err := req.Validate(); err != nil {
return nil, fmt.Errorf("invalid request: %w", err)
}
now := time.Now()
var meeting *coredata.Meeting
organization := &coredata.Organization{}
err := s.svc.pg.WithTx(
ctx,
func(ctx context.Context, conn pg.Tx) error {
if err := organization.LoadByID(ctx, conn, s.svc.scope, req.OrganizationID); err != nil {
return fmt.Errorf("cannot load organization: %w", err)
}
meeting = &coredata.Meeting{
ID: gid.New(organization.ID.TenantID(), coredata.MeetingEntityType),
OrganizationID: organization.ID,
Name: req.Name,
Date: req.Date,
Minutes: req.Minutes,
CreatedAt: now,
UpdatedAt: now,
}
if err := meeting.Insert(ctx, conn, s.svc.scope); err != nil {
return fmt.Errorf("cannot insert meeting: %w", err)
}
if len(req.AttendeeIDs) > 0 {
var attendeeProfiles coredata.MembershipProfiles
if err := attendeeProfiles.LoadByIDs(ctx, conn, s.svc.scope, req.AttendeeIDs); err != nil {
return fmt.Errorf("cannot load attendee profiles: %w", err)
}
var attendees coredata.MeetingAttendees
if err := attendees.Merge(ctx, conn, s.svc.scope, meeting.ID, organization.ID, req.AttendeeIDs); err != nil {
return fmt.Errorf("cannot merge meeting attendees: %w", err)
}
}
if err := webhook.InsertData(ctx, conn, s.svc.scope, organization.ID, coredata.WebhookEventTypeMeetingCreated, webhooktypes.NewMeeting(meeting)); err != nil {
return fmt.Errorf("cannot insert webhook event: %w", err)
}
return nil
},
)
if err != nil {
return nil, err
}
return meeting, nil
}
func (s MeetingService) GetAttendees(
ctx context.Context,
meetingID gid.GID,
) (coredata.MembershipProfiles, error) {
var attendees coredata.MembershipProfiles
err := s.svc.pg.WithConn(
ctx,
func(ctx context.Context, conn pg.Querier) error {
return attendees.LoadByMeetingID(ctx, conn, s.svc.scope, meetingID)
},
)
if err != nil {
return nil, err
}
return attendees, nil
}
func (s MeetingService) Update(
ctx context.Context,
req UpdateMeetingRequest,
) (*coredata.Meeting, error) {
if err := req.Validate(); err != nil {
return nil, fmt.Errorf("invalid request: %w", err)
}
meeting := &coredata.Meeting{}
err := s.svc.pg.WithTx(
ctx,
func(ctx context.Context, conn pg.Tx) error {
if err := meeting.LoadByID(ctx, conn, s.svc.scope, req.MeetingID); err != nil {
return fmt.Errorf("cannot load meeting: %w", err)
}
if req.Name != nil {
meeting.Name = *req.Name
}
if req.Date != nil {
meeting.Date = *req.Date
}
if req.Minutes != nil {
meeting.Minutes = *req.Minutes
}
meeting.UpdatedAt = time.Now()
if err := meeting.Update(ctx, conn, s.svc.scope); err != nil {
return fmt.Errorf("cannot update meeting: %w", err)
}
if req.AttendeeIDs != nil {
var attendeeProfiles coredata.MembershipProfiles
if err := attendeeProfiles.LoadByIDs(ctx, conn, s.svc.scope, req.AttendeeIDs); err != nil {
return fmt.Errorf("cannot load attendee profiles: %w", err)
}
var attendees coredata.MeetingAttendees
if err := attendees.Merge(ctx, conn, s.svc.scope, meeting.ID, meeting.OrganizationID, req.AttendeeIDs); err != nil {
return fmt.Errorf("cannot merge meeting attendees: %w", err)
}
}
if err := webhook.InsertData(ctx, conn, s.svc.scope, meeting.OrganizationID, coredata.WebhookEventTypeMeetingUpdated, webhooktypes.NewMeeting(meeting)); err != nil {
return fmt.Errorf("cannot insert webhook event: %w", err)
}
return nil
},
)
if err != nil {
return nil, err
}
return meeting, nil
}
func (s MeetingService) Delete(
ctx context.Context,
meetingID gid.GID,
) error {
meeting := &coredata.Meeting{ID: meetingID}
err := s.svc.pg.WithTx(
ctx,
func(ctx context.Context, conn pg.Tx) error {
if err := meeting.LoadByID(ctx, conn, s.svc.scope, meetingID); err != nil {
return fmt.Errorf("cannot load meeting: %w", err)
}
if err := webhook.InsertData(ctx, conn, s.svc.scope, meeting.OrganizationID, coredata.WebhookEventTypeMeetingDeleted, webhooktypes.NewMeeting(meeting)); err != nil {
return fmt.Errorf("cannot insert webhook event: %w", err)
}
if err := meeting.Delete(ctx, conn, s.svc.scope); err != nil {
return fmt.Errorf("cannot delete meeting: %w", err)
}
return nil
},
)
if err != nil {
return err
}
return nil
}

View File

@@ -75,7 +75,6 @@ var ViewerPolicy = policy.NewPolicy(
ActionDataProtectionImpactAssessmentGet, ActionDataProtectionImpactAssessmentList,
ActionTransferImpactAssessmentGet, ActionTransferImpactAssessmentList,
ActionSnapshotGet, ActionSnapshotList,
ActionMeetingGet, ActionMeetingList,
ActionFileGet, ActionFileDownloadUrl,
ActionSlackConnectionList, ActionConnectorList,
ActionRightsRequestGet, ActionRightsRequestList,

View File

@@ -101,7 +101,6 @@ type (
Assets *AssetService
Data *DatumService
Audits *AuditService
Meetings *MeetingService
WebhookSubscriptions *WebhookSubscriptionService
Reports *ReportService
TrustCenters *TrustCenterService
@@ -246,7 +245,6 @@ func (s *Service) WithTenant(tenantID gid.TenantID) *TenantService {
tenantService.Assets = &AssetService{svc: tenantService}
tenantService.Data = &DatumService{svc: tenantService}
tenantService.Audits = &AuditService{svc: tenantService}
tenantService.Meetings = &MeetingService{svc: tenantService}
tenantService.WebhookSubscriptions = &WebhookSubscriptionService{svc: tenantService}
tenantService.Reports = &ReportService{svc: tenantService}
tenantService.TrustCenters = &TrustCenterService{svc: tenantService}

View File

@@ -275,15 +275,6 @@ func (r *queryResolver) Node(ctx context.Context, id gid.GID) (types.Node, error
}
return types.NewTrustCenterAccess(trustCenterAccess), nil
}
case coredata.MeetingEntityType:
action = probo.ActionMeetingGet
loadNode = func(ctx context.Context, id gid.GID) (types.Node, error) {
meeting, err := prb.Meetings.Get(ctx, id)
if err != nil {
return nil, err
}
return types.NewMeeting(meeting), nil
}
case coredata.RightsRequestEntityType:
action = probo.ActionRightsRequestGet
loadNode = func(ctx context.Context, id gid.GID) (types.Node, error) {

View File

@@ -1,82 +0,0 @@
enum MeetingOrderField
@goModel(model: "go.probo.inc/probo/pkg/coredata.MeetingOrderField") {
DATE @goEnum(value: "go.probo.inc/probo/pkg/coredata.MeetingOrderFieldDate")
NAME @goEnum(value: "go.probo.inc/probo/pkg/coredata.MeetingOrderFieldName")
CREATED_AT
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.MeetingOrderFieldCreatedAt"
)
}
input MeetingOrder
@goModel(
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.MeetingOrderBy"
) {
direction: OrderDirection!
field: MeetingOrderField!
}
type Meeting implements Node {
id: ID!
name: String!
date: Datetime!
minutes: String
attendees: [Profile!]! @goField(forceResolver: true)
organization: Organization! @goField(forceResolver: true)
createdAt: Datetime!
updatedAt: Datetime!
permission(action: String!): Boolean! @goField(forceResolver: true)
}
type MeetingConnection
@goModel(
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.MeetingConnection"
) {
totalCount: Int! @goField(forceResolver: true)
edges: [MeetingEdge!]!
pageInfo: PageInfo!
}
type MeetingEdge {
cursor: CursorKey!
node: Meeting!
}
extend type Mutation {
createMeeting(input: CreateMeetingInput!): CreateMeetingPayload!
updateMeeting(input: UpdateMeetingInput!): UpdateMeetingPayload!
deleteMeeting(input: DeleteMeetingInput!): DeleteMeetingPayload!
}
input CreateMeetingInput {
organizationId: ID!
name: String!
date: Datetime!
attendeeIds: [ID!]
minutes: String
}
input UpdateMeetingInput {
meetingId: ID!
name: String
date: Datetime
attendeeIds: [ID!]
minutes: String @goField(omittable: true)
}
input DeleteMeetingInput {
meetingId: ID!
}
type CreateMeetingPayload {
meetingEdge: MeetingEdge!
}
type UpdateMeetingPayload {
meeting: Meeting!
}
type DeleteMeetingPayload {
deletedMeetingId: ID!
}

View File

@@ -245,14 +245,6 @@ type Organization implements Node {
filter: MeasureFilter
): MeasureConnection! @goField(forceResolver: true)
meetings(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: MeetingOrder
): MeetingConnection! @goField(forceResolver: true)
obligations(
first: Int
after: CursorKey

View File

@@ -1,11 +1,5 @@
enum WebhookEventType
@goModel(model: "go.probo.inc/probo/pkg/coredata.WebhookEventType") {
MEETING_CREATED
@goEnum(value: "go.probo.inc/probo/pkg/coredata.WebhookEventTypeMeetingCreated")
MEETING_UPDATED
@goEnum(value: "go.probo.inc/probo/pkg/coredata.WebhookEventTypeMeetingUpdated")
MEETING_DELETED
@goEnum(value: "go.probo.inc/probo/pkg/coredata.WebhookEventTypeMeetingDeleted")
VENDOR_CREATED
@goEnum(value: "go.probo.inc/probo/pkg/coredata.WebhookEventTypeVendorCreated")
VENDOR_UPDATED

View File

@@ -1,196 +0,0 @@
package console_v1
// This file will be automatically regenerated based on the schema, any resolver
// implementations
// will be copied through when generating and any unknown code will be moved to the end.
// Code generated by github.com/99designs/gqlgen version v0.17.87
import (
"context"
"errors"
"github.com/vikstrous/dataloadgen"
"go.gearno.de/kit/log"
"go.probo.inc/probo/pkg/coredata"
"go.probo.inc/probo/pkg/gid"
"go.probo.inc/probo/pkg/iam"
"go.probo.inc/probo/pkg/probo"
"go.probo.inc/probo/pkg/server/api/console/v1/dataloader"
"go.probo.inc/probo/pkg/server/api/console/v1/schema"
"go.probo.inc/probo/pkg/server/api/console/v1/types"
"go.probo.inc/probo/pkg/server/gqlutils"
"go.probo.inc/probo/pkg/validator"
)
// Attendees is the resolver for the attendees field.
func (r *meetingResolver) Attendees(ctx context.Context, obj *types.Meeting) ([]*types.Profile, error) {
// TODO bug must be paginated
if err := r.authorize(ctx, obj.ID, iam.ActionMembershipProfileList); err != nil {
return nil, err
}
prb := r.ProboService(ctx, obj.ID.TenantID())
attendees, err := prb.Meetings.GetAttendees(ctx, obj.ID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot load meeting attendees", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
if len(attendees) == 0 {
return []*types.Profile{}, nil
}
people := make([]*types.Profile, len(attendees))
for i, attendee := range attendees {
people[i] = types.NewProfile(attendee)
}
return people, nil
}
// Organization is the resolver for the organization field.
func (r *meetingResolver) Organization(ctx context.Context, obj *types.Meeting) (*types.Organization, error) {
if err := r.authorize(ctx, obj.ID, probo.ActionOrganizationGet); err != nil {
return nil, err
}
loaders := dataloader.FromContext(ctx)
organization, err := loaders.Organization.Load(ctx, obj.Organization.ID)
if err != nil {
if errors.Is(err, coredata.ErrResourceNotFound) || errors.Is(err, dataloadgen.ErrNotFound) {
return nil, gqlutils.NotFound(ctx, err)
}
r.logger.ErrorCtx(ctx, "cannot load organization", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return types.NewOrganization(organization), nil
}
// Permission is the resolver for the permission field.
func (r *meetingResolver) Permission(ctx context.Context, obj *types.Meeting, action string) (bool, error) {
return r.Resolver.Permission(ctx, obj, action)
}
// TotalCount is the resolver for the totalCount field.
func (r *meetingConnectionResolver) TotalCount(ctx context.Context, obj *types.MeetingConnection) (int, error) {
if err := r.authorize(ctx, obj.ParentID, probo.ActionMeetingList); err != nil {
return 0, err
}
prb := r.ProboService(ctx, obj.ParentID.TenantID())
switch obj.Resolver.(type) {
case *organizationResolver:
count, err := prb.Meetings.CountForOrganizationID(ctx, obj.ParentID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot count meetings", log.Error(err))
return 0, gqlutils.Internal(ctx)
}
return count, nil
}
r.logger.ErrorCtx(ctx, "unsupported resolver")
return 0, gqlutils.Internal(ctx)
}
// CreateMeeting is the resolver for the createMeeting field.
func (r *mutationResolver) CreateMeeting(ctx context.Context, input types.CreateMeetingInput) (*types.CreateMeetingPayload, error) {
if err := r.authorize(ctx, input.OrganizationID, probo.ActionMeetingCreate); err != nil {
return nil, err
}
prb := r.ProboService(ctx, input.OrganizationID.TenantID())
meeting, err := prb.Meetings.Create(
ctx,
probo.CreateMeetingRequest{
OrganizationID: input.OrganizationID,
Name: input.Name,
Date: input.Date,
AttendeeIDs: input.AttendeeIds,
Minutes: input.Minutes,
},
)
if err != nil {
if validationErrors, ok := errors.AsType[validator.ValidationErrors](err); ok {
return nil, gqlutils.InvalidValidationErrors(ctx, validationErrors)
}
r.logger.ErrorCtx(ctx, "cannot create meeting", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.CreateMeetingPayload{
MeetingEdge: types.NewMeetingEdge(meeting, coredata.MeetingOrderFieldCreatedAt),
}, nil
}
// UpdateMeeting is the resolver for the updateMeeting field.
func (r *mutationResolver) UpdateMeeting(ctx context.Context, input types.UpdateMeetingInput) (*types.UpdateMeetingPayload, error) {
if err := r.authorize(ctx, input.MeetingID, probo.ActionMeetingUpdate); err != nil {
return nil, err
}
prb := r.ProboService(ctx, input.MeetingID.TenantID())
var attendeeIDs []gid.GID
if input.AttendeeIds != nil {
attendeeIDs = input.AttendeeIds
}
meeting, err := prb.Meetings.Update(
ctx,
probo.UpdateMeetingRequest{
MeetingID: input.MeetingID,
Name: input.Name,
Date: input.Date,
AttendeeIDs: attendeeIDs,
Minutes: gqlutils.UnwrapOmittable(input.Minutes),
},
)
if err != nil {
if validationErrors, ok := errors.AsType[validator.ValidationErrors](err); ok {
return nil, gqlutils.InvalidValidationErrors(ctx, validationErrors)
}
r.logger.ErrorCtx(ctx, "cannot update meeting", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.UpdateMeetingPayload{
Meeting: types.NewMeeting(meeting),
}, nil
}
// DeleteMeeting is the resolver for the deleteMeeting field.
func (r *mutationResolver) DeleteMeeting(ctx context.Context, input types.DeleteMeetingInput) (*types.DeleteMeetingPayload, error) {
if err := r.authorize(ctx, input.MeetingID, probo.ActionMeetingDelete); err != nil {
return nil, err
}
prb := r.ProboService(ctx, input.MeetingID.TenantID())
err := prb.Meetings.Delete(ctx, input.MeetingID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot delete meeting", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.DeleteMeetingPayload{
DeletedMeetingID: input.MeetingID,
}, nil
}
// Meeting returns schema.MeetingResolver implementation.
func (r *Resolver) Meeting() schema.MeetingResolver { return &meetingResolver{r} }
// MeetingConnection returns schema.MeetingConnectionResolver implementation.
func (r *Resolver) MeetingConnection() schema.MeetingConnectionResolver {
return &meetingConnectionResolver{r}
}
type meetingResolver struct{ *Resolver }
type meetingConnectionResolver struct{ *Resolver }

View File

@@ -769,36 +769,6 @@ func (r *organizationResolver) Measures(ctx context.Context, obj *types.Organiza
return types.NewMeasureConnection(page, r, obj.ID, measureFilter), nil
}
// Meetings is the resolver for the meetings field.
func (r *organizationResolver) Meetings(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.MeetingOrderBy) (*types.MeetingConnection, error) {
if err := r.authorize(ctx, obj.ID, probo.ActionMeetingList); err != nil {
return nil, err
}
prb := r.ProboService(ctx, obj.ID.TenantID())
pageOrderBy := page.OrderBy[coredata.MeetingOrderField]{
Field: coredata.MeetingOrderFieldCreatedAt,
Direction: page.OrderDirectionDesc,
}
if orderBy != nil {
pageOrderBy = page.OrderBy[coredata.MeetingOrderField]{
Field: orderBy.Field,
Direction: orderBy.Direction,
}
}
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
page, err := prb.Meetings.ListForOrganizationID(ctx, obj.ID, cursor)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot list organization meetings", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return types.NewMeetingConnection(page, r, obj.ID), nil
}
// Obligations is the resolver for the obligations field.
func (r *organizationResolver) Obligations(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ObligationOrderBy, filter *types.ObligationFilter) (*types.ObligationConnection, error) {
if err := r.authorize(ctx, obj.ID, probo.ActionObligationList); err != nil {

View File

@@ -1,75 +0,0 @@
// Copyright (c) 2025-2026 Probo Inc <hello@getprobo.com>.
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
package types
import (
"go.probo.inc/probo/pkg/coredata"
"go.probo.inc/probo/pkg/gid"
"go.probo.inc/probo/pkg/page"
)
type (
MeetingOrderBy OrderBy[coredata.MeetingOrderField]
MeetingConnection struct {
TotalCount int
Edges []*MeetingEdge
PageInfo PageInfo
Resolver any
ParentID gid.GID
}
)
func NewMeetingConnection(
p *page.Page[*coredata.Meeting, coredata.MeetingOrderField],
parentType any,
parentID gid.GID,
) *MeetingConnection {
var edges = make([]*MeetingEdge, len(p.Data))
for i := range edges {
edges[i] = NewMeetingEdge(p.Data[i], p.Cursor.OrderBy.Field)
}
return &MeetingConnection{
Edges: edges,
PageInfo: *NewPageInfo(p),
Resolver: parentType,
ParentID: parentID,
}
}
func NewMeetingEdge(meeting *coredata.Meeting, orderBy coredata.MeetingOrderField) *MeetingEdge {
return &MeetingEdge{
Cursor: meeting.CursorKey(orderBy),
Node: NewMeeting(meeting),
}
}
func NewMeeting(meeting *coredata.Meeting) *Meeting {
return &Meeting{
ID: meeting.ID,
Name: meeting.Name,
Organization: &Organization{
ID: meeting.OrganizationID,
},
Date: meeting.Date,
Minutes: meeting.Minutes,
CreatedAt: meeting.CreatedAt,
UpdatedAt: meeting.UpdatedAt,
}
}

View File

@@ -2300,110 +2300,6 @@ func (r *Resolver) CancelSignatureRequestTool(ctx context.Context, req *mcp.Call
}, nil
}
func (r *Resolver) ListMeetingsTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListMeetingsInput) (*mcp.CallToolResult, types.ListMeetingsOutput, error) {
r.MustAuthorize(ctx, input.OrganizationID, probo.ActionMeetingList)
prb := r.ProboService(ctx, input.OrganizationID)
pageOrderBy := page.OrderBy[coredata.MeetingOrderField]{
Field: coredata.MeetingOrderFieldCreatedAt,
Direction: page.OrderDirectionDesc,
}
if input.OrderBy != nil {
pageOrderBy = page.OrderBy[coredata.MeetingOrderField]{
Field: input.OrderBy.Field,
Direction: input.OrderBy.Direction,
}
}
cursor := types.NewCursor(input.Size, input.Cursor, pageOrderBy)
page, err := prb.Meetings.ListForOrganizationID(ctx, input.OrganizationID, cursor)
if err != nil {
panic(fmt.Errorf("cannot list organization meetings: %w", err))
}
return nil, types.NewListMeetingsOutput(page), nil
}
func (r *Resolver) GetMeetingTool(ctx context.Context, req *mcp.CallToolRequest, input *types.GetMeetingInput) (*mcp.CallToolResult, types.GetMeetingOutput, error) {
r.MustAuthorize(ctx, input.ID, probo.ActionMeetingGet)
prb := r.ProboService(ctx, input.ID)
meeting, err := prb.Meetings.Get(ctx, input.ID)
if err != nil {
return nil, types.GetMeetingOutput{}, fmt.Errorf("failed to get meeting: %w", err)
}
return nil, types.GetMeetingOutput{
Meeting: types.NewMeeting(meeting),
}, nil
}
func (r *Resolver) AddMeetingTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddMeetingInput) (*mcp.CallToolResult, types.AddMeetingOutput, error) {
r.MustAuthorize(ctx, input.OrganizationID, probo.ActionMeetingCreate)
svc := r.ProboService(ctx, input.OrganizationID)
meeting, err := svc.Meetings.Create(
ctx,
probo.CreateMeetingRequest{
OrganizationID: input.OrganizationID,
Name: input.Name,
Date: input.Date,
AttendeeIDs: input.AttendeeIds,
Minutes: input.Minutes,
},
)
if err != nil {
return nil, types.AddMeetingOutput{}, fmt.Errorf("failed to create meeting: %w", err)
}
return nil, types.AddMeetingOutput{
Meeting: types.NewMeeting(meeting),
}, nil
}
func (r *Resolver) UpdateMeetingTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateMeetingInput) (*mcp.CallToolResult, types.UpdateMeetingOutput, error) {
r.MustAuthorize(ctx, input.ID, probo.ActionMeetingUpdate)
svc := r.ProboService(ctx, input.ID)
meeting, err := svc.Meetings.Update(
ctx,
probo.UpdateMeetingRequest{
MeetingID: input.ID,
Name: input.Name,
Date: input.Date,
AttendeeIDs: input.AttendeeIds,
Minutes: UnwrapOmittable(input.Minutes),
},
)
if err != nil {
return nil, types.UpdateMeetingOutput{}, fmt.Errorf("failed to update meeting: %w", err)
}
return nil, types.UpdateMeetingOutput{
Meeting: types.NewMeeting(meeting),
}, nil
}
func (r *Resolver) DeleteMeetingTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteMeetingInput) (*mcp.CallToolResult, types.DeleteMeetingOutput, error) {
r.MustAuthorize(ctx, input.ID, probo.ActionMeetingDelete)
svc := r.ProboService(ctx, input.ID)
err := svc.Meetings.Delete(ctx, input.ID)
if err != nil {
return nil, types.DeleteMeetingOutput{}, fmt.Errorf("failed to delete meeting: %w", err)
}
return nil, types.DeleteMeetingOutput{
DeletedMeetingID: input.ID,
}, nil
}
func (r *Resolver) DeleteRiskTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteRiskInput) (*mcp.CallToolResult, types.DeleteRiskOutput, error) {
r.MustAuthorize(ctx, input.ID, probo.ActionRiskDelete)
@@ -2419,26 +2315,6 @@ func (r *Resolver) DeleteRiskTool(ctx context.Context, req *mcp.CallToolRequest,
}, nil
}
func (r *Resolver) ListMeetingAttendeesTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListMeetingAttendeesInput) (*mcp.CallToolResult, types.ListMeetingAttendeesOutput, error) {
r.MustAuthorize(ctx, input.MeetingID, probo.ActionMeetingGet)
svc := r.ProboService(ctx, input.MeetingID)
attendees, err := svc.Meetings.GetAttendees(ctx, input.MeetingID)
if err != nil {
return nil, types.ListMeetingAttendeesOutput{}, fmt.Errorf("failed to list meeting attendees: %w", err)
}
profiles := make([]*types.Profile, 0, len(attendees))
for _, a := range attendees {
profiles = append(profiles, types.NewProfile(a))
}
return nil, types.ListMeetingAttendeesOutput{
Attendees: profiles,
}, nil
}
func (r *Resolver) DeleteMeasureTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteMeasureInput) (*mcp.CallToolResult, types.DeleteMeasureOutput, error) {
r.MustAuthorize(ctx, input.ID, probo.ActionMeasureDelete)

View File

@@ -6113,68 +6113,9 @@ components:
type: boolean
description: Whether the notifications were sent successfully
MeetingOrderField:
type: string
enum:
- CREATED_AT
- DATE
- NAME
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.MeetingOrderField
MeetingOrderBy:
type: object
required:
- field
- direction
properties:
field:
$ref: "#/components/schemas/MeetingOrderField"
description: Meeting order field
direction:
$ref: "#/components/schemas/OrderDirection"
description: Meeting order direction
Meeting:
type: object
required:
- id
- name
- date
- created_at
- updated_at
properties:
id:
$ref: "#/components/schemas/GID"
description: Meeting ID
name:
type: string
description: Meeting name
date:
type: string
format: date-time
description: Meeting date
minutes:
anyOf:
- type: string
description: Meeting minutes
- type: "null"
description: No minutes
description: Meeting minutes
created_at:
type: string
format: date-time
description: Creation timestamp
updated_at:
type: string
format: date-time
description: Update timestamp
WebhookEventType:
type: string
enum:
- "meeting:created"
- "meeting:updated"
- "meeting:deleted"
- "vendor:created"
- "vendor:updated"
- "vendor:deleted"
@@ -6447,166 +6388,6 @@ components:
- type: "null"
description: Next page cursor
ListMeetingsInput:
type: object
required:
- organization_id
properties:
organization_id:
$ref: "#/components/schemas/GID"
description: Organization ID
order_by:
$ref: "#/components/schemas/MeetingOrderBy"
description: Meeting order by
size:
type: integer
description: Page size
cursor:
$ref: "#/components/schemas/CursorKey"
description: Page cursor
ListMeetingsOutput:
type: object
required:
- meetings
properties:
meetings:
type: array
items:
$ref: "#/components/schemas/Meeting"
description: List of meetings
next_cursor:
anyOf:
- $ref: "#/components/schemas/CursorKey"
- type: "null"
description: Next page cursor
GetMeetingInput:
type: object
required:
- id
properties:
id:
$ref: "#/components/schemas/GID"
description: Meeting ID
GetMeetingOutput:
type: object
required:
- meeting
properties:
meeting:
$ref: "#/components/schemas/Meeting"
AddMeetingInput:
type: object
required:
- organization_id
- name
- date
properties:
organization_id:
$ref: "#/components/schemas/GID"
description: Organization ID
name:
type: string
description: Meeting name
date:
type: string
format: date-time
description: Meeting date
attendee_ids:
type: array
items:
$ref: "#/components/schemas/GID"
description: List of attendee profile IDs
minutes:
anyOf:
- type: string
description: Meeting minutes
- type: "null"
description: No minutes
description: Meeting minutes
AddMeetingOutput:
type: object
required:
- meeting
properties:
meeting:
$ref: "#/components/schemas/Meeting"
UpdateMeetingInput:
type: object
required:
- id
properties:
id:
$ref: "#/components/schemas/GID"
description: Meeting ID
name:
type: string
description: Meeting name
date:
type: string
format: date-time
description: Meeting date
attendee_ids:
type: array
items:
$ref: "#/components/schemas/GID"
description: List of attendee profile IDs
minutes:
type: ["string", "null"]
description: Meeting minutes
go.probo.inc/mcpgen/omittable: true
UpdateMeetingOutput:
type: object
required:
- meeting
properties:
meeting:
$ref: "#/components/schemas/Meeting"
DeleteMeetingInput:
type: object
required:
- id
properties:
id:
$ref: "#/components/schemas/GID"
description: Meeting ID
DeleteMeetingOutput:
type: object
required:
- deleted_meeting_id
properties:
deleted_meeting_id:
$ref: "#/components/schemas/GID"
description: Deleted meeting ID
ListMeetingAttendeesInput:
type: object
required:
- meeting_id
properties:
meeting_id:
$ref: "#/components/schemas/GID"
description: Meeting ID
ListMeetingAttendeesOutput:
type: object
required:
- attendees
properties:
attendees:
type: array
items:
$ref: "#/components/schemas/Profile"
description: List of attendee profiles
StatementOfApplicabilityOrderField:
type: string
enum:
@@ -9038,58 +8819,6 @@ tools:
$ref: "#/components/schemas/SendSigningNotificationsInput"
outputSchema:
$ref: "#/components/schemas/SendSigningNotificationsOutput"
- name: listMeetings
description: List all meetings for the organization
hints:
readonly: true
idempotent: true
inputSchema:
$ref: "#/components/schemas/ListMeetingsInput"
outputSchema:
$ref: "#/components/schemas/ListMeetingsOutput"
- name: getMeeting
description: Get a meeting by ID
hints:
readonly: true
idempotent: true
inputSchema:
$ref: "#/components/schemas/GetMeetingInput"
outputSchema:
$ref: "#/components/schemas/GetMeetingOutput"
- name: addMeeting
description: Add a new meeting to the organization
hints:
readonly: false
inputSchema:
$ref: "#/components/schemas/AddMeetingInput"
outputSchema:
$ref: "#/components/schemas/AddMeetingOutput"
- name: updateMeeting
description: Update an existing meeting
hints:
readonly: false
inputSchema:
$ref: "#/components/schemas/UpdateMeetingInput"
outputSchema:
$ref: "#/components/schemas/UpdateMeetingOutput"
- name: deleteMeeting
description: Delete a meeting
hints:
readonly: false
destructive: true
inputSchema:
$ref: "#/components/schemas/DeleteMeetingInput"
outputSchema:
$ref: "#/components/schemas/DeleteMeetingOutput"
- name: listMeetingAttendees
description: List all attendees for a meeting
hints:
readonly: true
idempotent: true
inputSchema:
$ref: "#/components/schemas/ListMeetingAttendeesInput"
outputSchema:
$ref: "#/components/schemas/ListMeetingAttendeesOutput"
- name: listStatementsOfApplicability
description: List all statements of applicability for the organization
hints:

View File

@@ -1,49 +0,0 @@
// Copyright (c) 2026 Probo Inc <hello@getprobo.com>.
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
package types
import (
"go.probo.inc/probo/pkg/coredata"
"go.probo.inc/probo/pkg/page"
)
func NewMeeting(m *coredata.Meeting) *Meeting {
return &Meeting{
ID: m.ID,
Name: m.Name,
Date: m.Date,
Minutes: m.Minutes,
CreatedAt: m.CreatedAt,
UpdatedAt: m.UpdatedAt,
}
}
func NewListMeetingsOutput(meetingPage *page.Page[*coredata.Meeting, coredata.MeetingOrderField]) ListMeetingsOutput {
meetings := make([]*Meeting, 0, len(meetingPage.Data))
for _, v := range meetingPage.Data {
meetings = append(meetings, NewMeeting(v))
}
var nextCursor *page.CursorKey
if len(meetingPage.Data) > 0 {
cursorKey := meetingPage.Data[len(meetingPage.Data)-1].CursorKey(meetingPage.Cursor.OrderBy.Field)
nextCursor = &cursorKey
}
return ListMeetingsOutput{
NextCursor: nextCursor,
Meetings: meetings,
}
}

View File

@@ -1,42 +0,0 @@
// Copyright (c) 2026 Probo Inc <hello@getprobo.com>.
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
package types
import (
"time"
"go.probo.inc/probo/pkg/coredata"
"go.probo.inc/probo/pkg/gid"
)
type Meeting struct {
ID gid.GID `json:"id"`
Name string `json:"name"`
Date time.Time `json:"date"`
Minutes *string `json:"minutes"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
func NewMeeting(m *coredata.Meeting) *Meeting {
return &Meeting{
ID: m.ID,
Name: m.Name,
Date: m.Date,
Minutes: m.Minutes,
CreatedAt: m.CreatedAt,
UpdatedAt: m.UpdatedAt,
}
}