qubesync 0.1.0 → 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 (258) hide show
  1. package/CHANGELOG.md +38 -2
  2. package/README.md +188 -5
  3. package/client.js +660 -0
  4. package/index.d.ts +211 -1
  5. package/index.js +5 -1
  6. package/index.mjs +2 -0
  7. package/operations/account.d.ts +263 -0
  8. package/operations/account.js +50 -0
  9. package/operations/account_tax_line_info.d.ts +31 -0
  10. package/operations/account_tax_line_info.js +26 -0
  11. package/operations/aging_report.d.ts +100 -0
  12. package/operations/aging_report.js +26 -0
  13. package/operations/alert.d.ts +118 -0
  14. package/operations/alert.js +50 -0
  15. package/operations/ar_refund_credit_card.d.ts +201 -0
  16. package/operations/ar_refund_credit_card.js +38 -0
  17. package/operations/bar_code.d.ts +40 -0
  18. package/operations/bar_code.js +26 -0
  19. package/operations/bill.d.ts +612 -0
  20. package/operations/bill.js +50 -0
  21. package/operations/bill_payment_check.d.ts +276 -0
  22. package/operations/bill_payment_check.js +50 -0
  23. package/operations/bill_payment_credit_card.d.ts +178 -0
  24. package/operations/bill_payment_credit_card.js +38 -0
  25. package/operations/bill_to_pay.d.ts +54 -0
  26. package/operations/bill_to_pay.js +26 -0
  27. package/operations/billing_rate.d.ts +159 -0
  28. package/operations/billing_rate.js +38 -0
  29. package/operations/budget_summary_report.d.ts +71 -0
  30. package/operations/budget_summary_report.js +26 -0
  31. package/operations/build_assembly.d.ts +264 -0
  32. package/operations/build_assembly.js +50 -0
  33. package/operations/charge.d.ts +330 -0
  34. package/operations/charge.js +50 -0
  35. package/operations/check.d.ts +394 -0
  36. package/operations/check.js +50 -0
  37. package/operations/class.d.ts +170 -0
  38. package/operations/class.js +50 -0
  39. package/operations/cleared_status.d.ts +43 -0
  40. package/operations/cleared_status.js +26 -0
  41. package/operations/client.d.ts +254 -0
  42. package/operations/company.d.ts +36 -0
  43. package/operations/company.js +26 -0
  44. package/operations/company_activity.d.ts +32 -0
  45. package/operations/company_activity.js +26 -0
  46. package/operations/credit_card_charge.d.ts +280 -0
  47. package/operations/credit_card_charge.js +50 -0
  48. package/operations/credit_card_credit.d.ts +280 -0
  49. package/operations/credit_card_credit.js +50 -0
  50. package/operations/credit_memo.d.ts +642 -0
  51. package/operations/credit_memo.js +50 -0
  52. package/operations/currency.d.ts +195 -0
  53. package/operations/currency.js +50 -0
  54. package/operations/custom_detail_report.d.ts +108 -0
  55. package/operations/custom_detail_report.js +26 -0
  56. package/operations/custom_summary_report.d.ts +119 -0
  57. package/operations/custom_summary_report.js +26 -0
  58. package/operations/customer.d.ts +639 -0
  59. package/operations/customer.js +50 -0
  60. package/operations/customer_msg.d.ts +121 -0
  61. package/operations/customer_msg.js +38 -0
  62. package/operations/customer_type.d.ts +127 -0
  63. package/operations/customer_type.js +38 -0
  64. package/operations/data_event_recovery_info.d.ts +61 -0
  65. package/operations/data_event_recovery_info.js +38 -0
  66. package/operations/data_ext.d.ts +197 -0
  67. package/operations/data_ext.js +50 -0
  68. package/operations/data_ext_def.d.ts +173 -0
  69. package/operations/data_ext_def.js +62 -0
  70. package/operations/date_driven_terms.d.ts +141 -0
  71. package/operations/date_driven_terms.js +38 -0
  72. package/operations/deposit.d.ts +402 -0
  73. package/operations/deposit.js +50 -0
  74. package/operations/employee.d.ts +683 -0
  75. package/operations/employee.js +50 -0
  76. package/operations/employee_default.d.ts +133 -0
  77. package/operations/employee_default.js +38 -0
  78. package/operations/entity.d.ts +96 -0
  79. package/operations/entity.js +26 -0
  80. package/operations/estimate.d.ts +590 -0
  81. package/operations/estimate.js +50 -0
  82. package/operations/form1099_category_account_mapping.d.ts +89 -0
  83. package/operations/form1099_category_account_mapping.js +38 -0
  84. package/operations/general_detail_report.d.ts +108 -0
  85. package/operations/general_detail_report.js +26 -0
  86. package/operations/general_summary_report.d.ts +115 -0
  87. package/operations/general_summary_report.js +26 -0
  88. package/operations/host.d.ts +43 -0
  89. package/operations/host.js +26 -0
  90. package/operations/index.js +397 -0
  91. package/operations/inventory_adjustment.d.ts +389 -0
  92. package/operations/inventory_adjustment.js +50 -0
  93. package/operations/inventory_site.d.ts +247 -0
  94. package/operations/inventory_site.js +50 -0
  95. package/operations/invoice.d.ts +682 -0
  96. package/operations/invoice.js +50 -0
  97. package/operations/item.d.ts +100 -0
  98. package/operations/item.js +26 -0
  99. package/operations/item_assemblies_can_build.d.ts +41 -0
  100. package/operations/item_assemblies_can_build.js +26 -0
  101. package/operations/item_discount.d.ts +256 -0
  102. package/operations/item_discount.js +50 -0
  103. package/operations/item_fixed_asset.d.ts +382 -0
  104. package/operations/item_fixed_asset.js +50 -0
  105. package/operations/item_group.d.ts +236 -0
  106. package/operations/item_group.js +50 -0
  107. package/operations/item_inventory.d.ts +350 -0
  108. package/operations/item_inventory.js +50 -0
  109. package/operations/item_inventory_assembly.d.ts +368 -0
  110. package/operations/item_inventory_assembly.js +50 -0
  111. package/operations/item_non_inventory.d.ts +264 -0
  112. package/operations/item_non_inventory.js +50 -0
  113. package/operations/item_other_charge.d.ts +244 -0
  114. package/operations/item_other_charge.js +50 -0
  115. package/operations/item_payment.d.ts +220 -0
  116. package/operations/item_payment.js +50 -0
  117. package/operations/item_receipt.d.ts +362 -0
  118. package/operations/item_receipt.js +50 -0
  119. package/operations/item_sales_tax.d.ts +228 -0
  120. package/operations/item_sales_tax.js +50 -0
  121. package/operations/item_sales_tax_group.d.ts +192 -0
  122. package/operations/item_sales_tax_group.js +50 -0
  123. package/operations/item_service.d.ts +256 -0
  124. package/operations/item_service.js +50 -0
  125. package/operations/item_sites.d.ts +81 -0
  126. package/operations/item_sites.js +26 -0
  127. package/operations/item_subtotal.d.ts +188 -0
  128. package/operations/item_subtotal.js +50 -0
  129. package/operations/job_report.d.ts +99 -0
  130. package/operations/job_report.js +26 -0
  131. package/operations/job_type.d.ts +127 -0
  132. package/operations/job_type.js +38 -0
  133. package/operations/journal_entry.d.ts +339 -0
  134. package/operations/journal_entry.js +50 -0
  135. package/operations/lead.d.ts +291 -0
  136. package/operations/lead.js +50 -0
  137. package/operations/list.d.ts +39 -0
  138. package/operations/list.js +26 -0
  139. package/operations/list_deleted.d.ts +44 -0
  140. package/operations/list_deleted.js +26 -0
  141. package/operations/list_display.d.ts +65 -0
  142. package/operations/list_display.js +38 -0
  143. package/operations/list_merge.d.ts +58 -0
  144. package/operations/list_merge.js +26 -0
  145. package/operations/other_name.d.ts +280 -0
  146. package/operations/other_name.js +50 -0
  147. package/operations/paycheck.d.ts +82 -0
  148. package/operations/paycheck.js +26 -0
  149. package/operations/payment_method.d.ts +131 -0
  150. package/operations/payment_method.js +38 -0
  151. package/operations/payroll_detail_report.d.ts +97 -0
  152. package/operations/payroll_detail_report.js +26 -0
  153. package/operations/payroll_item.d.ts +83 -0
  154. package/operations/payroll_item.js +26 -0
  155. package/operations/payroll_item_addition.d.ts +95 -0
  156. package/operations/payroll_item_addition.js +38 -0
  157. package/operations/payroll_item_company_contribution.d.ts +105 -0
  158. package/operations/payroll_item_company_contribution.js +38 -0
  159. package/operations/payroll_item_deduction.d.ts +101 -0
  160. package/operations/payroll_item_deduction.js +38 -0
  161. package/operations/payroll_item_direct_deposit.d.ts +65 -0
  162. package/operations/payroll_item_direct_deposit.js +38 -0
  163. package/operations/payroll_item_non_wage.d.ts +92 -0
  164. package/operations/payroll_item_non_wage.js +26 -0
  165. package/operations/payroll_item_tax.d.ts +108 -0
  166. package/operations/payroll_item_tax.js +38 -0
  167. package/operations/payroll_item_wage.d.ts +169 -0
  168. package/operations/payroll_item_wage.js +50 -0
  169. package/operations/payroll_item_workers_compensation.d.ts +77 -0
  170. package/operations/payroll_item_workers_compensation.js +38 -0
  171. package/operations/payroll_last_period.d.ts +31 -0
  172. package/operations/payroll_last_period.js +26 -0
  173. package/operations/payroll_liability_adjustment.d.ts +137 -0
  174. package/operations/payroll_liability_adjustment.js +38 -0
  175. package/operations/payroll_liability_check.d.ts +82 -0
  176. package/operations/payroll_liability_check.js +26 -0
  177. package/operations/payroll_prior_payment.d.ts +126 -0
  178. package/operations/payroll_prior_payment.js +38 -0
  179. package/operations/payroll_summary_report.d.ts +107 -0
  180. package/operations/payroll_summary_report.js +26 -0
  181. package/operations/payroll_year_to_date_adjustment.d.ts +156 -0
  182. package/operations/payroll_year_to_date_adjustment.js +38 -0
  183. package/operations/preferences.d.ts +64 -0
  184. package/operations/preferences.js +38 -0
  185. package/operations/price_level.d.ts +234 -0
  186. package/operations/price_level.js +50 -0
  187. package/operations/purchase_order.d.ts +620 -0
  188. package/operations/purchase_order.js +50 -0
  189. package/operations/qb_command_exec.d.ts +49 -0
  190. package/operations/qb_command_exec.js +26 -0
  191. package/operations/receive_payment.d.ts +450 -0
  192. package/operations/receive_payment.js +50 -0
  193. package/operations/receive_payment_to_deposit.d.ts +36 -0
  194. package/operations/receive_payment_to_deposit.js +26 -0
  195. package/operations/sales_order.d.ts +612 -0
  196. package/operations/sales_order.js +50 -0
  197. package/operations/sales_receipt.d.ts +650 -0
  198. package/operations/sales_receipt.js +50 -0
  199. package/operations/sales_rep.d.ts +170 -0
  200. package/operations/sales_rep.js +50 -0
  201. package/operations/sales_tax_code.d.ts +194 -0
  202. package/operations/sales_tax_code.js +50 -0
  203. package/operations/sales_tax_payable.d.ts +42 -0
  204. package/operations/sales_tax_payable.js +26 -0
  205. package/operations/sales_tax_payment_check.d.ts +254 -0
  206. package/operations/sales_tax_payment_check.js +50 -0
  207. package/operations/sales_tax_return.d.ts +35 -0
  208. package/operations/sales_tax_return.js +26 -0
  209. package/operations/sales_tax_return_line.d.ts +36 -0
  210. package/operations/sales_tax_return_line.js +26 -0
  211. package/operations/ship_method.d.ts +121 -0
  212. package/operations/ship_method.js +38 -0
  213. package/operations/special_account.d.ts +40 -0
  214. package/operations/special_account.js +26 -0
  215. package/operations/special_item.d.ts +44 -0
  216. package/operations/special_item.js +26 -0
  217. package/operations/standard_terms.d.ts +133 -0
  218. package/operations/standard_terms.js +38 -0
  219. package/operations/template.d.ts +36 -0
  220. package/operations/template.js +26 -0
  221. package/operations/terms.d.ts +90 -0
  222. package/operations/terms.js +26 -0
  223. package/operations/time_report.d.ts +84 -0
  224. package/operations/time_report.js +26 -0
  225. package/operations/time_tracking.d.ts +214 -0
  226. package/operations/time_tracking.js +50 -0
  227. package/operations/to_do.d.ts +254 -0
  228. package/operations/to_do.js +50 -0
  229. package/operations/transaction.d.ts +244 -0
  230. package/operations/transaction.js +26 -0
  231. package/operations/transfer.d.ts +178 -0
  232. package/operations/transfer.js +50 -0
  233. package/operations/transfer_inventory.d.ts +290 -0
  234. package/operations/transfer_inventory.js +50 -0
  235. package/operations/txn.d.ts +39 -0
  236. package/operations/txn.js +26 -0
  237. package/operations/txn_deleted.d.ts +44 -0
  238. package/operations/txn_deleted.js +26 -0
  239. package/operations/txn_display.d.ts +69 -0
  240. package/operations/txn_display.js +38 -0
  241. package/operations/txn_void.d.ts +39 -0
  242. package/operations/txn_void.js +26 -0
  243. package/operations/types.d.ts +1259 -0
  244. package/operations/unit_of_measure_set.d.ts +168 -0
  245. package/operations/unit_of_measure_set.js +38 -0
  246. package/operations/vehicle.d.ts +168 -0
  247. package/operations/vehicle.js +50 -0
  248. package/operations/vehicle_mileage.d.ts +147 -0
  249. package/operations/vehicle_mileage.js +38 -0
  250. package/operations/vendor.d.ts +541 -0
  251. package/operations/vendor.js +50 -0
  252. package/operations/vendor_credit.d.ts +365 -0
  253. package/operations/vendor_credit.js +50 -0
  254. package/operations/vendor_type.d.ts +127 -0
  255. package/operations/vendor_type.js +38 -0
  256. package/operations/workers_comp_code.d.ts +199 -0
  257. package/operations/workers_comp_code.js +50 -0
  258. package/package.json +14 -4
@@ -0,0 +1,214 @@
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, ModifiedDateRangeFilter, TxnDateRangeFilter } from "./types";
5
+
6
+ /** QuickBooks time tracking operations: `qube.timeTracking.<action>(connectionId, params, { webhookUrl })`. */
7
+ export declare class TimeTracking {
8
+ constructor(client: Client);
9
+ /**
10
+ * Create time tracking: `POST /connections/{connection_id}/time-trackings`, queued for QuickBooks.
11
+ *
12
+ * The answer comes to `webhookUrl` as one webhook.
13
+ * Params go in the JSON body.
14
+ *
15
+ * Fields: `billable_status`, `class_ref`, `customer_ref`, `def_macro`, `duration` (required), `entity_ref` (required), `external_guid`, `include_ret_element`, `item_service_ref`, `notes`, `payroll_item_wage_ref`, `rate`, `request_id`, `txn_date`.
16
+ *
17
+ * Resolves to the queued request.
18
+ * @see https://docs.qubesync.com/api-reference/v2/time-trackings/create-time-tracking
19
+ */
20
+ create(connectionId: string, params: TimeTrackingCreateParams, options: OperationOptions): Promise<QueuedRequest>;
21
+ /**
22
+ * List time trackings: `GET /connections/{connection_id}/time-trackings`, queued for QuickBooks.
23
+ *
24
+ * QuickBooks answers in pages: each page comes to `webhookUrl` as its own webhook.
25
+ * Params go in the query string.
26
+ *
27
+ * Fields: `include_ret_element`, `iterator`, `max_returned`, `meta_data`, `modified_date_range_filter`, `request_id`, `time_tracking_entity_filter`, `txn_date_range_filter`, `txn_id`.
28
+ *
29
+ * Resolves to the queued request.
30
+ * @see https://docs.qubesync.com/api-reference/v2/time-trackings/list-time-trackings
31
+ */
32
+ query(connectionId: string, params: TimeTrackingQueryParams | undefined, options: OperationOptions): Promise<QueuedRequest>;
33
+ /**
34
+ * Update time tracking: `PUT /connections/{connection_id}/time-trackings`, queued for QuickBooks.
35
+ *
36
+ * The answer comes to `webhookUrl` as one webhook.
37
+ * Params go in the JSON body.
38
+ *
39
+ * Fields: `billable_status`, `class_ref`, `customer_ref`, `duration` (required), `edit_sequence` (required), `entity_ref` (required), `include_ret_element`, `item_service_ref`, `notes`, `payroll_item_wage_ref`, `rate`, `request_id`, `txn_date`, `txn_id` (required).
40
+ *
41
+ * Resolves to the queued request.
42
+ * @see https://docs.qubesync.com/api-reference/v2/time-trackings/update-time-tracking
43
+ */
44
+ update(connectionId: string, params: TimeTrackingUpdateParams, options: OperationOptions): Promise<QueuedRequest>;
45
+ }
46
+
47
+ /**
48
+ * The params of `time_tracking.create`: Create time tracking.
49
+ */
50
+ export interface TimeTrackingCreateParams {
51
+ /**
52
+ * The billing status of this item line or expense line.
53
+ */
54
+ billable_status?: "Billable" | "HasBeenBilled" | "NotBillable";
55
+ /**
56
+ * Use classes to categorize transactions (for example, by department, location, or work type). Class tracking is off by default in QuickBooks. A `class_ref` points to one class; if both `full_name` and `list_id` are provided, `full_name` is ignored. In InvoiceAdd, a header-level `class_ref` is applied to line items unless you override or clear it on individual lines.
57
+ */
58
+ class_ref?: CurrencyRef;
59
+ /**
60
+ * `customer_ref` identifies a customer or customer job. If both `full_name` and `list_id` are provided, `full_name` is ignored. In SalesReceipt and ReceivePayment, it identifies who receives credit. In TimeTracking, it identifies who the time can be billed to and is required in TimeTrackingAdd when IsBillable is true.
61
+ */
62
+ customer_ref?: CurrencyRef;
63
+ /**
64
+ * `def_macro` lets you assign a reusable name to a returned `txn_id` or TxnLineID so later requests can reference it with `useMacro`. This feature requires SDK 2.0+.
65
+ */
66
+ def_macro?: string;
67
+ /**
68
+ * Time spent doing the work. In a TimeTrackAdd request, notice that although you can specify seconds, seconds aren’t returned in the response because the UI doesn’t use seconds.
69
+ */
70
+ duration: string;
71
+ /**
72
+ * A QuickBooks “entity” is a customer, vendor, employee, or person on the QuickBooks “other names” list. Special cases to note: In a BillToPayQuery message, `entity_ref` refers to the vendor name. In JournalCreditLine and JournalDebitLine messages for A/R accounts, `entity_ref` must refer to a customer, or else the transaction won’t be recorded.
73
+ */
74
+ entity_ref: CurrencyRef;
75
+ /**
76
+ * Allows for the attachment of a user defined GUID value.
77
+ */
78
+ external_guid?: string;
79
+ include_ret_element?: Array<"BillableStatus" | "ClassRef" | "CustomerRef" | "Duration" | "EditSequence" | "EntityRef" | "ExternalGUID" | "ItemServiceRef" | "ListID" | "Notes" | "OwnerID" | "PayrollItemWageRef" | "Rate" | "TimeCreated" | "TimeModified" | "TxnDate" | "TxnID" | "TxnNumber">;
80
+ /**
81
+ * A service item refers to services that a business charges for or purchases. Examples include specialized labor, consulting hours, and professional fees. An `item_service_ref` aggregate refers to an item on the ItemService list. In a request, if an `item_service_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
82
+ */
83
+ item_service_ref?: CurrencyRef;
84
+ /**
85
+ * Additional information.
86
+ */
87
+ notes?: string;
88
+ /**
89
+ * Each payroll wage item describes and names a payment scheme, for example, Regular Pay or Overtime Pay. A `payroll_item_wage_ref` aggregate refers to one of these wage items. In a request, if a `payroll_item_wage_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
90
+ */
91
+ payroll_item_wage_ref?: CurrencyRef;
92
+ rate?: number;
93
+ /**
94
+ * 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`.
95
+ */
96
+ request_id?: string;
97
+ /**
98
+ * The date of the transaction. In some cases, if you leave `txn_date` out of an -Add message, QuickBooks will prefill `txn_date` with the date of the last-saved transaction of the same type.
99
+ *
100
+ * Format: date.
101
+ */
102
+ txn_date?: string;
103
+ }
104
+
105
+ /**
106
+ * The params of `time_tracking.query`: List time trackings.
107
+ */
108
+ export interface TimeTrackingQueryParams {
109
+ include_ret_element?: Array<"BillableStatus" | "ClassRef" | "CustomerRef" | "Duration" | "EditSequence" | "EntityRef" | "ExternalGUID" | "ItemServiceRef" | "Notes" | "PayrollItemWageRef" | "Rate" | "TimeCreated" | "TimeModified" | "TxnDate" | "TxnID" | "TxnNumber">;
110
+ /**
111
+ * Page through every match: QuBe Sync asks QuickBooks for each page in turn and sends each to your `webhook_url` as it arrives, all with the same `id`. On by default, with pages of 100 records; send `iterator=true` with `max_returned` for another size. Off when you send `iterator=false` (every match in one answer) or `max_returned` alone (at most that many, in one answer). It pages a filtered query only: with `txn_id` every match comes back in one answer, so leave `iterator` out.
112
+ */
113
+ iterator?: boolean;
114
+ /**
115
+ * 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.
116
+ *
117
+ * The page size, with `iterator=true`. Sent without `iterator`, or with `iterator=false`, it's a cap instead: at most this many records come back, in one answer, and QuickBooks doesn't say whether more matched.
118
+ *
119
+ * Choose at most one of: `txn_id`, or the set (`max_returned`, `modified_date_range_filter`, `time_tracking_entity_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
120
+ *
121
+ * Minimum 1.
122
+ */
123
+ max_returned?: number;
124
+ /**
125
+ * 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.
126
+ */
127
+ meta_data?: "MetaDataAndResponseData" | "MetaDataOnly" | "NoMetaData";
128
+ /**
129
+ * Filters according to the dates when transactions were last modified. The `modified_date_range_filter` aggregate isn’t required to contain any elements, but if it is empty, we recommend that you leave it out altogether. Note that the time portion of the `from_modified_date` and `to_modified_date` fields wasn’t supported in qbXML version 1.0 or 1.1.
130
+ *
131
+ * Choose at most one of: `txn_id`, or the set (`max_returned`, `modified_date_range_filter`, `time_tracking_entity_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
132
+ */
133
+ modified_date_range_filter?: ModifiedDateRangeFilter;
134
+ /**
135
+ * 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`.
136
+ */
137
+ request_id?: string;
138
+ /**
139
+ * Allows you to query for one or more names on the QuickBooks Vendor list, Employee list, or Other Names list.
140
+ *
141
+ * Choose at most one of: `txn_id`, or the set (`max_returned`, `modified_date_range_filter`, `time_tracking_entity_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
142
+ */
143
+ time_tracking_entity_filter?: CurrencyFilter;
144
+ /**
145
+ * Filters according to the original transaction dates.
146
+ *
147
+ * Choose at most one of: `txn_id`, or the set (`max_returned`, `modified_date_range_filter`, `time_tracking_entity_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
148
+ */
149
+ txn_date_range_filter?: TxnDateRangeFilter;
150
+ /**
151
+ * `txn_id` is the unique QuickBooks identifier for a transaction. Use it to reference that transaction in later requests. `txn_id` values are transaction-specific and should not be reused across unrelated transaction types.
152
+ *
153
+ * Choose at most one of: `txn_id`, or the set (`max_returned`, `modified_date_range_filter`, `time_tracking_entity_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
154
+ */
155
+ txn_id?: string[];
156
+ }
157
+
158
+ /**
159
+ * The params of `time_tracking.update`: Update time tracking.
160
+ */
161
+ export interface TimeTrackingUpdateParams {
162
+ /**
163
+ * The billing status of this item line or expense line.
164
+ */
165
+ billable_status?: "Billable" | "HasBeenBilled" | "NotBillable";
166
+ /**
167
+ * Use classes to categorize transactions (for example, by department, location, or work type). Class tracking is off by default in QuickBooks. A `class_ref` points to one class; if both `full_name` and `list_id` are provided, `full_name` is ignored. In InvoiceAdd, a header-level `class_ref` is applied to line items unless you override or clear it on individual lines.
168
+ */
169
+ class_ref?: CurrencyRef;
170
+ /**
171
+ * `customer_ref` identifies a customer or customer job. If both `full_name` and `list_id` are provided, `full_name` is ignored. In SalesReceipt and ReceivePayment, it identifies who receives credit. In TimeTracking, it identifies who the time can be billed to and is required in TimeTrackingAdd when IsBillable is true.
172
+ */
173
+ customer_ref?: CurrencyRef;
174
+ /**
175
+ * Time spent doing the work. In a TimeTrackAdd request, notice that although you can specify seconds, seconds aren’t returned in the response because the UI doesn’t use seconds.
176
+ */
177
+ duration: string;
178
+ /**
179
+ * `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.
180
+ */
181
+ edit_sequence: string;
182
+ /**
183
+ * A QuickBooks “entity” is a customer, vendor, employee, or person on the QuickBooks “other names” list. Special cases to note: In a BillToPayQuery message, `entity_ref` refers to the vendor name. In JournalCreditLine and JournalDebitLine messages for A/R accounts, `entity_ref` must refer to a customer, or else the transaction won’t be recorded.
184
+ */
185
+ entity_ref: CurrencyRef;
186
+ include_ret_element?: Array<"BillableStatus" | "ClassRef" | "CustomerRef" | "Duration" | "EditSequence" | "EntityRef" | "ExternalGUID" | "ItemServiceRef" | "ListID" | "Notes" | "OwnerID" | "PayrollItemWageRef" | "Rate" | "TimeCreated" | "TimeModified" | "TxnDate" | "TxnID" | "TxnNumber">;
187
+ /**
188
+ * A service item refers to services that a business charges for or purchases. Examples include specialized labor, consulting hours, and professional fees. An `item_service_ref` aggregate refers to an item on the ItemService list. In a request, if an `item_service_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
189
+ */
190
+ item_service_ref?: CurrencyRef;
191
+ /**
192
+ * Additional information.
193
+ */
194
+ notes?: string;
195
+ /**
196
+ * Each payroll wage item describes and names a payment scheme, for example, Regular Pay or Overtime Pay. A `payroll_item_wage_ref` aggregate refers to one of these wage items. In a request, if a `payroll_item_wage_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
197
+ */
198
+ payroll_item_wage_ref?: CurrencyRef;
199
+ rate?: number;
200
+ /**
201
+ * 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`.
202
+ */
203
+ request_id?: string;
204
+ /**
205
+ * The date of the transaction. In some cases, if you leave `txn_date` out of an -Add message, QuickBooks will prefill `txn_date` with the date of the last-saved transaction of the same type.
206
+ *
207
+ * Format: date.
208
+ */
209
+ txn_date?: string;
210
+ /**
211
+ * `txn_id` is the unique QuickBooks identifier for a transaction. Use it to reference that transaction in later requests. `txn_id` values are transaction-specific and should not be reused across unrelated transaction types.
212
+ */
213
+ txn_id: string;
214
+ }
@@ -0,0 +1,50 @@
1
+ // Generated from operations.json by scripts/generate-operations.js: don't edit.
2
+ "use strict";
3
+
4
+ /** QuickBooks time tracking operations. Types: time_tracking.d.ts. */
5
+ class TimeTracking {
6
+ #client;
7
+
8
+ /** @param {import("../index").Client} client */
9
+ constructor(client) {
10
+ this.#client = client;
11
+ }
12
+
13
+ /**
14
+ * Create time tracking.
15
+ * @param {string} connectionId
16
+ * @param {import("./time_tracking").TimeTrackingCreateParams} params
17
+ * @param {import("./types").OperationOptions} options
18
+ * @returns {Promise<import("./types").QueuedRequest>}
19
+ * @see https://docs.qubesync.com/api-reference/v2/time-trackings/create-time-tracking
20
+ */
21
+ create(connectionId, params, options) {
22
+ return this.#client.queue("time_tracking.create", connectionId, params, options);
23
+ }
24
+
25
+ /**
26
+ * List time trackings (answers in pages, one webhook each).
27
+ * @param {string} connectionId
28
+ * @param {import("./time_tracking").TimeTrackingQueryParams} params
29
+ * @param {import("./types").OperationOptions} options
30
+ * @returns {Promise<import("./types").QueuedRequest>}
31
+ * @see https://docs.qubesync.com/api-reference/v2/time-trackings/list-time-trackings
32
+ */
33
+ query(connectionId, params, options) {
34
+ return this.#client.queue("time_tracking.query", connectionId, params, options);
35
+ }
36
+
37
+ /**
38
+ * Update time tracking.
39
+ * @param {string} connectionId
40
+ * @param {import("./time_tracking").TimeTrackingUpdateParams} params
41
+ * @param {import("./types").OperationOptions} options
42
+ * @returns {Promise<import("./types").QueuedRequest>}
43
+ * @see https://docs.qubesync.com/api-reference/v2/time-trackings/update-time-tracking
44
+ */
45
+ update(connectionId, params, options) {
46
+ return this.#client.queue("time_tracking.update", connectionId, params, options);
47
+ }
48
+ }
49
+
50
+ module.exports = { TimeTracking };
@@ -0,0 +1,254 @@
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, CurrencyRef, NameFilter, NameRangeFilter } from "./types";
5
+
6
+ /** QuickBooks to do operations: `qube.toDo.<action>(connectionId, params, { webhookUrl })`. */
7
+ export declare class ToDo {
8
+ constructor(client: Client);
9
+ /**
10
+ * Create to do: `POST /connections/{connection_id}/to-dos`, queued for QuickBooks.
11
+ *
12
+ * The answer comes to `webhookUrl` as one webhook.
13
+ * Params go in the JSON body.
14
+ *
15
+ * Fields: `customer_ref`, `employee_ref`, `include_ret_element`, `is_active`, `is_done`, `lead_ref`, `notes` (required), `priority`, `reminder_date`, `reminder_time`, `request_id`, `type`, `vendor_ref`.
16
+ *
17
+ * Resolves to the queued request.
18
+ * @see https://docs.qubesync.com/api-reference/v2/to-dos/create-to-do
19
+ */
20
+ create(connectionId: string, params: ToDoCreateParams, options: OperationOptions): Promise<QueuedRequest>;
21
+ /**
22
+ * List to dos: `GET /connections/{connection_id}/to-dos`, queued for QuickBooks.
23
+ *
24
+ * The answer comes to `webhookUrl` as one webhook.
25
+ * Params go in the query string.
26
+ *
27
+ * Fields: `active_status`, `done_status`, `from_modified_date`, `include_ret_element`, `list_id`, `max_returned`, `meta_data`, `name_filter`, `name_range_filter`, `request_id`, `to_modified_date`.
28
+ *
29
+ * Resolves to the queued request.
30
+ * @see https://docs.qubesync.com/api-reference/v2/to-dos/list-to-dos
31
+ */
32
+ query(connectionId: string, params: ToDoQueryParams | undefined, options: OperationOptions): Promise<QueuedRequest>;
33
+ /**
34
+ * Update to do: `PUT /connections/{connection_id}/to-dos`, queued for QuickBooks.
35
+ *
36
+ * The answer comes to `webhookUrl` as one webhook.
37
+ * Params go in the JSON body.
38
+ *
39
+ * Fields: `customer_ref`, `edit_sequence` (required), `employee_ref`, `include_ret_element`, `is_active`, `is_done`, `lead_ref`, `list_id` (required), `notes`, `priority`, `reminder_date`, `reminder_time`, `request_id`, `type`, `vendor_ref`.
40
+ *
41
+ * Resolves to the queued request.
42
+ * @see https://docs.qubesync.com/api-reference/v2/to-dos/update-to-do
43
+ */
44
+ update(connectionId: string, params: ToDoUpdateParams, options: OperationOptions): Promise<QueuedRequest>;
45
+ }
46
+
47
+ /**
48
+ * The params of `to_do.create`: Create to do.
49
+ */
50
+ export interface ToDoCreateParams {
51
+ /**
52
+ * `customer_ref` identifies a customer or customer job. If both `full_name` and `list_id` are provided, `full_name` is ignored. In SalesReceipt and ReceivePayment, it identifies who receives credit. In TimeTracking, it identifies who the time can be billed to and is required in TimeTrackingAdd when IsBillable is true.
53
+ *
54
+ * Choose at most one of: `customer_ref`, or `employee_ref`, or `lead_ref`, or `vendor_ref`.
55
+ */
56
+ customer_ref?: CurrencyRef;
57
+ /**
58
+ * The employee list contains payroll information about each of the company’s employees.
59
+ *
60
+ * Choose at most one of: `customer_ref`, or `employee_ref`, or `lead_ref`, or `vendor_ref`.
61
+ */
62
+ employee_ref?: CurrencyRef;
63
+ include_ret_element?: Array<"CustomerRef" | "EditSequence" | "EmployeeRef" | "ExternalGUID" | "IsActive" | "IsDone" | "LeadRef" | "ListID" | "Notes" | "OwnerID" | "Priority" | "ReminderDate" | "ReminderTime" | "TimeCreated" | "TimeModified" | "TxnID" | "TxnNumber" | "Type" | "VendorRef">;
64
+ /**
65
+ * If `is_active` is true, this object is currently enabled for use by QuickBooks. The default value is true.
66
+ */
67
+ is_active?: boolean;
68
+ /**
69
+ * If `is_done` is true, this “to do” task has been completed. The default value of `is_done` is false.
70
+ */
71
+ is_done?: boolean;
72
+ /**
73
+ * The lead list contains information about leads for a company.
74
+ *
75
+ * Choose at most one of: `customer_ref`, or `employee_ref`, or `lead_ref`, or `vendor_ref`.
76
+ */
77
+ lead_ref?: CurrencyRef;
78
+ /**
79
+ * Additional information.
80
+ */
81
+ notes: string;
82
+ /**
83
+ * Priority may have one of the following values: Low [DEFAULT], Medium, High
84
+ */
85
+ priority?: "High" | "Low" | "Medium";
86
+ /**
87
+ * The date on which the contents of the Notes string will appear on the Reminder list within QuickBooks.
88
+ *
89
+ * Format: date.
90
+ */
91
+ reminder_date?: string;
92
+ /**
93
+ * The time on which the contents of the Notes string will appear on the Reminder list within QuickBooks.
94
+ */
95
+ reminder_time?: 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
+ * Type may have one of the following values: Task [DEFAULT], Call, Fax, Email, Meeting, Appointment
102
+ */
103
+ type?: "Appointment" | "Call" | "Email" | "Fax" | "Meeting" | "Task";
104
+ /**
105
+ * A vendor is any person or company from whom a small business owner buys goods and services. (Banks and tax agencies usually are included on the vendor list.) A company’s vendor list contains information such as account balance and contact information about each vendor. A `vendor_ref` aggregate refers to one of the vendors on the list.
106
+ *
107
+ * Choose at most one of: `customer_ref`, or `employee_ref`, or `lead_ref`, or `vendor_ref`.
108
+ */
109
+ vendor_ref?: CurrencyRef;
110
+ }
111
+
112
+ /**
113
+ * The params of `to_do.query`: List to dos.
114
+ */
115
+ export interface ToDoQueryParams {
116
+ /**
117
+ * 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.
118
+ *
119
+ * Choose at most one of: `list_id`, or the set (`active_status`, `done_status`, `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.
120
+ */
121
+ active_status?: "ActiveOnly" | "All" | "InactiveOnly";
122
+ /**
123
+ * Selects all the relevant “to do” notes (dsAll), only those that are done (dsDoneOnly), or only those that aren’t done (dsNotDoneOnly).
124
+ *
125
+ * Choose at most one of: `list_id`, or the set (`active_status`, `done_status`, `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.
126
+ */
127
+ done_status?: "All" | "DoneOnly" | "NotDoneOnly";
128
+ /**
129
+ * 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.
130
+ *
131
+ * Choose at most one of: `list_id`, or the set (`active_status`, `done_status`, `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.
132
+ *
133
+ * Format: date-time.
134
+ */
135
+ from_modified_date?: string;
136
+ include_ret_element?: Array<"CustomerRef" | "EditSequence" | "EmployeeRef" | "IsActive" | "IsDone" | "LeadRef" | "ListID" | "Notes" | "Priority" | "ReminderDate" | "ReminderTime" | "TimeCreated" | "TimeModified" | "Type" | "VendorRef">;
137
+ /**
138
+ * `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`.
139
+ *
140
+ * Choose at most one of: `list_id`, or the set (`active_status`, `done_status`, `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.
141
+ */
142
+ list_id?: string[];
143
+ /**
144
+ * 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.
145
+ *
146
+ * 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.
147
+ *
148
+ * Choose at most one of: `list_id`, or the set (`active_status`, `done_status`, `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.
149
+ *
150
+ * Minimum 1.
151
+ */
152
+ max_returned?: number;
153
+ /**
154
+ * 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.
155
+ */
156
+ meta_data?: "MetaDataAndResponseData" | "MetaDataOnly" | "NoMetaData";
157
+ /**
158
+ * Filters according to the object’s Name.
159
+ *
160
+ * Choose at most one of: `list_id`, or the set (`active_status`, `done_status`, `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.
161
+ */
162
+ name_filter?: NameFilter;
163
+ /**
164
+ * Filters according to the object’s Name.
165
+ *
166
+ * Choose at most one of: `list_id`, or the set (`active_status`, `done_status`, `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.
167
+ */
168
+ name_range_filter?: NameRangeFilter;
169
+ /**
170
+ * 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`.
171
+ */
172
+ request_id?: string;
173
+ /**
174
+ * 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).
175
+ *
176
+ * Choose at most one of: `list_id`, or the set (`active_status`, `done_status`, `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.
177
+ *
178
+ * Format: date-time.
179
+ */
180
+ to_modified_date?: string;
181
+ }
182
+
183
+ /**
184
+ * The params of `to_do.update`: Update to do.
185
+ */
186
+ export interface ToDoUpdateParams {
187
+ /**
188
+ * `customer_ref` identifies a customer or customer job. If both `full_name` and `list_id` are provided, `full_name` is ignored. In SalesReceipt and ReceivePayment, it identifies who receives credit. In TimeTracking, it identifies who the time can be billed to and is required in TimeTrackingAdd when IsBillable is true.
189
+ *
190
+ * Choose at most one of: `customer_ref`, or `employee_ref`, or `lead_ref`, or `vendor_ref`.
191
+ */
192
+ customer_ref?: CurrencyRef;
193
+ /**
194
+ * `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.
195
+ */
196
+ edit_sequence: string;
197
+ /**
198
+ * The employee list contains payroll information about each of the company’s employees.
199
+ *
200
+ * Choose at most one of: `customer_ref`, or `employee_ref`, or `lead_ref`, or `vendor_ref`.
201
+ */
202
+ employee_ref?: CurrencyRef;
203
+ include_ret_element?: Array<"CustomerRef" | "EditSequence" | "EmployeeRef" | "ExternalGUID" | "IsActive" | "IsDone" | "LeadRef" | "ListID" | "Notes" | "OwnerID" | "Priority" | "ReminderDate" | "ReminderTime" | "TimeCreated" | "TimeModified" | "TxnID" | "TxnNumber" | "Type" | "VendorRef">;
204
+ /**
205
+ * If `is_active` is true, this object is currently enabled for use by QuickBooks. The default value is true.
206
+ */
207
+ is_active?: boolean;
208
+ /**
209
+ * If `is_done` is true, this “to do” task has been completed. The default value of `is_done` is false.
210
+ */
211
+ is_done?: boolean;
212
+ /**
213
+ * The lead list contains information about leads for a company.
214
+ *
215
+ * Choose at most one of: `customer_ref`, or `employee_ref`, or `lead_ref`, or `vendor_ref`.
216
+ */
217
+ lead_ref?: CurrencyRef;
218
+ /**
219
+ * `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`.
220
+ */
221
+ list_id: string;
222
+ /**
223
+ * Additional information.
224
+ */
225
+ notes?: string;
226
+ /**
227
+ * Priority may have one of the following values: Low [DEFAULT], Medium, High
228
+ */
229
+ priority?: "High" | "Low" | "Medium";
230
+ /**
231
+ * The date on which the contents of the Notes string will appear on the Reminder list within QuickBooks.
232
+ *
233
+ * Format: date.
234
+ */
235
+ reminder_date?: string;
236
+ /**
237
+ * The time on which the contents of the Notes string will appear on the Reminder list within QuickBooks.
238
+ */
239
+ reminder_time?: string;
240
+ /**
241
+ * 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`.
242
+ */
243
+ request_id?: string;
244
+ /**
245
+ * Type may have one of the following values: Task [DEFAULT], Call, Fax, Email, Meeting, Appointment
246
+ */
247
+ type?: "Appointment" | "Call" | "Email" | "Fax" | "Meeting" | "Task";
248
+ /**
249
+ * A vendor is any person or company from whom a small business owner buys goods and services. (Banks and tax agencies usually are included on the vendor list.) A company’s vendor list contains information such as account balance and contact information about each vendor. A `vendor_ref` aggregate refers to one of the vendors on the list.
250
+ *
251
+ * Choose at most one of: `customer_ref`, or `employee_ref`, or `lead_ref`, or `vendor_ref`.
252
+ */
253
+ vendor_ref?: CurrencyRef;
254
+ }
@@ -0,0 +1,50 @@
1
+ // Generated from operations.json by scripts/generate-operations.js: don't edit.
2
+ "use strict";
3
+
4
+ /** QuickBooks to do operations. Types: to_do.d.ts. */
5
+ class ToDo {
6
+ #client;
7
+
8
+ /** @param {import("../index").Client} client */
9
+ constructor(client) {
10
+ this.#client = client;
11
+ }
12
+
13
+ /**
14
+ * Create to do.
15
+ * @param {string} connectionId
16
+ * @param {import("./to_do").ToDoCreateParams} params
17
+ * @param {import("./types").OperationOptions} options
18
+ * @returns {Promise<import("./types").QueuedRequest>}
19
+ * @see https://docs.qubesync.com/api-reference/v2/to-dos/create-to-do
20
+ */
21
+ create(connectionId, params, options) {
22
+ return this.#client.queue("to_do.create", connectionId, params, options);
23
+ }
24
+
25
+ /**
26
+ * List to dos.
27
+ * @param {string} connectionId
28
+ * @param {import("./to_do").ToDoQueryParams} params
29
+ * @param {import("./types").OperationOptions} options
30
+ * @returns {Promise<import("./types").QueuedRequest>}
31
+ * @see https://docs.qubesync.com/api-reference/v2/to-dos/list-to-dos
32
+ */
33
+ query(connectionId, params, options) {
34
+ return this.#client.queue("to_do.query", connectionId, params, options);
35
+ }
36
+
37
+ /**
38
+ * Update to do.
39
+ * @param {string} connectionId
40
+ * @param {import("./to_do").ToDoUpdateParams} params
41
+ * @param {import("./types").OperationOptions} options
42
+ * @returns {Promise<import("./types").QueuedRequest>}
43
+ * @see https://docs.qubesync.com/api-reference/v2/to-dos/update-to-do
44
+ */
45
+ update(connectionId, params, options) {
46
+ return this.#client.queue("to_do.update", connectionId, params, options);
47
+ }
48
+ }
49
+
50
+ module.exports = { ToDo };