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:
@@ -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)
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user