qubesync 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/LICENSE +21 -0
  3. package/README.md +324 -2
  4. package/client.js +660 -0
  5. package/index.d.ts +367 -0
  6. package/index.js +409 -0
  7. package/index.mjs +22 -0
  8. package/operations/account.d.ts +263 -0
  9. package/operations/account.js +50 -0
  10. package/operations/account_tax_line_info.d.ts +31 -0
  11. package/operations/account_tax_line_info.js +26 -0
  12. package/operations/aging_report.d.ts +100 -0
  13. package/operations/aging_report.js +26 -0
  14. package/operations/alert.d.ts +118 -0
  15. package/operations/alert.js +50 -0
  16. package/operations/ar_refund_credit_card.d.ts +201 -0
  17. package/operations/ar_refund_credit_card.js +38 -0
  18. package/operations/bar_code.d.ts +40 -0
  19. package/operations/bar_code.js +26 -0
  20. package/operations/bill.d.ts +612 -0
  21. package/operations/bill.js +50 -0
  22. package/operations/bill_payment_check.d.ts +276 -0
  23. package/operations/bill_payment_check.js +50 -0
  24. package/operations/bill_payment_credit_card.d.ts +178 -0
  25. package/operations/bill_payment_credit_card.js +38 -0
  26. package/operations/bill_to_pay.d.ts +54 -0
  27. package/operations/bill_to_pay.js +26 -0
  28. package/operations/billing_rate.d.ts +159 -0
  29. package/operations/billing_rate.js +38 -0
  30. package/operations/budget_summary_report.d.ts +71 -0
  31. package/operations/budget_summary_report.js +26 -0
  32. package/operations/build_assembly.d.ts +264 -0
  33. package/operations/build_assembly.js +50 -0
  34. package/operations/charge.d.ts +330 -0
  35. package/operations/charge.js +50 -0
  36. package/operations/check.d.ts +394 -0
  37. package/operations/check.js +50 -0
  38. package/operations/class.d.ts +170 -0
  39. package/operations/class.js +50 -0
  40. package/operations/cleared_status.d.ts +43 -0
  41. package/operations/cleared_status.js +26 -0
  42. package/operations/client.d.ts +254 -0
  43. package/operations/company.d.ts +36 -0
  44. package/operations/company.js +26 -0
  45. package/operations/company_activity.d.ts +32 -0
  46. package/operations/company_activity.js +26 -0
  47. package/operations/credit_card_charge.d.ts +280 -0
  48. package/operations/credit_card_charge.js +50 -0
  49. package/operations/credit_card_credit.d.ts +280 -0
  50. package/operations/credit_card_credit.js +50 -0
  51. package/operations/credit_memo.d.ts +642 -0
  52. package/operations/credit_memo.js +50 -0
  53. package/operations/currency.d.ts +195 -0
  54. package/operations/currency.js +50 -0
  55. package/operations/custom_detail_report.d.ts +108 -0
  56. package/operations/custom_detail_report.js +26 -0
  57. package/operations/custom_summary_report.d.ts +119 -0
  58. package/operations/custom_summary_report.js +26 -0
  59. package/operations/customer.d.ts +639 -0
  60. package/operations/customer.js +50 -0
  61. package/operations/customer_msg.d.ts +121 -0
  62. package/operations/customer_msg.js +38 -0
  63. package/operations/customer_type.d.ts +127 -0
  64. package/operations/customer_type.js +38 -0
  65. package/operations/data_event_recovery_info.d.ts +61 -0
  66. package/operations/data_event_recovery_info.js +38 -0
  67. package/operations/data_ext.d.ts +197 -0
  68. package/operations/data_ext.js +50 -0
  69. package/operations/data_ext_def.d.ts +173 -0
  70. package/operations/data_ext_def.js +62 -0
  71. package/operations/date_driven_terms.d.ts +141 -0
  72. package/operations/date_driven_terms.js +38 -0
  73. package/operations/deposit.d.ts +402 -0
  74. package/operations/deposit.js +50 -0
  75. package/operations/employee.d.ts +683 -0
  76. package/operations/employee.js +50 -0
  77. package/operations/employee_default.d.ts +133 -0
  78. package/operations/employee_default.js +38 -0
  79. package/operations/entity.d.ts +96 -0
  80. package/operations/entity.js +26 -0
  81. package/operations/estimate.d.ts +590 -0
  82. package/operations/estimate.js +50 -0
  83. package/operations/form1099_category_account_mapping.d.ts +89 -0
  84. package/operations/form1099_category_account_mapping.js +38 -0
  85. package/operations/general_detail_report.d.ts +108 -0
  86. package/operations/general_detail_report.js +26 -0
  87. package/operations/general_summary_report.d.ts +115 -0
  88. package/operations/general_summary_report.js +26 -0
  89. package/operations/host.d.ts +43 -0
  90. package/operations/host.js +26 -0
  91. package/operations/index.js +397 -0
  92. package/operations/inventory_adjustment.d.ts +389 -0
  93. package/operations/inventory_adjustment.js +50 -0
  94. package/operations/inventory_site.d.ts +247 -0
  95. package/operations/inventory_site.js +50 -0
  96. package/operations/invoice.d.ts +682 -0
  97. package/operations/invoice.js +50 -0
  98. package/operations/item.d.ts +100 -0
  99. package/operations/item.js +26 -0
  100. package/operations/item_assemblies_can_build.d.ts +41 -0
  101. package/operations/item_assemblies_can_build.js +26 -0
  102. package/operations/item_discount.d.ts +256 -0
  103. package/operations/item_discount.js +50 -0
  104. package/operations/item_fixed_asset.d.ts +382 -0
  105. package/operations/item_fixed_asset.js +50 -0
  106. package/operations/item_group.d.ts +236 -0
  107. package/operations/item_group.js +50 -0
  108. package/operations/item_inventory.d.ts +350 -0
  109. package/operations/item_inventory.js +50 -0
  110. package/operations/item_inventory_assembly.d.ts +368 -0
  111. package/operations/item_inventory_assembly.js +50 -0
  112. package/operations/item_non_inventory.d.ts +264 -0
  113. package/operations/item_non_inventory.js +50 -0
  114. package/operations/item_other_charge.d.ts +244 -0
  115. package/operations/item_other_charge.js +50 -0
  116. package/operations/item_payment.d.ts +220 -0
  117. package/operations/item_payment.js +50 -0
  118. package/operations/item_receipt.d.ts +362 -0
  119. package/operations/item_receipt.js +50 -0
  120. package/operations/item_sales_tax.d.ts +228 -0
  121. package/operations/item_sales_tax.js +50 -0
  122. package/operations/item_sales_tax_group.d.ts +192 -0
  123. package/operations/item_sales_tax_group.js +50 -0
  124. package/operations/item_service.d.ts +256 -0
  125. package/operations/item_service.js +50 -0
  126. package/operations/item_sites.d.ts +81 -0
  127. package/operations/item_sites.js +26 -0
  128. package/operations/item_subtotal.d.ts +188 -0
  129. package/operations/item_subtotal.js +50 -0
  130. package/operations/job_report.d.ts +99 -0
  131. package/operations/job_report.js +26 -0
  132. package/operations/job_type.d.ts +127 -0
  133. package/operations/job_type.js +38 -0
  134. package/operations/journal_entry.d.ts +339 -0
  135. package/operations/journal_entry.js +50 -0
  136. package/operations/lead.d.ts +291 -0
  137. package/operations/lead.js +50 -0
  138. package/operations/list.d.ts +39 -0
  139. package/operations/list.js +26 -0
  140. package/operations/list_deleted.d.ts +44 -0
  141. package/operations/list_deleted.js +26 -0
  142. package/operations/list_display.d.ts +65 -0
  143. package/operations/list_display.js +38 -0
  144. package/operations/list_merge.d.ts +58 -0
  145. package/operations/list_merge.js +26 -0
  146. package/operations/other_name.d.ts +280 -0
  147. package/operations/other_name.js +50 -0
  148. package/operations/paycheck.d.ts +82 -0
  149. package/operations/paycheck.js +26 -0
  150. package/operations/payment_method.d.ts +131 -0
  151. package/operations/payment_method.js +38 -0
  152. package/operations/payroll_detail_report.d.ts +97 -0
  153. package/operations/payroll_detail_report.js +26 -0
  154. package/operations/payroll_item.d.ts +83 -0
  155. package/operations/payroll_item.js +26 -0
  156. package/operations/payroll_item_addition.d.ts +95 -0
  157. package/operations/payroll_item_addition.js +38 -0
  158. package/operations/payroll_item_company_contribution.d.ts +105 -0
  159. package/operations/payroll_item_company_contribution.js +38 -0
  160. package/operations/payroll_item_deduction.d.ts +101 -0
  161. package/operations/payroll_item_deduction.js +38 -0
  162. package/operations/payroll_item_direct_deposit.d.ts +65 -0
  163. package/operations/payroll_item_direct_deposit.js +38 -0
  164. package/operations/payroll_item_non_wage.d.ts +92 -0
  165. package/operations/payroll_item_non_wage.js +26 -0
  166. package/operations/payroll_item_tax.d.ts +108 -0
  167. package/operations/payroll_item_tax.js +38 -0
  168. package/operations/payroll_item_wage.d.ts +169 -0
  169. package/operations/payroll_item_wage.js +50 -0
  170. package/operations/payroll_item_workers_compensation.d.ts +77 -0
  171. package/operations/payroll_item_workers_compensation.js +38 -0
  172. package/operations/payroll_last_period.d.ts +31 -0
  173. package/operations/payroll_last_period.js +26 -0
  174. package/operations/payroll_liability_adjustment.d.ts +137 -0
  175. package/operations/payroll_liability_adjustment.js +38 -0
  176. package/operations/payroll_liability_check.d.ts +82 -0
  177. package/operations/payroll_liability_check.js +26 -0
  178. package/operations/payroll_prior_payment.d.ts +126 -0
  179. package/operations/payroll_prior_payment.js +38 -0
  180. package/operations/payroll_summary_report.d.ts +107 -0
  181. package/operations/payroll_summary_report.js +26 -0
  182. package/operations/payroll_year_to_date_adjustment.d.ts +156 -0
  183. package/operations/payroll_year_to_date_adjustment.js +38 -0
  184. package/operations/preferences.d.ts +64 -0
  185. package/operations/preferences.js +38 -0
  186. package/operations/price_level.d.ts +234 -0
  187. package/operations/price_level.js +50 -0
  188. package/operations/purchase_order.d.ts +620 -0
  189. package/operations/purchase_order.js +50 -0
  190. package/operations/qb_command_exec.d.ts +49 -0
  191. package/operations/qb_command_exec.js +26 -0
  192. package/operations/receive_payment.d.ts +450 -0
  193. package/operations/receive_payment.js +50 -0
  194. package/operations/receive_payment_to_deposit.d.ts +36 -0
  195. package/operations/receive_payment_to_deposit.js +26 -0
  196. package/operations/sales_order.d.ts +612 -0
  197. package/operations/sales_order.js +50 -0
  198. package/operations/sales_receipt.d.ts +650 -0
  199. package/operations/sales_receipt.js +50 -0
  200. package/operations/sales_rep.d.ts +170 -0
  201. package/operations/sales_rep.js +50 -0
  202. package/operations/sales_tax_code.d.ts +194 -0
  203. package/operations/sales_tax_code.js +50 -0
  204. package/operations/sales_tax_payable.d.ts +42 -0
  205. package/operations/sales_tax_payable.js +26 -0
  206. package/operations/sales_tax_payment_check.d.ts +254 -0
  207. package/operations/sales_tax_payment_check.js +50 -0
  208. package/operations/sales_tax_return.d.ts +35 -0
  209. package/operations/sales_tax_return.js +26 -0
  210. package/operations/sales_tax_return_line.d.ts +36 -0
  211. package/operations/sales_tax_return_line.js +26 -0
  212. package/operations/ship_method.d.ts +121 -0
  213. package/operations/ship_method.js +38 -0
  214. package/operations/special_account.d.ts +40 -0
  215. package/operations/special_account.js +26 -0
  216. package/operations/special_item.d.ts +44 -0
  217. package/operations/special_item.js +26 -0
  218. package/operations/standard_terms.d.ts +133 -0
  219. package/operations/standard_terms.js +38 -0
  220. package/operations/template.d.ts +36 -0
  221. package/operations/template.js +26 -0
  222. package/operations/terms.d.ts +90 -0
  223. package/operations/terms.js +26 -0
  224. package/operations/time_report.d.ts +84 -0
  225. package/operations/time_report.js +26 -0
  226. package/operations/time_tracking.d.ts +214 -0
  227. package/operations/time_tracking.js +50 -0
  228. package/operations/to_do.d.ts +254 -0
  229. package/operations/to_do.js +50 -0
  230. package/operations/transaction.d.ts +244 -0
  231. package/operations/transaction.js +26 -0
  232. package/operations/transfer.d.ts +178 -0
  233. package/operations/transfer.js +50 -0
  234. package/operations/transfer_inventory.d.ts +290 -0
  235. package/operations/transfer_inventory.js +50 -0
  236. package/operations/txn.d.ts +39 -0
  237. package/operations/txn.js +26 -0
  238. package/operations/txn_deleted.d.ts +44 -0
  239. package/operations/txn_deleted.js +26 -0
  240. package/operations/txn_display.d.ts +69 -0
  241. package/operations/txn_display.js +38 -0
  242. package/operations/txn_void.d.ts +39 -0
  243. package/operations/txn_void.js +26 -0
  244. package/operations/types.d.ts +1259 -0
  245. package/operations/unit_of_measure_set.d.ts +168 -0
  246. package/operations/unit_of_measure_set.js +38 -0
  247. package/operations/vehicle.d.ts +168 -0
  248. package/operations/vehicle.js +50 -0
  249. package/operations/vehicle_mileage.d.ts +147 -0
  250. package/operations/vehicle_mileage.js +38 -0
  251. package/operations/vendor.d.ts +541 -0
  252. package/operations/vendor.js +50 -0
  253. package/operations/vendor_credit.d.ts +365 -0
  254. package/operations/vendor_credit.js +50 -0
  255. package/operations/vendor_type.d.ts +127 -0
  256. package/operations/vendor_type.js +38 -0
  257. package/operations/workers_comp_code.d.ts +199 -0
  258. package/operations/workers_comp_code.js +50 -0
  259. package/package.json +52 -4
@@ -0,0 +1,263 @@
1
+ // Generated from operations.json by scripts/generate-operations.js: don't edit.
2
+
3
+ import type { Client } from "../index";
4
+ import type { OperationOptions, QueuedRequest, CurrencyFilter, CurrencyRef, NameFilter, NameRangeFilter } from "./types";
5
+
6
+ /** QuickBooks account operations: `qube.account.<action>(connectionId, params, { webhookUrl })`. */
7
+ export declare class Account {
8
+ constructor(client: Client);
9
+ /**
10
+ * Create account: `POST /connections/{connection_id}/accounts`, queued for QuickBooks.
11
+ *
12
+ * The answer comes to `webhookUrl` as one webhook.
13
+ * Params go in the JSON body.
14
+ *
15
+ * Fields: `account_number`, `account_type` (required), `bank_number`, `currency_ref`, `desc`, `detail_account_type`, `include_ret_element`, `is_active`, `name` (required), `open_balance`, `open_balance_date`, `parent_ref`, `request_id`, `sales_tax_code_ref`, `tax_line_id`.
16
+ *
17
+ * Resolves to the queued request.
18
+ * @see https://docs.qubesync.com/api-reference/v2/accounts/create-account
19
+ */
20
+ create(connectionId: string, params: AccountCreateParams, options: OperationOptions): Promise<QueuedRequest>;
21
+ /**
22
+ * List accounts: `GET /connections/{connection_id}/accounts`, queued for QuickBooks.
23
+ *
24
+ * The answer comes to `webhookUrl` as one webhook.
25
+ * Params go in the query string.
26
+ *
27
+ * Fields: `account_type`, `active_status`, `currency_filter`, `from_modified_date`, `full_name`, `include_ret_element`, `list_id`, `max_returned`, `meta_data`, `name_filter`, `name_range_filter`, `owner_id`, `request_id`, `to_modified_date`.
28
+ *
29
+ * Resolves to the queued request.
30
+ * @see https://docs.qubesync.com/api-reference/v2/accounts/list-accounts
31
+ */
32
+ query(connectionId: string, params: AccountQueryParams | undefined, options: OperationOptions): Promise<QueuedRequest>;
33
+ /**
34
+ * Update account: `PUT /connections/{connection_id}/accounts`, queued for QuickBooks.
35
+ *
36
+ * The answer comes to `webhookUrl` as one webhook.
37
+ * Params go in the JSON body.
38
+ *
39
+ * Fields: `account_number`, `account_type`, `bank_number`, `currency_ref`, `desc`, `edit_sequence` (required), `include_ret_element`, `is_active`, `list_id` (required), `name`, `open_balance`, `open_balance_date`, `parent_ref`, `request_id`, `sales_tax_code_ref`, `tax_line_id`.
40
+ *
41
+ * Resolves to the queued request.
42
+ * @see https://docs.qubesync.com/api-reference/v2/accounts/update-account
43
+ */
44
+ update(connectionId: string, params: AccountUpdateParams, options: OperationOptions): Promise<QueuedRequest>;
45
+ }
46
+
47
+ /**
48
+ * The params of `account.create`: Create account.
49
+ */
50
+ export interface AccountCreateParams {
51
+ /**
52
+ * Account numbers appear in the QuickBooks chart of accounts, Account fields, and reports and graphs. If the IsUsingAccountNumber preference is false (that is, if the QuickBooks user has the account numbers Preference turned off), you can still set account numbers through the SDK, but the numbers won’t be visible in the user interface.
53
+ */
54
+ account_number?: string;
55
+ /**
56
+ * The type of QuickBooks account. You can’t create or modify a non-posting account through the SDK, because QuickBooks creates these accounts behind the scenes. This means that you can’t send an AccountAdd request with an `account_type` of NonPosting.
57
+ */
58
+ account_type: "AccountsPayable" | "AccountsReceivable" | "Bank" | "CostOfGoodsSold" | "CreditCard" | "Equity" | "Expense" | "FixedAsset" | "Income" | "LongTermLiability" | "NonPosting" | "OtherAsset" | "OtherCurrentAsset" | "OtherCurrentLiability" | "OtherExpense" | "OtherIncome";
59
+ /**
60
+ * The bank account number or an identifying note about the account. If a `bank_number` exists in a QuickBooks company file, it will only be returned to applications that have been granted permission to access sensitive data and that are using SDK v2.0 or greater.
61
+ */
62
+ bank_number?: string;
63
+ /**
64
+ * A currency record defines how QuickBooks stores and displays a currency. Built-in currency name/code values are fixed; formatting and active status can vary by settings and workflow.
65
+ */
66
+ currency_ref?: CurrencyRef;
67
+ /**
68
+ * A descriptive text field.
69
+ */
70
+ desc?: string;
71
+ detail_account_type?: "AP" | "AR" | "AccumulatedAdjustment" | "AccumulatedAmortization" | "AccumulatedAmortizationOfOtherAssets" | "AccumulatedDepletion" | "AccumulatedDepreciation" | "AdvertisingOrPromotional" | "AllowanceForBadDebts" | "Amortization" | "Auto" | "BadDebts" | "BankCharges" | "Buildings" | "CashOnHand" | "CharitableContributions" | "Checking" | "CommonStock" | "CostOfLabor" | "CostOfLaborCOS" | "CreditCard" | "DepletableAssets" | "Depreciation" | "DevelopmentCosts" | "DiscountsOrRefundsGiven" | "DividendIncome" | "DuesAndSubscriptions" | "EmployeeCashAdvances" | "Entertainment" | "EntertainmentMeals" | "EquipmentRental" | "EquipmentRentalCOS" | "FederalIncomeTaxPayable" | "FurnitureAndFixtures" | "Goodwill" | "Insurance" | "InsurancePayable" | "IntangibleAssets" | "InterestEarned" | "InterestPaid" | "Inventory" | "InvestmentMortgageOrRealEstateLoans" | "InvestmentOther" | "InvestmentTaxExemptSecurities" | "InvestmentUSGovObligations" | "Land" | "LeaseBuyout" | "LeaseholdImprovements" | "LegalAndProfessionalFees" | "Licenses" | "LineOfCredit" | "LoanPayable" | "LoansToOfficers" | "LoansToOthers" | "LoansToStockholders" | "MachineryAndEquipment" | "MoneyMarket" | "NonProfitIncome" | "NotesPayable" | "OfficeOrGeneralAdministrativeExpenses" | "OpeningBalanceEquity" | "OrganizationalCosts" | "OtherCostsOfServiceCOS" | "OtherCurrentAssets" | "OtherCurrentLiab" | "OtherFixedAssets" | "OtherInvestmentIncome" | "OtherLongTermAssets" | "OtherLongTermLiab" | "OtherMiscExpense" | "OtherMiscIncome" | "OtherMiscServiceCost" | "OtherPrimaryIncome" | "OwnersEquity" | "PaidInCapitalOrSurplus" | "PartnerContributions" | "PartnerDistributions" | "PartnersEquity" | "PayrollClearing" | "PayrollExpenses" | "PayrollTaxPayable" | "PenaltiesAndSettlements" | "PreferredStock" | "PrepaidExpenses" | "PrepaidExpensesPayable" | "PromotionalMeals" | "RentOrLeaseOfBuildings" | "RentsHeldInTrust" | "RentsInTrustLiab" | "RepairAndMaintenance" | "Retainage" | "RetainedEarnings" | "SalesOfProductIncome" | "SalesTaxPayable" | "Savings" | "SecurityDeposits" | "ServiceOrFeeIncome" | "ShareholderNotesPayable" | "ShippingFreightAndDelivery" | "ShippingFreightAndDeliveryCOS" | "StateOrLocalIncomeTaxPayable" | "SuppliesAndMaterials" | "SuppliesAndMaterialsCOGS" | "TaxExemptInterest" | "TaxesPaid" | "Travel" | "TravelMeals" | "TreasuryStock" | "TrustAccounts" | "TrustAccountsLiab" | "UndepositedFunds" | "Utilities" | "Vehicles";
72
+ include_ret_element?: Array<"AccountNumber" | "AccountType" | "Balance" | "BankNumber" | "CashFlowClassification" | "CurrencyRef" | "DataExtRet" | "Desc" | "DetailAccountType" | "EditSequence" | "ExternalGUID" | "FullName" | "IsActive" | "IsTaxAccount" | "LastCheckNumber" | "ListID" | "Name" | "OwnerID" | "ParentRef" | "SalesTaxCodeRef" | "SpecialAccountType" | "Sublevel" | "TaxLineInfoRet" | "TimeCreated" | "TimeModified" | "TotalBalance" | "TxnID" | "TxnNumber">;
73
+ /**
74
+ * If `is_active` is true, this object is currently enabled for use by QuickBooks. The default value is true.
75
+ */
76
+ is_active?: boolean;
77
+ /**
78
+ * Name is the case-insensitive short name of a list object (without ancestors). It must be unique within its hierarchy scope. Hierarchical lists can reuse the same Name in different branches because `full_name` remains distinct.
79
+ */
80
+ name: string;
81
+ /**
82
+ * The amount of money in, or the value of, this account as of `open_balance_date`. On a bank statement, the amount of money in the account at the beginning of the statement period.
83
+ */
84
+ open_balance?: number;
85
+ /**
86
+ * The date when an opening balance was entered for this account.
87
+ *
88
+ * Format: date.
89
+ */
90
+ open_balance_date?: string;
91
+ /**
92
+ * A reference to the list object that is one level above this one. For example, an inventory item with the `full_name` of GermanCars:Mercedes-Benz:CL500I99AA might have a parent object with the `full_name` of GermanCars:Mercedes-Benz. In a request, if a `parent_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
93
+ */
94
+ parent_ref?: CurrencyRef;
95
+ /**
96
+ * Your own label for the request, sent to QuickBooks as its qbXML `requestID` and echoed in the raw answer (`response_xml`); optional, since the answer's webhook already carries the request's `id`.
97
+ */
98
+ request_id?: string;
99
+ /**
100
+ * `sales_tax_code_ref` points to the sales-tax code used for an item or customer context. QuickBooks includes default TAX and NON codes, and a code can be deleted only when nothing references it. If sales tax is disabled, QuickBooks assigns the default non-taxable code. If both `full_name` and `list_id` are provided in `sales_tax_code_ref`, `full_name` is ignored.
101
+ */
102
+ sales_tax_code_ref?: CurrencyRef;
103
+ /**
104
+ * An internal representation of the tax line associated with this account.
105
+ */
106
+ tax_line_id?: number;
107
+ }
108
+
109
+ /**
110
+ * The params of `account.query`: List accounts.
111
+ */
112
+ export interface AccountQueryParams {
113
+ /**
114
+ * The type of QuickBooks account. You can’t create or modify a non-posting account through the SDK, because QuickBooks creates these accounts behind the scenes. This means that you can’t send an AccountAdd request with an `account_type` of NonPosting.
115
+ *
116
+ * Choose at most one of: `list_id`, or `full_name`, or the set (`account_type`, `active_status`, `currency_filter`, `from_modified_date`, `max_returned`, `name_filter`, `name_range_filter`, `to_modified_date`). Members of a set combine with each other, not with the other choices.
117
+ */
118
+ account_type?: Array<"AccountsPayable" | "AccountsReceivable" | "Bank" | "CostOfGoodsSold" | "CreditCard" | "Equity" | "Expense" | "FixedAsset" | "Income" | "LongTermLiability" | "NonPosting" | "OtherAsset" | "OtherCurrentAsset" | "OtherCurrentLiability" | "OtherExpense" | "OtherIncome">;
119
+ /**
120
+ * Used in filters to select list objects based on whether or not they are currently enabled for use by QuickBooks. The default value is asActiveOnly, which selects only list objects that are active.
121
+ *
122
+ * Choose at most one of: `list_id`, or `full_name`, or the set (`account_type`, `active_status`, `currency_filter`, `from_modified_date`, `max_returned`, `name_filter`, `name_range_filter`, `to_modified_date`). Members of a set combine with each other, not with the other choices.
123
+ */
124
+ active_status?: "ActiveOnly" | "All" | "InactiveOnly";
125
+ /**
126
+ * Filters by the specified currency.
127
+ *
128
+ * Choose at most one of: `list_id`, or `full_name`, or the set (`account_type`, `active_status`, `currency_filter`, `from_modified_date`, `max_returned`, `name_filter`, `name_range_filter`, `to_modified_date`). Members of a set combine with each other, not with the other choices.
129
+ */
130
+ currency_filter?: CurrencyFilter;
131
+ /**
132
+ * Filters results to objects modified on or after this timestamp. QuickBooks Desktop accepts 1970-01-01 through 2038-01-19T03:14:07. If only a date is provided, time defaults to 00:00:00.
133
+ *
134
+ * Choose at most one of: `list_id`, or `full_name`, or the set (`account_type`, `active_status`, `currency_filter`, `from_modified_date`, `max_returned`, `name_filter`, `name_range_filter`, `to_modified_date`). Members of a set combine with each other, not with the other choices.
135
+ *
136
+ * Format: date-time.
137
+ */
138
+ from_modified_date?: string;
139
+ /**
140
+ * `full_name` (along with `list_id`) is a way to identify a list object. The `full_name` is the name prefixed by the names of each ancestor, for example Jones:Kitchen:Cabinets. `full_name` values aren’t case-sensitive.
141
+ *
142
+ * Choose at most one of: `list_id`, or `full_name`, or the set (`account_type`, `active_status`, `currency_filter`, `from_modified_date`, `max_returned`, `name_filter`, `name_range_filter`, `to_modified_date`). Members of a set combine with each other, not with the other choices.
143
+ */
144
+ full_name?: string[];
145
+ include_ret_element?: Array<"AccountNumber" | "AccountType" | "Balance" | "BankNumber" | "CashFlowClassification" | "CurrencyRef" | "DataExtRet" | "Desc" | "DetailAccountType" | "EditSequence" | "FullName" | "IsActive" | "IsTaxAccount" | "LastCheckNumber" | "ListID" | "Name" | "ParentRef" | "SalesTaxCodeRef" | "SpecialAccountType" | "Sublevel" | "TaxLineInfoRet" | "TimeCreated" | "TimeModified" | "TotalBalance">;
146
+ /**
147
+ * `list_id` and `full_name` both identify a list object. QuickBooks assigns `list_id` when the object is created. `list_id` values are unique within a list type, not globally across all lists. If both `full_name` and `list_id` are supplied in a request, QuickBooks uses `list_id` and ignores `full_name`.
148
+ *
149
+ * Choose at most one of: `list_id`, or `full_name`, or the set (`account_type`, `active_status`, `currency_filter`, `from_modified_date`, `max_returned`, `name_filter`, `name_range_filter`, `to_modified_date`). Members of a set combine with each other, not with the other choices.
150
+ */
151
+ list_id?: string[];
152
+ /**
153
+ * Limits the number of objects that a query returns. (To get a count of how many objects could possibly be returned, use the `meta_data` query attribute.) If you include a `max_returned` value, it must be at least 1.
154
+ *
155
+ * QuickBooks doesn't page this query: at most this many records come back, in one answer, with no sign of whether more matched. Leave it out for every match, in one answer; one over 4 MB as the Web Connector sends it, about 3 MB of qbXML isn't kept (`error_type` `response_too_large`), so narrow a large one with its filters.
156
+ *
157
+ * Choose at most one of: `list_id`, or `full_name`, or the set (`account_type`, `active_status`, `currency_filter`, `from_modified_date`, `max_returned`, `name_filter`, `name_range_filter`, `to_modified_date`). Members of a set combine with each other, not with the other choices.
158
+ *
159
+ * Minimum 1.
160
+ */
161
+ max_returned?: number;
162
+ /**
163
+ * Use the `meta_data` attribute to control whether query responses include counts. Options are NoMetaData (default), MetaDataOnly (count only), and MetaDataAndResponseData (count plus objects). Counts are approximate and may vary slightly if records are created or deleted during processing.
164
+ */
165
+ meta_data?: "MetaDataAndResponseData" | "MetaDataOnly" | "NoMetaData";
166
+ /**
167
+ * Filters according to the object’s Name.
168
+ *
169
+ * Choose at most one of: `list_id`, or `full_name`, or the set (`account_type`, `active_status`, `currency_filter`, `from_modified_date`, `max_returned`, `name_filter`, `name_range_filter`, `to_modified_date`). Members of a set combine with each other, not with the other choices.
170
+ */
171
+ name_filter?: NameFilter;
172
+ /**
173
+ * Filters according to the object’s Name.
174
+ *
175
+ * Choose at most one of: `list_id`, or `full_name`, or the set (`account_type`, `active_status`, `currency_filter`, `from_modified_date`, `max_returned`, `name_filter`, `name_range_filter`, `to_modified_date`). Members of a set combine with each other, not with the other choices.
176
+ */
177
+ name_range_filter?: NameRangeFilter;
178
+ /**
179
+ * `owner_id` identifies who owns the data extension. Use 0 for QuickBooks custom fields that appear in the UI, or use a GUID for private extensions owned by an app. Keep private GUIDs confidential unless you intentionally share extensions across apps. If you do share them, both apps must use the same `owner_id` and `data_ext_name`, because that pair uniquely identifies the extension.
180
+ */
181
+ owner_id?: string[];
182
+ /**
183
+ * Your own label for the request, sent to QuickBooks as its qbXML `requestID` and echoed in the raw answer (`response_xml`); optional, since the answer's webhook already carries the request's `id`.
184
+ */
185
+ request_id?: string;
186
+ /**
187
+ * Filters results to objects modified on or before this timestamp. QuickBooks Desktop accepts 1970-01-01 through 2038-01-19T03:14:07. If only a date is provided, time defaults to end-of-day (23:59:59).
188
+ *
189
+ * Choose at most one of: `list_id`, or `full_name`, or the set (`account_type`, `active_status`, `currency_filter`, `from_modified_date`, `max_returned`, `name_filter`, `name_range_filter`, `to_modified_date`). Members of a set combine with each other, not with the other choices.
190
+ *
191
+ * Format: date-time.
192
+ */
193
+ to_modified_date?: string;
194
+ }
195
+
196
+ /**
197
+ * The params of `account.update`: Update account.
198
+ */
199
+ export interface AccountUpdateParams {
200
+ /**
201
+ * Account numbers appear in the QuickBooks chart of accounts, Account fields, and reports and graphs. If the IsUsingAccountNumber preference is false (that is, if the QuickBooks user has the account numbers Preference turned off), you can still set account numbers through the SDK, but the numbers won’t be visible in the user interface.
202
+ */
203
+ account_number?: string;
204
+ /**
205
+ * The type of QuickBooks account. You can’t create or modify a non-posting account through the SDK, because QuickBooks creates these accounts behind the scenes. This means that you can’t send an AccountAdd request with an `account_type` of NonPosting.
206
+ */
207
+ account_type?: "AccountsPayable" | "AccountsReceivable" | "Bank" | "CostOfGoodsSold" | "CreditCard" | "Equity" | "Expense" | "FixedAsset" | "Income" | "LongTermLiability" | "NonPosting" | "OtherAsset" | "OtherCurrentAsset" | "OtherCurrentLiability" | "OtherExpense" | "OtherIncome";
208
+ /**
209
+ * The bank account number or an identifying note about the account. If a `bank_number` exists in a QuickBooks company file, it will only be returned to applications that have been granted permission to access sensitive data and that are using SDK v2.0 or greater.
210
+ */
211
+ bank_number?: string;
212
+ /**
213
+ * A currency record defines how QuickBooks stores and displays a currency. Built-in currency name/code values are fixed; formatting and active status can vary by settings and workflow.
214
+ */
215
+ currency_ref?: CurrencyRef;
216
+ /**
217
+ * A descriptive text field.
218
+ */
219
+ desc?: string;
220
+ /**
221
+ * `edit_sequence` is a server-generated revision token. It changes each time the object is updated. To modify an existing object, you must send the current `edit_sequence`. If your value is stale, the update is rejected to prevent overwriting newer changes.
222
+ */
223
+ edit_sequence: string;
224
+ include_ret_element?: Array<"AccountNumber" | "AccountType" | "Balance" | "BankNumber" | "CashFlowClassification" | "CurrencyRef" | "DataExtRet" | "Desc" | "DetailAccountType" | "EditSequence" | "ExternalGUID" | "FullName" | "IsActive" | "IsTaxAccount" | "LastCheckNumber" | "ListID" | "Name" | "OwnerID" | "ParentRef" | "SalesTaxCodeRef" | "SpecialAccountType" | "Sublevel" | "TaxLineInfoRet" | "TimeCreated" | "TimeModified" | "TotalBalance" | "TxnID" | "TxnNumber">;
225
+ /**
226
+ * If `is_active` is true, this object is currently enabled for use by QuickBooks. The default value is true.
227
+ */
228
+ is_active?: boolean;
229
+ /**
230
+ * `list_id` and `full_name` both identify a list object. QuickBooks assigns `list_id` when the object is created. `list_id` values are unique within a list type, not globally across all lists. If both `full_name` and `list_id` are supplied in a request, QuickBooks uses `list_id` and ignores `full_name`.
231
+ */
232
+ list_id: string;
233
+ /**
234
+ * Name is the case-insensitive short name of a list object (without ancestors). It must be unique within its hierarchy scope. Hierarchical lists can reuse the same Name in different branches because `full_name` remains distinct.
235
+ */
236
+ name?: string;
237
+ /**
238
+ * The amount of money in, or the value of, this account as of `open_balance_date`. On a bank statement, the amount of money in the account at the beginning of the statement period.
239
+ */
240
+ open_balance?: number;
241
+ /**
242
+ * The date when an opening balance was entered for this account.
243
+ *
244
+ * Format: date.
245
+ */
246
+ open_balance_date?: string;
247
+ /**
248
+ * A reference to the list object that is one level above this one. For example, an inventory item with the `full_name` of GermanCars:Mercedes-Benz:CL500I99AA might have a parent object with the `full_name` of GermanCars:Mercedes-Benz. In a request, if a `parent_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
249
+ */
250
+ parent_ref?: CurrencyRef;
251
+ /**
252
+ * Your own label for the request, sent to QuickBooks as its qbXML `requestID` and echoed in the raw answer (`response_xml`); optional, since the answer's webhook already carries the request's `id`.
253
+ */
254
+ request_id?: string;
255
+ /**
256
+ * `sales_tax_code_ref` points to the sales-tax code used for an item or customer context. QuickBooks includes default TAX and NON codes, and a code can be deleted only when nothing references it. If sales tax is disabled, QuickBooks assigns the default non-taxable code. If both `full_name` and `list_id` are provided in `sales_tax_code_ref`, `full_name` is ignored.
257
+ */
258
+ sales_tax_code_ref?: CurrencyRef;
259
+ /**
260
+ * An internal representation of the tax line associated with this account.
261
+ */
262
+ tax_line_id?: number;
263
+ }
@@ -0,0 +1,50 @@
1
+ // Generated from operations.json by scripts/generate-operations.js: don't edit.
2
+ "use strict";
3
+
4
+ /** QuickBooks account operations. Types: account.d.ts. */
5
+ class Account {
6
+ #client;
7
+
8
+ /** @param {import("../index").Client} client */
9
+ constructor(client) {
10
+ this.#client = client;
11
+ }
12
+
13
+ /**
14
+ * Create account.
15
+ * @param {string} connectionId
16
+ * @param {import("./account").AccountCreateParams} params
17
+ * @param {import("./types").OperationOptions} options
18
+ * @returns {Promise<import("./types").QueuedRequest>}
19
+ * @see https://docs.qubesync.com/api-reference/v2/accounts/create-account
20
+ */
21
+ create(connectionId, params, options) {
22
+ return this.#client.queue("account.create", connectionId, params, options);
23
+ }
24
+
25
+ /**
26
+ * List accounts.
27
+ * @param {string} connectionId
28
+ * @param {import("./account").AccountQueryParams} params
29
+ * @param {import("./types").OperationOptions} options
30
+ * @returns {Promise<import("./types").QueuedRequest>}
31
+ * @see https://docs.qubesync.com/api-reference/v2/accounts/list-accounts
32
+ */
33
+ query(connectionId, params, options) {
34
+ return this.#client.queue("account.query", connectionId, params, options);
35
+ }
36
+
37
+ /**
38
+ * Update account.
39
+ * @param {string} connectionId
40
+ * @param {import("./account").AccountUpdateParams} params
41
+ * @param {import("./types").OperationOptions} options
42
+ * @returns {Promise<import("./types").QueuedRequest>}
43
+ * @see https://docs.qubesync.com/api-reference/v2/accounts/update-account
44
+ */
45
+ update(connectionId, params, options) {
46
+ return this.#client.queue("account.update", connectionId, params, options);
47
+ }
48
+ }
49
+
50
+ module.exports = { Account };
@@ -0,0 +1,31 @@
1
+ // Generated from operations.json by scripts/generate-operations.js: don't edit.
2
+
3
+ import type { Client } from "../index";
4
+ import type { OperationOptions, QueuedRequest } from "./types";
5
+
6
+ /** QuickBooks account tax line info operations: `qube.accountTaxLineInfo.<action>(connectionId, params, { webhookUrl })`. */
7
+ export declare class AccountTaxLineInfo {
8
+ constructor(client: Client);
9
+ /**
10
+ * List account tax line infos: `GET /connections/{connection_id}/account-tax-line-infos`, queued for QuickBooks.
11
+ *
12
+ * The answer comes to `webhookUrl` as one webhook.
13
+ * Params go in the query string.
14
+ *
15
+ * Fields: `request_id`.
16
+ *
17
+ * Resolves to the queued request.
18
+ * @see https://docs.qubesync.com/api-reference/v2/account-tax-line-infos/list-account-tax-line-infos
19
+ */
20
+ query(connectionId: string, params: AccountTaxLineInfoQueryParams | undefined, options: OperationOptions): Promise<QueuedRequest>;
21
+ }
22
+
23
+ /**
24
+ * The params of `account_tax_line_info.query`: List account tax line infos.
25
+ */
26
+ export interface AccountTaxLineInfoQueryParams {
27
+ /**
28
+ * Your own label for the request, sent to QuickBooks as its qbXML `requestID` and echoed in the raw answer (`response_xml`); optional, since the answer's webhook already carries the request's `id`.
29
+ */
30
+ request_id?: string;
31
+ }
@@ -0,0 +1,26 @@
1
+ // Generated from operations.json by scripts/generate-operations.js: don't edit.
2
+ "use strict";
3
+
4
+ /** QuickBooks account tax line info operations. Types: account_tax_line_info.d.ts. */
5
+ class AccountTaxLineInfo {
6
+ #client;
7
+
8
+ /** @param {import("../index").Client} client */
9
+ constructor(client) {
10
+ this.#client = client;
11
+ }
12
+
13
+ /**
14
+ * List account tax line infos.
15
+ * @param {string} connectionId
16
+ * @param {import("./account_tax_line_info").AccountTaxLineInfoQueryParams} params
17
+ * @param {import("./types").OperationOptions} options
18
+ * @returns {Promise<import("./types").QueuedRequest>}
19
+ * @see https://docs.qubesync.com/api-reference/v2/account-tax-line-infos/list-account-tax-line-infos
20
+ */
21
+ query(connectionId, params, options) {
22
+ return this.#client.queue("account_tax_line_info.query", connectionId, params, options);
23
+ }
24
+ }
25
+
26
+ module.exports = { AccountTaxLineInfo };
@@ -0,0 +1,100 @@
1
+ // Generated from operations.json by scripts/generate-operations.js: don't edit.
2
+
3
+ import type { Client } from "../index";
4
+ import type { OperationOptions, QueuedRequest, ReportAccountFilter, ReportClassFilter, ReportEntityFilter, ReportItemFilter, ReportModifiedDateRangeFilter, ReportPeriod, ReportTxnTypeFilter } from "./types";
5
+
6
+ /** QuickBooks aging report operations: `qube.agingReport.<action>(connectionId, params, { webhookUrl })`. */
7
+ export declare class AgingReport {
8
+ constructor(client: Client);
9
+ /**
10
+ * List aging reports: `GET /connections/{connection_id}/aging-reports`, queued for QuickBooks.
11
+ *
12
+ * The answer comes to `webhookUrl` as one webhook.
13
+ * Params go in the query string.
14
+ *
15
+ * Fields: `aging_report_type` (required), `display_report`, `include_accounts`, `include_column`, `report_account_filter`, `report_aging_as_of`, `report_class_filter`, `report_date_macro`, `report_detail_level_filter`, `report_entity_filter`, `report_item_filter`, `report_modified_date_range_filter`, `report_modified_date_range_macro`, `report_period`, `report_posting_status_filter`, `report_txn_type_filter`, `request_id`.
16
+ *
17
+ * Resolves to the queued request.
18
+ * @see https://docs.qubesync.com/api-reference/v2/aging-reports/list-aging-reports
19
+ */
20
+ query(connectionId: string, params: AgingReportQueryParams, options: OperationOptions): Promise<QueuedRequest>;
21
+ }
22
+
23
+ /**
24
+ * The params of `aging_report.query`: List aging reports.
25
+ */
26
+ export interface AgingReportQueryParams {
27
+ /**
28
+ * The type of aging report being queried.
29
+ */
30
+ aging_report_type: "APAgingDetail" | "APAgingSummary" | "ARAgingDetail" | "ARAgingSummary" | "CollectionsReport";
31
+ /**
32
+ * Set `display_report` to true to display this report within the QuickBooks UI. (Default is false.) If you want the request to display the report without returning any data to your application, set the responseData attribute to includeNone.
33
+ */
34
+ display_report?: boolean;
35
+ /**
36
+ * Indicates whether this report should include all accounts or just those that are currently in use.
37
+ */
38
+ include_accounts?: "All" | "InUse";
39
+ include_column?: Array<"Account" | "Aging" | "Amount" | "AmountDifference" | "AverageCost" | "BilledDate" | "BillingStatus" | "CalculatedAmount" | "Class" | "ClearedStatus" | "CostPrice" | "Credit" | "Currency" | "Date" | "Debit" | "DeliveryDate" | "DueDate" | "EstimateActive" | "ExchangeRate" | "FOB" | "IncomeSubjectToTax" | "Invoiced" | "Item" | "ItemDesc" | "LastModifiedBy" | "LatestOrPriorState" | "Memo" | "ModifiedTime" | "Name" | "NameAccountNumber" | "NameAddress" | "NameCity" | "NameContact" | "NameEmail" | "NameFax" | "NamePhone" | "NameState" | "NameZip" | "OpenBalance" | "OriginalAmount" | "PONumber" | "PaidAmount" | "PaidStatus" | "PaidThroughDate" | "PaymentMethod" | "PayrollItem" | "PrintStatus" | "ProgressAmount" | "ProgressPercent" | "Quantity" | "QuantityAvailable" | "QuantityOnHand" | "QuantityOnSalesOrder" | "ReceivedQuantity" | "RefNumber" | "RunningBalance" | "SSNOrTaxID" | "SalesRep" | "SalesTaxCode" | "SerialOrLotNumber" | "ShipDate" | "ShipMethod" | "SourceName" | "SplitAccount" | "TaxLine" | "TaxTableVersion" | "Terms" | "TxnID" | "TxnNumber" | "TxnType" | "UnitPrice" | "UserEdit" | "ValueOnHand" | "WageBase" | "WageBaseTips">;
40
+ /**
41
+ * Allows you to query for a specified account type or for specific list elements.
42
+ */
43
+ report_account_filter?: ReportAccountFilter;
44
+ /**
45
+ * The report will return aging information up to the `report_aging_as_of` date.
46
+ */
47
+ report_aging_as_of?: "ReportEndDate" | "Today";
48
+ /**
49
+ * Allows you to query for a specified class. Classes can be used to separate transactions into meaningful categories. (For example, transactions could be classified according to department, business location, or type of work.) In QuickBooks, class tracking is off by default.
50
+ */
51
+ report_class_filter?: ReportClassFilter;
52
+ /**
53
+ * The time period covered by this report.
54
+ *
55
+ * Choose at most one of: `report_period`, or `report_date_macro`.
56
+ */
57
+ report_date_macro?: "All" | "LastMonth" | "LastMonthToDate" | "LastQuarter" | "LastQuarterToDate" | "LastWeek" | "LastWeekToDate" | "LastYear" | "LastYearToDate" | "NextFourWeeks" | "NextMonth" | "NextQuarter" | "NextWeek" | "NextYear" | "ThisMonth" | "ThisMonthToDate" | "ThisQuarter" | "ThisQuarterToDate" | "ThisWeek" | "ThisWeekToDate" | "ThisYear" | "ThisYearToDate" | "Today" | "Yesterday";
58
+ /**
59
+ * The level of detail to include in the report.
60
+ */
61
+ report_detail_level_filter?: "All" | "AllExceptSummary" | "SummaryOnly";
62
+ /**
63
+ * Allows you to query for a specified name type (customer, employee, vendor, or other) or query for specific list elements.
64
+ */
65
+ report_entity_filter?: ReportEntityFilter;
66
+ /**
67
+ * Allows you to query for a specified item type (for example, discount, inventory, or non-inventory) or query for specific list elements.
68
+ */
69
+ report_item_filter?: ReportItemFilter;
70
+ /**
71
+ * Returns reports that were modified between these two dates (inclusive). The range of acceptable dates for both `from_report_modified_date` and `to_report_modified_date` is 1970-01-01 to 2038-01-19T03:14:07 (2038-01-18T19:14:07-08:00 PST).
72
+ *
73
+ * Choose at most one of: `report_modified_date_range_filter`, or `report_modified_date_range_macro`.
74
+ */
75
+ report_modified_date_range_filter?: ReportModifiedDateRangeFilter;
76
+ /**
77
+ * The time period covered by this report.
78
+ *
79
+ * Choose at most one of: `report_modified_date_range_filter`, or `report_modified_date_range_macro`.
80
+ */
81
+ report_modified_date_range_macro?: "All" | "LastMonth" | "LastMonthToDate" | "LastQuarter" | "LastQuarterToDate" | "LastWeek" | "LastWeekToDate" | "LastYear" | "LastYearToDate" | "NextFourWeeks" | "NextMonth" | "NextQuarter" | "NextWeek" | "NextYear" | "ThisMonth" | "ThisMonthToDate" | "ThisQuarter" | "ThisQuarterToDate" | "ThisWeek" | "ThisWeekToDate" | "ThisYear" | "ThisYearToDate" | "Today" | "Yesterday";
82
+ /**
83
+ * If you omit both `to_report_date` and `from_report_date`, the report will cover the current fiscal year to date.
84
+ *
85
+ * Choose at most one of: `report_period`, or `report_date_macro`.
86
+ */
87
+ report_period?: ReportPeriod;
88
+ /**
89
+ * Allows you to query for posting reports, non-posting reports, or reports that are either one.
90
+ */
91
+ report_posting_status_filter?: "Either" | "NonPosting" | "Posting";
92
+ /**
93
+ * Allows you to report on specific transaction types (for example, charge, check, deposit, or estimate).
94
+ */
95
+ report_txn_type_filter?: ReportTxnTypeFilter;
96
+ /**
97
+ * Your own label for the request, sent to QuickBooks as its qbXML `requestID` and echoed in the raw answer (`response_xml`); optional, since the answer's webhook already carries the request's `id`.
98
+ */
99
+ request_id?: string;
100
+ }
@@ -0,0 +1,26 @@
1
+ // Generated from operations.json by scripts/generate-operations.js: don't edit.
2
+ "use strict";
3
+
4
+ /** QuickBooks aging report operations. Types: aging_report.d.ts. */
5
+ class AgingReport {
6
+ #client;
7
+
8
+ /** @param {import("../index").Client} client */
9
+ constructor(client) {
10
+ this.#client = client;
11
+ }
12
+
13
+ /**
14
+ * List aging reports.
15
+ * @param {string} connectionId
16
+ * @param {import("./aging_report").AgingReportQueryParams} params
17
+ * @param {import("./types").OperationOptions} options
18
+ * @returns {Promise<import("./types").QueuedRequest>}
19
+ * @see https://docs.qubesync.com/api-reference/v2/aging-reports/list-aging-reports
20
+ */
21
+ query(connectionId, params, options) {
22
+ return this.#client.queue("aging_report.query", connectionId, params, options);
23
+ }
24
+ }
25
+
26
+ module.exports = { AgingReport };
@@ -0,0 +1,118 @@
1
+ // Generated from operations.json by scripts/generate-operations.js: don't edit.
2
+
3
+ import type { Client } from "../index";
4
+ import type { OperationOptions, QueuedRequest } from "./types";
5
+
6
+ /** QuickBooks alert operations: `qube.alert.<action>(connectionId, params, { webhookUrl })`. */
7
+ export declare class Alert {
8
+ constructor(client: Client);
9
+ /**
10
+ * Create alert: `POST /connections/{connection_id}/alerts`, queued for QuickBooks.
11
+ *
12
+ * The answer comes to `webhookUrl` as one webhook.
13
+ * Params go in the JSON body.
14
+ *
15
+ * Fields: `activation_date`, `alert_permission`, `alert_tag` (required), `com_callback_info`, `desc` (required), `expiration_date`, `help_text` (required), `http_callback_info`, `message_text` (required), `owner_id` (required), `request_id`, `ui_context`.
16
+ *
17
+ * Give exactly one of: `com_callback_info`, or `http_callback_info`.
18
+ *
19
+ * Resolves to the queued request.
20
+ * @see https://docs.qubesync.com/api-reference/v2/alerts/create-alert
21
+ */
22
+ create(connectionId: string, params: AlertCreateParams, options: OperationOptions): Promise<QueuedRequest>;
23
+ /**
24
+ * Delete alert: `DELETE /connections/{connection_id}/alerts`, queued for QuickBooks.
25
+ *
26
+ * The answer comes to `webhookUrl` as one webhook.
27
+ * Params go in the JSON body.
28
+ *
29
+ * Fields: `alert_tag` (required), `owner_id` (required), `request_id`.
30
+ *
31
+ * Resolves to the queued request.
32
+ * @see https://docs.qubesync.com/api-reference/v2/alerts/delete-alert
33
+ */
34
+ delete(connectionId: string, params: AlertDeleteParams, options: OperationOptions): Promise<QueuedRequest>;
35
+ /**
36
+ * List alerts: `GET /connections/{connection_id}/alerts`, queued for QuickBooks.
37
+ *
38
+ * The answer comes to `webhookUrl` as one webhook.
39
+ * Params go in the query string.
40
+ *
41
+ * Fields: `meta_data`, `owner_id` (required), `request_id`.
42
+ *
43
+ * Resolves to the queued request.
44
+ * @see https://docs.qubesync.com/api-reference/v2/alerts/list-alerts
45
+ */
46
+ query(connectionId: string, params: AlertQueryParams, options: OperationOptions): Promise<QueuedRequest>;
47
+ }
48
+
49
+ /**
50
+ * The params of `alert.create`: Create alert.
51
+ *
52
+ * Give exactly one of: `com_callback_info`, or `http_callback_info`.
53
+ */
54
+ export interface AlertCreateParams {
55
+ /**
56
+ * Format: date.
57
+ */
58
+ activation_date?: string;
59
+ alert_permission?: AlertPermission;
60
+ alert_tag: string;
61
+ com_callback_info?: ComCallbackInfo;
62
+ desc: string;
63
+ /**
64
+ * Format: date.
65
+ */
66
+ expiration_date?: string;
67
+ help_text: string;
68
+ http_callback_info?: HttpCallbackInfo;
69
+ message_text: string;
70
+ owner_id: string;
71
+ /**
72
+ * Your own label for the request, sent to QuickBooks as its qbXML `requestID` and echoed in the raw answer (`response_xml`); optional, since the answer's webhook already carries the request's `id`.
73
+ */
74
+ request_id?: string;
75
+ ui_context?: Array<"AlertsManager" | "CompanyNavigator">;
76
+ }
77
+
78
+ /**
79
+ * The params of `alert.delete`: Delete alert.
80
+ */
81
+ export interface AlertDeleteParams {
82
+ alert_tag: string;
83
+ owner_id: string;
84
+ /**
85
+ * Your own label for the request, sent to QuickBooks as its qbXML `requestID` and echoed in the raw answer (`response_xml`); optional, since the answer's webhook already carries the request's `id`.
86
+ */
87
+ request_id?: string;
88
+ }
89
+
90
+ /**
91
+ * The params of `alert.query`: List alerts.
92
+ */
93
+ export interface AlertQueryParams {
94
+ meta_data?: "MetaDataAndResponseData" | "MetaDataOnly" | "NoMetaData";
95
+ owner_id: string[];
96
+ /**
97
+ * Your own label for the request, sent to QuickBooks as its qbXML `requestID` and echoed in the raw answer (`response_xml`); optional, since the answer's webhook already carries the request's `id`.
98
+ */
99
+ request_id?: string;
100
+ }
101
+
102
+ export interface AlertPermission {
103
+ permission_level: Array<"AccountsPayable" | "AccountsReceivable" | "Banking" | "Finance" | "Inventory" | "TimeTracking">;
104
+ permission_needed: "All" | "Any";
105
+ }
106
+
107
+ /**
108
+ * Give exactly one of: `prog_id`, or `clsid`.
109
+ */
110
+ export interface ComCallbackInfo {
111
+ app_name: string;
112
+ clsid?: string;
113
+ prog_id?: string;
114
+ }
115
+
116
+ export interface HttpCallbackInfo {
117
+ url: string;
118
+ }