Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

30.1 KB
Raw Blame
import { moxieCRMRegisterTrigger } from './register-trigger';
export const enum MoxieCRMEventType {
  CLIENT_CREATED = 'ClientCreate',
  CLIENT_UPDATED = 'ClientUpdate',
  CLIENT_DELETED = 'ClientDelete',
  PROJECT_CREATED = 'ProjectCreate',
  PROJECT_UPDATED = 'ProjectUpdate',
  PROJECT_COMPLETED = 'ProjectComplete',
  TASK_CREATED = 'DeliverableCreate',
  TASK_UPDATED = 'DeliverableUpdate',
  TASK_DELETED = 'DeliverableDelete',
  TASK_APPROVAL = 'DeliverableApproval',
  FORM_SUBMITTED = 'FormCompleted',
  TIME_ENTRY_CREATED = 'TimerCreate',
  TIME_ENTRY_UPDATED = 'TimerUpdate',
  TIME_ENTRY_DELETED = 'TimerDelete',
  MEETING_SCHEDULED = 'MeetingScheduled',
  MEETING_UPDATED = 'MeetingUpdated',
  MEETING_CANCELLED = 'MeetingCancelled',
  OPPORTUNITY_CREATED = 'OpportunityCreate',
  OPPORTUNITY_UPDATED = 'OpportunityUpdate',
  OPPORTUNITY_DELETED = 'OpportunityDelete',
  INVOICE_SENT = 'InvoiceSent',
  PAYMENT_RECEIVED = 'PaymentReceived',
  INVOICE_VOIDED = 'InvoiceVoided',
  INVOICE_WRITE_OFF = 'InvoiceWriteOff',
  AGREEMENT_SENT = 'AgreementSent',
  AGREEMENT_VIEWED = 'AgreementViewed',
  AGREEMENT_SIGNED = 'AgreementSigned',
  TICKET_CREATED = 'TicketCreate',
  TICKET_UPDATED = 'TicketUpdate',
  TICKET_CLOSED = 'TicketClose',
  TICKET_COMMENT = 'TicketComment',
  TICKET_DELETED = 'TicketDelete',
}

const MoxieCRMWebhookSampleData = {
  INVOICE_VOIDED_SAMPLE_DATA: {
    id: '66b0f2a1c3a9e40012ab34cd',
    accountId: 10016,
    invoiceNumber: 1042,
    invoiceNumberFormatted: 'E-2026-042',
    clientId: '66b0f2a1c3a9e40012ab34cd',
    status: 'VOIDED',
    invoiceType: 'STANDARD',
    currency: 'HUF',
    subTotal: 100.0,
    tax: 15.47,
    taxPercentage: 15.47375,
    taxBreakdown: [
      { name: 'GST', rate: 5.0, order: 0, compound: false, taxableAmount: 100.0, amount: 5.0 },
      { name: 'PST', rate: 9.975, order: 1, compound: true, taxableAmount: 105.0, amount: 10.47 },
    ],
    total: 115.47,
    amountDue: 0.0,
    viewOnlineUrl: 'https://pay.withmoxie.com/i/...',
    payments: [],
  },
  AGREEMENT_EVENT_SAMPLE_DATA: {
    id: '66c1a2b3c4d5e60012ab3401',
    accountId: 10016,
    name: 'Website Redesign Agreement',
    client: {
      id: '64b800010000000000000000',
      name: 'Moxie, Inc.',
      clientType: 'Client',
    },
    status: 'Finalized',
    statusTime: '2026-09-30T14:05:00.000Z',
    currency: 'USD',
    dateCreated: '2026-09-28T10:00:00.000Z',
    dateCompleted: null,
    fullyExecuted: false,
    userSigned: true,
    clientSigned: false,
  },
  TICKET_EVENT_SAMPLE_DATA: {
    ticket: {
      id: '66d2b3c4d5e6f70012ab3402',
      accountId: 10016,
      clientId: '64b800010000000000000000',
      clientContactId: -1,
      ticketNumber: 1001,
      ccList: [],
      assignedTo: [54197],
      mergedTickets: [],
      dueDate: '2026-10-05',
      subject: 'Website contact form is not sending email',
      open: true,
      type: '23e90abb-21c3-4a28-abdd-85b7bb4e3031',
      status: 'New',
      unread: false,
      unreadClient: true,
      lastComment: 'The contact form on the home page stopped sending email yesterday.',
      formData: null,
      summary: null,
      created: '2026-09-30T09:12:00.000Z',
      updated: '2026-09-30T09:12:00.000Z',
      closed: null,
      snoozedUntil: null,
      archived: false,
      client: {
        id: '64b800010000000000000000',
        name: 'Moxie, Inc.',
        clientType: 'Client',
      },
    },
    comments: [
      {
        id: '66d2b3c4d5e6f70012ab3404',
        accountId: 10016,
        ticketId: '66d2b3c4d5e6f70012ab3402',
        clientId: '64b800010000000000000000',
        commentType: 'PUBLIC',
        commentBy: -1,
        commentUserEmail: '[email protected]',
        commentUserName: 'Jane Doe',
        attachments: [],
        comment: 'The contact form on the home page stopped sending email yesterday.',
        fromEmail: false,
        created: '2026-09-30T09:12:00.000Z',
        updated: null,
        commentFormat: 'PlainText',
      },
    ],
  },
  PROJECT_EVENT_SAMPLE_DATA: {
    id: '64b800020000000000000000',
    accountId: 10016,
    projectTypeId: '64b800030000000000000000',
    sampleData: false,
    clientId: '64b800010000000000000000',
    name: 'Design & Development of Website',
    active: true,
    startDate: null,
    dueDate: null,
    dateCreated: '2026-08-31T10:22:40.856Z',
    client: {
      accountId: 10016,
      sampleData: false,
      id: '64b800010000000000000000',
      clientType: 'Client',
      name: 'Moxie, Inc.',
      initials: null,
      locality: 'OR',
      country: null,
      color: '#78909C',
      address1: null,
      address2: null,
      city: 'Portland',
      postal: null,
      website: null,
      phone: '+18887231235',
      s3LogoFile: null,
      taxId: null,
      projects: [],
      hourlyAmount: 225,
      archive: false,
      currency: null,
      logo: null,
      leadSource: null,
      defaultTaxRate: null,
      defaultTaxRuleId: null,
      whoPaysCardFees: 'Client',
      customValues: [],
      contact: null,
    },
    leadGenArchived: false,
    feeSchedule: {
      feeType: 'Hourly',
      amount: 225,
      retainerSchedule: 'Monthly',
      estimateMax: null,
      estimateMin: null,
      retainerStart: null,
      retainerTiming: 'Advanced',
      retainerPeriods: -1,
      retainerOverageRate: null,
      taxable: false,
      fromProposalId: null,
      fromProposalSignedDate: null,
      updatedDate: null,
      updatedBy: null,
      retainerActive: true,
    },
    proposalId: null,
    proposalName: null,
    hexColor: null,
    portalAccess: 'Overview',
    showTimeWorkedInPortal: true,
    portalAccessAssignedOnly: false,
    projectOwners: [],
    customValues: [],
    paymentHistory: [],
    files: [],
    deliverables: [],
  },
  CLIENT_EVENT_SAMPLE_DATA: {
    id: '64b800010000000000000000',
    accountId: 10016,
    name: 'Moxie, Inc.',
    clientType: 'Client',
    initials: null,
    address1: null,
    address2: null,
    city: 'Portland',
    locality: 'OR',
    postal: null,
    country: null,
    website: null,
    phone: '+18887231235',
    color: '#78909C',
    logo: null,
    s3LogoFile: null,
    taxId: null,
    leadSource: null,
    archive: false,
    leadGenArchived: false,
    paymentTerms: null,
    payInstructions: null,
    hourlyAmount: 225,
    defaultTaxRate: null,
    defaultTaxRuleId: null,
    roundingIncrement: 1,
    currency: null,
    activityInitialized: true,
    lastInvoiceRunDate: null,
    nextInvoiceRunDate: null,
    importRecordId: null,
    integrationKeys: {
      quickbooksId: null,
      xeroId: null,
    },
    customValues: [],
    files: [],
    comments: [],
    created: '2026-08-31T10:22:33.650Z',
    sampleData: false,
    stripeClientId: null,
    peppolCompliant: false,
    mergedIntoClientId: null,
    mergedAt: null,
    mergedByUserId: null,
    notes: null,
    notifyOnCreate: null,
    contacts: [],
  },
  PROJECT_TASK_EVENT_SAMPLE_DATA: {
    id: '64b800040000000000000000',
    clientId: '64b800010000000000000000',
    projectId: '64b800020000000000000000',
    projectTypeId: '64b800030000000000000000',
    parentTaskId: null,
    subTaskSort: 0,
    project: {
      accountId: 10016,
      id: '64b800020000000000000000',
      clientId: '64b800010000000000000000',
      projectTypeId: '64b800030000000000000000',
      name: 'Design & Development of Website',
      active: true,
      hexColor: null,
    },
    client: {
      accountId: 10016,
      id: '64b800010000000000000000',
      name: 'Moxie, Inc.',
      initials: null,
      s3LogoFile: null,
      logo: null,
      color: '#78909C',
    },
    name: 'Build the website',
    statusId: '3f9a1c62-0b7e-4d51-9a2f-8e6d4b1c7a05',
    status: 'Not started',
    descriptionFormat: 'Markdown',
    priority: 1,
    taskPriority: 'Normal',
    description: 'This is the description',
    assignedTo: null,
    assignedToList: [
      47158,
    ],
    approvalRequired: false,
    product: null,
    quantity: null,
    invoiceId: null,
    invoiceNumber: null,
    ticketId: null,
    initialWorkflowComplete: true,
    customValues: [],
    comments: [],
    events: [
      {
        user: 'Jamie Rivera',
        events: [
          'Jamie Rivera Created task',
        ],
        clientEvent: false,
        timestamp: '2026-08-31T10:22:47.654Z',
      },
    ],
    startDate: null,
    dueDate: null,
    created: '2026-08-31T10:22:47.645Z',
    completed: null,
    tasks: [],
    archived: false,
    kanbanSort: 0,
    isSubTask: false,
  },
  FORM_EVENT_SAMPLE_DATA: {
    id: '64b8233d6ce6226305f24b47',
    accountId: 10016,
    client: null,
    formName: 'test-new-client',
    businessName: 'Moxie',
    firstName: 'Geoffrey',
    lastName: 'Mina',
    phone: '+444445551212',
    email: '[email protected]',
    role: null,
    address1: null,
    address2: null,
    city: null,
    locality: null,
    postal: null,
    country: null,
    website: null,
    leadSource: null,
    sourceUrl:
      'https://hello.withmoxie.dev/00/hectic-lab/test-new-client?inPortal=true',
    Field6: 'Answer to your first question',
    Field7: 'Another to your other question',
    submittedAt: '2023-07-19T17:54:05.257Z',
  },
  TIME_ENTRY_EVENT_SAMPLE_DATA: {
    id: '64b800050000000000000000',
    accountId: 10016,
    sampleData: false,
    userId: 16,
    timerStart: '2026-08-29T09:00:00.000Z',
    timerEnd: '2026-08-29T10:15:00.000Z',
    pausedAt: null,
    userFullName: 'Jamie Rivera',
    notes: 'This is the description',
    format: 'Markdown',
    clientId: '64b800010000000000000000',
    projectId: '64b800020000000000000000',
    deliverableId: null,
    ticketId: null,
    clientName: 'Moxie, Inc.',
    projectName: 'Design & Development of Website',
    deliverableName: null,
    ticketName: null,
    timestamp: '2026-08-31T10:22:54.688Z',
    timestampUpdated: null,
    billable: true,
    pausedSeconds: 0,
    invoiceId: null,
    invoiceNumber: null,
    importRecordId: null,
    feeSchedule: null,
    customGroupFieldValue: null,
    duration: 4500,
    wasRounded: false,
  },
  MEETING_EVENT_SAMPLE_DATA: {
    id: '64b824df6ce6226305f24b53',
    accountId: 10016,
    ownerUserId: null,
    sampleData: false,
    meetingId: '63076a1320e0d10001e6cb63',
    clientId: '63c5ea0c840e3207033931b5',
    meetingStatus: 'Scheduled',
    meetingName: 'Geoff Mina / 30 minute meeting',
    schedulerName: '30 minute meeting',
    confirmedTime: {
      start: '2023-07-19T22:30:00.000Z',
      end: '2023-07-19T23:00:00.000Z',
    },
    scheduledTimezone: 'America/New_York',
    scheduledLocale: 'en-US',
    formData: {
      firstName: 'Geoff',
      lastName: 'Mina',
      email: '[email protected]',
      phone: '+445555555555',
      role: null,
      businessName: null,
      website: null,
      address1: null,
      address2: null,
      city: null,
      locality: null,
      postal: null,
      country: null,
      sourceUrl: null,
      opportunityId: null,
      templateId: null,
      cardTokenId: null,
      leadSource: null,
      answers: [],
    },
    location: {
      type: 'Google',
    },
    zoomMeeting: null,
    googleMeeting: {
      googleUserId: 16,
      eventId: '_6oq64e1i6hi6cdj3ckr34chm6co3aphi6hh3acq0d1im6t39cdgn0s1ecdnmq',
      hangoutLink: 'https://meet.google.com/swq-azkw-zkt',
      htmlLink:
        'https://www.google.com/calendar/event?eid=XzZvcTY0ZTFpNmhpNmNkajNja3IzNGNobTZjbzNhcGhpNmhoM2FjcTBkMWltNnQzOWNkZ24wczFlY2RubXEgZ2VvZmYubWluYUBoZWN0aWMudXM',
      googleUser: {
        name: 'Geoff Mina',
        given_name: 'Geoff',
        family_name: 'Mina',
        picture:
          'https://lh3.googleusercontent.com/a/AGNmyxYxJL9h8SnY6z2oXg7fNHAdov1TJ4--RQtiAMn8=s96-c',
        email: '[email protected]',
        email_verified: true,
        locale: 'en',
      },
      entryPoints: [
        {
          entryPointType: 'video',
          label: 'meet.google.com/swq-azkw-zkt',
          uri: 'https://meet.google.com/swq-azkw-zkt',
        },
        {
          entryPointType: 'more',
          pin: '4419810087411',
          uri: 'https://tel.meet/swq-azkw-zkt?pin=4419810087411',
        },
        {
          entryPointType: 'phone',
          label: '+1 646-504-7945',
          pin: '978184485',
          regionCode: 'US',
          uri: 'tel:+1-646-504-7945',
        },
      ],
    },
    microsoftEvent: null,
    connectedICalUid: null,
    notes: null,
    cancellationReason: null,
    leadGenArchived: false,
    opportunityId: null,
    files: [],
    meetingWith: 'Moxie',
    incomeRecordId: null,
    icalUid: '[email protected]',
  },
  OPPORTUNITY_EVENT_SAMPLE_DATA: {
    id: '64b800060000000000000000',
    accountId: 10016,
    clientId: null,
    statusId: '3f9a1c62-0b7e-4d51-9a2f-8e6d4b1c7a05',
    kanbanSort: 0,
    name: 'Hook SubmitterC / null',
    description: null,
    assignedTo: [],
    format: 'Markdown',
    sentiment: 2,
    value: 0,
    timePeriod: 'OneTime',
    periods: 1,
    estCloseDate: null,
    actualCloseDate: null,
    formData: {
      firstName: 'Jamie',
      lastName: 'Rivera',
      email: '[email protected]',
      phone: '+18887231235',
      role: null,
      businessName: 'Hook Co C',
      website: null,
      address1: null,
      address2: null,
      city: null,
      locality: null,
      postal: null,
      country: null,
      taxId: null,
      sourceUrl: null,
      opportunityId: null,
      templateId: null,
      cardTokenId: null,
      leadSource: null,
      clientId: null,
      answers: [
        {
          id: '3f9a1c62-0b7e-4d51-9a2f-8e6d4b1c7a05',
          fieldKey: 'q1',
          fieldType: 'TextInput',
          question: 'What do you need?',
          answer: 'Sample notes',
        },
      ],
    },
    archive: false,
    initialWorkflow: true,
    toDos: [],
    comments: [
      {
        id: null,
        author: 'Jamie Rivera',
        authorId: '0',
        comment: 'Auto created from form: null',
        format: 'Markdown',
        clientComment: false,
        edited: false,
        privateComment: false,
        sendEmail: false,
        timestamp: '2026-08-31T10:23:08.787Z',
      },
    ],
    files: [],
    workflow: [
      {
        id: '3f9a1c62-0b7e-4d51-9a2f-8e6d4b1c7a05',
        itemId: '64b800070000000000000000',
        itemType: 'Form',
        properties: {},
        timestamp: '2026-08-31T10:23:08.786Z',
      },
    ],
    customValues: [],
    history: [],
    importRecordId: null,
    sampleData: false,
    created: '2026-08-31T10:23:08.786Z',
    wonOn: null,
    client: null,
    statusLabel: 'Inquiry',
  },
  INVOICE_EVENT_SAMPLE_DATA: {
    id: '64ae5aea99f38e74fc78ae46',
    invoiceNumber: 74,
    invoiceNumberFormatted: 'E-2023-74',
    accountId: 10016,
    clientId: '6490580de30ecf51c2c22ffa',
    dateCreated: '2023-07-16',
    dateSent: '2023-07-12',
    dateDue: '2023-08-11',
    dateDueCalculated: null,
    datePaid: '2023-07-12',
    clientInfo: {
      id: '6490580de30ecf51c2c22ffa',
      name: 'E164',
      initials: null,
      address1: '123 Any Street',
      address2: null,
      city: 'Anytown',
      locality: 'NY',
      postal: '12020',
      country: 'US',
      phone: '+15555551212',
      color: '#8EA3B8',
      taxId: null,
      website: null,
      contact: {
        id: '6490580de30ecf51c2c22ffb',
        accountId: 10016,
        clientId: '6490580de30ecf51c2c22ffa',
        clientPortalUserId: -79,
        firstName: 'Geoffrey',
        lastName: 'Mina',
        role: null,
        phone: '+12224445234',
        email: '[email protected]',
        mobile: null,
        notes: null,
        defaultContact: true,
        invoiceContact: false,
        portalAccess: true,
        importRecordId: null,
        sampleData: null,
      },
      roundingIncrement: 1,
      customInfo: false,
    },
    status: 'PARTIAL',
    invoiceType: 'STANDARD',
    subTotal: 14950,
    convenienceFee: 0,
    lateFee: 0,
    discountAmount: 0,
    creditApplied: 0,
    tax: 225,
    total: 15175,
    localTotal: 15175,
    paymentTotal: 78.75,
    localPaymentTotal: 78.75,
    amountDue: 15096.25,
    localAmountDue: 15096.25,
    currency: 'USD',
    integrationKeys: {
      quickbooksId: null,
      xeroId: null,
    },
    viewOnlineUrl: 'https://clients.domain.com/invoice?token=',
    payments: [
      {
        id: '29e34d7b-ef69-4059-bbe9-7b214c38a011',
        amount: 78.75,
        pending: false,
        paidBy: 'G. Mina',
        paymentProvider: 'CHECK',
        currency: 'USD',
        referenceNumber: null,
        memo: null,
        datePaid: '2023-07-12',
        timestamp: '2023-07-12T06:00:00.000Z',
        integratedPayment: false,
        forcePaidInFull: false,
        integrationKeys: {
          quickbooksId: null,
          xeroId: null,
        },
        isFailedPayment: false,
        localAmount: 78.75,
      },
    ],
  },
};

export const moxieCRMTriggers = [
  {
    name: 'client_created',
    displayName: 'Client Created',
    description: 'Triggered when a new client is created.',
    aiMetadata: {
      description: 'Fires when a new client or prospect record is created in Moxie CRM. Use to start automations when an account is added to the CRM.',
    },
    eventType: MoxieCRMEventType.CLIENT_CREATED,
    sampleData: MoxieCRMWebhookSampleData.CLIENT_EVENT_SAMPLE_DATA,
  },
  {
    name: 'client_updated',
    displayName: 'Client Updated',
    description: 'Triggered when an existing client is updated.',
    aiMetadata: {
      description: 'Fires when an existing client record is modified in Moxie CRM, such as a change to contact, address, or billing details.',
    },
    eventType: MoxieCRMEventType.CLIENT_UPDATED,
    sampleData: MoxieCRMWebhookSampleData.CLIENT_EVENT_SAMPLE_DATA,
  },
  {
    name: 'client_deleted',
    displayName: 'Client Deleted',
    description: 'Triggered when an existing client is deleted.',
    aiMetadata: {
      description: 'Fires when a client record is deleted from Moxie CRM. Use to clean up or sync downstream systems when an account is removed.',
    },
    eventType: MoxieCRMEventType.CLIENT_DELETED,
    sampleData: MoxieCRMWebhookSampleData.CLIENT_EVENT_SAMPLE_DATA,
  },
  {
    name: 'project_created',
    displayName: 'Project Created',
    description: 'Triggered when a new project is created.',
    aiMetadata: {
      description: 'Fires when a new project is created for a client in Moxie CRM. Use to kick off engagement setup automations.',
    },
    eventType: MoxieCRMEventType.PROJECT_CREATED,
    sampleData: MoxieCRMWebhookSampleData.PROJECT_EVENT_SAMPLE_DATA,
  },
  {
    name: 'project_updated',
    displayName: 'Project Updated',
    description: 'Triggered when an existing project is updated.',
    aiMetadata: {
      description: 'Fires when an existing project is modified in Moxie CRM, such as a change to dates, fee schedule, or portal access.',
    },
    eventType: MoxieCRMEventType.PROJECT_UPDATED,
    sampleData: MoxieCRMWebhookSampleData.PROJECT_EVENT_SAMPLE_DATA,
  },
  {
    name: 'project_completed',
    displayName: 'Project Completed',
    description: 'Triggered when an existing project is completed.',
    aiMetadata: {
      description: 'Fires when a project is marked complete in Moxie CRM. Use to trigger wrap-up steps such as final invoicing or close-out notifications.',
    },
    eventType: MoxieCRMEventType.PROJECT_COMPLETED,
    sampleData: MoxieCRMWebhookSampleData.PROJECT_EVENT_SAMPLE_DATA,
  },
  {
    name: 'task_created',
    displayName: 'Task Created',
    description: 'Triggered when a new task is created.',
    aiMetadata: {
      description: 'Fires when a new task (deliverable) is created within a project in Moxie CRM.',
    },
    eventType: MoxieCRMEventType.TASK_CREATED,
    sampleData: MoxieCRMWebhookSampleData.PROJECT_TASK_EVENT_SAMPLE_DATA,
  },
  {
    name: 'task_updated',
    displayName: 'Task Updated',
    description: 'Triggered when an existing task is updated.',
    aiMetadata: {
      description: 'Fires when an existing task (deliverable) is modified in Moxie CRM, such as a change to status, assignee, or due date.',
    },
    eventType: MoxieCRMEventType.TASK_UPDATED,
    sampleData: MoxieCRMWebhookSampleData.PROJECT_TASK_EVENT_SAMPLE_DATA,
  },
  {
    name: 'task_deleted',
    displayName: 'Task Deleted',
    description: 'Triggered when an existing task is deleted.',
    aiMetadata: {
      description: 'Fires when a task (deliverable) is deleted from a project in Moxie CRM.',
    },
    eventType: MoxieCRMEventType.TASK_DELETED,
    sampleData: MoxieCRMWebhookSampleData.PROJECT_TASK_EVENT_SAMPLE_DATA,
  },
  {
    name: 'client_task_approval',
    displayName: 'Client Task Approval',
    description: 'Triggered when a task is moved to client approval.',
    aiMetadata: {
      description: 'Fires when a task (deliverable) is moved into the client-approval stage in Moxie CRM. Use to notify or escalate when work awaits client sign-off.',
    },
    eventType: MoxieCRMEventType.TASK_APPROVAL,
    sampleData: MoxieCRMWebhookSampleData.PROJECT_TASK_EVENT_SAMPLE_DATA,
  },
  {
    name: 'form_submitted',
    displayName: 'Form Submitted',
    description: 'Triggered when a new form is submitted.',
    aiMetadata: {
      description: 'Fires when a Moxie CRM form (such as an intake or lead form) is submitted. Use to capture inbound leads or client-supplied information.',
    },
    eventType: MoxieCRMEventType.FORM_SUBMITTED,
    sampleData: MoxieCRMWebhookSampleData.FORM_EVENT_SAMPLE_DATA,
  },
  {
    name: 'time_entry_created',
    displayName: 'Time Entry Created',
    description: 'Triggered when a new time entry is created.',
    aiMetadata: {
      description: 'Fires when a new time entry (timer record) is logged in Moxie CRM against a client, project, or task.',
    },
    eventType: MoxieCRMEventType.TIME_ENTRY_CREATED,
    sampleData: MoxieCRMWebhookSampleData.TIME_ENTRY_EVENT_SAMPLE_DATA,
  },
  {
    name: 'time_entry_updated',
    displayName: 'Time Entry Updated',
    description: 'Triggered when an existing time entry is updated.',
    aiMetadata: {
      description: 'Fires when an existing time entry (timer record) is modified in Moxie CRM, such as a change to duration or notes.',
    },
    eventType: MoxieCRMEventType.TIME_ENTRY_UPDATED,
    sampleData: MoxieCRMWebhookSampleData.TIME_ENTRY_EVENT_SAMPLE_DATA,
  },
  {
    name: 'time_entry_deleted',
    displayName: 'Time Entry Deleted',
    description: 'Triggered when an existing time entry is deleted.',
    aiMetadata: {
      description: 'Fires when a time entry (timer record) is deleted in Moxie CRM.',
    },
    eventType: MoxieCRMEventType.TIME_ENTRY_DELETED,
    sampleData: MoxieCRMWebhookSampleData.TIME_ENTRY_EVENT_SAMPLE_DATA,
  },
  {
    name: 'meeting_scheduled',
    displayName: 'Meeting Scheduled',
    description: 'Triggered when a new meeting is scheduled.',
    aiMetadata: {
      description: 'Fires when a new meeting is scheduled in Moxie CRM, including its confirmed time and conferencing details.',
    },
    eventType: MoxieCRMEventType.MEETING_SCHEDULED,
    sampleData: MoxieCRMWebhookSampleData.MEETING_EVENT_SAMPLE_DATA,
  },
  {
    name: 'meeting_updated',
    displayName: 'Meeting Updated',
    description: 'Triggered when an existing meeting is updated.',
    aiMetadata: {
      description: 'Fires when an existing meeting is modified in Moxie CRM, such as a reschedule or change to its details.',
    },
    eventType: MoxieCRMEventType.MEETING_UPDATED,
    sampleData: MoxieCRMWebhookSampleData.MEETING_EVENT_SAMPLE_DATA,
  },
  {
    name: 'meeting_cancelled',
    displayName: 'Meeting Cancelled',
    description: 'Triggered when a meeting is cancelled.',
    aiMetadata: {
      description: 'Fires when a scheduled meeting is cancelled in Moxie CRM.',
    },
    eventType: MoxieCRMEventType.MEETING_CANCELLED,
    sampleData: MoxieCRMWebhookSampleData.MEETING_EVENT_SAMPLE_DATA,
  },
  {
    name: 'opportunity_created',
    displayName: 'Opportunity Created',
    description: 'Triggered when a new pipeline opportunity is created.',
    aiMetadata: {
      description: 'Fires when a new sales-pipeline opportunity is created in Moxie CRM. Use to start automations on incoming deals.',
    },
    eventType: MoxieCRMEventType.OPPORTUNITY_CREATED,
    sampleData: MoxieCRMWebhookSampleData.OPPORTUNITY_EVENT_SAMPLE_DATA,
  },
  {
    name: 'opportunity_updated',
    displayName: 'Opportunity Updated',
    description: 'Triggered when an existing opportunity is updated.',
    aiMetadata: {
      description: 'Fires when an existing pipeline opportunity is modified in Moxie CRM, such as a stage change or value update.',
    },
    eventType: MoxieCRMEventType.OPPORTUNITY_UPDATED,
    sampleData: MoxieCRMWebhookSampleData.OPPORTUNITY_EVENT_SAMPLE_DATA,
  },
  {
    name: 'opportunity_deleted',
    displayName: 'Opportunity Deleted',
    description: 'Triggered when an existing pipeline opportunity is deleted.',
    aiMetadata: {
      description: 'Fires when a pipeline opportunity is deleted from Moxie CRM.',
    },
    eventType: MoxieCRMEventType.OPPORTUNITY_DELETED,
    sampleData: MoxieCRMWebhookSampleData.OPPORTUNITY_EVENT_SAMPLE_DATA,
  },
  {
    name: 'invoice_sent',
    displayName: 'Invoice Sent',
    description: 'Triggered when an invoice is sent.',
    aiMetadata: {
      description: 'Fires when an invoice is sent to a client in Moxie CRM. Use to track billing or notify on outgoing invoices.',
    },
    eventType: MoxieCRMEventType.INVOICE_SENT,
    sampleData: MoxieCRMWebhookSampleData.INVOICE_EVENT_SAMPLE_DATA,
  },
  {
    name: 'payment_received',
    displayName: 'Payment Received',
    description: 'Triggered when a payment is received.',
    aiMetadata: {
      description: 'Fires when a payment against an invoice is received in Moxie CRM. Use to reconcile payments or trigger fulfillment.',
    },
    eventType: MoxieCRMEventType.PAYMENT_RECEIVED,
    sampleData: MoxieCRMWebhookSampleData.INVOICE_EVENT_SAMPLE_DATA,
  },
  {
    name: 'invoice_voided',
    displayName: 'Invoice Voided',
    description: 'Triggered when a sent invoice is voided.',
    aiMetadata: {
      description: "Fires once when a sent invoice with no payments is voided in Moxie and moves to VOIDED. Use to cancel the matching invoice or post a reversal in an accounting system.",
    },
    eventType: MoxieCRMEventType.INVOICE_VOIDED,
    sampleData: MoxieCRMWebhookSampleData.INVOICE_VOIDED_SAMPLE_DATA,
    autoRegister: true,
  },
  {
    name: 'invoice_write_off',
    displayName: 'Invoice Written Off',
    description: 'Triggered when an invoice is written off.',
    aiMetadata: {
      description: "Fires once when a sent or partially paid invoice is written off in Moxie and moves to WRITE-OFF. Use to record the bad debt or close the receivable elsewhere.",
    },
    eventType: MoxieCRMEventType.INVOICE_WRITE_OFF,
    sampleData: MoxieCRMWebhookSampleData.INVOICE_EVENT_SAMPLE_DATA,
    autoRegister: true,
  },
  {
    name: 'agreement_sent',
    displayName: 'Agreement Sent',
    description: 'Triggered when an agreement is sent to a client.',
    aiMetadata: {
      description: "Fires once when an agreement (contract) is sent to a client from Moxie. Use to follow up or log the outgoing contract.",
    },
    eventType: MoxieCRMEventType.AGREEMENT_SENT,
    sampleData: MoxieCRMWebhookSampleData.AGREEMENT_EVENT_SAMPLE_DATA,
    autoRegister: true,
  },
  {
    name: 'agreement_viewed',
    displayName: 'Agreement Viewed',
    description: 'Triggered when a client views an agreement.',
    aiMetadata: {
      description: "Fires when a client opens an agreement sent from Moxie. Use to time a follow-up while the client is engaged.",
    },
    eventType: MoxieCRMEventType.AGREEMENT_VIEWED,
    sampleData: MoxieCRMWebhookSampleData.AGREEMENT_EVENT_SAMPLE_DATA,
    autoRegister: true,
  },
  {
    name: 'agreement_signed',
    displayName: 'Agreement Signed',
    description: 'Triggered when an agreement is signed.',
    aiMetadata: {
      description: "Fires when an agreement is signed in Moxie. Use to start onboarding, create the project or send the deposit invoice once the contract is signed.",
    },
    eventType: MoxieCRMEventType.AGREEMENT_SIGNED,
    sampleData: MoxieCRMWebhookSampleData.AGREEMENT_EVENT_SAMPLE_DATA,
    autoRegister: true,
  },
  {
    name: 'ticket_created',
    displayName: 'Ticket Created',
    description: 'Triggered when a new support ticket is created.',
    aiMetadata: {
      description: "Fires once when a new support ticket is created in Moxie, from the client portal, email or the API. Use to route or acknowledge new client requests.",
    },
    eventType: MoxieCRMEventType.TICKET_CREATED,
    sampleData: MoxieCRMWebhookSampleData.TICKET_EVENT_SAMPLE_DATA,
    autoRegister: true,
  },
  {
    name: 'ticket_updated',
    displayName: 'Ticket Updated',
    description: 'Triggered when a ticket is updated.',
    aiMetadata: {
      description: "Fires when an existing ticket changes in Moxie, such as its status, assignee or due date. Use to keep another help desk or task list in sync.",
    },
    eventType: MoxieCRMEventType.TICKET_UPDATED,
    sampleData: MoxieCRMWebhookSampleData.TICKET_EVENT_SAMPLE_DATA,
    autoRegister: true,
  },
  {
    name: 'ticket_closed',
    displayName: 'Ticket Closed',
    description: 'Triggered when a ticket is closed.',
    aiMetadata: {
      description: "Fires when a ticket is closed in Moxie. Use to send a satisfaction survey or close the matching item elsewhere.",
    },
    eventType: MoxieCRMEventType.TICKET_CLOSED,
    sampleData: MoxieCRMWebhookSampleData.TICKET_EVENT_SAMPLE_DATA,
    autoRegister: true,
  },
  {
    name: 'ticket_comment_added',
    displayName: 'Ticket Comment Added',
    description: 'Triggered when a comment is added to a ticket.',
    aiMetadata: {
      description: "Fires when a comment is added to a ticket in Moxie, by the team or the client. Use to notify the assignee or mirror the conversation.",
    },
    eventType: MoxieCRMEventType.TICKET_COMMENT,
    sampleData: MoxieCRMWebhookSampleData.TICKET_EVENT_SAMPLE_DATA,
    autoRegister: true,
  },
  {
    name: 'ticket_deleted',
    displayName: 'Ticket Deleted',
    description: 'Triggered when a ticket is deleted.',
    aiMetadata: {
      description: "Fires when a ticket is deleted in Moxie. Use to remove the matching item from other systems.",
    },
    eventType: MoxieCRMEventType.TICKET_DELETED,
    sampleData: MoxieCRMWebhookSampleData.TICKET_EVENT_SAMPLE_DATA,
    autoRegister: true,
  },
].map((props) => moxieCRMRegisterTrigger(props));