diff --git a/components/xero_accounting_api/actions/add-line-item-to-invoice/add-line-item-to-invoice.mjs b/components/xero_accounting_api/actions/add-line-item-to-invoice/add-line-item-to-invoice.mjs index 9984cd0e1c3d5..97a4b76a19e13 100644 --- a/components/xero_accounting_api/actions/add-line-item-to-invoice/add-line-item-to-invoice.mjs +++ b/components/xero_accounting_api/actions/add-line-item-to-invoice/add-line-item-to-invoice.mjs @@ -8,7 +8,7 @@ export default { key: "xero_accounting_api-add-line-item-to-invoice", name: "Add Items to Existing Sales Invoice", description: "Adds line items to an existing sales invoice. [See the docs here](https://developer.xero.com/documentation/api/accounting/invoices#post-invoices)", - version: "0.0.4", + version: "0.0.5", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/create-bank-transaction/create-bank-transaction.mjs b/components/xero_accounting_api/actions/create-bank-transaction/create-bank-transaction.mjs index 08ff8f4efd8a5..77099e9c27a22 100644 --- a/components/xero_accounting_api/actions/create-bank-transaction/create-bank-transaction.mjs +++ b/components/xero_accounting_api/actions/create-bank-transaction/create-bank-transaction.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-create-bank-transaction", name: "Create Bank Transaction", description: "Create a new bank transaction [See the documentation](https://developer.xero.com/documentation/api/accounting/banktransactions#put-banktransactions)", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: true, openWorldHint: true, @@ -22,25 +22,30 @@ export default { }, bankAccountCode: { type: "string", - label: "Bank account code", + label: "Bank Account Code", description: "The Account Code of the Bank Account of the transaction. If Code is not included then AccountID is required.", optional: true, }, bankAccountId: { type: "string", - label: "Bank account ID", + label: "Bank Account ID", description: "The ID of the Bank Account transaction. If AccountID is not included then Code is required.", optional: true, }, contactId: { - type: "string", - label: "Contact ID", - description: "Id of the contact associated to the bank transaction.", + propDefinition: [ + xeroAccountingApi, + "contactId", + (c) => ({ + tenantId: c.tenantId, + }), + ], + description: "ID of the contact associated to the bank transaction.", optional: true, }, contactName: { type: "string", - label: "Contact name", + label: "Contact Name", description: "Name of the contact associated to the bank transaction. If there is no contact matching this name, a new contact is created.", optional: true, }, @@ -59,12 +64,12 @@ export default { }, lineItems: { type: "object", - label: "Line items", + label: "Line Items", description: "See [LineItems](https://developer.xero.com/documentation/api/banktransactions#LineItemsPOST). The LineItems element can contain any number of individual LineItem sub-elements. At least **one** is required to create a bank transaction.", }, isReconciled: { type: "boolean", - label: "Is reconciled", + label: "Is Reconciled", description: "Boolean to show if transaction is reconciled. Conversion related apps can set the IsReconciled flag in scenarios when a matching bank statement line is not available. [Learn more](http://help.xero.com/#Q_BankRecNoImport)", optional: true, }, @@ -82,13 +87,13 @@ export default { }, currencyCode: { type: "string", - label: "Currency code", + label: "Currency Code", description: "The currency that bank transaction has been raised in (see [Currencies](https://developer.xero.com/documentation/api/currencies)). Setting currency is only supported on overpayments.", optional: true, }, currencyRate: { type: "string", - label: "Currency rate", + label: "Currency Rate", description: "Exchange rate to base currency when money is spent or received. e.g. 0.7500 Only used for bank transactions in non base currency. If this isn't specified for non base currency accounts then either the user-defined rate (preference) or the [XE.com day rate](http://help.xero.com/#CurrencySettings$Rates) will be used. Setting currency is only supported on overpayments.", optional: true, }, @@ -110,7 +115,7 @@ export default { }, lineAmountTypes: { type: "string", - label: "Line amount types", + label: "Line Amount Types", description: "Line amounts are exclusive of tax by default if you don't specify this element. See [Line Amount Types](https://developer.xero.com/documentation/api/types#LineAmountTypes)", optional: true, options: [ diff --git a/components/xero_accounting_api/actions/create-bill/create-bill.mjs b/components/xero_accounting_api/actions/create-bill/create-bill.mjs index 82a02bcd006d8..67ae383868a53 100644 --- a/components/xero_accounting_api/actions/create-bill/create-bill.mjs +++ b/components/xero_accounting_api/actions/create-bill/create-bill.mjs @@ -1,5 +1,4 @@ import { - deleteKeys, formatLineItems, isValidDate, removeNullEntries, @@ -10,7 +9,7 @@ export default { key: "xero_accounting_api-create-bill", name: "Create Bill", description: "Creates a new bill (Accounts Payable)[See the docs here](https://developer.xero.com/documentation/api/accounting/invoices)", - version: "0.0.4", + version: "0.0.5", annotations: { destructiveHint: false, openWorldHint: true, @@ -28,7 +27,7 @@ export default { invoiceNumber: { type: "string", optional: true, - label: "Invoice number", + label: "Invoice Number", description: "Unique alpha numeric code identifying invoice", }, reference: { @@ -37,19 +36,14 @@ export default { label: "Reference", description: "ACCREC only - additional reference number", }, - contact: { - type: "object", - label: "Contact information", - description: `Provide an object. Enter the column name for the key and the corresponding column value. - [See object documentation](https://developer.xero.com/documentation/api/accounting/contacts/#post-contacts). - Example: - \`{ - "ContactID":"Existing contact ID. *Note: If contactID is populated, other key-value pairs would be ignored", - "Name":"MyCorp Inc", - "FirstName":"Sir", - "LastName":"Bush", - "EmailAddress": "jonny@mailinator.com" - }\``, + contactId: { + propDefinition: [ + xeroAccountingApi, + "contactId", + (c) => ({ + tenantId: c.tenantId, + }), + ], }, lineItems: { propDefinition: [ @@ -60,19 +54,19 @@ export default { date: { type: "string", optional: true, - label: "Invoice date", + label: "Invoice Date", description: "Date invoice was issued - YYYY-MM-DD", }, dueDate: { type: "string", optional: true, - label: "Invoice due date", + label: "Invoice Due Date", description: "Date invoice is due - YYYY-MM-DD", }, currencyCode: { type: "string", optional: true, - label: "The invoice currency", + label: "The Invoice Currency", description: "The currency that invoice has been raised in. Refer to [object documentation](https://www.xe.com/iso4217.php)", }, @@ -83,14 +77,9 @@ export default { tenantId: this.tenantId, data: removeNullEntries({ Type: "ACCPAY", - Contact: this.contact?.ContactID - ? deleteKeys(this.contact, [ - "Name", - "FirstName", - "LastName", - "EmailAddress", - ]) - : this.contact, + Contact: { + ContactID: this.contactId, + }, LineItems: formatLineItems(this.lineItems), Date: isValidDate(this.date, "Date") && this.date, DueDate: isValidDate(this.dueDate, "DueDate") && this.dueDate, diff --git a/components/xero_accounting_api/actions/create-credit-note/create-credit-note.mjs b/components/xero_accounting_api/actions/create-credit-note/create-credit-note.mjs index c9fd2aaaf2faa..e548de13d5598 100644 --- a/components/xero_accounting_api/actions/create-credit-note/create-credit-note.mjs +++ b/components/xero_accounting_api/actions/create-credit-note/create-credit-note.mjs @@ -6,7 +6,7 @@ export default { key: "xero_accounting_api-create-credit-note", name: "Create Credit Note", description: "Creates a new credit note.", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: true, openWorldHint: true, @@ -22,9 +22,14 @@ export default { ], }, contactId: { - label: "Contact ID", - type: "string", - description: "Id of the contact associated to the credit note.", + propDefinition: [ + xeroAccountingApi, + "contactId", + (c) => ({ + tenantId: c.tenantId, + }), + ], + description: "ID of the contact associated to the credit note", optional: true, }, contactName: { @@ -69,7 +74,7 @@ export default { ], }, lineAmountTypes: { - label: "Line amount types", + label: "Line Amount Types", type: "string", description: "See [Invoice Line Amount Types](https://developer.xero.com/documentation/api/Types#LineAmountTypes)", optional: true, @@ -80,19 +85,19 @@ export default { ], }, lineItems: { - label: "Line items", + label: "Line Items", type: "object", description: "See [Invoice Line Items](https://developer.xero.com/documentation/api/Invoices#LineItems)", optional: true, }, currencyCode: { - label: "Currency code", + label: "Currency Code", type: "string", description: "Currency used for the Credit Note", optional: true, }, creditNoteNumber: { - label: "Credit note number", + label: "Credit Note Number", type: "string", description: "[ACCRECCREDIT](https://developer.xero.com/documentation/api/types#CreditNoteTypes) - Unique alpha numeric code identifying credit note ( *when missing will auto-generate from your Organisation Invoice Settings*)\n[ACCPAYCREDIT](https://developer.xero.com/documentation/api/types#CreditNoteTypes) - non-unique alpha numeric code identifying credit note. This value will also display as Reference in the UI.", optional: true, @@ -104,19 +109,19 @@ export default { optional: true, }, sentToContact: { - label: "Sent to contact", + label: "Sent to Contact", type: "boolean", description: "Boolean to indicate if a credit note has been sent to a contact via the Xero app (currently read only)", optional: true, }, currencyRate: { - label: "Currency rate", + label: "Currency Rate", type: "string", description: "The currency rate for a multicurrency invoice. If no rate is specified, the [XE.com day rate](http://help.xero.com/#CurrencySettings$Rates) is used", optional: true, }, brandingThemeId: { - label: "Branding theme ID", + label: "Branding Theme ID", type: "string", description: "See [BrandingThemes](https://developer.xero.com/documentation/api/branding-themes)", optional: true, diff --git a/components/xero_accounting_api/actions/create-history-note/create-history-note.mjs b/components/xero_accounting_api/actions/create-history-note/create-history-note.mjs index 287b291fa90ab..3d5d443f4de0a 100644 --- a/components/xero_accounting_api/actions/create-history-note/create-history-note.mjs +++ b/components/xero_accounting_api/actions/create-history-note/create-history-note.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-create-history-note", name: "Create History Note", description: "Creates a new note adding it to a document.", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/create-item/create-item.mjs b/components/xero_accounting_api/actions/create-item/create-item.mjs index c8bdc335d1a5e..89ab14ea000ff 100644 --- a/components/xero_accounting_api/actions/create-item/create-item.mjs +++ b/components/xero_accounting_api/actions/create-item/create-item.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-create-item", name: "Create Item", description: "Creates a new item.", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/create-payment/create-payment.mjs b/components/xero_accounting_api/actions/create-payment/create-payment.mjs index 95027b118efef..1a09376b3cee2 100644 --- a/components/xero_accounting_api/actions/create-payment/create-payment.mjs +++ b/components/xero_accounting_api/actions/create-payment/create-payment.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-create-payment", name: "Create Payment", description: "Creates a new payment", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/create-tracking-category/create-tracking-category.mjs b/components/xero_accounting_api/actions/create-tracking-category/create-tracking-category.mjs index 1aa9e3424ecca..6fdd6b836bb2a 100644 --- a/components/xero_accounting_api/actions/create-tracking-category/create-tracking-category.mjs +++ b/components/xero_accounting_api/actions/create-tracking-category/create-tracking-category.mjs @@ -6,7 +6,7 @@ export default { key: "xero_accounting_api-create-tracking-category", name: "Create tracking category", description: "Create a new tracking category [See the documentation](https://developer.xero.com/documentation/api/accounting/trackingcategories#put-trackingcategories).", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/create-update-contact/create-update-contact.mjs b/components/xero_accounting_api/actions/create-update-contact/create-update-contact.mjs index 01cd21c37f4b3..a32c5a54f23b8 100644 --- a/components/xero_accounting_api/actions/create-update-contact/create-update-contact.mjs +++ b/components/xero_accounting_api/actions/create-update-contact/create-update-contact.mjs @@ -6,7 +6,7 @@ export default { key: "xero_accounting_api-create-update-contact", name: "Create or update contact ", description: "Creates a new contact or updates a contact if a contact already exists. [See the docs here](https://developer.xero.com/documentation/api/accounting/contacts)", - version: "0.1.1", + version: "0.1.2", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/delete-tracking-category-option/delete-tracking-category-option.mjs b/components/xero_accounting_api/actions/delete-tracking-category-option/delete-tracking-category-option.mjs index 210b9e768ba45..5dd317f071f9a 100644 --- a/components/xero_accounting_api/actions/delete-tracking-category-option/delete-tracking-category-option.mjs +++ b/components/xero_accounting_api/actions/delete-tracking-category-option/delete-tracking-category-option.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-delete-tracking-category-option", name: "Delete tracking category option", description: "Delete a tracking category option by ID [See the documentation](https://developer.xero.com/documentation/api/accounting/trackingcategories#delete-trackingcategories).", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/delete-tracking-category/delete-tracking-category.mjs b/components/xero_accounting_api/actions/delete-tracking-category/delete-tracking-category.mjs index 247d29156c465..e44283993d363 100644 --- a/components/xero_accounting_api/actions/delete-tracking-category/delete-tracking-category.mjs +++ b/components/xero_accounting_api/actions/delete-tracking-category/delete-tracking-category.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-delete-tracking-category", name: "Delete tracking category", description: "Delete a tracking category by ID [See the documentation](https://developer.xero.com/documentation/api/accounting/trackingcategories#delete-trackingcategories).", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/download-invoice/download-invoice.mjs b/components/xero_accounting_api/actions/download-invoice/download-invoice.mjs index fb95f35f94ee1..c4970a575611d 100644 --- a/components/xero_accounting_api/actions/download-invoice/download-invoice.mjs +++ b/components/xero_accounting_api/actions/download-invoice/download-invoice.mjs @@ -6,7 +6,7 @@ export default { key: "xero_accounting_api-download-invoice", name: "Download Invoice", description: "Downloads an invoice as pdf file. File will be placed at the action's associated workflow temporary folder.", - version: "0.2.3", + version: "0.2.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/email-an-invoice/email-an-invoice.mjs b/components/xero_accounting_api/actions/email-an-invoice/email-an-invoice.mjs index 4f2621b632957..b5f95a8304eed 100644 --- a/components/xero_accounting_api/actions/email-an-invoice/email-an-invoice.mjs +++ b/components/xero_accounting_api/actions/email-an-invoice/email-an-invoice.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-email-an-invoice", name: "Email an Invoice", description: "Triggers the email of a sales invoice out of Xero.", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/find-invoice/find-invoice.mjs b/components/xero_accounting_api/actions/find-invoice/find-invoice.mjs index 98c0e9fbef8c3..c405ced99fee8 100644 --- a/components/xero_accounting_api/actions/find-invoice/find-invoice.mjs +++ b/components/xero_accounting_api/actions/find-invoice/find-invoice.mjs @@ -8,7 +8,7 @@ export default { key: "xero_accounting_api-find-invoice", name: "Find Invoice", description: "Finds an invoice by number or reference.[See the docs here](https://developer.xero.com/documentation/api/accounting/invoices/#get-invoices)", - version: "0.0.4", + version: "0.0.5", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/find-or-create-contact/find-or-create-contact.mjs b/components/xero_accounting_api/actions/find-or-create-contact/find-or-create-contact.mjs index 505bc02ce6613..a380b03425504 100644 --- a/components/xero_accounting_api/actions/find-or-create-contact/find-or-create-contact.mjs +++ b/components/xero_accounting_api/actions/find-or-create-contact/find-or-create-contact.mjs @@ -9,7 +9,7 @@ export default { key: "xero_accounting_api-find-or-create-contact", name: "Find or Create Contact", description: "Finds a contact by name or email address. Optionally, create one if none are found. [See the docs here](https://developer.xero.com/documentation/api/accounting/contacts/#get-contacts)", - version: "0.1.1", + version: "0.1.2", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/get-bank-statements-report/get-bank-statements-report.mjs b/components/xero_accounting_api/actions/get-bank-statements-report/get-bank-statements-report.mjs index 24f4611ad1165..83d3ea9598201 100644 --- a/components/xero_accounting_api/actions/get-bank-statements-report/get-bank-statements-report.mjs +++ b/components/xero_accounting_api/actions/get-bank-statements-report/get-bank-statements-report.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-get-bank-statements-report", name: "Bank Statements Report", description: "Gets bank statements for the specified bank account.", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/get-bank-summary/get-bank-summary.mjs b/components/xero_accounting_api/actions/get-bank-summary/get-bank-summary.mjs index a8e24a4389c62..53d35bcfd46fb 100644 --- a/components/xero_accounting_api/actions/get-bank-summary/get-bank-summary.mjs +++ b/components/xero_accounting_api/actions/get-bank-summary/get-bank-summary.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-get-bank-summary", name: "Get Bank Summary", description: "Gets the balances and cash movements for each bank account.", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/get-contact/get-contact.mjs b/components/xero_accounting_api/actions/get-contact/get-contact.mjs index 7d9a4e4c9d016..fa1b81bcfb71e 100644 --- a/components/xero_accounting_api/actions/get-contact/get-contact.mjs +++ b/components/xero_accounting_api/actions/get-contact/get-contact.mjs @@ -4,7 +4,7 @@ export default { key: "xero_accounting_api-get-contact", name: "Get Contact", description: "Gets details of a contact.", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: false, openWorldHint: true, @@ -20,7 +20,13 @@ export default { ], }, contactIdentifier: { - type: "string", + propDefinition: [ + xeroAccountingApi, + "contactId", + (c) => ({ + tenantId: c.tenantId, + }), + ], description: "Xero identifier of the contact to get. Possible values: \n* **ContactID** - The Xero identifier for a contact e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9\n* **ContactNumber** - A custom identifier specified from another system e.g. a CRM system has a contact number of CUST100", label: "Contact Identifier", }, diff --git a/components/xero_accounting_api/actions/get-history-of-changes/get-history-of-changes.mjs b/components/xero_accounting_api/actions/get-history-of-changes/get-history-of-changes.mjs index ef4a68445fd90..e9069e2659e7f 100644 --- a/components/xero_accounting_api/actions/get-history-of-changes/get-history-of-changes.mjs +++ b/components/xero_accounting_api/actions/get-history-of-changes/get-history-of-changes.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-get-history-of-changes", name: "Get History of Changes", description: "Gets the history of changes to a single existing document.", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/get-invoice-online-url/get-invoice-online-url.mjs b/components/xero_accounting_api/actions/get-invoice-online-url/get-invoice-online-url.mjs index db99817924972..668291fc3680c 100644 --- a/components/xero_accounting_api/actions/get-invoice-online-url/get-invoice-online-url.mjs +++ b/components/xero_accounting_api/actions/get-invoice-online-url/get-invoice-online-url.mjs @@ -4,7 +4,7 @@ export default { key: "xero_accounting_api-get-invoice-online-url", name: "Get Sales Invoice Online URL", description: "Retrieves the online sales invoice URL.", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/get-invoice/get-invoice.mjs b/components/xero_accounting_api/actions/get-invoice/get-invoice.mjs index 8259655486834..16b18f442039f 100644 --- a/components/xero_accounting_api/actions/get-invoice/get-invoice.mjs +++ b/components/xero_accounting_api/actions/get-invoice/get-invoice.mjs @@ -4,7 +4,7 @@ export default { key: "xero_accounting_api-get-invoice", name: "Get Invoice", description: "Gets details of an invoice.", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/get-item/get-item.mjs b/components/xero_accounting_api/actions/get-item/get-item.mjs index 05f633e19ee8c..ca24776b45ee6 100644 --- a/components/xero_accounting_api/actions/get-item/get-item.mjs +++ b/components/xero_accounting_api/actions/get-item/get-item.mjs @@ -4,7 +4,7 @@ export default { key: "xero_accounting_api-get-item", name: "Get Item", description: "Gets details of an item.", - version: "0.2.3", + version: "0.2.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/get-tenant-connections/get-tenant-connections.mjs b/components/xero_accounting_api/actions/get-tenant-connections/get-tenant-connections.mjs index b082ad52960a4..8f4bc3e047ddd 100644 --- a/components/xero_accounting_api/actions/get-tenant-connections/get-tenant-connections.mjs +++ b/components/xero_accounting_api/actions/get-tenant-connections/get-tenant-connections.mjs @@ -4,7 +4,7 @@ export default { key: "xero_accounting_api-get-tenant-connections", name: "Get Tenant Connections", description: "Gets the tenants connections the user is authorized to access", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/get-tracking-category/get-tracking-category.mjs b/components/xero_accounting_api/actions/get-tracking-category/get-tracking-category.mjs index 3921043d456c2..eb0b1e642ac84 100644 --- a/components/xero_accounting_api/actions/get-tracking-category/get-tracking-category.mjs +++ b/components/xero_accounting_api/actions/get-tracking-category/get-tracking-category.mjs @@ -4,7 +4,7 @@ export default { key: "xero_accounting_api-get-tracking-category", name: "Get tracking category", description: "Get information from a tracking category by ID [See the documentation](https://developer.xero.com/documentation/api/accounting/trackingcategories#get-trackingcategories).", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/list-contacts/list-contacts.mjs b/components/xero_accounting_api/actions/list-contacts/list-contacts.mjs index c64f051f1fe54..8f18bd84e476a 100644 --- a/components/xero_accounting_api/actions/list-contacts/list-contacts.mjs +++ b/components/xero_accounting_api/actions/list-contacts/list-contacts.mjs @@ -4,7 +4,7 @@ export default { key: "xero_accounting_api-list-contacts", name: "List Contacts", description: "Lists information from contacts in the given tenant id as per filter parameters.", - version: "0.2.1", + version: "0.2.2", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/list-credit-notes/list-credit-notes.mjs b/components/xero_accounting_api/actions/list-credit-notes/list-credit-notes.mjs index 991e961555b62..0184efcae61c9 100644 --- a/components/xero_accounting_api/actions/list-credit-notes/list-credit-notes.mjs +++ b/components/xero_accounting_api/actions/list-credit-notes/list-credit-notes.mjs @@ -4,7 +4,7 @@ export default { key: "xero_accounting_api-list-credit-notes", name: "List Credit Notes", description: "Lists information from credit notes in the given tenant id as per filter parameters.", - version: "0.2.1", + version: "0.2.2", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/list-invoices/list-invoices.mjs b/components/xero_accounting_api/actions/list-invoices/list-invoices.mjs index 4078a4b34b1e0..2f910c57b4904 100644 --- a/components/xero_accounting_api/actions/list-invoices/list-invoices.mjs +++ b/components/xero_accounting_api/actions/list-invoices/list-invoices.mjs @@ -4,7 +4,7 @@ export default { key: "xero_accounting_api-list-invoices", name: "List Invoices", description: "Lists information from invoices in the given tenant id as per filter parameters.", - version: "0.3.1", + version: "0.3.2", annotations: { destructiveHint: false, openWorldHint: true, @@ -38,9 +38,16 @@ export default { optional: true, }, contactIds: { + propDefinition: [ + xeroAccountingApi, + "contactId", + (c) => ({ + tenantId: c.tenantId, + }), + ], + type: "string[]", label: "Contact IDs", - type: "string", - description: "Filter by a comma-separated list of ContactIDs. See [details](https://developer.xero.com/documentation/api/invoices#optimised-queryparameters).", + description: "Filter by an array of ContactIDs. See [details](https://developer.xero.com/documentation/api/invoices#optimised-queryparameters).", optional: true, }, statuses: { @@ -83,7 +90,9 @@ export default { params: { IDs: this.ids, InvoiceNumbers: this.invoiceNumbers, - ContactIDs: this.contactIds, + ContactIDs: this.contactIds + ? this.contactIds.join(",") + : undefined, Statuses: this.statuses, Where: this.where, createdByMyApp: this.createdByMyApp, diff --git a/components/xero_accounting_api/actions/list-manual-journals/list-manual-journals.mjs b/components/xero_accounting_api/actions/list-manual-journals/list-manual-journals.mjs index cb70d38fdfdc0..a79c720296f11 100644 --- a/components/xero_accounting_api/actions/list-manual-journals/list-manual-journals.mjs +++ b/components/xero_accounting_api/actions/list-manual-journals/list-manual-journals.mjs @@ -4,7 +4,7 @@ export default { key: "xero_accounting_api-list-manual-journals", name: "List Manual Journals", description: "Lists information from manual journals in the given tenant id as per filter parameters.", - version: "0.2.1", + version: "0.2.2", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/list-tracking-categories/list-tracking-categories.mjs b/components/xero_accounting_api/actions/list-tracking-categories/list-tracking-categories.mjs index 3590eba563b74..e59dd19303eda 100644 --- a/components/xero_accounting_api/actions/list-tracking-categories/list-tracking-categories.mjs +++ b/components/xero_accounting_api/actions/list-tracking-categories/list-tracking-categories.mjs @@ -4,7 +4,7 @@ export default { key: "xero_accounting_api-list-tracking-categories", name: "List tracking categories", description: "Lists information from tracking categories [See the documentation](https://developer.xero.com/documentation/api/accounting/trackingcategories).", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/make-an-api-call/make-an-api-call.mjs b/components/xero_accounting_api/actions/make-an-api-call/make-an-api-call.mjs index f9e530e8b1f76..494543a0c8935 100644 --- a/components/xero_accounting_api/actions/make-an-api-call/make-an-api-call.mjs +++ b/components/xero_accounting_api/actions/make-an-api-call/make-an-api-call.mjs @@ -6,7 +6,7 @@ export default { key: "xero_accounting_api-make-an-api-call", name: "Make API Call", description: "Makes an aribitrary call to Xero Accounting API.", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/update-tracking-category-option/update-tracking-category-option.mjs b/components/xero_accounting_api/actions/update-tracking-category-option/update-tracking-category-option.mjs index 1c34f0474147a..542d3fb96b2bd 100644 --- a/components/xero_accounting_api/actions/update-tracking-category-option/update-tracking-category-option.mjs +++ b/components/xero_accounting_api/actions/update-tracking-category-option/update-tracking-category-option.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-update-tracking-category-option", name: "Update tracking category option", description: "Update a tracking category by ID [See the documentation](https://developer.xero.com/documentation/api/accounting/trackingcategories#post-trackingcategories).", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/update-tracking-category/update-tracking-category.mjs b/components/xero_accounting_api/actions/update-tracking-category/update-tracking-category.mjs index 69d65d6165012..05a695c382d97 100644 --- a/components/xero_accounting_api/actions/update-tracking-category/update-tracking-category.mjs +++ b/components/xero_accounting_api/actions/update-tracking-category/update-tracking-category.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-update-tracking-category", name: "Update tracking category", description: "Update a tracking category by ID [See the documentation](https://developer.xero.com/documentation/api/accounting/trackingcategories#post-trackingcategories).", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/upload-file/upload-file.mjs b/components/xero_accounting_api/actions/upload-file/upload-file.mjs index 670a164179d36..99f042f626405 100644 --- a/components/xero_accounting_api/actions/upload-file/upload-file.mjs +++ b/components/xero_accounting_api/actions/upload-file/upload-file.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-upload-file", name: "Upload File", description: "Uploads a file to the specified document. [See the documentation](https://developer.xero.com/documentation/api/accounting/invoices#upload-attachment)", - version: "1.0.3", + version: "1.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/xero-accounting-create-employee/xero-accounting-create-employee.mjs b/components/xero_accounting_api/actions/xero-accounting-create-employee/xero-accounting-create-employee.mjs index 929790a733f92..fa60b3a1a410b 100644 --- a/components/xero_accounting_api/actions/xero-accounting-create-employee/xero-accounting-create-employee.mjs +++ b/components/xero_accounting_api/actions/xero-accounting-create-employee/xero-accounting-create-employee.mjs @@ -6,7 +6,7 @@ export default { key: "xero_accounting_api-xero-accounting-create-employee", name: "Create Employee", description: "Creates a new employee.", - version: "0.3.3", + version: "0.3.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/xero_accounting_api/actions/xero-accounting-create-or-update-contact/xero-accounting-create-or-update-contact.mjs b/components/xero_accounting_api/actions/xero-accounting-create-or-update-contact/xero-accounting-create-or-update-contact.mjs index e2c6e6a7f4816..90e32cbc5bdbc 100644 --- a/components/xero_accounting_api/actions/xero-accounting-create-or-update-contact/xero-accounting-create-or-update-contact.mjs +++ b/components/xero_accounting_api/actions/xero-accounting-create-or-update-contact/xero-accounting-create-or-update-contact.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-xero-accounting-create-or-update-contact", name: "Create or Update Contact", description: "Creates a new contact or updates if the contact exists.", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: true, openWorldHint: true, @@ -27,9 +27,13 @@ export default { optional: true, }, contactId: { - label: "Contact ID", - type: "string", - description: "Xero identifier.", + propDefinition: [ + xeroAccountingApi, + "contactId", + (c) => ({ + tenantId: c.tenantId, + }), + ], optional: true, }, contactNumber: { @@ -58,7 +62,7 @@ export default { firstName: { label: "First Name", type: "string", - description: "First name of contact person (max length = 255).", + description: "First name of contact person (max length = 255)", optional: true, }, lastName: { @@ -76,13 +80,13 @@ export default { skypeUserName: { label: "Skype User Name", type: "string", - description: "Skype user name of contact.", + description: "Skype user name of contact", optional: true, }, contactPersons: { label: "Contact Persons", type: "any", - description: "See [contact persons](https://developer.xero.com/documentation/api/contacts#contact-persons).", + description: "See [contact persons](https://developer.xero.com/documentation/api/contacts#contact-persons)", optional: true, }, bankAccountDetails: { @@ -118,7 +122,7 @@ export default { phones: { label: "Phones", type: "any", - description: "Store certain phone types for a contact - see phone types.", + description: "Store certain phone types for a contact - see phone types", optional: true, }, isSupplier: { @@ -142,7 +146,7 @@ export default { xeroNetworkKey: { label: "Xero Network Key", type: "string", - description: "Store XeroNetworkKey for contacts.", + description: "Store XeroNetworkKey for contacts", optional: true, }, salesDefaultAccountCode: { diff --git a/components/xero_accounting_api/actions/xero-accounting-update-contact/xero-accounting-update-contact.mjs b/components/xero_accounting_api/actions/xero-accounting-update-contact/xero-accounting-update-contact.mjs index 099eb4579fdaa..af530af5bc7e6 100644 --- a/components/xero_accounting_api/actions/xero-accounting-update-contact/xero-accounting-update-contact.mjs +++ b/components/xero_accounting_api/actions/xero-accounting-update-contact/xero-accounting-update-contact.mjs @@ -6,7 +6,7 @@ export default { key: "xero_accounting_api-xero-accounting-update-contact", name: "Update Contact", description: "Updates a contact given its identifier.", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: true, openWorldHint: true, @@ -22,9 +22,14 @@ export default { ], }, contactId: { - label: "Contact ID", - type: "string", - description: "Contact identifier of the contact to update.", + propDefinition: [ + xeroAccountingApi, + "contactId", + (c) => ({ + tenantId: c.tenantId, + }), + ], + description: "Contact identifier of the contact to update", }, name: { label: "Name", @@ -58,7 +63,7 @@ export default { firstName: { label: "First Name", type: "string", - description: "First name of contact person (max length = 255).", + description: "First name of contact person (max length = 255)", optional: true, }, lastName: { @@ -76,13 +81,13 @@ export default { skypeUserName: { label: "Skype User Name", type: "string", - description: "Skype user name of contact.", + description: "Skype user name of contact", optional: true, }, contactPersons: { label: "Contact Persons", type: "any", - description: "See [contact persons](https://developer.xero.com/documentation/api/contacts#contact-persons).", + description: "See [contact persons](https://developer.xero.com/documentation/api/contacts#contact-persons)", optional: true, }, bankAccountDetails: { @@ -118,7 +123,7 @@ export default { phones: { label: "Phones", type: "any", - description: "Store certain phone types for a contact - see phone types.", + description: "Store certain phone types for a contact - see phone types", optional: true, }, isSupplier: { @@ -142,7 +147,7 @@ export default { xeroNetworkKey: { label: "Xero Network Key", type: "string", - description: "Store XeroNetworkKey for contacts.", + description: "Store XeroNetworkKey for contacts", optional: true, }, salesDefaultAccountCode: { diff --git a/components/xero_accounting_api/actions/xero-create-purchase-bill/xero-create-purchase-bill.mjs b/components/xero_accounting_api/actions/xero-create-purchase-bill/xero-create-purchase-bill.mjs index eac5f23036f9c..ce9a2ea9f4c18 100644 --- a/components/xero_accounting_api/actions/xero-create-purchase-bill/xero-create-purchase-bill.mjs +++ b/components/xero_accounting_api/actions/xero-create-purchase-bill/xero-create-purchase-bill.mjs @@ -6,7 +6,7 @@ export default { key: "xero_accounting_api-xero-create-purchase-bill", name: "Create Purchase Bill", description: "Creates a new purchase bill.", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: false, openWorldHint: true, @@ -22,9 +22,14 @@ export default { ], }, contactId: { - label: "Contact ID", - type: "string", - description: "Id of the contact associated to the invoice.", + propDefinition: [ + xeroAccountingApi, + "contactId", + (c) => ({ + tenantId: c.tenantId, + }), + ], + description: "ID of the contact associated to the invoice.", optional: true, }, contactName: { @@ -141,7 +146,7 @@ export default { }, }); - $.export("$summary", `Successfully created purchase bill with ID: ${response.PurchaseBillID}`); + $.export("$summary", `Successfully created purchase bill with ID: ${response.Invoices[0].InvoiceID}`); return response; }, }; diff --git a/components/xero_accounting_api/actions/xero-create-sales-invoice/xero-create-sales-invoice.mjs b/components/xero_accounting_api/actions/xero-create-sales-invoice/xero-create-sales-invoice.mjs index dda9051d1ef3d..7b7dee18d5d1f 100644 --- a/components/xero_accounting_api/actions/xero-create-sales-invoice/xero-create-sales-invoice.mjs +++ b/components/xero_accounting_api/actions/xero-create-sales-invoice/xero-create-sales-invoice.mjs @@ -6,7 +6,7 @@ export default { key: "xero_accounting_api-xero-create-sales-invoice", name: "Create Sales Invoice", description: "Creates a new sales invoice. [See the documentation](https://developer.xero.com/documentation/api/invoices#post)", - version: "0.3.4", + version: "0.3.5", annotations: { destructiveHint: false, openWorldHint: true, @@ -22,23 +22,14 @@ export default { ], }, contactId: { - type: "string", - label: "Contact", - description: "Id of the contact associated to the invoice.", - async options() { - if (!this.tenantId) { - return []; - } - const { Contacts: contacts } = await this.xero.getContact({ - tenantId: this.tenantId, - }); - return contacts?.map(({ - ContactID: value, Name: label, - }) => ({ - value, - label, - })) || []; - }, + propDefinition: [ + xero, + "contactId", + (c) => ({ + tenantId: c.tenantId, + }), + ], + description: "ID of the contact associated to the invoice.", optional: true, }, contactName: { diff --git a/components/xero_accounting_api/package.json b/components/xero_accounting_api/package.json index 68efa42e0107e..7c224bd1da715 100644 --- a/components/xero_accounting_api/package.json +++ b/components/xero_accounting_api/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/xero_accounting_api", - "version": "0.4.0", + "version": "0.5.0", "description": "Pipedream Xero Components", "main": "xero_accounting_api.app.mjs", "keywords": [ diff --git a/components/xero_accounting_api/sources/common/base-polling.mjs b/components/xero_accounting_api/sources/common/base-polling.mjs new file mode 100644 index 0000000000000..634558a3112b2 --- /dev/null +++ b/components/xero_accounting_api/sources/common/base-polling.mjs @@ -0,0 +1,21 @@ +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; + +export default { + props: { + xeroAccountingApi, + db: "$.service.db", + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + tenantId: { + propDefinition: [ + xeroAccountingApi, + "tenantId", + ], + }, + }, +}; diff --git a/components/xero_accounting_api/sources/new-or-updated-quote/new-or-updated-quote.mjs b/components/xero_accounting_api/sources/new-or-updated-quote/new-or-updated-quote.mjs new file mode 100644 index 0000000000000..6703eaaba8442 --- /dev/null +++ b/components/xero_accounting_api/sources/new-or-updated-quote/new-or-updated-quote.mjs @@ -0,0 +1,39 @@ +import common from "../common/base-polling.mjs"; +import { formatJsonDate } from "../../common/util.mjs"; + +export default { + ...common, + key: "xero_accounting_api-new-or-updated-quote", + name: "New or Updated Quote", + description: "Emit new event each time a quote is added or updated. [See the documentation](https://developer.xero.com/documentation/api/accounting/quotes)", + version: "0.0.1", + type: "source", + dedupe: "unique", + async run() { + let lastDateChecked = this.xeroAccountingApi.getLastDateChecked(this.db); + + if (!lastDateChecked) { + lastDateChecked = new Date().toISOString(); + this.xeroAccountingApi.setLastDateChecked(this.db, lastDateChecked); + } + + const { Quotes: quotes } = await this.xeroAccountingApi.listQuotes({ + tenantId: this.tenantId, + modifiedSince: lastDateChecked.slice(0, 10), + headers: { + Accept: "application/json", + }, + }); + + quotes && quotes.reverse().forEach((quote) => { + const formattedDate = formatJsonDate(quote.UpdatedDateUTC); + this.xeroAccountingApi.setLastDateChecked(this.db, formattedDate); + this.$emit(quote, + { + id: `${quote.QuoteID}D${formattedDate || ""}`, + summary: `Quote Number: ${quote.QuoteNumber}`, + ts: Date.parse(quote.DateString), + }); + }); + }, +}; diff --git a/components/xero_accounting_api/sources/new-updated-contact/new-updated-contact.mjs b/components/xero_accounting_api/sources/new-updated-contact/new-updated-contact.mjs index 8df1eb1677c6d..5d1fcae814f45 100644 --- a/components/xero_accounting_api/sources/new-updated-contact/new-updated-contact.mjs +++ b/components/xero_accounting_api/sources/new-updated-contact/new-updated-contact.mjs @@ -1,31 +1,13 @@ -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import common from "../common/base-polling.mjs"; import { formatJsonDate } from "../../common/util.mjs"; -import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; export default { + ...common, key: "xero_accounting_api-new-updated-contact", - name: "New or updated contact", + name: "New or Updated Contact", description: "Emit new notifications when you create a new or update existing contact", - version: "0.0.4", + version: "0.0.5", type: "source", - props: { - xeroAccountingApi, - tenantId: { - propDefinition: [ - xeroAccountingApi, - "tenantId", - ], - }, - timer: { - label: "Polling interval", - description: "Pipedream will poll Xero accounting API on this schedule", - type: "$.interface.timer", - default: { - intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, - }, - }, - db: "$.service.db", - }, dedupe: "unique", async run() { let lastDateChecked = this.xeroAccountingApi.getLastDateChecked(this.db); @@ -37,7 +19,10 @@ export default { const contacts = ( await this.xeroAccountingApi.getContact({ tenantId: this.tenantId, - modifiedSince: lastDateChecked, + modifiedSince: lastDateChecked.slice(0, 10), + headers: { + Accept: "application/json", + }, }) )?.Contacts; contacts && contacts.reverse().forEach((contact) => { @@ -47,6 +32,7 @@ export default { { id: `${contact.ContactID}D${formattedDate || ""}`, summary: contact.Name, + ts: Date.parse(contact.DateString), }); }); }, diff --git a/components/xero_accounting_api/sources/new-updated-invoice/new-updated-invoice.mjs b/components/xero_accounting_api/sources/new-updated-invoice/new-updated-invoice.mjs index 6352c5ff0ff11..5e6e09c04acd2 100644 --- a/components/xero_accounting_api/sources/new-updated-invoice/new-updated-invoice.mjs +++ b/components/xero_accounting_api/sources/new-updated-invoice/new-updated-invoice.mjs @@ -1,31 +1,13 @@ -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; import { formatJsonDate } from "../../common/util.mjs"; -import xeroAccountingApi from "../../xero_accounting_api.app.mjs"; +import common from "../common/base-polling.mjs"; export default { + ...common, key: "xero_accounting_api-new-updated-invoice", name: "New or updated invoice", description: "Emit new notifications when you create a new or update existing invoice", - version: "0.0.4", + version: "0.0.5", type: "source", - props: { - xeroAccountingApi, - tenantId: { - propDefinition: [ - xeroAccountingApi, - "tenantId", - ], - }, - timer: { - label: "Polling interval", - description: "Pipedream will poll Xero accounting API on this schedule", - type: "$.interface.timer", - default: { - intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, - }, - }, - db: "$.service.db", - }, dedupe: "unique", async run() { let lastDateChecked = this.xeroAccountingApi.getLastDateChecked(this.db); @@ -38,7 +20,10 @@ export default { const invoices = ( await this.xeroAccountingApi.getInvoice({ tenantId: this.tenantId, - modifiedSince: lastDateChecked, + modifiedSince: lastDateChecked.slice(0, 10), + headers: { + Accept: "application/json", + }, }) )?.Invoices; invoices && @@ -48,6 +33,7 @@ export default { this.$emit(invoice, { id: `${invoice.InvoiceID}D${formattedDate || ""}`, summary: invoice.InvoiceID, + ts: Date.parse(invoice.DateString), }); }); }, diff --git a/components/xero_accounting_api/sources/webhook-event-received/webhook-event-received.mjs b/components/xero_accounting_api/sources/webhook-event-received/webhook-event-received.mjs index 17975dd13471e..e42445b59fe17 100644 --- a/components/xero_accounting_api/sources/webhook-event-received/webhook-event-received.mjs +++ b/components/xero_accounting_api/sources/webhook-event-received/webhook-event-received.mjs @@ -5,7 +5,7 @@ export default { key: "xero_accounting_api-webhook-event-received", name: "Webhook Event Received (Instant)", description: "Emit new event for each incoming webhook notification. To create a Xero Webhook, please follow [the instructions here](https://developer.xero.com/documentation/guides/webhooks/creating-webhooks/).", - version: "0.0.2", + version: "0.0.3", type: "source", props: { xeroAccountingApi, diff --git a/components/xero_accounting_api/xero_accounting_api.app.mjs b/components/xero_accounting_api/xero_accounting_api.app.mjs index a6e1dc32c1c9f..0babfa736e9b1 100644 --- a/components/xero_accounting_api/xero_accounting_api.app.mjs +++ b/components/xero_accounting_api/xero_accounting_api.app.mjs @@ -26,7 +26,7 @@ export default { }, trackingCategoryId: { type: "string", - label: "Tracking category ID", + label: "Tracking Category ID", description: "Unique identification of the tracking category", async options({ tenantId }) { const { TrackingCategories: trackingCategories } = await this.getTrackingCategories({ @@ -44,7 +44,7 @@ export default { }, trackingOptionId: { type: "string", - label: "Tracking option ID", + label: "Tracking Option ID", description: "Unique identification of the tracking option", async options({ tenantId, trackingCategoryId, @@ -72,9 +72,30 @@ export default { }); }, }, + contactId: { + type: "string", + label: "Contact ID", + description: "Unique identification of the contact", + async options({ + tenantId, page, + }) { + const { Contacts: contacts } = await this.getContact({ + tenantId, + params: { + page: page + 1, + }, + }); + return contacts?.map(({ + ContactID: value, Name: label, + }) => ({ + label, + value, + })) || []; + }, + }, lineItems: { type: "string[]", - label: "Line items", + label: "Line Items", description: "The LineItems collection can contain any number of individual LineItem sub-elements. At least one is required to create a complete Invoice. [Refer to Tax Type](https://developer.xero.com/documentation/api/accounting/types#report-tax-types), [Refer to Line Items](https://developer.xero.com/documentation/api/accounting/invoices#creating-updating-and-deleting-line-items-when-updating-invoices)\n\n**Example:** `[{\"Description\":\"Football\", \"Quantity\":\"20\", \"UnitAmount\":\"50000\", \"TaxType\":\"OUTPUT\" }]`", }, }, @@ -388,5 +409,11 @@ export default { ...opts, }); }, + listQuotes(opts = {}) { + return this._makeRequest({ + path: "/Quotes", + ...opts, + }); + }, }, };