diff --git a/components/quickbooks/actions/create-ap-aging-report/create-ap-aging-report.mjs b/components/quickbooks/actions/create-ap-aging-report/create-ap-aging-report.mjs index f9b5c51383f90..34f20e82cea77 100644 --- a/components/quickbooks/actions/create-ap-aging-report/create-ap-aging-report.mjs +++ b/components/quickbooks/actions/create-ap-aging-report/create-ap-aging-report.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-create-ap-aging-report", name: "Create AP Aging Detail Report", description: "Creates an AP aging report in Quickbooks Online. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/apagingdetail#query-a-report)", - version: "0.0.4", + version: "0.0.5", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-bill/create-bill.mjs b/components/quickbooks/actions/create-bill/create-bill.mjs index be455097b90ac..1c5e660e5774d 100644 --- a/components/quickbooks/actions/create-bill/create-bill.mjs +++ b/components/quickbooks/actions/create-bill/create-bill.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-create-bill", name: "Create Bill", description: "Creates a bill. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/bill#create-a-bill)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-customer/create-customer.mjs b/components/quickbooks/actions/create-customer/create-customer.mjs index b0a4dfa530af7..40fae539fe4d3 100644 --- a/components/quickbooks/actions/create-customer/create-customer.mjs +++ b/components/quickbooks/actions/create-customer/create-customer.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-create-customer", name: "Create Customer", description: "Creates a customer. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/customer#create-a-customer)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-estimate/create-estimate.mjs b/components/quickbooks/actions/create-estimate/create-estimate.mjs index bf167149333c5..8e82f286beef9 100644 --- a/components/quickbooks/actions/create-estimate/create-estimate.mjs +++ b/components/quickbooks/actions/create-estimate/create-estimate.mjs @@ -9,7 +9,7 @@ export default { key: "quickbooks-create-estimate", name: "Create Estimate", description: "Creates an estimate. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/estimate#create-an-estimate)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-invoice/create-invoice.mjs b/components/quickbooks/actions/create-invoice/create-invoice.mjs index e8248d0ec6d5b..5c43230644429 100644 --- a/components/quickbooks/actions/create-invoice/create-invoice.mjs +++ b/components/quickbooks/actions/create-invoice/create-invoice.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-create-invoice", name: "Create Invoice", description: "Creates an invoice. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#create-an-invoice)", - version: "0.2.3", + version: "0.2.4", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-payment/create-payment.mjs b/components/quickbooks/actions/create-payment/create-payment.mjs index 6cd876ad1b196..be15215d7ec98 100644 --- a/components/quickbooks/actions/create-payment/create-payment.mjs +++ b/components/quickbooks/actions/create-payment/create-payment.mjs @@ -4,7 +4,7 @@ export default { key: "quickbooks-create-payment", name: "Create Payment", description: "Creates a payment. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/payment#create-a-payment)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-pl-report/create-pl-report.mjs b/components/quickbooks/actions/create-pl-report/create-pl-report.mjs index 664ab68073ebb..d6d7511816a6e 100644 --- a/components/quickbooks/actions/create-pl-report/create-pl-report.mjs +++ b/components/quickbooks/actions/create-pl-report/create-pl-report.mjs @@ -7,7 +7,7 @@ export default { key: "quickbooks-create-pl-report", name: "Create Profit and Loss Detail Report", description: "Creates a profit and loss report in Quickbooks Online. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/profitandloss#query-a-report)", - version: "0.0.4", + version: "0.0.5", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-purchase-order/create-purchase-order.mjs b/components/quickbooks/actions/create-purchase-order/create-purchase-order.mjs index 10b2d5b959ed2..66ce81832c590 100644 --- a/components/quickbooks/actions/create-purchase-order/create-purchase-order.mjs +++ b/components/quickbooks/actions/create-purchase-order/create-purchase-order.mjs @@ -9,18 +9,27 @@ export default { key: "quickbooks-create-purchase-order", name: "Create Purchase Order", description: "Creates a purchase order. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchaseorder#create-a-purchaseorder)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { quickbooks, accountId: { - propDefinition: [ - quickbooks, - "accountIds", - ], type: "string", label: "Account ID", description: "The ID of the account to use for the purchase order", + async options() { + const { QueryResponse: queryResponse } = await this.quickbooks.query({ + params: { + query: "select * from Account where Classification = 'Liability' AND AccountSubType = 'AccountsPayable'", + }, + }); + return queryResponse.Account.map(({ + Id, Name, + }) => ({ + value: Id, + label: Name, + })); + }, }, vendorRefValue: { propDefinition: [ @@ -102,7 +111,7 @@ export default { props.lineItems = { type: "string[]", label: "Line Items", - description: "Line items of a purchase order. Set DetailType to `ItemBasedExpenseLineDetail` or `AccountBasedExpenseLineDetail`. Example: `{ \"DetailType\": \"ItemBasedExpenseLineDetail\", \"Amount\": 100.0, \"ItemBasedExpenseLineDetail\": { \"ItemRef\": { \"name\": \"Services\", \"value\": \"1\" } } }` [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchaseorder#create-a-purchaseorder) for more information.", + description: "Line items of a purchase order. DetailType is `ItemBasedExpenseLineDetail`. Example: `{ \"DetailType\": \"ItemBasedExpenseLineDetail\", \"Amount\": 100.0, \"ItemBasedExpenseLineDetail\": { \"ItemRef\": { \"name\": \"Services\", \"value\": \"1\" } } }` [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchaseorder#create-a-purchaseorder) for more information.", }; return props; } @@ -116,35 +125,26 @@ export default { return props; } for (let i = 1; i <= this.numLineItems; i++) { - props[`detailType_${i}`] = { - type: "string", - label: `Line ${i} - Detail Type`, - options: [ - { - label: "Item Based Expense", - value: "ItemBasedExpenseLineDetail", - }, - { - label: "Account Based Expense", - value: "AccountBasedExpenseLineDetail", - }, - ], - default: "ItemBasedExpenseLineDetail", - }; props[`item_${i}`] = { type: "string", label: `Line ${i} - Item/Account ID`, options: async ({ page }) => { - return this.quickbooks.getPropOptions({ + const options = await this.quickbooks.getPropOptions({ page, resource: "Item", mapper: ({ - Id: value, Name: label, - }) => ({ - value, - label, - }), + Id: value, Name: label, ExpenseAccountRef, + }) => { + if (ExpenseAccountRef) { + return { + value, + label, + }; + } + return null; + }, }); + return options.filter((option) => option !== null); }, }; props[`amount_${i}`] = { @@ -180,12 +180,6 @@ export default { throw new ConfigurationError("No valid line items were provided."); } - lines.forEach((line, index) => { - if (line.DetailType !== "ItemBasedExpenseLineDetail" && line.DetailType !== "AccountBasedExpenseLineDetail") { - throw new ConfigurationError(`Line Item at index ${index + 1} has invalid DetailType '${line.DetailType}'. Must be 'ItemBasedExpenseLineDetail' or 'AccountBasedExpenseLineDetail'`); - } - }); - const hasShippingAddress = this.shippingStreetAddress || this.shippingCity || this.shippingState diff --git a/components/quickbooks/actions/create-purchase/create-purchase.mjs b/components/quickbooks/actions/create-purchase/create-purchase.mjs index cd81546038d88..eebe47052d2e9 100644 --- a/components/quickbooks/actions/create-purchase/create-purchase.mjs +++ b/components/quickbooks/actions/create-purchase/create-purchase.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-create-purchase", name: "Create Purchase", description: "Creates a new purchase. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#create-a-purchase)", - version: "0.0.7", + version: "0.0.8", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/create-sales-receipt/create-sales-receipt.mjs b/components/quickbooks/actions/create-sales-receipt/create-sales-receipt.mjs index 6e121d79b38ec..6dfdb4dc40012 100644 --- a/components/quickbooks/actions/create-sales-receipt/create-sales-receipt.mjs +++ b/components/quickbooks/actions/create-sales-receipt/create-sales-receipt.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-create-sales-receipt", name: "Create Sales Receipt", description: "Creates a sales receipt. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/salesreceipt#create-a-salesreceipt)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/delete-purchase/delete-purchase.mjs b/components/quickbooks/actions/delete-purchase/delete-purchase.mjs index 575cc1c939212..7e8a3297cedf1 100644 --- a/components/quickbooks/actions/delete-purchase/delete-purchase.mjs +++ b/components/quickbooks/actions/delete-purchase/delete-purchase.mjs @@ -4,7 +4,7 @@ export default { key: "quickbooks-delete-purchase", name: "Delete Purchase", description: "Delete a specific purchase. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#delete-a-purchase)", - version: "0.0.7", + version: "0.0.8", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-bill/get-bill.mjs b/components/quickbooks/actions/get-bill/get-bill.mjs index 628a47c560960..6847ca62b2867 100644 --- a/components/quickbooks/actions/get-bill/get-bill.mjs +++ b/components/quickbooks/actions/get-bill/get-bill.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-bill", name: "Get Bill", description: "Returns info about a bill. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/bill#read-a-bill)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-customer/get-customer.mjs b/components/quickbooks/actions/get-customer/get-customer.mjs index a8623e2c87c18..10678c8c67031 100644 --- a/components/quickbooks/actions/get-customer/get-customer.mjs +++ b/components/quickbooks/actions/get-customer/get-customer.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-customer", name: "Get Customer", description: "Returns info about a customer. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/most-commonly-used/customer#read-a-customer)", - version: "0.3.9", + version: "0.3.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-invoice/get-invoice.mjs b/components/quickbooks/actions/get-invoice/get-invoice.mjs index 1048d1e41905a..c9f39028e5eb0 100644 --- a/components/quickbooks/actions/get-invoice/get-invoice.mjs +++ b/components/quickbooks/actions/get-invoice/get-invoice.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-invoice", name: "Get Invoice", description: "Returns info about an invoice. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#read-an-invoice)", - version: "0.2.10", + version: "0.2.11", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-my-company/get-my-company.mjs b/components/quickbooks/actions/get-my-company/get-my-company.mjs index c5d757f5d1985..6ac75ab5dc644 100644 --- a/components/quickbooks/actions/get-my-company/get-my-company.mjs +++ b/components/quickbooks/actions/get-my-company/get-my-company.mjs @@ -4,7 +4,7 @@ export default { key: "quickbooks-get-my-company", name: "Get My Company", description: "Gets info about a company. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/companyinfo)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-payment/get-payment.mjs b/components/quickbooks/actions/get-payment/get-payment.mjs index 017395168ad1a..150f8b9332104 100644 --- a/components/quickbooks/actions/get-payment/get-payment.mjs +++ b/components/quickbooks/actions/get-payment/get-payment.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-payment", name: "Get Payment", description: "Returns info about a payment. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/payment#read-a-payment)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-purchase-order/get-purchase-order.mjs b/components/quickbooks/actions/get-purchase-order/get-purchase-order.mjs index e7d4bfd2dbad6..a2c80ec93ed13 100644 --- a/components/quickbooks/actions/get-purchase-order/get-purchase-order.mjs +++ b/components/quickbooks/actions/get-purchase-order/get-purchase-order.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-purchase-order", name: "Get Purchase Order", description: "Returns details about a purchase order. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchaseorder#read-a-purchase-order)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-purchase/get-purchase.mjs b/components/quickbooks/actions/get-purchase/get-purchase.mjs index 093e5b701fcc7..736b06aa4aa29 100644 --- a/components/quickbooks/actions/get-purchase/get-purchase.mjs +++ b/components/quickbooks/actions/get-purchase/get-purchase.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-purchase", name: "Get Purchase", description: "Returns info about a purchase. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#read-a-purchase)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-sales-receipt/get-sales-receipt.mjs b/components/quickbooks/actions/get-sales-receipt/get-sales-receipt.mjs index 8fb2eda77c7a4..6ed7ec28ecab4 100644 --- a/components/quickbooks/actions/get-sales-receipt/get-sales-receipt.mjs +++ b/components/quickbooks/actions/get-sales-receipt/get-sales-receipt.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-sales-receipt", name: "Get Sales Receipt", description: "Returns details about a sales receipt. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/salesreceipt#read-a-salesreceipt)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/get-time-activity/get-time-activity.mjs b/components/quickbooks/actions/get-time-activity/get-time-activity.mjs index 857a6992ca704..c8f9868ce917f 100644 --- a/components/quickbooks/actions/get-time-activity/get-time-activity.mjs +++ b/components/quickbooks/actions/get-time-activity/get-time-activity.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-get-time-activity", name: "Get Time Activity", description: "Returns info about an activity. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/timeactivity#read-a-timeactivity-object)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-accounts/search-accounts.mjs b/components/quickbooks/actions/search-accounts/search-accounts.mjs index 73ffc601fb58a..ccede3b3fbfb1 100644 --- a/components/quickbooks/actions/search-accounts/search-accounts.mjs +++ b/components/quickbooks/actions/search-accounts/search-accounts.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-accounts", name: "Search Accounts", description: "Search for accounts. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/account#query-an-account)", - version: "0.2.9", + version: "0.2.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-customers/search-customers.mjs b/components/quickbooks/actions/search-customers/search-customers.mjs index 473718799621d..ad0203695d30a 100644 --- a/components/quickbooks/actions/search-customers/search-customers.mjs +++ b/components/quickbooks/actions/search-customers/search-customers.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-customers", name: "Search Customers", description: "Searches for customers. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/customer#query-a-customer)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-invoices/search-invoices.mjs b/components/quickbooks/actions/search-invoices/search-invoices.mjs index 852fbe2a288d1..bcc50fe1f586c 100644 --- a/components/quickbooks/actions/search-invoices/search-invoices.mjs +++ b/components/quickbooks/actions/search-invoices/search-invoices.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-invoices", name: "Search Invoices", description: "Searches for invoices. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#query-an-invoice)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-items/search-items.mjs b/components/quickbooks/actions/search-items/search-items.mjs index 9d01b7cb40ee0..d6a91effa5da8 100644 --- a/components/quickbooks/actions/search-items/search-items.mjs +++ b/components/quickbooks/actions/search-items/search-items.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-items", name: "Search Items", description: "Searches for items. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/item#query-an-item)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-products/search-products.mjs b/components/quickbooks/actions/search-products/search-products.mjs index 89ea67d1ad2ff..a6de9b4e2cf83 100644 --- a/components/quickbooks/actions/search-products/search-products.mjs +++ b/components/quickbooks/actions/search-products/search-products.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-products", name: "Search Products", description: "Search for products. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/item#query-an-item)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-purchases/search-purchases.mjs b/components/quickbooks/actions/search-purchases/search-purchases.mjs index 39e6fe9663d38..b84768cc44570 100644 --- a/components/quickbooks/actions/search-purchases/search-purchases.mjs +++ b/components/quickbooks/actions/search-purchases/search-purchases.mjs @@ -4,7 +4,7 @@ export default { key: "quickbooks-search-purchases", name: "Search Purchases", description: "Searches for purchases. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/purchase#query-a-purchase)", - version: "0.0.7", + version: "0.0.8", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-query/search-query.mjs b/components/quickbooks/actions/search-query/search-query.mjs index 1471782c42be4..b6d30dea2c581 100644 --- a/components/quickbooks/actions/search-query/search-query.mjs +++ b/components/quickbooks/actions/search-query/search-query.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-query", name: "Search Query", description: "Performs a search query against a Quickbooks entity. [See the documentation](https://developer.intuit.com/app/develophttps://developer.intuit.com/app/developer/qbo/docs/develop/explore-the-quickbooks-online-api/data-queries)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-services/search-services.mjs b/components/quickbooks/actions/search-services/search-services.mjs index 386c050e6eab0..e8ef737065a7d 100644 --- a/components/quickbooks/actions/search-services/search-services.mjs +++ b/components/quickbooks/actions/search-services/search-services.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-services", name: "Search Services", description: "Search for services. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/item#query-an-item)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-time-activities/search-time-activities.mjs b/components/quickbooks/actions/search-time-activities/search-time-activities.mjs index 4f1866d05e727..15f5bf179072e 100644 --- a/components/quickbooks/actions/search-time-activities/search-time-activities.mjs +++ b/components/quickbooks/actions/search-time-activities/search-time-activities.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-time-activities", name: "Search Time Activities", description: "Searches for time activities. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/timeactivity#query-a-timeactivity-object)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/search-vendors/search-vendors.mjs b/components/quickbooks/actions/search-vendors/search-vendors.mjs index 7d2d5d8d6b4d6..a1722b05a3309 100644 --- a/components/quickbooks/actions/search-vendors/search-vendors.mjs +++ b/components/quickbooks/actions/search-vendors/search-vendors.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-search-vendors", name: "Search Vendors", description: "Searches for vendors. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/vendor#query-a-vendor)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/send-estimate/send-estimate.mjs b/components/quickbooks/actions/send-estimate/send-estimate.mjs index 3093556392f4b..2a10736fb484a 100644 --- a/components/quickbooks/actions/send-estimate/send-estimate.mjs +++ b/components/quickbooks/actions/send-estimate/send-estimate.mjs @@ -4,7 +4,7 @@ export default { key: "quickbooks-send-estimate", name: "Send Estimate", description: "Sends an estimate by email. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/estimate#send-an-estimate)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/send-invoice/send-invoice.mjs b/components/quickbooks/actions/send-invoice/send-invoice.mjs index 0093c41d10c54..dc24cc7181955 100644 --- a/components/quickbooks/actions/send-invoice/send-invoice.mjs +++ b/components/quickbooks/actions/send-invoice/send-invoice.mjs @@ -4,7 +4,7 @@ export default { key: "quickbooks-send-invoice", name: "Send Invoice", description: "Sends an invoice by email. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#send-an-invoice)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/sparse-update-invoice/sparse-update-invoice.mjs b/components/quickbooks/actions/sparse-update-invoice/sparse-update-invoice.mjs index de0efeabe5e2e..fbf7376ad93c4 100644 --- a/components/quickbooks/actions/sparse-update-invoice/sparse-update-invoice.mjs +++ b/components/quickbooks/actions/sparse-update-invoice/sparse-update-invoice.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-sparse-update-invoice", name: "Sparse Update Invoice", description: "Sparse updating provides the ability to update a subset of properties for a given object; only elements specified in the request are updated. Missing elements are left untouched. The ID of the object to update is specified in the request body.​ [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#sparse-update-an-invoice)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/update-customer/update-customer.mjs b/components/quickbooks/actions/update-customer/update-customer.mjs index acdcf4dae1ae8..73bd5e647452d 100644 --- a/components/quickbooks/actions/update-customer/update-customer.mjs +++ b/components/quickbooks/actions/update-customer/update-customer.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-update-customer", name: "Update Customer", description: "Updates a customer. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/customer#full-update-a-customer)", - version: "0.1.9", + version: "0.1.10", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/update-estimate/update-estimate.mjs b/components/quickbooks/actions/update-estimate/update-estimate.mjs index 906740b05db81..78302747d4380 100644 --- a/components/quickbooks/actions/update-estimate/update-estimate.mjs +++ b/components/quickbooks/actions/update-estimate/update-estimate.mjs @@ -9,7 +9,7 @@ export default { key: "quickbooks-update-estimate", name: "Update Estimate", description: "Updates an estimate. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/estimate#update-an-estimate)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/update-invoice/update-invoice.mjs b/components/quickbooks/actions/update-invoice/update-invoice.mjs index 464f7e2b5d67b..5df278ea7cdfc 100644 --- a/components/quickbooks/actions/update-invoice/update-invoice.mjs +++ b/components/quickbooks/actions/update-invoice/update-invoice.mjs @@ -9,7 +9,7 @@ export default { key: "quickbooks-update-invoice", name: "Update Invoice", description: "Updates an invoice. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#update-an-invoice)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/update-item/update-item.mjs b/components/quickbooks/actions/update-item/update-item.mjs index 97ca7402754a4..d794095954668 100644 --- a/components/quickbooks/actions/update-item/update-item.mjs +++ b/components/quickbooks/actions/update-item/update-item.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-update-item", name: "Update Item", description: "Updates an item. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/item#full-update-an-item)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { quickbooks, diff --git a/components/quickbooks/actions/void-invoice/void-invoice.mjs b/components/quickbooks/actions/void-invoice/void-invoice.mjs index 3fe697a8250a3..63a4e3f343786 100644 --- a/components/quickbooks/actions/void-invoice/void-invoice.mjs +++ b/components/quickbooks/actions/void-invoice/void-invoice.mjs @@ -5,7 +5,7 @@ export default { key: "quickbooks-void-invoice", name: "Void Invoice", description: "Voids an invoice. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#void-an-invoice)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { quickbooks, diff --git a/components/quickbooks/common/utils.mjs b/components/quickbooks/common/utils.mjs index 8b2f9a1b0921a..30aaba3ed910b 100644 --- a/components/quickbooks/common/utils.mjs +++ b/components/quickbooks/common/utils.mjs @@ -171,26 +171,9 @@ export function buildPurchaseLineItems(numLineItems, context) { throw new ConfigurationError(`Invalid amount values for: ${invalidAmounts.join(", ")}. Amounts must be valid numbers.`); } - // Validate detailType values if provided - const validDetailTypes = [ - "ItemBasedExpenseLineDetail", - "AccountBasedExpenseLineDetail", - ]; - const invalidDetailTypes = []; - for (let i = 1; i <= numLineItems; i++) { - const detailType = context[`detailType_${i}`]; - if (detailType && !validDetailTypes.includes(detailType)) { - invalidDetailTypes.push(`detailType_${i}: ${detailType}`); - } - } - - if (invalidDetailTypes.length > 0) { - throw new ConfigurationError(`Invalid detailType values for: ${invalidDetailTypes.join(", ")}. Valid types are: ${validDetailTypes.join(", ")}`); - } - const lineItems = []; for (let i = 1; i <= numLineItems; i++) { - const detailType = context[`detailType_${i}`] || "ItemBasedExpenseLineDetail"; + const detailType = "ItemBasedExpenseLineDetail"; // Extract conditional logic into clear variables const isItemBased = detailType === "ItemBasedExpenseLineDetail"; diff --git a/components/quickbooks/package.json b/components/quickbooks/package.json index c42d7faecd0f7..d00273c3b6624 100644 --- a/components/quickbooks/package.json +++ b/components/quickbooks/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/quickbooks", - "version": "0.6.0", + "version": "0.6.1", "description": "Pipedream Quickbooks Components", "main": "quickbooks.app.mjs", "keywords": [ diff --git a/components/quickbooks/sources/new-customer-created/new-customer-created.mjs b/components/quickbooks/sources/new-customer-created/new-customer-created.mjs index ec7fb31b29311..944c9d4b387fb 100644 --- a/components/quickbooks/sources/new-customer-created/new-customer-created.mjs +++ b/components/quickbooks/sources/new-customer-created/new-customer-created.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-customer-created", name: "New Customer Created", description: "Emit new event when a new customer is created.", - version: "0.0.6", + version: "0.0.7", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-customer-updated/new-customer-updated.mjs b/components/quickbooks/sources/new-customer-updated/new-customer-updated.mjs index 9ad50717b2ca6..ed858ef24e65a 100644 --- a/components/quickbooks/sources/new-customer-updated/new-customer-updated.mjs +++ b/components/quickbooks/sources/new-customer-updated/new-customer-updated.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-customer-updated", name: "New Customer Updated", description: "Emit new event when a customer is updated.", - version: "0.0.6", + version: "0.0.7", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-employee-created/new-employee-created.mjs b/components/quickbooks/sources/new-employee-created/new-employee-created.mjs index 02530898c4660..78504b6a97c32 100644 --- a/components/quickbooks/sources/new-employee-created/new-employee-created.mjs +++ b/components/quickbooks/sources/new-employee-created/new-employee-created.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-employee-created", name: "New Employee Created", description: "Emit new event when a new employee is created.", - version: "0.0.4", + version: "0.0.5", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-employee-updated/new-employee-updated.mjs b/components/quickbooks/sources/new-employee-updated/new-employee-updated.mjs index 3d1a03d86b4f3..b6479ebd2b505 100644 --- a/components/quickbooks/sources/new-employee-updated/new-employee-updated.mjs +++ b/components/quickbooks/sources/new-employee-updated/new-employee-updated.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-employee-updated", name: "New Employee Updated", description: "Emit new event when an employee is updated.", - version: "0.0.4", + version: "0.0.5", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-invoice-created/new-invoice-created.mjs b/components/quickbooks/sources/new-invoice-created/new-invoice-created.mjs index f43afbdf65ad6..5ffa6c087dab4 100644 --- a/components/quickbooks/sources/new-invoice-created/new-invoice-created.mjs +++ b/components/quickbooks/sources/new-invoice-created/new-invoice-created.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-invoice-created", name: "New Invoice Created", description: "Emit new event when a new invoice is created.", - version: "0.0.6", + version: "0.0.7", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-invoice-updated/new-invoice-updated.mjs b/components/quickbooks/sources/new-invoice-updated/new-invoice-updated.mjs index 7744a2232ff6c..c566d19f5e849 100644 --- a/components/quickbooks/sources/new-invoice-updated/new-invoice-updated.mjs +++ b/components/quickbooks/sources/new-invoice-updated/new-invoice-updated.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-invoice-updated", name: "New Invoice Updated", description: "Emit new event when an invoice is updated.", - version: "0.0.6", + version: "0.0.7", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-item-created/new-item-created.mjs b/components/quickbooks/sources/new-item-created/new-item-created.mjs index faf6739009b74..8aa868989b2cf 100644 --- a/components/quickbooks/sources/new-item-created/new-item-created.mjs +++ b/components/quickbooks/sources/new-item-created/new-item-created.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-item-created", name: "New Item Created", description: "Emit new event when a new item is created.", - version: "0.0.6", + version: "0.0.7", type: "source", dedupe: "unique", methods: { diff --git a/components/quickbooks/sources/new-item-updated/new-item-updated.mjs b/components/quickbooks/sources/new-item-updated/new-item-updated.mjs index a2c6cdfe1ef45..ecbc2c0f84a00 100644 --- a/components/quickbooks/sources/new-item-updated/new-item-updated.mjs +++ b/components/quickbooks/sources/new-item-updated/new-item-updated.mjs @@ -6,7 +6,7 @@ export default { key: "quickbooks-new-item-updated", name: "New Item Updated", description: "Emit new event when an item is updated.", - version: "0.0.6", + version: "0.0.7", type: "source", dedupe: "unique", methods: {