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.
- package/CHANGELOG.md +38 -2
- package/README.md +188 -5
- package/client.js +660 -0
- package/index.d.ts +211 -1
- package/index.js +5 -1
- package/index.mjs +2 -0
- package/operations/account.d.ts +263 -0
- package/operations/account.js +50 -0
- package/operations/account_tax_line_info.d.ts +31 -0
- package/operations/account_tax_line_info.js +26 -0
- package/operations/aging_report.d.ts +100 -0
- package/operations/aging_report.js +26 -0
- package/operations/alert.d.ts +118 -0
- package/operations/alert.js +50 -0
- package/operations/ar_refund_credit_card.d.ts +201 -0
- package/operations/ar_refund_credit_card.js +38 -0
- package/operations/bar_code.d.ts +40 -0
- package/operations/bar_code.js +26 -0
- package/operations/bill.d.ts +612 -0
- package/operations/bill.js +50 -0
- package/operations/bill_payment_check.d.ts +276 -0
- package/operations/bill_payment_check.js +50 -0
- package/operations/bill_payment_credit_card.d.ts +178 -0
- package/operations/bill_payment_credit_card.js +38 -0
- package/operations/bill_to_pay.d.ts +54 -0
- package/operations/bill_to_pay.js +26 -0
- package/operations/billing_rate.d.ts +159 -0
- package/operations/billing_rate.js +38 -0
- package/operations/budget_summary_report.d.ts +71 -0
- package/operations/budget_summary_report.js +26 -0
- package/operations/build_assembly.d.ts +264 -0
- package/operations/build_assembly.js +50 -0
- package/operations/charge.d.ts +330 -0
- package/operations/charge.js +50 -0
- package/operations/check.d.ts +394 -0
- package/operations/check.js +50 -0
- package/operations/class.d.ts +170 -0
- package/operations/class.js +50 -0
- package/operations/cleared_status.d.ts +43 -0
- package/operations/cleared_status.js +26 -0
- package/operations/client.d.ts +254 -0
- package/operations/company.d.ts +36 -0
- package/operations/company.js +26 -0
- package/operations/company_activity.d.ts +32 -0
- package/operations/company_activity.js +26 -0
- package/operations/credit_card_charge.d.ts +280 -0
- package/operations/credit_card_charge.js +50 -0
- package/operations/credit_card_credit.d.ts +280 -0
- package/operations/credit_card_credit.js +50 -0
- package/operations/credit_memo.d.ts +642 -0
- package/operations/credit_memo.js +50 -0
- package/operations/currency.d.ts +195 -0
- package/operations/currency.js +50 -0
- package/operations/custom_detail_report.d.ts +108 -0
- package/operations/custom_detail_report.js +26 -0
- package/operations/custom_summary_report.d.ts +119 -0
- package/operations/custom_summary_report.js +26 -0
- package/operations/customer.d.ts +639 -0
- package/operations/customer.js +50 -0
- package/operations/customer_msg.d.ts +121 -0
- package/operations/customer_msg.js +38 -0
- package/operations/customer_type.d.ts +127 -0
- package/operations/customer_type.js +38 -0
- package/operations/data_event_recovery_info.d.ts +61 -0
- package/operations/data_event_recovery_info.js +38 -0
- package/operations/data_ext.d.ts +197 -0
- package/operations/data_ext.js +50 -0
- package/operations/data_ext_def.d.ts +173 -0
- package/operations/data_ext_def.js +62 -0
- package/operations/date_driven_terms.d.ts +141 -0
- package/operations/date_driven_terms.js +38 -0
- package/operations/deposit.d.ts +402 -0
- package/operations/deposit.js +50 -0
- package/operations/employee.d.ts +683 -0
- package/operations/employee.js +50 -0
- package/operations/employee_default.d.ts +133 -0
- package/operations/employee_default.js +38 -0
- package/operations/entity.d.ts +96 -0
- package/operations/entity.js +26 -0
- package/operations/estimate.d.ts +590 -0
- package/operations/estimate.js +50 -0
- package/operations/form1099_category_account_mapping.d.ts +89 -0
- package/operations/form1099_category_account_mapping.js +38 -0
- package/operations/general_detail_report.d.ts +108 -0
- package/operations/general_detail_report.js +26 -0
- package/operations/general_summary_report.d.ts +115 -0
- package/operations/general_summary_report.js +26 -0
- package/operations/host.d.ts +43 -0
- package/operations/host.js +26 -0
- package/operations/index.js +397 -0
- package/operations/inventory_adjustment.d.ts +389 -0
- package/operations/inventory_adjustment.js +50 -0
- package/operations/inventory_site.d.ts +247 -0
- package/operations/inventory_site.js +50 -0
- package/operations/invoice.d.ts +682 -0
- package/operations/invoice.js +50 -0
- package/operations/item.d.ts +100 -0
- package/operations/item.js +26 -0
- package/operations/item_assemblies_can_build.d.ts +41 -0
- package/operations/item_assemblies_can_build.js +26 -0
- package/operations/item_discount.d.ts +256 -0
- package/operations/item_discount.js +50 -0
- package/operations/item_fixed_asset.d.ts +382 -0
- package/operations/item_fixed_asset.js +50 -0
- package/operations/item_group.d.ts +236 -0
- package/operations/item_group.js +50 -0
- package/operations/item_inventory.d.ts +350 -0
- package/operations/item_inventory.js +50 -0
- package/operations/item_inventory_assembly.d.ts +368 -0
- package/operations/item_inventory_assembly.js +50 -0
- package/operations/item_non_inventory.d.ts +264 -0
- package/operations/item_non_inventory.js +50 -0
- package/operations/item_other_charge.d.ts +244 -0
- package/operations/item_other_charge.js +50 -0
- package/operations/item_payment.d.ts +220 -0
- package/operations/item_payment.js +50 -0
- package/operations/item_receipt.d.ts +362 -0
- package/operations/item_receipt.js +50 -0
- package/operations/item_sales_tax.d.ts +228 -0
- package/operations/item_sales_tax.js +50 -0
- package/operations/item_sales_tax_group.d.ts +192 -0
- package/operations/item_sales_tax_group.js +50 -0
- package/operations/item_service.d.ts +256 -0
- package/operations/item_service.js +50 -0
- package/operations/item_sites.d.ts +81 -0
- package/operations/item_sites.js +26 -0
- package/operations/item_subtotal.d.ts +188 -0
- package/operations/item_subtotal.js +50 -0
- package/operations/job_report.d.ts +99 -0
- package/operations/job_report.js +26 -0
- package/operations/job_type.d.ts +127 -0
- package/operations/job_type.js +38 -0
- package/operations/journal_entry.d.ts +339 -0
- package/operations/journal_entry.js +50 -0
- package/operations/lead.d.ts +291 -0
- package/operations/lead.js +50 -0
- package/operations/list.d.ts +39 -0
- package/operations/list.js +26 -0
- package/operations/list_deleted.d.ts +44 -0
- package/operations/list_deleted.js +26 -0
- package/operations/list_display.d.ts +65 -0
- package/operations/list_display.js +38 -0
- package/operations/list_merge.d.ts +58 -0
- package/operations/list_merge.js +26 -0
- package/operations/other_name.d.ts +280 -0
- package/operations/other_name.js +50 -0
- package/operations/paycheck.d.ts +82 -0
- package/operations/paycheck.js +26 -0
- package/operations/payment_method.d.ts +131 -0
- package/operations/payment_method.js +38 -0
- package/operations/payroll_detail_report.d.ts +97 -0
- package/operations/payroll_detail_report.js +26 -0
- package/operations/payroll_item.d.ts +83 -0
- package/operations/payroll_item.js +26 -0
- package/operations/payroll_item_addition.d.ts +95 -0
- package/operations/payroll_item_addition.js +38 -0
- package/operations/payroll_item_company_contribution.d.ts +105 -0
- package/operations/payroll_item_company_contribution.js +38 -0
- package/operations/payroll_item_deduction.d.ts +101 -0
- package/operations/payroll_item_deduction.js +38 -0
- package/operations/payroll_item_direct_deposit.d.ts +65 -0
- package/operations/payroll_item_direct_deposit.js +38 -0
- package/operations/payroll_item_non_wage.d.ts +92 -0
- package/operations/payroll_item_non_wage.js +26 -0
- package/operations/payroll_item_tax.d.ts +108 -0
- package/operations/payroll_item_tax.js +38 -0
- package/operations/payroll_item_wage.d.ts +169 -0
- package/operations/payroll_item_wage.js +50 -0
- package/operations/payroll_item_workers_compensation.d.ts +77 -0
- package/operations/payroll_item_workers_compensation.js +38 -0
- package/operations/payroll_last_period.d.ts +31 -0
- package/operations/payroll_last_period.js +26 -0
- package/operations/payroll_liability_adjustment.d.ts +137 -0
- package/operations/payroll_liability_adjustment.js +38 -0
- package/operations/payroll_liability_check.d.ts +82 -0
- package/operations/payroll_liability_check.js +26 -0
- package/operations/payroll_prior_payment.d.ts +126 -0
- package/operations/payroll_prior_payment.js +38 -0
- package/operations/payroll_summary_report.d.ts +107 -0
- package/operations/payroll_summary_report.js +26 -0
- package/operations/payroll_year_to_date_adjustment.d.ts +156 -0
- package/operations/payroll_year_to_date_adjustment.js +38 -0
- package/operations/preferences.d.ts +64 -0
- package/operations/preferences.js +38 -0
- package/operations/price_level.d.ts +234 -0
- package/operations/price_level.js +50 -0
- package/operations/purchase_order.d.ts +620 -0
- package/operations/purchase_order.js +50 -0
- package/operations/qb_command_exec.d.ts +49 -0
- package/operations/qb_command_exec.js +26 -0
- package/operations/receive_payment.d.ts +450 -0
- package/operations/receive_payment.js +50 -0
- package/operations/receive_payment_to_deposit.d.ts +36 -0
- package/operations/receive_payment_to_deposit.js +26 -0
- package/operations/sales_order.d.ts +612 -0
- package/operations/sales_order.js +50 -0
- package/operations/sales_receipt.d.ts +650 -0
- package/operations/sales_receipt.js +50 -0
- package/operations/sales_rep.d.ts +170 -0
- package/operations/sales_rep.js +50 -0
- package/operations/sales_tax_code.d.ts +194 -0
- package/operations/sales_tax_code.js +50 -0
- package/operations/sales_tax_payable.d.ts +42 -0
- package/operations/sales_tax_payable.js +26 -0
- package/operations/sales_tax_payment_check.d.ts +254 -0
- package/operations/sales_tax_payment_check.js +50 -0
- package/operations/sales_tax_return.d.ts +35 -0
- package/operations/sales_tax_return.js +26 -0
- package/operations/sales_tax_return_line.d.ts +36 -0
- package/operations/sales_tax_return_line.js +26 -0
- package/operations/ship_method.d.ts +121 -0
- package/operations/ship_method.js +38 -0
- package/operations/special_account.d.ts +40 -0
- package/operations/special_account.js +26 -0
- package/operations/special_item.d.ts +44 -0
- package/operations/special_item.js +26 -0
- package/operations/standard_terms.d.ts +133 -0
- package/operations/standard_terms.js +38 -0
- package/operations/template.d.ts +36 -0
- package/operations/template.js +26 -0
- package/operations/terms.d.ts +90 -0
- package/operations/terms.js +26 -0
- package/operations/time_report.d.ts +84 -0
- package/operations/time_report.js +26 -0
- package/operations/time_tracking.d.ts +214 -0
- package/operations/time_tracking.js +50 -0
- package/operations/to_do.d.ts +254 -0
- package/operations/to_do.js +50 -0
- package/operations/transaction.d.ts +244 -0
- package/operations/transaction.js +26 -0
- package/operations/transfer.d.ts +178 -0
- package/operations/transfer.js +50 -0
- package/operations/transfer_inventory.d.ts +290 -0
- package/operations/transfer_inventory.js +50 -0
- package/operations/txn.d.ts +39 -0
- package/operations/txn.js +26 -0
- package/operations/txn_deleted.d.ts +44 -0
- package/operations/txn_deleted.js +26 -0
- package/operations/txn_display.d.ts +69 -0
- package/operations/txn_display.js +38 -0
- package/operations/txn_void.d.ts +39 -0
- package/operations/txn_void.js +26 -0
- package/operations/types.d.ts +1259 -0
- package/operations/unit_of_measure_set.d.ts +168 -0
- package/operations/unit_of_measure_set.js +38 -0
- package/operations/vehicle.d.ts +168 -0
- package/operations/vehicle.js +50 -0
- package/operations/vehicle_mileage.d.ts +147 -0
- package/operations/vehicle_mileage.js +38 -0
- package/operations/vendor.d.ts +541 -0
- package/operations/vendor.js +50 -0
- package/operations/vendor_credit.d.ts +365 -0
- package/operations/vendor_credit.js +50 -0
- package/operations/vendor_type.d.ts +127 -0
- package/operations/vendor_type.js +38 -0
- package/operations/workers_comp_code.d.ts +199 -0
- package/operations/workers_comp_code.js +50 -0
- package/package.json +14 -4
|
@@ -0,0 +1,244 @@
|
|
|
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, AccountFilter, CurrencyFilter, RefNumberFilter, RefNumberRangeFilter, ReportTxnTypeFilter, TxnDateRangeFilterBill } from "./types";
|
|
5
|
+
|
|
6
|
+
/** QuickBooks transaction operations: `qube.transaction.<action>(connectionId, params, { webhookUrl })`. */
|
|
7
|
+
export declare class Transaction {
|
|
8
|
+
constructor(client: Client);
|
|
9
|
+
/**
|
|
10
|
+
* List transactions: `GET /connections/{connection_id}/transactions`, queued for QuickBooks.
|
|
11
|
+
*
|
|
12
|
+
* QuickBooks answers in pages: each page comes to `webhookUrl` as its own webhook.
|
|
13
|
+
* Params go in the query string.
|
|
14
|
+
*
|
|
15
|
+
* Fields: `currency_filter`, `include_ret_element`, `iterator`, `max_returned`, `meta_data`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `request_id`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`, `txn_id`.
|
|
16
|
+
*
|
|
17
|
+
* Resolves to the queued request.
|
|
18
|
+
* @see https://docs.qubesync.com/api-reference/v2/transactions/list-transactions
|
|
19
|
+
*/
|
|
20
|
+
query(connectionId: string, params: TransactionQueryParams | undefined, options: OperationOptions): Promise<QueuedRequest>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The params of `transaction.query`: List transactions.
|
|
25
|
+
*/
|
|
26
|
+
export interface TransactionQueryParams {
|
|
27
|
+
/**
|
|
28
|
+
* Filters by the specified currency.
|
|
29
|
+
*
|
|
30
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
31
|
+
*/
|
|
32
|
+
currency_filter?: CurrencyFilter;
|
|
33
|
+
include_ret_element?: Array<"AccountRef" | "Amount" | "AmountInHomeCurrency" | "CurrencyRef" | "EntityRef" | "ExchangeRate" | "Memo" | "RefNumber" | "TimeCreated" | "TimeModified" | "TxnDate" | "TxnID" | "TxnLineID" | "TxnType">;
|
|
34
|
+
/**
|
|
35
|
+
* 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.
|
|
36
|
+
*/
|
|
37
|
+
iterator?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 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.
|
|
40
|
+
*
|
|
41
|
+
* 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.
|
|
42
|
+
*
|
|
43
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
44
|
+
*
|
|
45
|
+
* Minimum 1.
|
|
46
|
+
*/
|
|
47
|
+
max_returned?: number;
|
|
48
|
+
/**
|
|
49
|
+
* 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.
|
|
50
|
+
*/
|
|
51
|
+
meta_data?: "MetaDataAndResponseData" | "MetaDataOnly" | "NoMetaData";
|
|
52
|
+
/**
|
|
53
|
+
* `ref_number` is a user-managed transaction reference (for example, a check number). It can be edited and is not guaranteed to be globally unique. Some transaction types auto-populate `ref_number` when omitted, based on QuickBooks preferences and numbering state.
|
|
54
|
+
*
|
|
55
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
56
|
+
*/
|
|
57
|
+
ref_number?: string[];
|
|
58
|
+
/**
|
|
59
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
60
|
+
*/
|
|
61
|
+
ref_number_case_sensitive?: string[];
|
|
62
|
+
/**
|
|
63
|
+
* Filters by `ref_number` range. Numeric-only bounds are compared numerically; otherwise comparison is lexicographic.
|
|
64
|
+
*
|
|
65
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
66
|
+
*/
|
|
67
|
+
ref_number_filter?: RefNumberFilter;
|
|
68
|
+
/**
|
|
69
|
+
* Filters by `ref_number` range. Numeric-only bounds are compared numerically; otherwise comparison is lexicographic.
|
|
70
|
+
*
|
|
71
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
72
|
+
*/
|
|
73
|
+
ref_number_range_filter?: RefNumberRangeFilter;
|
|
74
|
+
/**
|
|
75
|
+
* 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`.
|
|
76
|
+
*/
|
|
77
|
+
request_id?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Filters the transactions based on the `account_ref` in the transaction or transaction line using an account type filter or a specific `list_id`, or a `full_name`, or a `list_id_with_children`, or a `full_name_with_children`. To filter on transaction lines, you must specify the `transaction_detail_level_filter` with a value of either “All” or “AllExceptSummary”.
|
|
80
|
+
*
|
|
81
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
82
|
+
*/
|
|
83
|
+
transaction_account_filter?: TransactionAccountFilter;
|
|
84
|
+
/**
|
|
85
|
+
* Filters the transactions based on the ClassRef in the transaction or transaction line by using a specific `list_id`, or a `full_name`, or a `list_id_with_children`, or a `full_name_with_children`. To filter on transaction lines, you must specify the `transaction_detail_level_filter` with a value of either “All” or “AllExceptSummary”.
|
|
86
|
+
*
|
|
87
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
88
|
+
*/
|
|
89
|
+
transaction_class_filter?: AccountFilter;
|
|
90
|
+
/**
|
|
91
|
+
* Filters the transactions based on the transaction’s date either by specifying a “from” and/or “to” date, or by using a `date_macro`.
|
|
92
|
+
*
|
|
93
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
94
|
+
*/
|
|
95
|
+
transaction_date_range_filter?: TxnDateRangeFilterBill;
|
|
96
|
+
/**
|
|
97
|
+
* Allows you to specify the detail level of the query results. You can specify all, summary only (the default), or all except summary. Summary only refers to the transaction as a whole, whereas all except summary refers to the transaction lines.
|
|
98
|
+
*
|
|
99
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
100
|
+
*/
|
|
101
|
+
transaction_detail_level_filter?: "All" | "AllExceptSummary" | "SummaryOnly";
|
|
102
|
+
/**
|
|
103
|
+
* Filters the transactions based on the `entity_ref` used in the transaction or transaction line by specifying an entity type filter, a `list_id`, a `full_name`, a `list_id_with_children`, or a `full_name_with_children`. If you want to filter on transaction lines you must specify the `transaction_detail_level_filter` with a value of either “All” or “AllExceptSummary”.
|
|
104
|
+
*
|
|
105
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
106
|
+
*/
|
|
107
|
+
transaction_entity_filter?: TransactionEntityFilter;
|
|
108
|
+
/**
|
|
109
|
+
* Filters the transactions based on the ItemRef used in the transaction line using an item type filter, or a specific `list_id`, or a `full_name`, or a `list_id_with_children`, or a `full_name_with_children`. To filter on transaction lines, you must specify the `transaction_detail_level_filter` with a value of either “All” or “AllExceptSummary”.
|
|
110
|
+
*
|
|
111
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
112
|
+
*/
|
|
113
|
+
transaction_item_filter?: TransactionItemFilter;
|
|
114
|
+
/**
|
|
115
|
+
* Filters the transactions based on the transaction’s modified datetime, either by specifying a “from” and/or “to” date or by using a `date_macro`.
|
|
116
|
+
*
|
|
117
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
118
|
+
*/
|
|
119
|
+
transaction_modified_date_range_filter?: TransactionModifiedDateRangeFilter;
|
|
120
|
+
/**
|
|
121
|
+
* This filter allows you to search for “open” transactions, i.e. transactions with a remaining balance (for example, credits not fully applied or invoices not fully paid). Valid values are closed, open, or either, which is the default.
|
|
122
|
+
*
|
|
123
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
124
|
+
*/
|
|
125
|
+
transaction_paid_status_filter?: "Closed" | "Either" | "Open";
|
|
126
|
+
/**
|
|
127
|
+
* Allows you to filter transactions based on posting status. Valid values are posting, non-posting, or either. The default is “either.” (Posting status refers to whether QuickBooks records a transaction in one of your account registers.)
|
|
128
|
+
*
|
|
129
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
130
|
+
*/
|
|
131
|
+
transaction_posting_status_filter?: "Either" | "NonPosting" | "Posting";
|
|
132
|
+
/**
|
|
133
|
+
* Filters the transactions based on the transaction’s type. You can specify one or more transaction types in the filter. Notice that TimeTracking transactions aren’t supported. If you set the transaction type filter to “All” (or if you don’t set it at all), the query will be searching only those transaction types that are permissible types for the user currently logged in.
|
|
134
|
+
*
|
|
135
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
136
|
+
*/
|
|
137
|
+
transaction_type_filter?: ReportTxnTypeFilter;
|
|
138
|
+
/**
|
|
139
|
+
* `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.
|
|
140
|
+
*
|
|
141
|
+
* Choose at most one of: `txn_id`, or the set (`currency_filter`, `max_returned`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `transaction_account_filter`, `transaction_class_filter`, `transaction_date_range_filter`, `transaction_detail_level_filter`, `transaction_entity_filter`, `transaction_item_filter`, `transaction_modified_date_range_filter`, `transaction_paid_status_filter`, `transaction_posting_status_filter`, `transaction_type_filter`). Members of a set combine with each other, not with the other choices.
|
|
142
|
+
*/
|
|
143
|
+
txn_id?: string[];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Give exactly one of: `account_type_filter`, or `list_id`, or `full_name`, or `list_id_with_children`, or `full_name_with_children`.
|
|
148
|
+
*/
|
|
149
|
+
export interface TransactionAccountFilter {
|
|
150
|
+
/**
|
|
151
|
+
* Allows you to report on a specific account type.
|
|
152
|
+
*/
|
|
153
|
+
account_type_filter?: "APAndSalesTax" | "APOrCreditCard" | "ARAndAP" | "AccountsPayable" | "AccountsReceivable" | "AllowedFor1099" | "Asset" | "BalanceSheet" | "Bank" | "BankAndARAndAPAndUF" | "BankAndUF" | "CostOfSales" | "CreditCard" | "CurrentAsset" | "CurrentAssetAndExpense" | "CurrentLiability" | "Equity" | "EquityAndIncomeAndExpense" | "ExpenseAndOtherExpense" | "FixedAsset" | "IncomeAndExpense" | "IncomeAndOtherIncome" | "Liability" | "LiabilityAndEquity" | "LongTermLiability" | "NonPosting" | "OrdinaryExpense" | "OrdinaryIncome" | "OrdinaryIncomeAndCOGS" | "OrdinaryIncomeAndExpense" | "OtherAsset" | "OtherCurrentAsset" | "OtherCurrentLiability" | "OtherExpense" | "OtherIncome" | "OtherIncomeOrExpense";
|
|
154
|
+
/**
|
|
155
|
+
* `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.
|
|
156
|
+
*/
|
|
157
|
+
full_name?: string[];
|
|
158
|
+
/**
|
|
159
|
+
* Allows you to filter for data that relates to the specified object and its descendants. For names that don’t have children, `full_name_with_children` is exactly the same as `full_name`.
|
|
160
|
+
*/
|
|
161
|
+
full_name_with_children?: string;
|
|
162
|
+
/**
|
|
163
|
+
* `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`.
|
|
164
|
+
*/
|
|
165
|
+
list_id?: string[];
|
|
166
|
+
/**
|
|
167
|
+
* Allows you to filter for data that relates to the specified object and its descendants.
|
|
168
|
+
*/
|
|
169
|
+
list_id_with_children?: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Give exactly one of: `entity_type_filter`, or `list_id`, or `full_name`, or `list_id_with_children`, or `full_name_with_children`.
|
|
174
|
+
*/
|
|
175
|
+
export interface TransactionEntityFilter {
|
|
176
|
+
/**
|
|
177
|
+
* Allows you to report on a specific name type.
|
|
178
|
+
*/
|
|
179
|
+
entity_type_filter?: "Customer" | "Employee" | "OtherName" | "Vendor";
|
|
180
|
+
/**
|
|
181
|
+
* `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.
|
|
182
|
+
*/
|
|
183
|
+
full_name?: string[];
|
|
184
|
+
/**
|
|
185
|
+
* Allows you to filter for data that relates to the specified object and its descendants. For names that don’t have children, `full_name_with_children` is exactly the same as `full_name`.
|
|
186
|
+
*/
|
|
187
|
+
full_name_with_children?: string;
|
|
188
|
+
/**
|
|
189
|
+
* `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`.
|
|
190
|
+
*/
|
|
191
|
+
list_id?: string[];
|
|
192
|
+
/**
|
|
193
|
+
* Allows you to filter for data that relates to the specified object and its descendants.
|
|
194
|
+
*/
|
|
195
|
+
list_id_with_children?: string;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Give exactly one of: `item_type_filter`, or `list_id`, or `full_name`, or `list_id_with_children`, or `full_name_with_children`.
|
|
200
|
+
*/
|
|
201
|
+
export interface TransactionItemFilter {
|
|
202
|
+
/**
|
|
203
|
+
* `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.
|
|
204
|
+
*/
|
|
205
|
+
full_name?: string[];
|
|
206
|
+
/**
|
|
207
|
+
* Allows you to filter for data that relates to the specified object and its descendants. For names that don’t have children, `full_name_with_children` is exactly the same as `full_name`.
|
|
208
|
+
*/
|
|
209
|
+
full_name_with_children?: string;
|
|
210
|
+
/**
|
|
211
|
+
* Allows you to report on a specific item type.
|
|
212
|
+
*/
|
|
213
|
+
item_type_filter?: "AllExceptFixedAsset" | "Assembly" | "Discount" | "FixedAsset" | "Inventory" | "InventoryAndAssembly" | "NonInventory" | "OtherCharge" | "Payment" | "Sales" | "SalesTax" | "Service";
|
|
214
|
+
/**
|
|
215
|
+
* `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`.
|
|
216
|
+
*/
|
|
217
|
+
list_id?: string[];
|
|
218
|
+
/**
|
|
219
|
+
* Allows you to filter for data that relates to the specified object and its descendants.
|
|
220
|
+
*/
|
|
221
|
+
list_id_with_children?: string;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Give exactly one of: (`from_modified_date`, `to_modified_date`), or `date_macro`.
|
|
226
|
+
*/
|
|
227
|
+
export interface TransactionModifiedDateRangeFilter {
|
|
228
|
+
/**
|
|
229
|
+
* `date_macro` filters by transaction date (not last-modified date). Do not combine `date_macro` with `from_modified_date`/`to_modified_date` in the same query filter set.
|
|
230
|
+
*/
|
|
231
|
+
date_macro?: "All" | "LastCalendarQuarter" | "LastCalendarQuarterToDate" | "LastCalendarYear" | "LastCalendarYearToDate" | "LastFiscalQuarter" | "LastFiscalQuarterToDate" | "LastFiscalYear" | "LastFiscalYearToDate" | "LastMonth" | "LastMonthToDate" | "LastWeek" | "LastWeekToDate" | "NextCalendarQuarter" | "NextCalendarYear" | "NextFiscalQuarter" | "NextFiscalYear" | "NextFourWeeks" | "NextMonth" | "NextWeek" | "ThisCalendarQuarter" | "ThisCalendarQuarterToDate" | "ThisCalendarYear" | "ThisCalendarYearToDate" | "ThisFiscalQuarter" | "ThisFiscalQuarterToDate" | "ThisFiscalYear" | "ThisFiscalYearToDate" | "ThisMonth" | "ThisMonthToDate" | "ThisWeek" | "ThisWeekToDate" | "Today" | "Yesterday";
|
|
232
|
+
/**
|
|
233
|
+
* 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.
|
|
234
|
+
*
|
|
235
|
+
* Format: date-time.
|
|
236
|
+
*/
|
|
237
|
+
from_modified_date?: string;
|
|
238
|
+
/**
|
|
239
|
+
* 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).
|
|
240
|
+
*
|
|
241
|
+
* Format: date-time.
|
|
242
|
+
*/
|
|
243
|
+
to_modified_date?: string;
|
|
244
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Generated from operations.json by scripts/generate-operations.js: don't edit.
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
/** QuickBooks transaction operations. Types: transaction.d.ts. */
|
|
5
|
+
class Transaction {
|
|
6
|
+
#client;
|
|
7
|
+
|
|
8
|
+
/** @param {import("../index").Client} client */
|
|
9
|
+
constructor(client) {
|
|
10
|
+
this.#client = client;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* List transactions (answers in pages, one webhook each).
|
|
15
|
+
* @param {string} connectionId
|
|
16
|
+
* @param {import("./transaction").TransactionQueryParams} params
|
|
17
|
+
* @param {import("./types").OperationOptions} options
|
|
18
|
+
* @returns {Promise<import("./types").QueuedRequest>}
|
|
19
|
+
* @see https://docs.qubesync.com/api-reference/v2/transactions/list-transactions
|
|
20
|
+
*/
|
|
21
|
+
query(connectionId, params, options) {
|
|
22
|
+
return this.#client.queue("transaction.query", connectionId, params, options);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
module.exports = { Transaction };
|
|
@@ -0,0 +1,178 @@
|
|
|
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, ModifiedDateRangeFilter, TxnDateRangeFilter } from "./types";
|
|
5
|
+
|
|
6
|
+
/** QuickBooks transfer operations: `qube.transfer.<action>(connectionId, params, { webhookUrl })`. */
|
|
7
|
+
export declare class Transfer {
|
|
8
|
+
constructor(client: Client);
|
|
9
|
+
/**
|
|
10
|
+
* Create transfer: `POST /connections/{connection_id}/transfers`, queued for QuickBooks.
|
|
11
|
+
*
|
|
12
|
+
* The answer comes to `webhookUrl` as one webhook.
|
|
13
|
+
* Params go in the JSON body.
|
|
14
|
+
*
|
|
15
|
+
* Fields: `amount`, `class_ref`, `def_macro`, `include_ret_element`, `memo`, `request_id`, `transfer_from_account_ref`, `transfer_to_account_ref`, `txn_date`.
|
|
16
|
+
*
|
|
17
|
+
* Resolves to the queued request.
|
|
18
|
+
* @see https://docs.qubesync.com/api-reference/v2/transfers/create-transfer
|
|
19
|
+
*/
|
|
20
|
+
create(connectionId: string, params: TransferCreateParams | undefined, options: OperationOptions): Promise<QueuedRequest>;
|
|
21
|
+
/**
|
|
22
|
+
* List transfers: `GET /connections/{connection_id}/transfers`, 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`, `txn_date_range_filter`, `txn_id`.
|
|
28
|
+
*
|
|
29
|
+
* Resolves to the queued request.
|
|
30
|
+
* @see https://docs.qubesync.com/api-reference/v2/transfers/list-transfers
|
|
31
|
+
*/
|
|
32
|
+
query(connectionId: string, params: TransferQueryParams | undefined, options: OperationOptions): Promise<QueuedRequest>;
|
|
33
|
+
/**
|
|
34
|
+
* Update transfer: `PUT /connections/{connection_id}/transfers`, queued for QuickBooks.
|
|
35
|
+
*
|
|
36
|
+
* The answer comes to `webhookUrl` as one webhook.
|
|
37
|
+
* Params go in the JSON body.
|
|
38
|
+
*
|
|
39
|
+
* Fields: `amount`, `class_ref`, `edit_sequence` (required), `include_ret_element`, `memo`, `request_id`, `transfer_from_account_ref`, `transfer_to_account_ref`, `txn_date`, `txn_id` (required).
|
|
40
|
+
*
|
|
41
|
+
* Resolves to the queued request.
|
|
42
|
+
* @see https://docs.qubesync.com/api-reference/v2/transfers/update-transfer
|
|
43
|
+
*/
|
|
44
|
+
update(connectionId: string, params: TransferUpdateParams, options: OperationOptions): Promise<QueuedRequest>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The params of `transfer.create`: Create transfer.
|
|
49
|
+
*/
|
|
50
|
+
export interface TransferCreateParams {
|
|
51
|
+
/**
|
|
52
|
+
* A monetary amount.
|
|
53
|
+
*/
|
|
54
|
+
amount?: number;
|
|
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
|
+
* `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+.
|
|
61
|
+
*/
|
|
62
|
+
def_macro?: string;
|
|
63
|
+
include_ret_element?: Array<"Amount" | "ClassRef" | "EditSequence" | "FromAccountBalance" | "Memo" | "TimeCreated" | "TimeModified" | "ToAccountBalance" | "TransferFromAccountRef" | "TransferToAccountRef" | "TxnDate" | "TxnID" | "TxnNumber">;
|
|
64
|
+
/**
|
|
65
|
+
* Additional information.
|
|
66
|
+
*/
|
|
67
|
+
memo?: string;
|
|
68
|
+
/**
|
|
69
|
+
* 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`.
|
|
70
|
+
*/
|
|
71
|
+
request_id?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Account that money will be transferred from.
|
|
74
|
+
*/
|
|
75
|
+
transfer_from_account_ref?: CurrencyRef;
|
|
76
|
+
/**
|
|
77
|
+
* Account that money will be transferred to.
|
|
78
|
+
*/
|
|
79
|
+
transfer_to_account_ref?: CurrencyRef;
|
|
80
|
+
/**
|
|
81
|
+
* 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.
|
|
82
|
+
*
|
|
83
|
+
* Format: date.
|
|
84
|
+
*/
|
|
85
|
+
txn_date?: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The params of `transfer.query`: List transfers.
|
|
90
|
+
*/
|
|
91
|
+
export interface TransferQueryParams {
|
|
92
|
+
include_ret_element?: Array<"Amount" | "ClassRef" | "EditSequence" | "FromAccountBalance" | "Memo" | "TimeCreated" | "TimeModified" | "ToAccountBalance" | "TransferFromAccountRef" | "TransferToAccountRef" | "TxnDate" | "TxnID" | "TxnNumber">;
|
|
93
|
+
/**
|
|
94
|
+
* 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.
|
|
95
|
+
*/
|
|
96
|
+
iterator?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* 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.
|
|
99
|
+
*
|
|
100
|
+
* 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.
|
|
101
|
+
*
|
|
102
|
+
* Choose at most one of: `txn_id`, or the set (`max_returned`, `modified_date_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
|
|
103
|
+
*
|
|
104
|
+
* Minimum 1.
|
|
105
|
+
*/
|
|
106
|
+
max_returned?: number;
|
|
107
|
+
/**
|
|
108
|
+
* 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.
|
|
109
|
+
*/
|
|
110
|
+
meta_data?: "MetaDataAndResponseData" | "MetaDataOnly" | "NoMetaData";
|
|
111
|
+
/**
|
|
112
|
+
* 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.
|
|
113
|
+
*
|
|
114
|
+
* Choose at most one of: `txn_id`, or the set (`max_returned`, `modified_date_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
|
|
115
|
+
*/
|
|
116
|
+
modified_date_range_filter?: ModifiedDateRangeFilter;
|
|
117
|
+
/**
|
|
118
|
+
* 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`.
|
|
119
|
+
*/
|
|
120
|
+
request_id?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Filters according to the original transaction dates.
|
|
123
|
+
*
|
|
124
|
+
* Choose at most one of: `txn_id`, or the set (`max_returned`, `modified_date_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
|
|
125
|
+
*/
|
|
126
|
+
txn_date_range_filter?: TxnDateRangeFilter;
|
|
127
|
+
/**
|
|
128
|
+
* `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.
|
|
129
|
+
*
|
|
130
|
+
* Choose at most one of: `txn_id`, or the set (`max_returned`, `modified_date_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
|
|
131
|
+
*/
|
|
132
|
+
txn_id?: string[];
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The params of `transfer.update`: Update transfer.
|
|
137
|
+
*/
|
|
138
|
+
export interface TransferUpdateParams {
|
|
139
|
+
/**
|
|
140
|
+
* A monetary amount.
|
|
141
|
+
*/
|
|
142
|
+
amount?: number;
|
|
143
|
+
/**
|
|
144
|
+
* 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.
|
|
145
|
+
*/
|
|
146
|
+
class_ref?: CurrencyRef;
|
|
147
|
+
/**
|
|
148
|
+
* `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.
|
|
149
|
+
*/
|
|
150
|
+
edit_sequence: string;
|
|
151
|
+
include_ret_element?: Array<"Amount" | "ClassRef" | "EditSequence" | "FromAccountBalance" | "Memo" | "TimeCreated" | "TimeModified" | "ToAccountBalance" | "TransferFromAccountRef" | "TransferToAccountRef" | "TxnDate" | "TxnID" | "TxnNumber">;
|
|
152
|
+
/**
|
|
153
|
+
* Additional information.
|
|
154
|
+
*/
|
|
155
|
+
memo?: string;
|
|
156
|
+
/**
|
|
157
|
+
* 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`.
|
|
158
|
+
*/
|
|
159
|
+
request_id?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Account that money will be transferred from.
|
|
162
|
+
*/
|
|
163
|
+
transfer_from_account_ref?: CurrencyRef;
|
|
164
|
+
/**
|
|
165
|
+
* Account that money will be transferred to.
|
|
166
|
+
*/
|
|
167
|
+
transfer_to_account_ref?: CurrencyRef;
|
|
168
|
+
/**
|
|
169
|
+
* 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.
|
|
170
|
+
*
|
|
171
|
+
* Format: date.
|
|
172
|
+
*/
|
|
173
|
+
txn_date?: string;
|
|
174
|
+
/**
|
|
175
|
+
* `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.
|
|
176
|
+
*/
|
|
177
|
+
txn_id: string;
|
|
178
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Generated from operations.json by scripts/generate-operations.js: don't edit.
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
/** QuickBooks transfer operations. Types: transfer.d.ts. */
|
|
5
|
+
class Transfer {
|
|
6
|
+
#client;
|
|
7
|
+
|
|
8
|
+
/** @param {import("../index").Client} client */
|
|
9
|
+
constructor(client) {
|
|
10
|
+
this.#client = client;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Create transfer.
|
|
15
|
+
* @param {string} connectionId
|
|
16
|
+
* @param {import("./transfer").TransferCreateParams} params
|
|
17
|
+
* @param {import("./types").OperationOptions} options
|
|
18
|
+
* @returns {Promise<import("./types").QueuedRequest>}
|
|
19
|
+
* @see https://docs.qubesync.com/api-reference/v2/transfers/create-transfer
|
|
20
|
+
*/
|
|
21
|
+
create(connectionId, params, options) {
|
|
22
|
+
return this.#client.queue("transfer.create", connectionId, params, options);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* List transfers (answers in pages, one webhook each).
|
|
27
|
+
* @param {string} connectionId
|
|
28
|
+
* @param {import("./transfer").TransferQueryParams} params
|
|
29
|
+
* @param {import("./types").OperationOptions} options
|
|
30
|
+
* @returns {Promise<import("./types").QueuedRequest>}
|
|
31
|
+
* @see https://docs.qubesync.com/api-reference/v2/transfers/list-transfers
|
|
32
|
+
*/
|
|
33
|
+
query(connectionId, params, options) {
|
|
34
|
+
return this.#client.queue("transfer.query", connectionId, params, options);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Update transfer.
|
|
39
|
+
* @param {string} connectionId
|
|
40
|
+
* @param {import("./transfer").TransferUpdateParams} params
|
|
41
|
+
* @param {import("./types").OperationOptions} options
|
|
42
|
+
* @returns {Promise<import("./types").QueuedRequest>}
|
|
43
|
+
* @see https://docs.qubesync.com/api-reference/v2/transfers/update-transfer
|
|
44
|
+
*/
|
|
45
|
+
update(connectionId, params, options) {
|
|
46
|
+
return this.#client.queue("transfer.update", connectionId, params, options);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = { Transfer };
|