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

4.1 KB
Raw Blame
const contact = { ContactID: '6d42f03b-181f-43e3-93fb-2025c012de92', Name: 'Acme Ltd', EmailAddress: '[email protected]' };

const lineItem = {
  LineItemID: '52208ff9-528a-4985-a9ad-b2b1d4210e38',
  Description: 'Consulting services',
  Quantity: 2,
  UnitAmount: 250,
  AccountCode: '200',
  TaxType: 'OUTPUT',
  TaxAmount: 75,
  LineAmount: 500,
  DiscountRate: 0,
  Tracking: [],
};

const totals = { LineAmountTypes: 'Exclusive', SubTotal: 500, TotalTax: 75, Total: 575, CurrencyCode: 'USD', CurrencyRate: 1 };

const invoice = {
  InvoiceID: '4f7a5f8e-8e3c-4c4d-9b8a-0a1f2b3c4d5e',
  InvoiceNumber: 'INV-0042',
  Type: 'ACCREC',
  Status: 'AUTHORISED',
  Reference: 'PO-1001',
  Contact: contact,
  DateString: '2026-10-05T00:00:00',
  DueDateString: '2026-10-19T00:00:00',
  ...totals,
  AmountDue: 575,
  AmountPaid: 0,
  AmountCredited: 0,
  SentToContact: false,
  HasAttachments: false,
  LineItems: [lineItem],
};

export const xeroSamples = {
  contact: {
    ...contact,
    FirstName: 'Jane',
    LastName: 'Doe',
    ContactStatus: 'ACTIVE',
    IsCustomer: true,
    IsSupplier: false,
    DefaultCurrency: 'USD',
    Phones: [{ PhoneType: 'DEFAULT', PhoneNumber: '5550100', PhoneAreaCode: '', PhoneCountryCode: '1' }],
    Addresses: [{ AddressType: 'POBOX', AddressLine1: '1 Main Street', City: 'Springfield', Region: '', PostalCode: '12345', Country: 'US' }],
    HasAttachments: false,
  },
  invoice,
  bill: { ...invoice, InvoiceID: '8a7d3f0c-2b1e-4d5f-9c8b-7a6e5d4c3b2a', InvoiceNumber: 'SUP-77', Type: 'ACCPAY', Contact: { ...contact, Name: 'Office Mart' } },
  payment: {
    PaymentID: '0d666415-cf77-43fa-80c7-56775591d426',
    Amount: 575,
    BankAmount: 575,
    CurrencyRate: 1,
    Reference: 'INV-0042 payment',
    Status: 'AUTHORISED',
    PaymentType: 'ACCRECPAYMENT',
    IsReconciled: false,
    Invoice: { InvoiceID: invoice.InvoiceID, InvoiceNumber: invoice.InvoiceNumber, Type: 'ACCREC', Contact: contact },
    Account: { AccountID: 'bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4', Code: '090', Name: 'Business Bank Account' },
  },
  bankTransaction: {
    BankTransactionID: 'd20b6c54-7f5d-4ce6-ab83-55f609719126',
    Type: 'RECEIVE',
    Status: 'AUTHORISED',
    Reference: 'Cash sale',
    Contact: contact,
    BankAccount: { AccountID: 'bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4', Code: '090', Name: 'Business Bank Account' },
    DateString: '2026-10-05T00:00:00',
    IsReconciled: false,
    ...totals,
    LineItems: [lineItem],
  },
  creditNote: {
    CreditNoteID: 'c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f',
    CreditNoteNumber: 'CN-0007',
    Type: 'ACCRECCREDIT',
    Status: 'AUTHORISED',
    Reference: 'Refund for INV-0042',
    Contact: contact,
    DateString: '2026-10-05T00:00:00',
    ...totals,
    RemainingCredit: 575,
    Allocations: [],
    LineItems: [lineItem],
  },
  quote: {
    QuoteID: 'a9b8c7d6-e5f4-4a3b-9c2d-1e0f9a8b7c6d',
    QuoteNumber: 'QU-0012',
    Reference: 'Website redesign',
    Status: 'DRAFT',
    Title: 'Website redesign',
    Summary: 'Design and build of the new website',
    Terms: 'Valid for 30 days',
    Contact: contact,
    DateString: '2026-10-05T00:00:00',
    ExpiryDateString: '2026-11-04T00:00:00',
    ...totals,
    LineItems: [lineItem],
  },
  purchaseOrder: {
    PurchaseOrderID: 'f0e1d2c3-b4a5-4968-8776-655443322110',
    PurchaseOrderNumber: 'PO-0005',
    Reference: 'Stock reorder',
    Status: 'AUTHORISED',
    Contact: { ...contact, Name: 'Office Mart' },
    DateString: '2026-10-05T00:00:00',
    DeliveryDateString: '2026-10-12T00:00:00',
    DeliveryAddress: '1 Main Street, Springfield',
    AttentionTo: 'Warehouse',
    Telephone: '5550100',
    DeliveryInstructions: 'Rear entrance',
    SentToContact: false,
    ...totals,
    LineItems: [lineItem],
  },
  project: {
    projectId: 'b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e',
    name: 'Website redesign',
    contactId: contact.ContactID,
    status: 'INPROGRESS',
    currencyCode: 'USD',
    deadlineUtc: '2026-12-31T00:00:00Z',
    minutesLogged: 0,
    estimate: { currency: 'USD', value: 5000 },
    totalTaskAmount: { currency: 'USD', value: 0 },
    totalInvoiced: { currency: 'USD', value: 0 },
    totalToBeInvoiced: { currency: 'USD', value: 0 },
  },
};