conductor-node 0.0.10 → 0.0.13
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/README.md +3 -5
- package/dist/Client.d.ts +1 -1
- package/dist/Client.js +5 -4
- package/dist/qb/ClientQBD.d.ts +26 -11
- package/dist/qb/ClientQBD.js +41 -13
- package/dist/qb/qbXMLTypes/Account.d.ts +1 -5
- package/dist/qb/qbXMLTypes/Customer.d.ts +152 -0
- package/dist/qb/qbXMLTypes/Customer.js +2 -0
- package/dist/qb/qbXMLTypes/Vendor.d.ts +51 -42
- package/dist/qb/qbXMLTypes/shared.d.ts +45 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -1
- package/src/Client.ts +0 -12
- package/src/qb/ClientQBD.ts +0 -191
- package/src/qb/qbXMLTypes/Account.ts +0 -313
- package/src/qb/qbXMLTypes/Employee.ts +0 -501
- package/src/qb/qbXMLTypes/Vendor.ts +0 -190
- package/src/qb/qbXMLTypes/shared.ts +0 -84
- package/tsconfig.json +0 -18
package/README.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
# Conductor Node.js Library
|
|
2
2
|
|
|
3
|
-
The Conductor Node.js library provides convenient access to the Conductor API from applications written in server-side JavaScript.
|
|
4
|
-
|
|
5
|
-
There are zero dependencies.
|
|
3
|
+
The Conductor Node.js library provides convenient access to the Conductor API from applications written in server-side JavaScript. Zero dependencies.
|
|
6
4
|
|
|
7
5
|
## Requirements
|
|
8
6
|
|
|
9
|
-
1. A running version of QuickBooks Desktop with QuickBooks Web Connector configured for Conductor. See the [Conductor Getting Started guide](https://www.notion.so/conductor-io/Conductor-Documentation-Getting-Started-7f0f42593d444337b0b3200c771d98e6)
|
|
7
|
+
1. A running version of QuickBooks Desktop with QuickBooks Web Connector configured for Conductor. See the [Conductor Getting Started guide](https://www.notion.so/conductor-io/Conductor-Documentation-Getting-Started-7f0f42593d444337b0b3200c771d98e6).
|
|
10
8
|
2. A Conductor API key from Danny.
|
|
11
9
|
|
|
12
10
|
## Installation
|
|
@@ -21,7 +19,7 @@ The package must be configured with your account's secret key, which is availabl
|
|
|
21
19
|
|
|
22
20
|
Currently supports executing any [QuickBooks Desktop API](https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop) via JSON and receiving the response in JSON. In the future, Conductor will incorporate extensive typings for these APIs.
|
|
23
21
|
|
|
24
|
-
To send a request to a specific QuickBooks Desktop user, you must also supply the username in their `.qwc` file that you provided them.
|
|
22
|
+
To send a request to a specific QuickBooks Desktop user, you must also supply the username that is in their `.qwc` file that you provided them.
|
|
25
23
|
|
|
26
24
|
```ts
|
|
27
25
|
import Conductor from "conductor-node";
|
package/dist/Client.d.ts
CHANGED
package/dist/Client.js
CHANGED
|
@@ -7,10 +7,11 @@ const ClientQBD_1 = __importDefault(require("./qb/ClientQBD"));
|
|
|
7
7
|
class Client {
|
|
8
8
|
/** QuickBooks Desktop integration. */
|
|
9
9
|
qbd;
|
|
10
|
-
constructor(apiKey, verbose = false) {
|
|
11
|
-
// Do not assign
|
|
12
|
-
//
|
|
13
|
-
|
|
10
|
+
constructor(apiKey, verbose = false, environment = "development") {
|
|
11
|
+
// Do not assign the passed parameters to the root `Client` to avoid
|
|
12
|
+
// exposing them as properties to the user and mixing them with the
|
|
13
|
+
// integrations, like `qbd`.
|
|
14
|
+
this.qbd = new ClientQBD_1.default(apiKey, verbose, environment);
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
exports.default = Client;
|
package/dist/qb/ClientQBD.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { AccountAdd, AccountQueryRq, AccountRet } from "../qb/qbXMLTypes/Account";
|
|
2
|
+
import type { CustomerQueryRq, CustomerRet } from "../qb/qbXMLTypes/Customer";
|
|
2
3
|
import type { EmployeeAdd, EmployeeMod, EmployeeQueryRq, EmployeeRet } from "../qb/qbXMLTypes/Employee";
|
|
3
4
|
import type { VendorQueryRq, VendorRet } from "../qb/qbXMLTypes/Vendor";
|
|
4
5
|
export default class ClientQBD {
|
|
5
6
|
private readonly apiKey;
|
|
6
7
|
private readonly verbose;
|
|
7
|
-
|
|
8
|
+
private readonly serverURL;
|
|
9
|
+
constructor(apiKey: string, verbose: boolean, environment: string);
|
|
8
10
|
/**
|
|
9
11
|
* Send any QBXML request to QuickBooks Desktop.
|
|
10
12
|
*
|
|
@@ -12,26 +14,39 @@ export default class ClientQBD {
|
|
|
12
14
|
*/
|
|
13
15
|
sendRequest(qbwcUsername: string, requestObj: object): Promise<object>;
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
17
|
+
* Perform the same activities as a user does in the QB New Account form,
|
|
18
|
+
* which can be accessed in QB by selecting "Lists" → "Chart of Accounts" →
|
|
19
|
+
* "Accounts" → "New".
|
|
18
20
|
*
|
|
19
21
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountadd
|
|
20
22
|
*/
|
|
21
23
|
accountAdd(qbwcUsername: string, params: AccountAdd): Promise<AccountRet>;
|
|
22
24
|
/**
|
|
23
|
-
* `AccountQuery` is a list query that returns data for all accounts that
|
|
24
|
-
* the provided filter criteria. Notice that it returns only data
|
|
25
|
-
* the account itself. It does not return any data about
|
|
26
|
-
* involving the account. It does, however, return the parent
|
|
27
|
-
* there is one. You can search across all accounts or you can
|
|
28
|
-
* account type and search only those.
|
|
25
|
+
* `AccountQuery` is a list query that returns data for all accounts that
|
|
26
|
+
* match the provided filter criteria. Notice that it returns only data
|
|
27
|
+
* internal to the account itself. It does not return any data about
|
|
28
|
+
* transactions involving the account. It does, however, return the parent
|
|
29
|
+
* account, if there is one. You can search across all accounts or you can
|
|
30
|
+
* specify an account type and search only those.
|
|
29
31
|
*
|
|
30
32
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountquery
|
|
31
33
|
*/
|
|
32
34
|
accountQuery(qbwcUsername: string, params: AccountQueryRq): Promise<AccountRet>;
|
|
33
35
|
/**
|
|
34
|
-
*
|
|
36
|
+
* Returns data for the specified customers.
|
|
37
|
+
*
|
|
38
|
+
* Important: We highly recommend that you use the `IncludeRetElement` tag in
|
|
39
|
+
* your `CustomerQuery` to include any data you want but do NOT include the
|
|
40
|
+
* `ShipAddress` data in the `Response`, unless you need to get the shipping
|
|
41
|
+
* address for a particular customer. Excluding the shipping address data will
|
|
42
|
+
* significantly improve the performance of the `CustomerQuery`.
|
|
43
|
+
*
|
|
44
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/customerquery
|
|
45
|
+
*/
|
|
46
|
+
customerQuery(qbwcUsername: string, params: CustomerQueryRq): Promise<CustomerRet>;
|
|
47
|
+
/**
|
|
48
|
+
* Adds an employee with personal data about the employee as well as certain
|
|
49
|
+
* payroll-related data.
|
|
35
50
|
*
|
|
36
51
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/employeeAdd
|
|
37
52
|
*/
|
package/dist/qb/ClientQBD.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const SERVER_URL = "https://conductor.ngrok.io";
|
|
4
3
|
class ClientQBD {
|
|
5
4
|
apiKey;
|
|
6
5
|
verbose;
|
|
7
|
-
|
|
6
|
+
serverURL;
|
|
7
|
+
constructor(apiKey, verbose, environment) {
|
|
8
8
|
this.apiKey = apiKey;
|
|
9
9
|
this.verbose = verbose;
|
|
10
|
+
if (environment === "development") {
|
|
11
|
+
this.serverURL = "https://conductor.ngrok.io";
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
throw new Error(`Unsupported environment: ${environment}`);
|
|
15
|
+
}
|
|
10
16
|
}
|
|
11
17
|
/**
|
|
12
18
|
* Send any QBXML request to QuickBooks Desktop.
|
|
@@ -17,7 +23,7 @@ class ClientQBD {
|
|
|
17
23
|
if (this.verbose) {
|
|
18
24
|
console.log(`Client sent request for user ${qbwcUsername}:`, JSON.stringify(requestObj, null, 2));
|
|
19
25
|
}
|
|
20
|
-
const response = await fetch(
|
|
26
|
+
const response = await fetch(this.serverURL, {
|
|
21
27
|
body: JSON.stringify({ qbwcUsername, requestObj }),
|
|
22
28
|
headers: {
|
|
23
29
|
"Content-Type": "application/json",
|
|
@@ -32,9 +38,9 @@ class ClientQBD {
|
|
|
32
38
|
return responseObj;
|
|
33
39
|
}
|
|
34
40
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
41
|
+
* Perform the same activities as a user does in the QB New Account form,
|
|
42
|
+
* which can be accessed in QB by selecting "Lists" → "Chart of Accounts" →
|
|
43
|
+
* "Accounts" → "New".
|
|
38
44
|
*
|
|
39
45
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountadd
|
|
40
46
|
*/
|
|
@@ -49,12 +55,12 @@ class ClientQBD {
|
|
|
49
55
|
return responseBody;
|
|
50
56
|
}
|
|
51
57
|
/**
|
|
52
|
-
* `AccountQuery` is a list query that returns data for all accounts that
|
|
53
|
-
* the provided filter criteria. Notice that it returns only data
|
|
54
|
-
* the account itself. It does not return any data about
|
|
55
|
-
* involving the account. It does, however, return the parent
|
|
56
|
-
* there is one. You can search across all accounts or you can
|
|
57
|
-
* account type and search only those.
|
|
58
|
+
* `AccountQuery` is a list query that returns data for all accounts that
|
|
59
|
+
* match the provided filter criteria. Notice that it returns only data
|
|
60
|
+
* internal to the account itself. It does not return any data about
|
|
61
|
+
* transactions involving the account. It does, however, return the parent
|
|
62
|
+
* account, if there is one. You can search across all accounts or you can
|
|
63
|
+
* specify an account type and search only those.
|
|
58
64
|
*
|
|
59
65
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountquery
|
|
60
66
|
*/
|
|
@@ -69,7 +75,29 @@ class ClientQBD {
|
|
|
69
75
|
return responseBody;
|
|
70
76
|
}
|
|
71
77
|
/**
|
|
72
|
-
*
|
|
78
|
+
* Returns data for the specified customers.
|
|
79
|
+
*
|
|
80
|
+
* Important: We highly recommend that you use the `IncludeRetElement` tag in
|
|
81
|
+
* your `CustomerQuery` to include any data you want but do NOT include the
|
|
82
|
+
* `ShipAddress` data in the `Response`, unless you need to get the shipping
|
|
83
|
+
* address for a particular customer. Excluding the shipping address data will
|
|
84
|
+
* significantly improve the performance of the `CustomerQuery`.
|
|
85
|
+
*
|
|
86
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/customerquery
|
|
87
|
+
*/
|
|
88
|
+
async customerQuery(qbwcUsername, params) {
|
|
89
|
+
const response = (await this.sendRequest(qbwcUsername, {
|
|
90
|
+
CustomerQueryRq: params,
|
|
91
|
+
}));
|
|
92
|
+
const responseBody = response.CustomerQueryRs.CustomerRet;
|
|
93
|
+
if (!responseBody) {
|
|
94
|
+
throw new Error("No response");
|
|
95
|
+
}
|
|
96
|
+
return responseBody;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Adds an employee with personal data about the employee as well as certain
|
|
100
|
+
* payroll-related data.
|
|
73
101
|
*
|
|
74
102
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/employeeAdd
|
|
75
103
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActiveStatus, CurrencyFilter, CurrencyRef, DataExtRet, NameFilter, NameRangeFilter, SalesTaxCodeRef } from "../../qb/qbXMLTypes/shared";
|
|
1
|
+
import type { ActiveStatus, CurrencyFilter, CurrencyRef, DataExtRet, NameFilter, NameRangeFilter, ParentRef, SalesTaxCodeRef } from "../../qb/qbXMLTypes/shared";
|
|
2
2
|
export interface AccountAddRq {
|
|
3
3
|
AccountAdd: AccountAdd;
|
|
4
4
|
IncludeRetElement?: string;
|
|
@@ -238,10 +238,6 @@ export interface AccountRet {
|
|
|
238
238
|
CurrencyRef?: CurrencyRef;
|
|
239
239
|
DataExtRet?: DataExtRet;
|
|
240
240
|
}
|
|
241
|
-
interface ParentRef {
|
|
242
|
-
ListID?: string;
|
|
243
|
-
FullName?: string;
|
|
244
|
-
}
|
|
245
241
|
declare type AccountType = "AccountsPayable" | "AccountsReceivable" | "Bank" | "CostOfGoodsSold" | "CreditCard" | "Equity" | "Expense" | "FixedAsset" | "Income" | "LongTermLiability" | "NonPosting" | "OtherAsset" | "OtherCurrentAsset" | "OtherCurrentLiability" | "OtherExpense" | "OtherIncome";
|
|
246
242
|
declare type SpecialAccountType = "AccountsPayable" | "AccountsReceivable" | "CondenseItemAdjustmentExpenses" | "CostOfGoodsSold" | "DirectDepositLiabilities" | "Estimates" | "ExchangeGainLoss" | "InventoryAssets" | "ItemReceiptAccount" | "OpeningBalanceEquity" | "PayrollExpenses" | "PayrollLiabilities" | "PettyCash" | "PurchaseOrders" | "ReconciliationDifferences" | "RetainedEarnings" | "SalesOrders" | "SalesTaxPayable" | "UncategorizedExpenses" | "UncategorizedIncome" | "UndepositedFunds";
|
|
247
243
|
declare type CashFlowClassification = "Financing" | "Investing" | "None" | "NotApplicable" | "Operating";
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import type { ActiveStatus, AdditionalContactRef, AdditionalNotesRet, ClassFilter, ClassRef, ContactsRet, CurrencyFilter, CurrencyRef, DataExtRet, NameFilter, NameRangeFilter, ParentRef, SalesTaxCodeRef, SalesTaxCountry, ShipAddress, TermsRef, TotalBalanceFilter } from "../../qb/qbXMLTypes/shared";
|
|
2
|
+
export interface CustomerQueryRq {
|
|
3
|
+
ListID?: string;
|
|
4
|
+
FullName?: string;
|
|
5
|
+
MaxReturned?: number;
|
|
6
|
+
ActiveStatus?: ActiveStatus;
|
|
7
|
+
FromModifiedDate?: Date;
|
|
8
|
+
ToModifiedDate?: Date;
|
|
9
|
+
NameFilter?: NameFilter;
|
|
10
|
+
NameRangeFilter?: NameRangeFilter;
|
|
11
|
+
TotalBalanceFilter?: TotalBalanceFilter;
|
|
12
|
+
CurrencyFilter?: CurrencyFilter;
|
|
13
|
+
ClassFilter?: ClassFilter;
|
|
14
|
+
IncludeRetElement?: string;
|
|
15
|
+
OwnerID?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface CustomerQueryRs {
|
|
18
|
+
CustomerRet?: CustomerRet;
|
|
19
|
+
}
|
|
20
|
+
export interface CustomerRet {
|
|
21
|
+
ListID: string;
|
|
22
|
+
TimeCreated: Date;
|
|
23
|
+
TimeModified: Date;
|
|
24
|
+
EditSequence: string;
|
|
25
|
+
Name: string;
|
|
26
|
+
FullName: string;
|
|
27
|
+
IsActive?: boolean;
|
|
28
|
+
ClassRef?: ClassRef;
|
|
29
|
+
ParentRef?: ParentRef;
|
|
30
|
+
Sublevel: number;
|
|
31
|
+
CompanyName?: string;
|
|
32
|
+
Salutation?: string;
|
|
33
|
+
FirstName?: string;
|
|
34
|
+
MiddleName?: string;
|
|
35
|
+
LastName?: string;
|
|
36
|
+
JobTitle?: string;
|
|
37
|
+
BillAddress?: BillAddress;
|
|
38
|
+
BillAddressBlock?: BillAddressBlock;
|
|
39
|
+
ShipAddress?: ShipAddress;
|
|
40
|
+
ShipAddressBlock?: ShipAddressBlock;
|
|
41
|
+
ShipToAddress?: ShipToAddress;
|
|
42
|
+
Phone?: string;
|
|
43
|
+
AltPhone?: string;
|
|
44
|
+
Fax?: string;
|
|
45
|
+
Email?: string;
|
|
46
|
+
Cc?: string;
|
|
47
|
+
Contact?: string;
|
|
48
|
+
AltContact?: string;
|
|
49
|
+
AdditionalContactRef?: AdditionalContactRef;
|
|
50
|
+
ContactsRet?: ContactsRet;
|
|
51
|
+
CustomerTypeRef?: CustomerTypeRef;
|
|
52
|
+
TermsRef?: TermsRef;
|
|
53
|
+
SalesRepRef?: SalesRepRef;
|
|
54
|
+
Balance?: string;
|
|
55
|
+
TotalBalance?: string;
|
|
56
|
+
SalesTaxCodeRef?: SalesTaxCodeRef;
|
|
57
|
+
ItemSalesTaxRef?: ItemSalesTaxRef;
|
|
58
|
+
SalesTaxCountry?: SalesTaxCountry;
|
|
59
|
+
ResaleNumber?: string;
|
|
60
|
+
AccountNumber?: string;
|
|
61
|
+
CreditLimit?: string;
|
|
62
|
+
PreferredPaymentMethodRef?: PreferredPaymentMethodRef;
|
|
63
|
+
CreditCardInfo?: CreditCardInfo;
|
|
64
|
+
JobStatus?: JobStatus;
|
|
65
|
+
JobStartDate?: Date;
|
|
66
|
+
JobProjectedEndDate?: Date;
|
|
67
|
+
JobEndDate?: Date;
|
|
68
|
+
JobDesc?: string;
|
|
69
|
+
JobTypeRef?: JobTypeRef;
|
|
70
|
+
Notes?: string;
|
|
71
|
+
AdditionalNotesRet?: AdditionalNotesRet;
|
|
72
|
+
PreferredDeliveryMethod?: PreferredDeliveryMethod;
|
|
73
|
+
PriceLevelRef?: PriceLevelRef;
|
|
74
|
+
ExternalGUID?: string;
|
|
75
|
+
TaxRegistrationNumber?: string;
|
|
76
|
+
CurrencyRef?: CurrencyRef;
|
|
77
|
+
DataExtRet?: DataExtRet;
|
|
78
|
+
}
|
|
79
|
+
interface BillAddress {
|
|
80
|
+
Addr1?: string;
|
|
81
|
+
Addr2?: string;
|
|
82
|
+
Addr3?: string;
|
|
83
|
+
Addr4?: string;
|
|
84
|
+
Addr5?: string;
|
|
85
|
+
City?: string;
|
|
86
|
+
State?: string;
|
|
87
|
+
PostalCode?: string;
|
|
88
|
+
Country?: string;
|
|
89
|
+
Note?: string;
|
|
90
|
+
}
|
|
91
|
+
interface BillAddressBlock {
|
|
92
|
+
Addr1?: string;
|
|
93
|
+
Addr2?: string;
|
|
94
|
+
Addr3?: string;
|
|
95
|
+
Addr4?: string;
|
|
96
|
+
Addr5?: string;
|
|
97
|
+
}
|
|
98
|
+
interface ShipAddressBlock {
|
|
99
|
+
Addr1?: string;
|
|
100
|
+
Addr2?: string;
|
|
101
|
+
Addr3?: string;
|
|
102
|
+
Addr4?: string;
|
|
103
|
+
Addr5?: string;
|
|
104
|
+
}
|
|
105
|
+
interface ShipToAddress {
|
|
106
|
+
Addr1?: string;
|
|
107
|
+
Addr2?: string;
|
|
108
|
+
Addr3?: string;
|
|
109
|
+
Addr4?: string;
|
|
110
|
+
Addr5?: string;
|
|
111
|
+
City?: string;
|
|
112
|
+
State?: string;
|
|
113
|
+
PostalCode?: string;
|
|
114
|
+
Country?: string;
|
|
115
|
+
Note?: string;
|
|
116
|
+
DefaultShipTo?: boolean;
|
|
117
|
+
}
|
|
118
|
+
interface CustomerTypeRef {
|
|
119
|
+
ListID?: string;
|
|
120
|
+
FullName?: string;
|
|
121
|
+
}
|
|
122
|
+
interface SalesRepRef {
|
|
123
|
+
ListID?: string;
|
|
124
|
+
FullName?: string;
|
|
125
|
+
}
|
|
126
|
+
interface ItemSalesTaxRef {
|
|
127
|
+
ListID?: string;
|
|
128
|
+
FullName?: string;
|
|
129
|
+
}
|
|
130
|
+
interface PreferredPaymentMethodRef {
|
|
131
|
+
ListID?: string;
|
|
132
|
+
FullName?: string;
|
|
133
|
+
}
|
|
134
|
+
interface CreditCardInfo {
|
|
135
|
+
CreditCardNumber?: string;
|
|
136
|
+
ExpirationMonth?: number;
|
|
137
|
+
ExpirationYear?: number;
|
|
138
|
+
NameOnCard?: string;
|
|
139
|
+
CreditCardAddress?: string;
|
|
140
|
+
CreditCardPostalCode?: string;
|
|
141
|
+
}
|
|
142
|
+
declare type JobStatus = "Awarded" | "Closed" | "InProgress" | "None" | "NotAwarded" | "Pending";
|
|
143
|
+
interface JobTypeRef {
|
|
144
|
+
ListID?: string;
|
|
145
|
+
FullName?: string;
|
|
146
|
+
}
|
|
147
|
+
declare type PreferredDeliveryMethod = "Email" | "Fax" | "None";
|
|
148
|
+
interface PriceLevelRef {
|
|
149
|
+
ListID?: string;
|
|
150
|
+
FullName?: string;
|
|
151
|
+
}
|
|
152
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActiveStatus, AdditionalContactRef, AdditionalNotesRet, BillingRateRef, ClassRef, CurrencyFilter, CurrencyRef, DataExtRet, NameFilter, NameRangeFilter, SalesTaxCodeRef } from "../../qb/qbXMLTypes/shared";
|
|
1
|
+
import type { ActiveStatus, AdditionalContactRef, AdditionalNotesRet, BillingRateRef, ClassFilter, ClassRef, ContactsRet, CurrencyFilter, CurrencyRef, DataExtRet, NameFilter, NameRangeFilter, SalesTaxCodeRef, SalesTaxCountry, ShipAddress, TermsRef, TotalBalanceFilter } from "../../qb/qbXMLTypes/shared";
|
|
2
2
|
export interface VendorQueryRq {
|
|
3
3
|
ListID?: string;
|
|
4
4
|
FullName?: string;
|
|
@@ -17,32 +17,71 @@ export interface VendorQueryRq {
|
|
|
17
17
|
export interface VendorQueryRs {
|
|
18
18
|
VendorRet?: VendorRet;
|
|
19
19
|
}
|
|
20
|
-
interface TotalBalanceFilter {
|
|
21
|
-
Operator: Operator;
|
|
22
|
-
Amount: string;
|
|
23
|
-
}
|
|
24
|
-
declare type Operator = "Equal" | "GreaterThan" | "GreaterThanEqual" | "LessThan" | "LessThanEqual";
|
|
25
|
-
interface ClassFilter {
|
|
26
|
-
ListID?: string;
|
|
27
|
-
FullName?: string;
|
|
28
|
-
ListIDWithChildren?: string;
|
|
29
|
-
FullNameWithChildren?: string;
|
|
30
|
-
}
|
|
31
20
|
export interface VendorRet {
|
|
32
21
|
ListID: string;
|
|
33
22
|
TimeCreated: Date;
|
|
34
23
|
TimeModified: Date;
|
|
35
24
|
EditSequence: string;
|
|
36
25
|
Name: string;
|
|
26
|
+
/**
|
|
27
|
+
* If `IsActive` is `true`, this object is currently enabled for use by
|
|
28
|
+
* QuickBooks. The default value is `true`.
|
|
29
|
+
*/
|
|
37
30
|
IsActive?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Classes can be used to separate transactions into meaningful categories.
|
|
33
|
+
* (For example, transactions could be classified according to department,
|
|
34
|
+
* business location, or type of work.) In QuickBooks, class tracking is off
|
|
35
|
+
* by default. A `ClassRef` aggregate refers to one of these named classes.
|
|
36
|
+
* For example, in a `TimeTracking` message, `ClassRef` refers to the
|
|
37
|
+
* QuickBooks class into which the timed activity falls. If a `ClassRef`
|
|
38
|
+
* aggregate includes both `FullName` and `ListID`, `FullName` will be
|
|
39
|
+
* ignored. In an `InvoiceAdd` request, if you specify a `ClassRef` for the
|
|
40
|
+
* whole invoice, that same `ClassRef` is automatically used in the line
|
|
41
|
+
* items. If you want to clear that (that is, have NO `ClassRef` for the line
|
|
42
|
+
* item, you can clear it in the line item by simply not specifying it in the
|
|
43
|
+
* line item.
|
|
44
|
+
*/
|
|
38
45
|
ClassRef?: ClassRef;
|
|
46
|
+
/**
|
|
47
|
+
* Is the current entity a tax agency.
|
|
48
|
+
*/
|
|
39
49
|
IsTaxAgency?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The name of the QuickBooks user’s business, as specified in QuickBooks.
|
|
52
|
+
* `CompanyName` and `Address` are used on invoices, checks, and other forms.
|
|
53
|
+
* (`LegalCompanyName` and `LegalAddress`, on the other hand, are used on a
|
|
54
|
+
* company’s tax forms and pay stubs.)
|
|
55
|
+
*/
|
|
40
56
|
CompanyName?: string;
|
|
57
|
+
/**
|
|
58
|
+
* A formal reference, such as Mr. or Dr., that precedes a name.
|
|
59
|
+
*/
|
|
41
60
|
Salutation?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The first name of a customer, vendor, employee, or person on the “other
|
|
63
|
+
* names” list.
|
|
64
|
+
*/
|
|
42
65
|
FirstName?: string;
|
|
66
|
+
/**
|
|
67
|
+
* The middle name of a customer, vendor, employee, or person on the “other
|
|
68
|
+
* names” list.
|
|
69
|
+
*/
|
|
43
70
|
MiddleName?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The last name of a customer, vendor, employee, or person on the “other
|
|
73
|
+
* names” list.
|
|
74
|
+
*/
|
|
44
75
|
LastName?: string;
|
|
76
|
+
/**
|
|
77
|
+
* The job title of a customer, vendor, employee, or person on the “other
|
|
78
|
+
* names” list.
|
|
79
|
+
*/
|
|
45
80
|
JobTitle?: string;
|
|
81
|
+
/**
|
|
82
|
+
* If an address request fails, some combination of address fields might be
|
|
83
|
+
* too long.
|
|
84
|
+
*/
|
|
46
85
|
VendorAddress?: VendorAddress;
|
|
47
86
|
VendorAddressBlock?: VendorAddressBlock;
|
|
48
87
|
ShipAddress?: ShipAddress;
|
|
@@ -101,40 +140,10 @@ interface VendorAddressBlock {
|
|
|
101
140
|
Addr4?: string;
|
|
102
141
|
Addr5?: string;
|
|
103
142
|
}
|
|
104
|
-
interface ShipAddress {
|
|
105
|
-
Addr1?: string;
|
|
106
|
-
Addr2?: string;
|
|
107
|
-
Addr3?: string;
|
|
108
|
-
Addr4?: string;
|
|
109
|
-
Addr5?: string;
|
|
110
|
-
City?: string;
|
|
111
|
-
State?: string;
|
|
112
|
-
PostalCode?: string;
|
|
113
|
-
Country?: string;
|
|
114
|
-
Note?: string;
|
|
115
|
-
}
|
|
116
|
-
interface ContactsRet {
|
|
117
|
-
ListID: string;
|
|
118
|
-
TimeCreated: Date;
|
|
119
|
-
TimeModified: Date;
|
|
120
|
-
EditSequence: string;
|
|
121
|
-
Contact?: string;
|
|
122
|
-
Salutation?: string;
|
|
123
|
-
FirstName?: string;
|
|
124
|
-
MiddleName?: string;
|
|
125
|
-
LastName?: string;
|
|
126
|
-
JobTitle?: string;
|
|
127
|
-
AdditionalContactRef?: AdditionalContactRef;
|
|
128
|
-
}
|
|
129
143
|
interface VendorTypeRef {
|
|
130
144
|
ListID?: string;
|
|
131
145
|
FullName?: string;
|
|
132
146
|
}
|
|
133
|
-
interface TermsRef {
|
|
134
|
-
ListID?: string;
|
|
135
|
-
FullName?: string;
|
|
136
|
-
}
|
|
137
|
-
declare type SalesTaxCountry = "Australia" | "Canada" | "UK" | "US";
|
|
138
147
|
interface SalesTaxReturnRef {
|
|
139
148
|
ListID?: string;
|
|
140
149
|
FullNam?: string;
|
|
@@ -61,4 +61,49 @@ export interface CurrencyRef {
|
|
|
61
61
|
ListID?: string;
|
|
62
62
|
FullName?: string;
|
|
63
63
|
}
|
|
64
|
+
export interface TotalBalanceFilter {
|
|
65
|
+
Operator: Operator;
|
|
66
|
+
Amount: string;
|
|
67
|
+
}
|
|
68
|
+
declare type Operator = "Equal" | "GreaterThan" | "GreaterThanEqual" | "LessThan" | "LessThanEqual";
|
|
69
|
+
export interface ClassFilter {
|
|
70
|
+
ListID?: string;
|
|
71
|
+
FullName?: string;
|
|
72
|
+
ListIDWithChildren?: string;
|
|
73
|
+
FullNameWithChildren?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface ParentRef {
|
|
76
|
+
ListID?: string;
|
|
77
|
+
FullName?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface ShipAddress {
|
|
80
|
+
Addr1?: string;
|
|
81
|
+
Addr2?: string;
|
|
82
|
+
Addr3?: string;
|
|
83
|
+
Addr4?: string;
|
|
84
|
+
Addr5?: string;
|
|
85
|
+
City?: string;
|
|
86
|
+
State?: string;
|
|
87
|
+
PostalCode?: string;
|
|
88
|
+
Country?: string;
|
|
89
|
+
Note?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface ContactsRet {
|
|
92
|
+
ListID: string;
|
|
93
|
+
TimeCreated: Date;
|
|
94
|
+
TimeModified: Date;
|
|
95
|
+
EditSequence: string;
|
|
96
|
+
Contact?: string;
|
|
97
|
+
Salutation?: string;
|
|
98
|
+
FirstName?: string;
|
|
99
|
+
MiddleName?: string;
|
|
100
|
+
LastName?: string;
|
|
101
|
+
JobTitle?: string;
|
|
102
|
+
AdditionalContactRef?: AdditionalContactRef;
|
|
103
|
+
}
|
|
104
|
+
export interface TermsRef {
|
|
105
|
+
ListID?: string;
|
|
106
|
+
FullName?: string;
|
|
107
|
+
}
|
|
108
|
+
export declare type SalesTaxCountry = "Australia" | "Canada" | "UK" | "US";
|
|
64
109
|
export {};
|