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,168 @@
|
|
|
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, NameFilter, NameRangeFilter } from "./types";
|
|
5
|
+
|
|
6
|
+
/** QuickBooks unit of measure set operations: `qube.unitOfMeasureSet.<action>(connectionId, params, { webhookUrl })`. */
|
|
7
|
+
export declare class UnitOfMeasureSet {
|
|
8
|
+
constructor(client: Client);
|
|
9
|
+
/**
|
|
10
|
+
* Create unit of measure set: `POST /connections/{connection_id}/unit-of-measure-sets`, queued for QuickBooks.
|
|
11
|
+
*
|
|
12
|
+
* The answer comes to `webhookUrl` as one webhook.
|
|
13
|
+
* Params go in the JSON body.
|
|
14
|
+
*
|
|
15
|
+
* Fields: `base_unit` (required), `default_unit`, `include_ret_element`, `is_active`, `name` (required), `related_unit`, `request_id`, `unit_of_measure_type` (required).
|
|
16
|
+
*
|
|
17
|
+
* Resolves to the queued request.
|
|
18
|
+
* @see https://docs.qubesync.com/api-reference/v2/unit-of-measure-sets/create-unit-of-measure-set
|
|
19
|
+
*/
|
|
20
|
+
create(connectionId: string, params: UnitOfMeasureSetCreateParams, options: OperationOptions): Promise<QueuedRequest>;
|
|
21
|
+
/**
|
|
22
|
+
* List unit of measure sets: `GET /connections/{connection_id}/unit-of-measure-sets`, 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`, `from_modified_date`, `full_name`, `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/unit-of-measure-sets/list-unit-of-measure-sets
|
|
31
|
+
*/
|
|
32
|
+
query(connectionId: string, params: UnitOfMeasureSetQueryParams | undefined, options: OperationOptions): Promise<QueuedRequest>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The params of `unit_of_measure_set.create`: Create unit of measure set.
|
|
37
|
+
*/
|
|
38
|
+
export interface UnitOfMeasureSetCreateParams {
|
|
39
|
+
/**
|
|
40
|
+
* The unit of measure in a unit of measure set by which quantities of an item are tracked, priced, etc. If the company file is enabled for single unit of measure per item, the base unit is the only unit that is available for transaction line items.
|
|
41
|
+
*/
|
|
42
|
+
base_unit: BaseUnit;
|
|
43
|
+
default_unit?: DefaultUnit[];
|
|
44
|
+
include_ret_element?: Array<"BaseUnit" | "DefaultUnit" | "EditSequence" | "ExternalGUID" | "IsActive" | "ListID" | "Name" | "OwnerID" | "RelatedUnit" | "TimeCreated" | "TimeModified" | "TxnID" | "TxnNumber" | "UnitOfMeasureType">;
|
|
45
|
+
/**
|
|
46
|
+
* If `is_active` is true, this object is currently enabled for use by QuickBooks. The default value is true.
|
|
47
|
+
*/
|
|
48
|
+
is_active?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Name is the case-insensitive short name of a list object (without ancestors). It must be unique within its hierarchy scope. Hierarchical lists can reuse the same Name in different branches because FullName remains distinct.
|
|
51
|
+
*/
|
|
52
|
+
name: string;
|
|
53
|
+
related_unit?: RelatedUnit[];
|
|
54
|
+
/**
|
|
55
|
+
* 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`.
|
|
56
|
+
*/
|
|
57
|
+
request_id?: string;
|
|
58
|
+
/**
|
|
59
|
+
* The type of the unit of measure. This can be one of the values you see in the QuickBooks UI when you create a new UOM set, such as Count, or it can be your own value, which in the UI you can specify by selecting “Other” then defining it.
|
|
60
|
+
*/
|
|
61
|
+
unit_of_measure_type: "Area" | "Count" | "Length" | "Other" | "Time" | "Volume" | "Weight";
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The params of `unit_of_measure_set.query`: List unit of measure sets.
|
|
66
|
+
*/
|
|
67
|
+
export interface UnitOfMeasureSetQueryParams {
|
|
68
|
+
/**
|
|
69
|
+
* 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.
|
|
70
|
+
*
|
|
71
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
72
|
+
*/
|
|
73
|
+
active_status?: "ActiveOnly" | "All" | "InactiveOnly";
|
|
74
|
+
/**
|
|
75
|
+
* 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.
|
|
76
|
+
*
|
|
77
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
78
|
+
*
|
|
79
|
+
* Format: date-time.
|
|
80
|
+
*/
|
|
81
|
+
from_modified_date?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
84
|
+
*/
|
|
85
|
+
full_name?: string[];
|
|
86
|
+
include_ret_element?: Array<"BaseUnit" | "DefaultUnit" | "EditSequence" | "IsActive" | "ListID" | "Name" | "RelatedUnit" | "TimeCreated" | "TimeModified" | "UnitOfMeasureType">;
|
|
87
|
+
/**
|
|
88
|
+
* `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`.
|
|
89
|
+
*
|
|
90
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
91
|
+
*/
|
|
92
|
+
list_id?: string[];
|
|
93
|
+
/**
|
|
94
|
+
* 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.
|
|
95
|
+
*
|
|
96
|
+
* 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.
|
|
97
|
+
*
|
|
98
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
99
|
+
*
|
|
100
|
+
* Minimum 1.
|
|
101
|
+
*/
|
|
102
|
+
max_returned?: number;
|
|
103
|
+
/**
|
|
104
|
+
* 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.
|
|
105
|
+
*/
|
|
106
|
+
meta_data?: "MetaDataAndResponseData" | "MetaDataOnly" | "NoMetaData";
|
|
107
|
+
/**
|
|
108
|
+
* Filters according to the object’s Name.
|
|
109
|
+
*
|
|
110
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
111
|
+
*/
|
|
112
|
+
name_filter?: NameFilter;
|
|
113
|
+
/**
|
|
114
|
+
* Filters according to the object’s Name.
|
|
115
|
+
*
|
|
116
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
117
|
+
*/
|
|
118
|
+
name_range_filter?: NameRangeFilter;
|
|
119
|
+
/**
|
|
120
|
+
* 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`.
|
|
121
|
+
*/
|
|
122
|
+
request_id?: string;
|
|
123
|
+
/**
|
|
124
|
+
* 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).
|
|
125
|
+
*
|
|
126
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
127
|
+
*
|
|
128
|
+
* Format: date-time.
|
|
129
|
+
*/
|
|
130
|
+
to_modified_date?: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface BaseUnit {
|
|
134
|
+
/**
|
|
135
|
+
* The is the short “identifier” for a unit of measure that shows up in transaction line items in the U/M field in the QuickBooks UI.
|
|
136
|
+
*/
|
|
137
|
+
abbreviation: string;
|
|
138
|
+
/**
|
|
139
|
+
* Name is the case-insensitive short name of a list object (without ancestors). It must be unique within its hierarchy scope. Hierarchical lists can reuse the same Name in different branches because FullName remains distinct.
|
|
140
|
+
*/
|
|
141
|
+
name: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface DefaultUnit {
|
|
145
|
+
/**
|
|
146
|
+
* In a related unit within a unit of measure set, the name you want the unit to have. This name is displayed in the QuickBooks as an available unit for the item, if the company is enabled for multiple units of measure per item.
|
|
147
|
+
*/
|
|
148
|
+
unit: string;
|
|
149
|
+
/**
|
|
150
|
+
* In a default unit of measure, this specifies whether the default is to be used for purchase line items, sales line items, or shipping lines.
|
|
151
|
+
*/
|
|
152
|
+
unit_used_for: "Purchase" | "Sales" | "Shipping";
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface RelatedUnit {
|
|
156
|
+
/**
|
|
157
|
+
* The is the short “identifier” for a unit of measure that shows up in transaction line items in the U/M field in the QuickBooks UI.
|
|
158
|
+
*/
|
|
159
|
+
abbreviation: string;
|
|
160
|
+
/**
|
|
161
|
+
* Within a unit of measure set, in any of the related units in that set, this indicates how many base units are in the related unit. That is, if the base unit is “box”, and the related unit is “case” with a conversion ratio of 10, that means there are 10 boxes in a case.
|
|
162
|
+
*/
|
|
163
|
+
conversion_ratio: number;
|
|
164
|
+
/**
|
|
165
|
+
* Name is the case-insensitive short name of a list object (without ancestors). It must be unique within its hierarchy scope. Hierarchical lists can reuse the same Name in different branches because FullName remains distinct.
|
|
166
|
+
*/
|
|
167
|
+
name: string;
|
|
168
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Generated from operations.json by scripts/generate-operations.js: don't edit.
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
/** QuickBooks unit of measure set operations. Types: unit_of_measure_set.d.ts. */
|
|
5
|
+
class UnitOfMeasureSet {
|
|
6
|
+
#client;
|
|
7
|
+
|
|
8
|
+
/** @param {import("../index").Client} client */
|
|
9
|
+
constructor(client) {
|
|
10
|
+
this.#client = client;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Create unit of measure set.
|
|
15
|
+
* @param {string} connectionId
|
|
16
|
+
* @param {import("./unit_of_measure_set").UnitOfMeasureSetCreateParams} params
|
|
17
|
+
* @param {import("./types").OperationOptions} options
|
|
18
|
+
* @returns {Promise<import("./types").QueuedRequest>}
|
|
19
|
+
* @see https://docs.qubesync.com/api-reference/v2/unit-of-measure-sets/create-unit-of-measure-set
|
|
20
|
+
*/
|
|
21
|
+
create(connectionId, params, options) {
|
|
22
|
+
return this.#client.queue("unit_of_measure_set.create", connectionId, params, options);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* List unit of measure sets.
|
|
27
|
+
* @param {string} connectionId
|
|
28
|
+
* @param {import("./unit_of_measure_set").UnitOfMeasureSetQueryParams} params
|
|
29
|
+
* @param {import("./types").OperationOptions} options
|
|
30
|
+
* @returns {Promise<import("./types").QueuedRequest>}
|
|
31
|
+
* @see https://docs.qubesync.com/api-reference/v2/unit-of-measure-sets/list-unit-of-measure-sets
|
|
32
|
+
*/
|
|
33
|
+
query(connectionId, params, options) {
|
|
34
|
+
return this.#client.queue("unit_of_measure_set.query", connectionId, params, options);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
module.exports = { UnitOfMeasureSet };
|
|
@@ -0,0 +1,168 @@
|
|
|
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, NameFilter, NameRangeFilter } from "./types";
|
|
5
|
+
|
|
6
|
+
/** QuickBooks vehicle operations: `qube.vehicle.<action>(connectionId, params, { webhookUrl })`. */
|
|
7
|
+
export declare class Vehicle {
|
|
8
|
+
constructor(client: Client);
|
|
9
|
+
/**
|
|
10
|
+
* Create vehicle: `POST /connections/{connection_id}/vehicles`, queued for QuickBooks.
|
|
11
|
+
*
|
|
12
|
+
* The answer comes to `webhookUrl` as one webhook.
|
|
13
|
+
* Params go in the JSON body.
|
|
14
|
+
*
|
|
15
|
+
* Fields: `desc`, `include_ret_element`, `is_active`, `name` (required), `request_id`.
|
|
16
|
+
*
|
|
17
|
+
* Resolves to the queued request.
|
|
18
|
+
* @see https://docs.qubesync.com/api-reference/v2/vehicles/create-vehicle
|
|
19
|
+
*/
|
|
20
|
+
create(connectionId: string, params: VehicleCreateParams, options: OperationOptions): Promise<QueuedRequest>;
|
|
21
|
+
/**
|
|
22
|
+
* List vehicles: `GET /connections/{connection_id}/vehicles`, 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`, `from_modified_date`, `full_name`, `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/vehicles/list-vehicles
|
|
31
|
+
*/
|
|
32
|
+
query(connectionId: string, params: VehicleQueryParams | undefined, options: OperationOptions): Promise<QueuedRequest>;
|
|
33
|
+
/**
|
|
34
|
+
* Update vehicle: `PUT /connections/{connection_id}/vehicles`, queued for QuickBooks.
|
|
35
|
+
*
|
|
36
|
+
* The answer comes to `webhookUrl` as one webhook.
|
|
37
|
+
* Params go in the JSON body.
|
|
38
|
+
*
|
|
39
|
+
* Fields: `desc`, `edit_sequence` (required), `include_ret_element`, `is_active`, `list_id` (required), `name`, `request_id`.
|
|
40
|
+
*
|
|
41
|
+
* Resolves to the queued request.
|
|
42
|
+
* @see https://docs.qubesync.com/api-reference/v2/vehicles/update-vehicle
|
|
43
|
+
*/
|
|
44
|
+
update(connectionId: string, params: VehicleUpdateParams, options: OperationOptions): Promise<QueuedRequest>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The params of `vehicle.create`: Create vehicle.
|
|
49
|
+
*/
|
|
50
|
+
export interface VehicleCreateParams {
|
|
51
|
+
/**
|
|
52
|
+
* A descriptive text field.
|
|
53
|
+
*/
|
|
54
|
+
desc?: string;
|
|
55
|
+
include_ret_element?: Array<"Desc" | "EditSequence" | "ExternalGUID" | "IsActive" | "ListID" | "Name" | "OwnerID" | "TimeCreated" | "TimeModified" | "TxnID" | "TxnNumber">;
|
|
56
|
+
/**
|
|
57
|
+
* If `is_active` is true, this object is currently enabled for use by QuickBooks. The default value is true.
|
|
58
|
+
*/
|
|
59
|
+
is_active?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Name is the case-insensitive short name of a list object (without ancestors). It must be unique within its hierarchy scope. Hierarchical lists can reuse the same Name in different branches because FullName remains distinct.
|
|
62
|
+
*/
|
|
63
|
+
name: string;
|
|
64
|
+
/**
|
|
65
|
+
* 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`.
|
|
66
|
+
*/
|
|
67
|
+
request_id?: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The params of `vehicle.query`: List vehicles.
|
|
72
|
+
*/
|
|
73
|
+
export interface VehicleQueryParams {
|
|
74
|
+
/**
|
|
75
|
+
* 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.
|
|
76
|
+
*
|
|
77
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
78
|
+
*/
|
|
79
|
+
active_status?: "ActiveOnly" | "All" | "InactiveOnly";
|
|
80
|
+
/**
|
|
81
|
+
* 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.
|
|
82
|
+
*
|
|
83
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
84
|
+
*
|
|
85
|
+
* Format: date-time.
|
|
86
|
+
*/
|
|
87
|
+
from_modified_date?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
90
|
+
*/
|
|
91
|
+
full_name?: string[];
|
|
92
|
+
include_ret_element?: Array<"Desc" | "EditSequence" | "IsActive" | "ListID" | "Name" | "TimeCreated" | "TimeModified">;
|
|
93
|
+
/**
|
|
94
|
+
* `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`.
|
|
95
|
+
*
|
|
96
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
97
|
+
*/
|
|
98
|
+
list_id?: string[];
|
|
99
|
+
/**
|
|
100
|
+
* 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.
|
|
101
|
+
*
|
|
102
|
+
* 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.
|
|
103
|
+
*
|
|
104
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
105
|
+
*
|
|
106
|
+
* Minimum 1.
|
|
107
|
+
*/
|
|
108
|
+
max_returned?: number;
|
|
109
|
+
/**
|
|
110
|
+
* 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.
|
|
111
|
+
*/
|
|
112
|
+
meta_data?: "MetaDataAndResponseData" | "MetaDataOnly" | "NoMetaData";
|
|
113
|
+
/**
|
|
114
|
+
* Filters according to the object’s Name.
|
|
115
|
+
*
|
|
116
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
117
|
+
*/
|
|
118
|
+
name_filter?: NameFilter;
|
|
119
|
+
/**
|
|
120
|
+
* Filters according to the object’s Name.
|
|
121
|
+
*
|
|
122
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
123
|
+
*/
|
|
124
|
+
name_range_filter?: NameRangeFilter;
|
|
125
|
+
/**
|
|
126
|
+
* 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`.
|
|
127
|
+
*/
|
|
128
|
+
request_id?: string;
|
|
129
|
+
/**
|
|
130
|
+
* 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).
|
|
131
|
+
*
|
|
132
|
+
* Choose at most one of: `list_id`, or `full_name`, or the set (`active_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.
|
|
133
|
+
*
|
|
134
|
+
* Format: date-time.
|
|
135
|
+
*/
|
|
136
|
+
to_modified_date?: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The params of `vehicle.update`: Update vehicle.
|
|
141
|
+
*/
|
|
142
|
+
export interface VehicleUpdateParams {
|
|
143
|
+
/**
|
|
144
|
+
* A descriptive text field.
|
|
145
|
+
*/
|
|
146
|
+
desc?: string;
|
|
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<"Desc" | "EditSequence" | "ExternalGUID" | "IsActive" | "ListID" | "Name" | "OwnerID" | "TimeCreated" | "TimeModified" | "TxnID" | "TxnNumber">;
|
|
152
|
+
/**
|
|
153
|
+
* If `is_active` is true, this object is currently enabled for use by QuickBooks. The default value is true.
|
|
154
|
+
*/
|
|
155
|
+
is_active?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* `list_id` and FullName 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 FullName and `list_id` are supplied in a request, QuickBooks uses `list_id` and ignores FullName.
|
|
158
|
+
*/
|
|
159
|
+
list_id: string;
|
|
160
|
+
/**
|
|
161
|
+
* Name is the case-insensitive short name of a list object (without ancestors). It must be unique within its hierarchy scope. Hierarchical lists can reuse the same Name in different branches because FullName remains distinct.
|
|
162
|
+
*/
|
|
163
|
+
name?: string;
|
|
164
|
+
/**
|
|
165
|
+
* 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`.
|
|
166
|
+
*/
|
|
167
|
+
request_id?: string;
|
|
168
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Generated from operations.json by scripts/generate-operations.js: don't edit.
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
/** QuickBooks vehicle operations. Types: vehicle.d.ts. */
|
|
5
|
+
class Vehicle {
|
|
6
|
+
#client;
|
|
7
|
+
|
|
8
|
+
/** @param {import("../index").Client} client */
|
|
9
|
+
constructor(client) {
|
|
10
|
+
this.#client = client;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Create vehicle.
|
|
15
|
+
* @param {string} connectionId
|
|
16
|
+
* @param {import("./vehicle").VehicleCreateParams} params
|
|
17
|
+
* @param {import("./types").OperationOptions} options
|
|
18
|
+
* @returns {Promise<import("./types").QueuedRequest>}
|
|
19
|
+
* @see https://docs.qubesync.com/api-reference/v2/vehicles/create-vehicle
|
|
20
|
+
*/
|
|
21
|
+
create(connectionId, params, options) {
|
|
22
|
+
return this.#client.queue("vehicle.create", connectionId, params, options);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* List vehicles.
|
|
27
|
+
* @param {string} connectionId
|
|
28
|
+
* @param {import("./vehicle").VehicleQueryParams} params
|
|
29
|
+
* @param {import("./types").OperationOptions} options
|
|
30
|
+
* @returns {Promise<import("./types").QueuedRequest>}
|
|
31
|
+
* @see https://docs.qubesync.com/api-reference/v2/vehicles/list-vehicles
|
|
32
|
+
*/
|
|
33
|
+
query(connectionId, params, options) {
|
|
34
|
+
return this.#client.queue("vehicle.query", connectionId, params, options);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Update vehicle.
|
|
39
|
+
* @param {string} connectionId
|
|
40
|
+
* @param {import("./vehicle").VehicleUpdateParams} params
|
|
41
|
+
* @param {import("./types").OperationOptions} options
|
|
42
|
+
* @returns {Promise<import("./types").QueuedRequest>}
|
|
43
|
+
* @see https://docs.qubesync.com/api-reference/v2/vehicles/update-vehicle
|
|
44
|
+
*/
|
|
45
|
+
update(connectionId, params, options) {
|
|
46
|
+
return this.#client.queue("vehicle.update", connectionId, params, options);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = { Vehicle };
|
|
@@ -0,0 +1,147 @@
|
|
|
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 vehicle mileage operations: `qube.vehicleMileage.<action>(connectionId, params, { webhookUrl })`. */
|
|
7
|
+
export declare class VehicleMileage {
|
|
8
|
+
constructor(client: Client);
|
|
9
|
+
/**
|
|
10
|
+
* Create vehicle mileage: `POST /connections/{connection_id}/vehicle-mileages`, 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`, `include_ret_element`, `item_ref`, `notes`, `odometer_end`, `odometer_start`, `request_id`, `total_miles`, `trip_end_date`, `trip_start_date`, `vehicle_ref` (required).
|
|
16
|
+
*
|
|
17
|
+
* Give exactly one of: (`odometer_end`, `odometer_start`), or `total_miles`.
|
|
18
|
+
*
|
|
19
|
+
* Resolves to the queued request.
|
|
20
|
+
* @see https://docs.qubesync.com/api-reference/v2/vehicle-mileages/create-vehicle-mileage
|
|
21
|
+
*/
|
|
22
|
+
create(connectionId: string, params: VehicleMileageCreateParams, options: OperationOptions): Promise<QueuedRequest>;
|
|
23
|
+
/**
|
|
24
|
+
* List vehicle mileages: `GET /connections/{connection_id}/vehicle-mileages`, queued for QuickBooks.
|
|
25
|
+
*
|
|
26
|
+
* QuickBooks answers in pages: each page comes to `webhookUrl` as its own webhook.
|
|
27
|
+
* Params go in the query string.
|
|
28
|
+
*
|
|
29
|
+
* Fields: `include_ret_element`, `iterator`, `max_returned`, `meta_data`, `modified_date_range_filter`, `request_id`, `txn_date_range_filter`, `txn_id`.
|
|
30
|
+
*
|
|
31
|
+
* Resolves to the queued request.
|
|
32
|
+
* @see https://docs.qubesync.com/api-reference/v2/vehicle-mileages/list-vehicle-mileages
|
|
33
|
+
*/
|
|
34
|
+
query(connectionId: string, params: VehicleMileageQueryParams | undefined, options: OperationOptions): Promise<QueuedRequest>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The params of `vehicle_mileage.create`: Create vehicle mileage.
|
|
39
|
+
*
|
|
40
|
+
* Give exactly one of: (`odometer_end`, `odometer_start`), or `total_miles`.
|
|
41
|
+
*/
|
|
42
|
+
export interface VehicleMileageCreateParams {
|
|
43
|
+
/**
|
|
44
|
+
* The billing status of this item line or expense line.
|
|
45
|
+
*/
|
|
46
|
+
billable_status?: "Billable" | "HasBeenBilled" | "NotBillable";
|
|
47
|
+
/**
|
|
48
|
+
* 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.
|
|
49
|
+
*/
|
|
50
|
+
class_ref?: CurrencyRef;
|
|
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
|
+
customer_ref?: CurrencyRef;
|
|
55
|
+
/**
|
|
56
|
+
* `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+.
|
|
57
|
+
*/
|
|
58
|
+
def_macro?: string;
|
|
59
|
+
include_ret_element?: Array<"BillableAmount" | "BillableRate" | "BillableStatus" | "ClassRef" | "CustomerRef" | "EditSequence" | "ExternalGUID" | "ItemRef" | "ListID" | "Notes" | "OdometerEnd" | "OdometerStart" | "OwnerID" | "StandardMileageRate" | "StandardMileageTotalAmount" | "TimeCreated" | "TimeModified" | "TotalMiles" | "TripEndDate" | "TripStartDate" | "TxnID" | "TxnNumber" | "VehicleRef">;
|
|
60
|
+
/**
|
|
61
|
+
* `item_ref` may accept all item types or a restricted subset, depending on the request. Examples: PurchaseOrder and Bill do not allow discount or sales-tax items; VehicleMileageAdd requires a service or other-charge item; BillingRateAdd requires a service item. If both `full_name` and `list_id` are provided, `full_name` is ignored.
|
|
62
|
+
*/
|
|
63
|
+
item_ref?: CurrencyRef;
|
|
64
|
+
/**
|
|
65
|
+
* Additional information.
|
|
66
|
+
*/
|
|
67
|
+
notes?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Odometer reading at the end of the trip. `odometer_start` and `odometer_end` must both be specified if `total_miles` isn’t specified. QuickBooks will calculate the total trip miles from these two values. If `total_miles` is specified, you can’t specify `odometer_start` and `odometer_end`.
|
|
70
|
+
*/
|
|
71
|
+
odometer_end?: number;
|
|
72
|
+
/**
|
|
73
|
+
* Odometer reading at the start of the trip. `odometer_start` and `odometer_end` must both be specified if `total_miles` isn’t specified. QuickBooks will calculate the total trip miles from these two values. If `total_miles` is specified, you can’t specify `odometer_start` and `odometer_end`.
|
|
74
|
+
*/
|
|
75
|
+
odometer_start?: number;
|
|
76
|
+
/**
|
|
77
|
+
* 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`.
|
|
78
|
+
*/
|
|
79
|
+
request_id?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Total trip miles. If `total_miles` is specified, you can’t specify `odometer_start` and `odometer_end`. If you use `odometer_start` and `odometer_end` instead of `total_miles`, QuickBooks will calculate the total trip miles from these two values.
|
|
82
|
+
*/
|
|
83
|
+
total_miles?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Date the trip ended. If left blank, the current date at the time of transaction will be used. Notice that only dates are supported for vehicle mileage, so make sure you enter any datetime values with dates only, no time values. That is, 2002-02-02 will work for trip end date or start date, but 2002-02-02T12:20:20 won’t work.
|
|
86
|
+
*
|
|
87
|
+
* Format: date.
|
|
88
|
+
*/
|
|
89
|
+
trip_end_date?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Date the trip began. If left blank, the current date at the time of transaction will be used. Notice that only dates are supported for vehicle mileage, so make sure you enter any datetime values with dates only, no time values. That is, 2002-02-02 will work for trip end date or start date, but 2002-02-02T12:20:20 won’t work.
|
|
92
|
+
*
|
|
93
|
+
* Format: date.
|
|
94
|
+
*/
|
|
95
|
+
trip_start_date?: string;
|
|
96
|
+
/**
|
|
97
|
+
* A vehicle for use in VehicleMileage transactions. Each vehicle name must be unique.
|
|
98
|
+
*/
|
|
99
|
+
vehicle_ref: CurrencyRef;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The params of `vehicle_mileage.query`: List vehicle mileages.
|
|
104
|
+
*/
|
|
105
|
+
export interface VehicleMileageQueryParams {
|
|
106
|
+
include_ret_element?: Array<"BillableAmount" | "BillableRate" | "BillableStatus" | "ClassRef" | "CustomerRef" | "EditSequence" | "ItemRef" | "Notes" | "OdometerEnd" | "OdometerStart" | "StandardMileageRate" | "StandardMileageTotalAmount" | "TimeCreated" | "TimeModified" | "TotalMiles" | "TripEndDate" | "TripStartDate" | "TxnID" | "VehicleRef">;
|
|
107
|
+
/**
|
|
108
|
+
* 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.
|
|
109
|
+
*/
|
|
110
|
+
iterator?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* 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.
|
|
113
|
+
*
|
|
114
|
+
* 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.
|
|
115
|
+
*
|
|
116
|
+
* 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.
|
|
117
|
+
*
|
|
118
|
+
* Minimum 1.
|
|
119
|
+
*/
|
|
120
|
+
max_returned?: number;
|
|
121
|
+
/**
|
|
122
|
+
* 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.
|
|
123
|
+
*/
|
|
124
|
+
meta_data?: "MetaDataAndResponseData" | "MetaDataOnly" | "NoMetaData";
|
|
125
|
+
/**
|
|
126
|
+
* 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.
|
|
127
|
+
*
|
|
128
|
+
* 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.
|
|
129
|
+
*/
|
|
130
|
+
modified_date_range_filter?: ModifiedDateRangeFilter;
|
|
131
|
+
/**
|
|
132
|
+
* 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`.
|
|
133
|
+
*/
|
|
134
|
+
request_id?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Filters according to the original transaction dates.
|
|
137
|
+
*
|
|
138
|
+
* 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.
|
|
139
|
+
*/
|
|
140
|
+
txn_date_range_filter?: TxnDateRangeFilter;
|
|
141
|
+
/**
|
|
142
|
+
* `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.
|
|
143
|
+
*
|
|
144
|
+
* 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.
|
|
145
|
+
*/
|
|
146
|
+
txn_id?: string[];
|
|
147
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Generated from operations.json by scripts/generate-operations.js: don't edit.
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
/** QuickBooks vehicle mileage operations. Types: vehicle_mileage.d.ts. */
|
|
5
|
+
class VehicleMileage {
|
|
6
|
+
#client;
|
|
7
|
+
|
|
8
|
+
/** @param {import("../index").Client} client */
|
|
9
|
+
constructor(client) {
|
|
10
|
+
this.#client = client;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Create vehicle mileage.
|
|
15
|
+
* @param {string} connectionId
|
|
16
|
+
* @param {import("./vehicle_mileage").VehicleMileageCreateParams} params
|
|
17
|
+
* @param {import("./types").OperationOptions} options
|
|
18
|
+
* @returns {Promise<import("./types").QueuedRequest>}
|
|
19
|
+
* @see https://docs.qubesync.com/api-reference/v2/vehicle-mileages/create-vehicle-mileage
|
|
20
|
+
*/
|
|
21
|
+
create(connectionId, params, options) {
|
|
22
|
+
return this.#client.queue("vehicle_mileage.create", connectionId, params, options);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* List vehicle mileages (answers in pages, one webhook each).
|
|
27
|
+
* @param {string} connectionId
|
|
28
|
+
* @param {import("./vehicle_mileage").VehicleMileageQueryParams} params
|
|
29
|
+
* @param {import("./types").OperationOptions} options
|
|
30
|
+
* @returns {Promise<import("./types").QueuedRequest>}
|
|
31
|
+
* @see https://docs.qubesync.com/api-reference/v2/vehicle-mileages/list-vehicle-mileages
|
|
32
|
+
*/
|
|
33
|
+
query(connectionId, params, options) {
|
|
34
|
+
return this.#client.queue("vehicle_mileage.query", connectionId, params, options);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
module.exports = { VehicleMileage };
|