conductor-node 0.2.0 → 0.3.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/README.md CHANGED
@@ -25,8 +25,8 @@ To send a request to a specific QuickBooks Desktop user, you must also supply th
25
25
  import Conductor from "conductor-node";
26
26
  const conductor = new Conductor({ apiKey: "sk_test_..." });
27
27
 
28
- conductor.qbd
29
- .accountAdd("mock_qbwc_username", {
28
+ conductor.qbd.account
29
+ .add("mock_qbwc_username", {
30
30
  Name: "Test Account",
31
31
  AccountType: "Bank",
32
32
  OpenBalance: "100",
@@ -4,167 +4,197 @@ export interface QBXMLObj {
4
4
  [apiName: string]: object;
5
5
  }
6
6
  export default class ClientQBD extends BaseClient {
7
+ account: {
8
+ /**
9
+ * Perform the same activities as a user does in the QB New Account form,
10
+ * which can be accessed in QB by selecting "Lists" → "Chart of Accounts" →
11
+ * "Accounts" → "New".
12
+ *
13
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountAdd
14
+ */
15
+ add: (qbwcUsername: string, params: qbd.AccountAddRq["AccountAdd"]) => Promise<qbd.AccountAddRs["AccountRet"]>;
16
+ /**
17
+ * Modifies an account.
18
+ *
19
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountMod
20
+ */
21
+ mod: (qbwcUsername: string, params: qbd.AccountModRq["AccountMod"]) => Promise<qbd.AccountModRs["AccountRet"]>;
22
+ /**
23
+ * `AccountQuery` is a list query that returns data for all accounts that
24
+ * match the provided filter criteria. Notice that it returns only data
25
+ * internal to the account itself. It does not return any data about
26
+ * transactions involving the account. It does, however, return the parent
27
+ * account, if there is one. You can search across all accounts or you can
28
+ * specify an account type and search only those.
29
+ *
30
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountQuery
31
+ */
32
+ query: (qbwcUsername: string, params: qbd.AccountQueryRq) => Promise<qbd.AccountQueryRs["AccountRet"]>;
33
+ };
34
+ customer: {
35
+ /**
36
+ * The customer list includes information about the QuickBooks user’s
37
+ * customers and the individual jobs that are being performed for them. A
38
+ * `CustomerRef` aggregate refers to one of the customers (or customer jobs)
39
+ * on the list. In a request, if a `CustomerRef` aggregate includes both
40
+ * `FullName` and `ListID`, `FullName` will be ignored. Special cases to note:
41
+ *
42
+ * - In `SalesReceipt` and `ReceivePayment` requests, `CustomerRef` refers to
43
+ * the customer or customer job to which the payment is credited.
44
+ *
45
+ * - In a `TimeTracking` request, CustomerRef refers to the customer or
46
+ * customer job to which this time could be billed. If `IsBillable` is set
47
+ * to true, `CustomerRef` is required in `TimeTrackingAdd`.
48
+ *
49
+ * - In an `ExpenseLineAdd` request, if `AccountRef` refers to an A/P account,
50
+ * `CustomerRef` must refer to a vendor (not to a customer). If `AccountRef`
51
+ * refers to any other type of account, the `CustomerRef` must refer to a
52
+ * customer.
53
+ *
54
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerAdd
55
+ */
56
+ add: (qbwcUsername: string, params: qbd.CustomerAddRq["CustomerAdd"]) => Promise<qbd.CustomerAddRs["CustomerRet"]>;
57
+ /**
58
+ * Modifies the customer record.
59
+ *
60
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerMod
61
+ */
62
+ mod: (qbwcUsername: string, params: qbd.CustomerModRq["CustomerMod"]) => Promise<qbd.CustomerModRs["CustomerRet"]>;
63
+ /**
64
+ * Returns data for the specified customers.
65
+ *
66
+ * Important: We highly recommend that you use the `IncludeRetElement` tag in
67
+ * your `CustomerQuery` to include any data you want but do NOT include the
68
+ * `ShipAddress` data in the `Response`, unless you need to get the shipping
69
+ * address for a particular customer. Excluding the shipping address data will
70
+ * significantly improve the performance of the `CustomerQuery`.
71
+ *
72
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerQuery
73
+ */
74
+ query: (qbwcUsername: string, params: qbd.CustomerQueryRq) => Promise<qbd.CustomerQueryRs["CustomerRet"]>;
75
+ };
76
+ employee: {
77
+ /**
78
+ * Adds an employee with personal data about the employee as well as certain
79
+ * payroll-related data.
80
+ *
81
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeAdd
82
+ */
83
+ add: (qbwcUsername: string, params: qbd.EmployeeAddRq["EmployeeAdd"]) => Promise<qbd.EmployeeAddRs["EmployeeRet"]>;
84
+ /**
85
+ * Modifies an existing employee.
86
+ *
87
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeMod
88
+ */
89
+ mod: (qbwcUsername: string, params: qbd.EmployeeModRq["EmployeeMod"]) => Promise<qbd.EmployeeModRs["EmployeeRet"]>;
90
+ /**
91
+ * Returns employee data.
92
+ *
93
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeQuery
94
+ */
95
+ query: (qbwcUsername: string, params: qbd.EmployeeQueryRq) => Promise<qbd.EmployeeQueryRs["EmployeeRet"]>;
96
+ };
97
+ journalEntry: {
98
+ /**
99
+ * The debit and credit lines can be intermingled. A credit line can legally
100
+ * come first in the journal entry add.
101
+ *
102
+ * In traditional accounting, transactions are entered into the general
103
+ * journal and categorized exclusively by account. In QuickBooks, most
104
+ * transactions can be categorized either by account or by type (invoice,
105
+ * check, and so on). For a few activities in QuickBooks, you must use the
106
+ * general journal directly, for example for recording depreciation. Notice
107
+ * that you must supply the credit line and a corresponding debit line in the
108
+ * same request. It will not work to supply them in two distinct requests. You
109
+ * can supply as many credit lines and debit lines in one single request as
110
+ * you want so long as the total monetary amount from the credits equals the
111
+ * total monetary amount from the debits in that request.
112
+ *
113
+ * Finally, DO NOT supply negative sign for the monetary amounts. QuickBooks
114
+ * does that for you. If you do supply the negative sign, amounts will add
115
+ * instead of cancel and you’ll get a runtime error.
116
+ *
117
+ * Querying for Condensed Transactions: If you need the query to return
118
+ * condensed transactions, you can do this by using either an `Entity` or
119
+ * `Account` filter in the journal query request. Alternatively, you could use
120
+ * the The generic `TransactionQuery`, which can return condensed
121
+ * transactions.
122
+ *
123
+ * If the transaction is a home currency adjustment, QuickBooks will ignore
124
+ * the `IsAmountsEnteredInHomeCurrency`, `CurrencyRef`, and `ExchangeRate`
125
+ * elements.
126
+ *
127
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryAdd
128
+ */
129
+ add: (qbwcUsername: string, params: qbd.JournalEntryAddRq) => Promise<qbd.JournalEntryAddRs["JournalEntryRet"]>;
130
+ /**
131
+ * Modifies a journal entry.
132
+ *
133
+ * If the transaction is a home currency adjustment, QuickBooks will ignore
134
+ * the `IsAmountsEnteredInHomeCurrency`, `CurrencyRef`, and `ExchangeRate`
135
+ * elements.
136
+ *
137
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryMod
138
+ */
139
+ mod: (qbwcUsername: string, params: qbd.JournalEntryModRq["JournalEntryMod"]) => Promise<qbd.JournalEntryModRs["JournalEntryRet"]>;
140
+ /**
141
+ * In traditional accounting, transactions are entered into the general
142
+ * journal and categorized exclusively by account. In QuickBooks, most
143
+ * transactions can be categorized either by account or by type (invoice,
144
+ * check, and so on). For a few activities in QuickBooks, you must use the
145
+ * general journal directly, for example for recording depreciation. Notice
146
+ * that you must supply the credit line and a corresponding debit line in the
147
+ * same request. It will not work to supply them in two distinct requests. You
148
+ * can supply as many credit lines and debit lines in one single request as
149
+ * you want so long as the total monetary amount from the credits equals the
150
+ * total monetary amount from the debits in that request.
151
+ *
152
+ * Finally, DO NOT supply negative sign for the monetary amounts. QuickBooks
153
+ * does that for you. If you do supply the negative sign, amounts will add
154
+ * instead of cancel and you’ll get a runtime error.
155
+ *
156
+ * Querying for Condensed Transactions: If you need the query to return
157
+ * condensed transactions, you can do this by using either an `Entity` or
158
+ * `Account` filter in the journal query request. Alternatively, you could use
159
+ * the The generic `TransactionQuery`, which can return condensed
160
+ * transactions.
161
+ *
162
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryQuery
163
+ */
164
+ query: (qbwcUsername: string, params: qbd.JournalEntryQueryRq) => Promise<qbd.JournalEntryQueryRs["JournalEntryRet"]>;
165
+ };
166
+ vendor: {
167
+ /**
168
+ * Adds a vendor.
169
+ *
170
+ * A vendor is any person or company from whom a small business owner buys
171
+ * goods and services. (Banks and tax agencies usually are included on the
172
+ * vendor list.) A company’s vendor list contains information such as account
173
+ * balance and contact information about each vendor. A `VendorRef` aggregate
174
+ * refers to one of the vendors on the list. In a request, if a `VendorRef`
175
+ * aggregate includes both `FullName` and `ListID`, `FullName` will be
176
+ * ignored.
177
+ *
178
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorAdd
179
+ */
180
+ add: (qbwcUsername: string, params: qbd.VendorAddRq["VendorAdd"]) => Promise<qbd.VendorAddRs["VendorRet"]>;
181
+ /**
182
+ * Modifies a vendor.
183
+ *
184
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorMod
185
+ */
186
+ mod: (qbwcUsername: string, params: qbd.VendorModRq["VendorMod"]) => Promise<qbd.VendorModRs["VendorRet"]>;
187
+ /**
188
+ * Queries for the specified vendor or set of vendors.
189
+ *
190
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorQuery
191
+ */
192
+ query: (qbwcUsername: string, params: qbd.VendorQueryRq) => Promise<qbd.VendorQueryRs["VendorRet"]>;
193
+ };
7
194
  /**
8
195
  * Send any QBXML request to QuickBooks Desktop.
9
196
  *
10
197
  * Available APIs: https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop
11
198
  */
12
199
  sendRequest(qbwcUsername: string, requestObj: QBXMLObj): Promise<QBXMLObj>;
13
- /**
14
- * Perform the same activities as a user does in the QB New Account form,
15
- * which can be accessed in QB by selecting "Lists" → "Chart of Accounts" →
16
- * "Accounts" → "New".
17
- *
18
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountAdd
19
- */
20
- accountAdd(qbwcUsername: string, params: qbd.AccountAddRq["AccountAdd"]): Promise<qbd.AccountAddRs["AccountRet"]>;
21
- /**
22
- * Modifies an account.
23
- *
24
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountMod
25
- */
26
- accountMod(qbwcUsername: string, params: qbd.AccountModRq["AccountMod"]): Promise<qbd.AccountModRs["AccountRet"]>;
27
- /**
28
- * `AccountQuery` is a list query that returns data for all accounts that
29
- * match the provided filter criteria. Notice that it returns only data
30
- * internal to the account itself. It does not return any data about
31
- * transactions involving the account. It does, however, return the parent
32
- * account, if there is one. You can search across all accounts or you can
33
- * specify an account type and search only those.
34
- *
35
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountQuery
36
- */
37
- accountQuery(qbwcUsername: string, params: qbd.AccountQueryRq): Promise<qbd.AccountQueryRs["AccountRet"]>;
38
- /**
39
- * The customer list includes information about the QuickBooks user’s
40
- * customers and the individual jobs that are being performed for them. A
41
- * `CustomerRef` aggregate refers to one of the customers (or customer jobs)
42
- * on the list. In a request, if a `CustomerRef` aggregate includes both
43
- * `FullName` and `ListID`, `FullName` will be ignored. Special cases to note:
44
- *
45
- * - In `SalesReceipt` and `ReceivePayment` requests, `CustomerRef` refers to
46
- * the customer or customer job to which the payment is credited.
47
- *
48
- * - In a `TimeTracking` request, CustomerRef refers to the customer or
49
- * customer job to which this time could be billed. If `IsBillable` is set
50
- * to true, `CustomerRef` is required in `TimeTrackingAdd`.
51
- *
52
- * - In an `ExpenseLineAdd` request, if `AccountRef` refers to an A/P account,
53
- * `CustomerRef` must refer to a vendor (not to a customer). If `AccountRef`
54
- * refers to any other type of account, the `CustomerRef` must refer to a
55
- * customer.
56
- *
57
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerAdd
58
- */
59
- customerAdd(qbwcUsername: string, params: qbd.CustomerAddRq["CustomerAdd"]): Promise<qbd.CustomerAddRs["CustomerRet"]>;
60
- /**
61
- * Modifies the customer record.
62
- *
63
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerMod
64
- */
65
- customerMod(qbwcUsername: string, params: qbd.CustomerModRq["CustomerMod"]): Promise<qbd.CustomerModRs["CustomerRet"]>;
66
- /**
67
- * Returns data for the specified customers.
68
- *
69
- * Important: We highly recommend that you use the `IncludeRetElement` tag in
70
- * your `CustomerQuery` to include any data you want but do NOT include the
71
- * `ShipAddress` data in the `Response`, unless you need to get the shipping
72
- * address for a particular customer. Excluding the shipping address data will
73
- * significantly improve the performance of the `CustomerQuery`.
74
- *
75
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerQuery
76
- */
77
- customerQuery(qbwcUsername: string, params: qbd.CustomerQueryRq): Promise<qbd.CustomerQueryRs["CustomerRet"]>;
78
- /**
79
- * Adds an employee with personal data about the employee as well as certain
80
- * payroll-related data.
81
- *
82
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeAdd
83
- */
84
- employeeAdd(qbwcUsername: string, params: qbd.EmployeeAddRq["EmployeeAdd"]): Promise<qbd.EmployeeAddRs["EmployeeRet"]>;
85
- /**
86
- * Modifies an existing employee.
87
- *
88
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeMod
89
- */
90
- employeeMod(qbwcUsername: string, params: qbd.EmployeeModRq["EmployeeMod"]): Promise<qbd.EmployeeModRs["EmployeeRet"]>;
91
- /**
92
- * Returns employee data.
93
- *
94
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeQuery
95
- */
96
- employeeQuery(qbwcUsername: string, params: qbd.EmployeeQueryRq): Promise<qbd.EmployeeQueryRs["EmployeeRet"]>;
97
- /**
98
- * The debit and credit lines can be intermingled. A credit line can legally
99
- * come first in the journal entry add.
100
- *
101
- * In traditional accounting, transactions are entered into the general
102
- * journal and categorized exclusively by account. In QuickBooks, most
103
- * transactions can be categorized either by account or by type (invoice,
104
- * check, and so on). For a few activities in QuickBooks, you must use the
105
- * general journal directly, for example for recording depreciation. Notice
106
- * that you must supply the credit line and a corresponding debit line in the
107
- * same request. It will not work to supply them in two distinct requests. You
108
- * can supply as many credit lines and debit lines in one single request as
109
- * you want so long as the total monetary amount from the credits equals the
110
- * total monetary amount from the debits in that request.
111
- *
112
- * Finally, DO NOT supply negative sign for the monetary amounts. QuickBooks
113
- * does that for you. If you do supply the negative sign, amounts will add
114
- * instead of cancel and you’ll get a runtime error.
115
- *
116
- * Querying for Condensed Transactions: If you need the query to return
117
- * condensed transactions, you can do this by using either an `Entity` or
118
- * `Account` filter in the journal query request. Alternatively, you could use
119
- * the The generic `TransactionQuery`, which can return condensed
120
- * transactions.
121
- *
122
- * If the transaction is a home currency adjustment, QuickBooks will ignore
123
- * the `IsAmountsEnteredInHomeCurrency`, `CurrencyRef`, and `ExchangeRate`
124
- * elements.
125
- *
126
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryAdd
127
- */
128
- journalEntryAdd(qbwcUsername: string, params: qbd.JournalEntryAddRq): Promise<qbd.JournalEntryAddRs["JournalEntryRet"]>;
129
- /**
130
- * Modifies a journal entry.
131
- *
132
- * If the transaction is a home currency adjustment, QuickBooks will ignore
133
- * the `IsAmountsEnteredInHomeCurrency`, `CurrencyRef`, and `ExchangeRate`
134
- * elements.
135
- *
136
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryMod
137
- */
138
- journalEntryMod(qbwcUsername: string, params: qbd.JournalEntryModRq["JournalEntryMod"]): Promise<qbd.JournalEntryModRs["JournalEntryRet"]>;
139
- /**
140
- * In traditional accounting, transactions are entered into the general
141
- * journal and categorized exclusively by account. In QuickBooks, most
142
- * transactions can be categorized either by account or by type (invoice,
143
- * check, and so on). For a few activities in QuickBooks, you must use the
144
- * general journal directly, for example for recording depreciation. Notice
145
- * that you must supply the credit line and a corresponding debit line in the
146
- * same request. It will not work to supply them in two distinct requests. You
147
- * can supply as many credit lines and debit lines in one single request as
148
- * you want so long as the total monetary amount from the credits equals the
149
- * total monetary amount from the debits in that request.
150
- *
151
- * Finally, DO NOT supply negative sign for the monetary amounts. QuickBooks
152
- * does that for you. If you do supply the negative sign, amounts will add
153
- * instead of cancel and you’ll get a runtime error.
154
- *
155
- * Querying for Condensed Transactions: If you need the query to return
156
- * condensed transactions, you can do this by using either an `Entity` or
157
- * `Account` filter in the journal query request. Alternatively, you could use
158
- * the The generic `TransactionQuery`, which can return condensed
159
- * transactions.
160
- *
161
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryQuery
162
- */
163
- journalEntryQuery(qbwcUsername: string, params: qbd.JournalEntryQueryRq): Promise<qbd.JournalEntryQueryRs["JournalEntryRet"]>;
164
- /**
165
- * Queries for the specified vendor or set of vendors.
166
- *
167
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorQuery
168
- */
169
- vendorQuery(qbwcUsername: string, params: qbd.VendorQueryRq): Promise<qbd.VendorQueryRs["VendorRet"]>;
170
200
  }
@@ -5,6 +5,328 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const BaseClient_1 = __importDefault(require("../BaseClient"));
7
7
  class ClientQBD extends BaseClient_1.default {
8
+ account = {
9
+ /**
10
+ * Perform the same activities as a user does in the QB New Account form,
11
+ * which can be accessed in QB by selecting "Lists" → "Chart of Accounts" →
12
+ * "Accounts" → "New".
13
+ *
14
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountAdd
15
+ */
16
+ add: async (qbwcUsername, params) => {
17
+ const response = (await this.sendRequest(qbwcUsername, {
18
+ AccountAddRq: { AccountAdd: params },
19
+ }));
20
+ const responseBody = response.AccountAddRs.AccountRet;
21
+ if (!responseBody) {
22
+ throw new Error("No response");
23
+ }
24
+ return responseBody;
25
+ },
26
+ /**
27
+ * Modifies an account.
28
+ *
29
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountMod
30
+ */
31
+ mod: async (qbwcUsername, params) => {
32
+ const response = (await this.sendRequest(qbwcUsername, {
33
+ AccountModRq: { AccountMod: params },
34
+ }));
35
+ const responseBody = response.AccountModRs.AccountRet;
36
+ if (!responseBody) {
37
+ throw new Error("No response");
38
+ }
39
+ return responseBody;
40
+ },
41
+ /**
42
+ * `AccountQuery` is a list query that returns data for all accounts that
43
+ * match the provided filter criteria. Notice that it returns only data
44
+ * internal to the account itself. It does not return any data about
45
+ * transactions involving the account. It does, however, return the parent
46
+ * account, if there is one. You can search across all accounts or you can
47
+ * specify an account type and search only those.
48
+ *
49
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountQuery
50
+ */
51
+ query: async (qbwcUsername, params) => {
52
+ const response = (await this.sendRequest(qbwcUsername, {
53
+ AccountQueryRq: params,
54
+ }));
55
+ const responseBody = response.AccountQueryRs.AccountRet;
56
+ if (!responseBody) {
57
+ throw new Error("No response");
58
+ }
59
+ return responseBody;
60
+ },
61
+ };
62
+ customer = {
63
+ /**
64
+ * The customer list includes information about the QuickBooks user’s
65
+ * customers and the individual jobs that are being performed for them. A
66
+ * `CustomerRef` aggregate refers to one of the customers (or customer jobs)
67
+ * on the list. In a request, if a `CustomerRef` aggregate includes both
68
+ * `FullName` and `ListID`, `FullName` will be ignored. Special cases to note:
69
+ *
70
+ * - In `SalesReceipt` and `ReceivePayment` requests, `CustomerRef` refers to
71
+ * the customer or customer job to which the payment is credited.
72
+ *
73
+ * - In a `TimeTracking` request, CustomerRef refers to the customer or
74
+ * customer job to which this time could be billed. If `IsBillable` is set
75
+ * to true, `CustomerRef` is required in `TimeTrackingAdd`.
76
+ *
77
+ * - In an `ExpenseLineAdd` request, if `AccountRef` refers to an A/P account,
78
+ * `CustomerRef` must refer to a vendor (not to a customer). If `AccountRef`
79
+ * refers to any other type of account, the `CustomerRef` must refer to a
80
+ * customer.
81
+ *
82
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerAdd
83
+ */
84
+ add: async (qbwcUsername, params) => {
85
+ const response = (await this.sendRequest(qbwcUsername, {
86
+ CustomerAddRq: { CustomerAdd: params },
87
+ }));
88
+ const responseBody = response.CustomerAddRs.CustomerRet;
89
+ if (!responseBody) {
90
+ throw new Error("No response");
91
+ }
92
+ return responseBody;
93
+ },
94
+ /**
95
+ * Modifies the customer record.
96
+ *
97
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerMod
98
+ */
99
+ mod: async (qbwcUsername, params) => {
100
+ const response = (await this.sendRequest(qbwcUsername, {
101
+ CustomerModRq: { CustomerMod: params },
102
+ }));
103
+ const responseBody = response.CustomerModRs.CustomerRet;
104
+ if (!responseBody) {
105
+ throw new Error("No response");
106
+ }
107
+ return responseBody;
108
+ },
109
+ /**
110
+ * Returns data for the specified customers.
111
+ *
112
+ * Important: We highly recommend that you use the `IncludeRetElement` tag in
113
+ * your `CustomerQuery` to include any data you want but do NOT include the
114
+ * `ShipAddress` data in the `Response`, unless you need to get the shipping
115
+ * address for a particular customer. Excluding the shipping address data will
116
+ * significantly improve the performance of the `CustomerQuery`.
117
+ *
118
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerQuery
119
+ */
120
+ query: async (qbwcUsername, params) => {
121
+ const response = (await this.sendRequest(qbwcUsername, {
122
+ CustomerQueryRq: params,
123
+ }));
124
+ const responseBody = response.CustomerQueryRs.CustomerRet;
125
+ if (!responseBody) {
126
+ throw new Error("No response");
127
+ }
128
+ return responseBody;
129
+ },
130
+ };
131
+ employee = {
132
+ /**
133
+ * Adds an employee with personal data about the employee as well as certain
134
+ * payroll-related data.
135
+ *
136
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeAdd
137
+ */
138
+ add: async (qbwcUsername, params) => {
139
+ const response = (await this.sendRequest(qbwcUsername, {
140
+ EmployeeAddRq: { EmployeeAdd: params },
141
+ }));
142
+ const responseBody = response.EmployeeAddRs.EmployeeRet;
143
+ if (!responseBody) {
144
+ throw new Error("No response");
145
+ }
146
+ return responseBody;
147
+ },
148
+ /**
149
+ * Modifies an existing employee.
150
+ *
151
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeMod
152
+ */
153
+ mod: async (qbwcUsername, params) => {
154
+ const response = (await this.sendRequest(qbwcUsername, {
155
+ EmployeeModRq: { EmployeeMod: params },
156
+ }));
157
+ const responseBody = response.EmployeeModRs.EmployeeRet;
158
+ if (!responseBody) {
159
+ throw new Error("No response");
160
+ }
161
+ return responseBody;
162
+ },
163
+ /**
164
+ * Returns employee data.
165
+ *
166
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeQuery
167
+ */
168
+ query: async (qbwcUsername, params) => {
169
+ const response = (await this.sendRequest(qbwcUsername, {
170
+ EmployeeQueryRq: params,
171
+ }));
172
+ const responseBody = response.EmployeeQueryRs.EmployeeRet;
173
+ if (!responseBody) {
174
+ throw new Error("No response");
175
+ }
176
+ return responseBody;
177
+ },
178
+ };
179
+ journalEntry = {
180
+ /**
181
+ * The debit and credit lines can be intermingled. A credit line can legally
182
+ * come first in the journal entry add.
183
+ *
184
+ * In traditional accounting, transactions are entered into the general
185
+ * journal and categorized exclusively by account. In QuickBooks, most
186
+ * transactions can be categorized either by account or by type (invoice,
187
+ * check, and so on). For a few activities in QuickBooks, you must use the
188
+ * general journal directly, for example for recording depreciation. Notice
189
+ * that you must supply the credit line and a corresponding debit line in the
190
+ * same request. It will not work to supply them in two distinct requests. You
191
+ * can supply as many credit lines and debit lines in one single request as
192
+ * you want so long as the total monetary amount from the credits equals the
193
+ * total monetary amount from the debits in that request.
194
+ *
195
+ * Finally, DO NOT supply negative sign for the monetary amounts. QuickBooks
196
+ * does that for you. If you do supply the negative sign, amounts will add
197
+ * instead of cancel and you’ll get a runtime error.
198
+ *
199
+ * Querying for Condensed Transactions: If you need the query to return
200
+ * condensed transactions, you can do this by using either an `Entity` or
201
+ * `Account` filter in the journal query request. Alternatively, you could use
202
+ * the The generic `TransactionQuery`, which can return condensed
203
+ * transactions.
204
+ *
205
+ * If the transaction is a home currency adjustment, QuickBooks will ignore
206
+ * the `IsAmountsEnteredInHomeCurrency`, `CurrencyRef`, and `ExchangeRate`
207
+ * elements.
208
+ *
209
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryAdd
210
+ */
211
+ add: async (qbwcUsername, params) => {
212
+ const response = (await this.sendRequest(qbwcUsername, {
213
+ JournalEntryAddRq: params,
214
+ }));
215
+ const responseBody = response.JournalEntryAddRs.JournalEntryRet;
216
+ if (!responseBody) {
217
+ throw new Error("No response");
218
+ }
219
+ return responseBody;
220
+ },
221
+ /**
222
+ * Modifies a journal entry.
223
+ *
224
+ * If the transaction is a home currency adjustment, QuickBooks will ignore
225
+ * the `IsAmountsEnteredInHomeCurrency`, `CurrencyRef`, and `ExchangeRate`
226
+ * elements.
227
+ *
228
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryMod
229
+ */
230
+ mod: async (qbwcUsername, params) => {
231
+ const response = (await this.sendRequest(qbwcUsername, {
232
+ JournalEntryModRq: { JournalEntryMod: params },
233
+ }));
234
+ const responseBody = response.JournalEntryModRs.JournalEntryRet;
235
+ if (!responseBody) {
236
+ throw new Error("No response");
237
+ }
238
+ return responseBody;
239
+ },
240
+ /**
241
+ * In traditional accounting, transactions are entered into the general
242
+ * journal and categorized exclusively by account. In QuickBooks, most
243
+ * transactions can be categorized either by account or by type (invoice,
244
+ * check, and so on). For a few activities in QuickBooks, you must use the
245
+ * general journal directly, for example for recording depreciation. Notice
246
+ * that you must supply the credit line and a corresponding debit line in the
247
+ * same request. It will not work to supply them in two distinct requests. You
248
+ * can supply as many credit lines and debit lines in one single request as
249
+ * you want so long as the total monetary amount from the credits equals the
250
+ * total monetary amount from the debits in that request.
251
+ *
252
+ * Finally, DO NOT supply negative sign for the monetary amounts. QuickBooks
253
+ * does that for you. If you do supply the negative sign, amounts will add
254
+ * instead of cancel and you’ll get a runtime error.
255
+ *
256
+ * Querying for Condensed Transactions: If you need the query to return
257
+ * condensed transactions, you can do this by using either an `Entity` or
258
+ * `Account` filter in the journal query request. Alternatively, you could use
259
+ * the The generic `TransactionQuery`, which can return condensed
260
+ * transactions.
261
+ *
262
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryQuery
263
+ */
264
+ query: async (qbwcUsername, params) => {
265
+ const response = (await this.sendRequest(qbwcUsername, {
266
+ JournalEntryQueryRq: params,
267
+ }));
268
+ const responseBody = response.JournalEntryQueryRs.JournalEntryRet;
269
+ if (!responseBody) {
270
+ throw new Error("No response");
271
+ }
272
+ return responseBody;
273
+ },
274
+ };
275
+ vendor = {
276
+ /**
277
+ * Adds a vendor.
278
+ *
279
+ * A vendor is any person or company from whom a small business owner buys
280
+ * goods and services. (Banks and tax agencies usually are included on the
281
+ * vendor list.) A company’s vendor list contains information such as account
282
+ * balance and contact information about each vendor. A `VendorRef` aggregate
283
+ * refers to one of the vendors on the list. In a request, if a `VendorRef`
284
+ * aggregate includes both `FullName` and `ListID`, `FullName` will be
285
+ * ignored.
286
+ *
287
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorAdd
288
+ */
289
+ add: async (qbwcUsername, params) => {
290
+ const response = (await this.sendRequest(qbwcUsername, {
291
+ VendorAddRq: { VendorAdd: params },
292
+ }));
293
+ const responseBody = response.VendorAddRs.VendorRet;
294
+ if (!responseBody) {
295
+ throw new Error("No response");
296
+ }
297
+ return responseBody;
298
+ },
299
+ /**
300
+ * Modifies a vendor.
301
+ *
302
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorMod
303
+ */
304
+ mod: async (qbwcUsername, params) => {
305
+ const response = (await this.sendRequest(qbwcUsername, {
306
+ VendorModRq: { VendorMod: params },
307
+ }));
308
+ const responseBody = response.VendorModRs.VendorRet;
309
+ if (!responseBody) {
310
+ throw new Error("No response");
311
+ }
312
+ return responseBody;
313
+ },
314
+ /**
315
+ * Queries for the specified vendor or set of vendors.
316
+ *
317
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorQuery
318
+ */
319
+ query: async (qbwcUsername, params) => {
320
+ const response = (await this.sendRequest(qbwcUsername, {
321
+ VendorQueryRq: params,
322
+ }));
323
+ const responseBody = response.VendorQueryRs.VendorRet;
324
+ if (!responseBody) {
325
+ throw new Error("No response");
326
+ }
327
+ return responseBody;
328
+ },
329
+ };
8
330
  /**
9
331
  * Send any QBXML request to QuickBooks Desktop.
10
332
  *
@@ -13,279 +335,5 @@ class ClientQBD extends BaseClient_1.default {
13
335
  async sendRequest(qbwcUsername, requestObj) {
14
336
  return this.sendAPIRequest("qbd", qbwcUsername, requestObj);
15
337
  }
16
- /**
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".
20
- *
21
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountAdd
22
- */
23
- async accountAdd(qbwcUsername, params) {
24
- const response = (await this.sendRequest(qbwcUsername, {
25
- AccountAddRq: { AccountAdd: params },
26
- }));
27
- const responseBody = response.AccountAddRs.AccountRet;
28
- if (!responseBody) {
29
- throw new Error("No response");
30
- }
31
- return responseBody;
32
- }
33
- /**
34
- * Modifies an account.
35
- *
36
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountMod
37
- */
38
- async accountMod(qbwcUsername, params) {
39
- const response = (await this.sendRequest(qbwcUsername, {
40
- AccountModRq: { AccountMod: params },
41
- }));
42
- const responseBody = response.AccountModRs.AccountRet;
43
- if (!responseBody) {
44
- throw new Error("No response");
45
- }
46
- return responseBody;
47
- }
48
- /**
49
- * `AccountQuery` is a list query that returns data for all accounts that
50
- * match the provided filter criteria. Notice that it returns only data
51
- * internal to the account itself. It does not return any data about
52
- * transactions involving the account. It does, however, return the parent
53
- * account, if there is one. You can search across all accounts or you can
54
- * specify an account type and search only those.
55
- *
56
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountQuery
57
- */
58
- async accountQuery(qbwcUsername, params) {
59
- const response = (await this.sendRequest(qbwcUsername, {
60
- AccountQueryRq: params,
61
- }));
62
- const responseBody = response.AccountQueryRs.AccountRet;
63
- if (!responseBody) {
64
- throw new Error("No response");
65
- }
66
- return responseBody;
67
- }
68
- /**
69
- * The customer list includes information about the QuickBooks user’s
70
- * customers and the individual jobs that are being performed for them. A
71
- * `CustomerRef` aggregate refers to one of the customers (or customer jobs)
72
- * on the list. In a request, if a `CustomerRef` aggregate includes both
73
- * `FullName` and `ListID`, `FullName` will be ignored. Special cases to note:
74
- *
75
- * - In `SalesReceipt` and `ReceivePayment` requests, `CustomerRef` refers to
76
- * the customer or customer job to which the payment is credited.
77
- *
78
- * - In a `TimeTracking` request, CustomerRef refers to the customer or
79
- * customer job to which this time could be billed. If `IsBillable` is set
80
- * to true, `CustomerRef` is required in `TimeTrackingAdd`.
81
- *
82
- * - In an `ExpenseLineAdd` request, if `AccountRef` refers to an A/P account,
83
- * `CustomerRef` must refer to a vendor (not to a customer). If `AccountRef`
84
- * refers to any other type of account, the `CustomerRef` must refer to a
85
- * customer.
86
- *
87
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerAdd
88
- */
89
- async customerAdd(qbwcUsername, params) {
90
- const response = (await this.sendRequest(qbwcUsername, {
91
- CustomerAddRq: { CustomerAdd: params },
92
- }));
93
- const responseBody = response.CustomerAddRs.CustomerRet;
94
- if (!responseBody) {
95
- throw new Error("No response");
96
- }
97
- return responseBody;
98
- }
99
- /**
100
- * Modifies the customer record.
101
- *
102
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerMod
103
- */
104
- async customerMod(qbwcUsername, params) {
105
- const response = (await this.sendRequest(qbwcUsername, {
106
- CustomerModRq: { CustomerMod: params },
107
- }));
108
- const responseBody = response.CustomerModRs.CustomerRet;
109
- if (!responseBody) {
110
- throw new Error("No response");
111
- }
112
- return responseBody;
113
- }
114
- /**
115
- * Returns data for the specified customers.
116
- *
117
- * Important: We highly recommend that you use the `IncludeRetElement` tag in
118
- * your `CustomerQuery` to include any data you want but do NOT include the
119
- * `ShipAddress` data in the `Response`, unless you need to get the shipping
120
- * address for a particular customer. Excluding the shipping address data will
121
- * significantly improve the performance of the `CustomerQuery`.
122
- *
123
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerQuery
124
- */
125
- async customerQuery(qbwcUsername, params) {
126
- const response = (await this.sendRequest(qbwcUsername, {
127
- CustomerQueryRq: params,
128
- }));
129
- const responseBody = response.CustomerQueryRs.CustomerRet;
130
- if (!responseBody) {
131
- throw new Error("No response");
132
- }
133
- return responseBody;
134
- }
135
- /**
136
- * Adds an employee with personal data about the employee as well as certain
137
- * payroll-related data.
138
- *
139
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeAdd
140
- */
141
- async employeeAdd(qbwcUsername, params) {
142
- const response = (await this.sendRequest(qbwcUsername, {
143
- EmployeeAddRq: { EmployeeAdd: params },
144
- }));
145
- const responseBody = response.EmployeeAddRs.EmployeeRet;
146
- if (!responseBody) {
147
- throw new Error("No response");
148
- }
149
- return responseBody;
150
- }
151
- /**
152
- * Modifies an existing employee.
153
- *
154
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeMod
155
- */
156
- async employeeMod(qbwcUsername, params) {
157
- const response = (await this.sendRequest(qbwcUsername, {
158
- EmployeeModRq: { EmployeeMod: params },
159
- }));
160
- const responseBody = response.EmployeeModRs.EmployeeRet;
161
- if (!responseBody) {
162
- throw new Error("No response");
163
- }
164
- return responseBody;
165
- }
166
- /**
167
- * Returns employee data.
168
- *
169
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeQuery
170
- */
171
- async employeeQuery(qbwcUsername, params) {
172
- const response = (await this.sendRequest(qbwcUsername, {
173
- EmployeeQueryRq: params,
174
- }));
175
- const responseBody = response.EmployeeQueryRs.EmployeeRet;
176
- if (!responseBody) {
177
- throw new Error("No response");
178
- }
179
- return responseBody;
180
- }
181
- /**
182
- * The debit and credit lines can be intermingled. A credit line can legally
183
- * come first in the journal entry add.
184
- *
185
- * In traditional accounting, transactions are entered into the general
186
- * journal and categorized exclusively by account. In QuickBooks, most
187
- * transactions can be categorized either by account or by type (invoice,
188
- * check, and so on). For a few activities in QuickBooks, you must use the
189
- * general journal directly, for example for recording depreciation. Notice
190
- * that you must supply the credit line and a corresponding debit line in the
191
- * same request. It will not work to supply them in two distinct requests. You
192
- * can supply as many credit lines and debit lines in one single request as
193
- * you want so long as the total monetary amount from the credits equals the
194
- * total monetary amount from the debits in that request.
195
- *
196
- * Finally, DO NOT supply negative sign for the monetary amounts. QuickBooks
197
- * does that for you. If you do supply the negative sign, amounts will add
198
- * instead of cancel and you’ll get a runtime error.
199
- *
200
- * Querying for Condensed Transactions: If you need the query to return
201
- * condensed transactions, you can do this by using either an `Entity` or
202
- * `Account` filter in the journal query request. Alternatively, you could use
203
- * the The generic `TransactionQuery`, which can return condensed
204
- * transactions.
205
- *
206
- * If the transaction is a home currency adjustment, QuickBooks will ignore
207
- * the `IsAmountsEnteredInHomeCurrency`, `CurrencyRef`, and `ExchangeRate`
208
- * elements.
209
- *
210
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryAdd
211
- */
212
- async journalEntryAdd(qbwcUsername, params) {
213
- const response = (await this.sendRequest(qbwcUsername, {
214
- JournalEntryAddRq: params,
215
- }));
216
- const responseBody = response.JournalEntryAddRs.JournalEntryRet;
217
- if (!responseBody) {
218
- throw new Error("No response");
219
- }
220
- return responseBody;
221
- }
222
- /**
223
- * Modifies a journal entry.
224
- *
225
- * If the transaction is a home currency adjustment, QuickBooks will ignore
226
- * the `IsAmountsEnteredInHomeCurrency`, `CurrencyRef`, and `ExchangeRate`
227
- * elements.
228
- *
229
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryMod
230
- */
231
- async journalEntryMod(qbwcUsername, params) {
232
- const response = (await this.sendRequest(qbwcUsername, {
233
- JournalEntryModRq: { JournalEntryMod: params },
234
- }));
235
- const responseBody = response.JournalEntryModRs.JournalEntryRet;
236
- if (!responseBody) {
237
- throw new Error("No response");
238
- }
239
- return responseBody;
240
- }
241
- /**
242
- * In traditional accounting, transactions are entered into the general
243
- * journal and categorized exclusively by account. In QuickBooks, most
244
- * transactions can be categorized either by account or by type (invoice,
245
- * check, and so on). For a few activities in QuickBooks, you must use the
246
- * general journal directly, for example for recording depreciation. Notice
247
- * that you must supply the credit line and a corresponding debit line in the
248
- * same request. It will not work to supply them in two distinct requests. You
249
- * can supply as many credit lines and debit lines in one single request as
250
- * you want so long as the total monetary amount from the credits equals the
251
- * total monetary amount from the debits in that request.
252
- *
253
- * Finally, DO NOT supply negative sign for the monetary amounts. QuickBooks
254
- * does that for you. If you do supply the negative sign, amounts will add
255
- * instead of cancel and you’ll get a runtime error.
256
- *
257
- * Querying for Condensed Transactions: If you need the query to return
258
- * condensed transactions, you can do this by using either an `Entity` or
259
- * `Account` filter in the journal query request. Alternatively, you could use
260
- * the The generic `TransactionQuery`, which can return condensed
261
- * transactions.
262
- *
263
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryQuery
264
- */
265
- async journalEntryQuery(qbwcUsername, params) {
266
- const response = (await this.sendRequest(qbwcUsername, {
267
- JournalEntryQueryRq: params,
268
- }));
269
- const responseBody = response.JournalEntryQueryRs.JournalEntryRet;
270
- if (!responseBody) {
271
- throw new Error("No response");
272
- }
273
- return responseBody;
274
- }
275
- /**
276
- * Queries for the specified vendor or set of vendors.
277
- *
278
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorQuery
279
- */
280
- async vendorQuery(qbwcUsername, params) {
281
- const response = (await this.sendRequest(qbwcUsername, {
282
- VendorQueryRq: params,
283
- }));
284
- const responseBody = response.VendorQueryRs.VendorRet;
285
- if (!responseBody) {
286
- throw new Error("No response");
287
- }
288
- return responseBody;
289
- }
290
338
  }
291
339
  exports.default = ClientQBD;
@@ -35,7 +35,7 @@ interface TaxLineInfoRet {
35
35
  TaxLineName?: string;
36
36
  }
37
37
  declare type CashFlowClassification = "Financing" | "Investing" | "None" | "NotApplicable" | "Operating";
38
- declare type DataExtType = "AMTTYPE" | "DATETIMETYPE" | "INTTYPE" | "PERCENTTYPE" | "PRICETYPE" | "QUANTYPE" | "STR1024TYPE" | "STR255TYPE";
38
+ declare type DataExtType = "AMTTYPE" | "DATETIMETYPE" | "INTTYPE" | "PERCENTTYPE" | "PRICETYPE" | "QUANTYPE" | "STR255TYPE" | "STR1024TYPE";
39
39
  interface DataExtRet {
40
40
  OwnerID?: string;
41
41
  DataExtName: string;
@@ -126,7 +126,7 @@ export interface AccountQueryRq {
126
126
  ToModifiedDate?: string;
127
127
  NameFilter?: NameFilter;
128
128
  NameRangeFilter?: NameRangeFilter;
129
- AccountType?: AccountType[] | AccountType;
129
+ AccountType?: AccountType | AccountType[];
130
130
  CurrencyFilter?: CurrencyFilter;
131
131
  IncludeRetElement?: string[] | string;
132
132
  OwnerID?: string[] | string;
@@ -901,21 +901,6 @@ export interface JournalEntryQueryRq {
901
901
  export interface JournalEntryQueryRs {
902
902
  JournalEntryRet?: JournalEntryRet | JournalEntryRet[];
903
903
  }
904
- export interface VendorQueryRq {
905
- ListID?: string[] | string;
906
- FullName?: string[] | string;
907
- MaxReturned?: number;
908
- ActiveStatus?: ActiveStatus;
909
- FromModifiedDate?: string;
910
- ToModifiedDate?: string;
911
- NameFilter?: NameFilter;
912
- NameRangeFilter?: NameRangeFilter;
913
- TotalBalanceFilter?: TotalBalanceFilter;
914
- CurrencyFilter?: CurrencyFilter;
915
- ClassFilter?: ClassFilter;
916
- IncludeRetElement?: string[] | string;
917
- OwnerID?: string[] | string;
918
- }
919
904
  interface VendorAddress {
920
905
  Addr1?: string;
921
906
  Addr2?: string;
@@ -928,13 +913,6 @@ interface VendorAddress {
928
913
  Country?: string;
929
914
  Note?: string;
930
915
  }
931
- interface VendorAddressBlock {
932
- Addr1?: string;
933
- Addr2?: string;
934
- Addr3?: string;
935
- Addr4?: string;
936
- Addr5?: string;
937
- }
938
916
  interface VendorTypeRef {
939
917
  ListID?: string;
940
918
  FullName?: string;
@@ -957,6 +935,65 @@ interface PrefillAccountRef {
957
935
  ListID?: string;
958
936
  FullName?: string;
959
937
  }
938
+ interface VendorAdd {
939
+ Name: string;
940
+ IsActive?: boolean;
941
+ ClassRef?: ClassRef;
942
+ CompanyName?: string;
943
+ Salutation?: string;
944
+ FirstName?: string;
945
+ MiddleName?: string;
946
+ LastName?: string;
947
+ JobTitle?: string;
948
+ VendorAddress?: VendorAddress;
949
+ ShipAddress?: ShipAddress;
950
+ Phone?: string;
951
+ AltPhone?: string;
952
+ Fax?: string;
953
+ Email?: string;
954
+ Cc?: string;
955
+ Contact?: string;
956
+ AltContact?: string;
957
+ AdditionalContactRef?: AdditionalContactRef | AdditionalContactRef[];
958
+ Contacts?: Contacts | Contacts[];
959
+ NameOnCheck?: string;
960
+ AccountNumber?: string;
961
+ Notes?: string;
962
+ AdditionalNotes?: AdditionalNotes | AdditionalNotes[];
963
+ VendorTypeRef?: VendorTypeRef;
964
+ TermsRef?: TermsRef;
965
+ CreditLimit?: string;
966
+ VendorTaxIdent?: string;
967
+ IsVendorEligibleFor1099?: boolean;
968
+ OpenBalance?: string;
969
+ OpenBalanceDate?: string;
970
+ BillingRateRef?: BillingRateRef;
971
+ ExternalGUID?: string;
972
+ SalesTaxCodeRef?: SalesTaxCodeRef;
973
+ SalesTaxCountry?: SalesTaxCountry;
974
+ IsSalesTaxAgency?: boolean;
975
+ SalesTaxReturnRef?: SalesTaxReturnRef;
976
+ TaxRegistrationNumber?: string;
977
+ ReportingPeriod?: ReportingPeriod;
978
+ IsTaxTrackedOnPurchases?: boolean;
979
+ TaxOnPurchasesAccountRef?: TaxOnPurchasesAccountRef;
980
+ IsTaxTrackedOnSales?: boolean;
981
+ TaxOnSalesAccountRef?: TaxOnSalesAccountRef;
982
+ IsTaxOnTax?: boolean;
983
+ PrefillAccountRef?: PrefillAccountRef | PrefillAccountRef[];
984
+ CurrencyRef?: CurrencyRef;
985
+ }
986
+ export interface VendorAddRq {
987
+ VendorAdd: VendorAdd;
988
+ IncludeRetElement?: string[] | string;
989
+ }
990
+ interface VendorAddressBlock {
991
+ Addr1?: string;
992
+ Addr2?: string;
993
+ Addr3?: string;
994
+ Addr4?: string;
995
+ Addr5?: string;
996
+ }
960
997
  interface VendorRet {
961
998
  ListID: string;
962
999
  TimeCreated: string;
@@ -1011,6 +1048,80 @@ interface VendorRet {
1011
1048
  CurrencyRef?: CurrencyRef;
1012
1049
  DataExtRet?: DataExtRet | DataExtRet[];
1013
1050
  }
1051
+ export interface VendorAddRs {
1052
+ VendorRet?: VendorRet;
1053
+ ErrorRecovery?: ErrorRecovery;
1054
+ }
1055
+ interface VendorMod {
1056
+ ListID: string;
1057
+ EditSequence: string;
1058
+ Name?: string;
1059
+ IsActive?: boolean;
1060
+ ClassRef?: ClassRef;
1061
+ CompanyName?: string;
1062
+ Salutation?: string;
1063
+ FirstName?: string;
1064
+ MiddleName?: string;
1065
+ LastName?: string;
1066
+ JobTitle?: string;
1067
+ VendorAddress?: VendorAddress;
1068
+ ShipAddress?: ShipAddress;
1069
+ Phone?: string;
1070
+ AltPhone?: string;
1071
+ Fax?: string;
1072
+ Email?: string;
1073
+ Cc?: string;
1074
+ Contact?: string;
1075
+ AltContact?: string;
1076
+ AdditionalContactRef?: AdditionalContactRef | AdditionalContactRef[];
1077
+ ContactsMod?: ContactsMod | ContactsMod[];
1078
+ NameOnCheck?: string;
1079
+ AccountNumber?: string;
1080
+ Notes?: string;
1081
+ AdditionalNotesMod?: AdditionalNotesMod | AdditionalNotesMod[];
1082
+ VendorTypeRef?: VendorTypeRef;
1083
+ TermsRef?: TermsRef;
1084
+ CreditLimit?: string;
1085
+ VendorTaxIdent?: string;
1086
+ IsVendorEligibleFor1099?: boolean;
1087
+ BillingRateRef?: BillingRateRef;
1088
+ SalesTaxCodeRef?: SalesTaxCodeRef;
1089
+ SalesTaxCountry?: SalesTaxCountry;
1090
+ IsSalesTaxAgency?: boolean;
1091
+ SalesTaxReturnRef?: SalesTaxReturnRef;
1092
+ TaxRegistrationNumber?: string;
1093
+ ReportingPeriod?: ReportingPeriod;
1094
+ IsTaxTrackedOnPurchases?: boolean;
1095
+ TaxOnPurchasesAccountRef?: TaxOnPurchasesAccountRef;
1096
+ IsTaxTrackedOnSales?: boolean;
1097
+ TaxOnSalesAccountRef?: TaxOnSalesAccountRef;
1098
+ IsTaxOnTax?: boolean;
1099
+ PrefillAccountRef?: PrefillAccountRef | PrefillAccountRef[];
1100
+ CurrencyRef?: CurrencyRef;
1101
+ }
1102
+ export interface VendorModRq {
1103
+ VendorMod: VendorMod;
1104
+ IncludeRetElement?: string[] | string;
1105
+ }
1106
+ export interface VendorModRs {
1107
+ VendorRet?: VendorRet;
1108
+ ErrorRecovery?: ErrorRecovery;
1109
+ }
1110
+ export interface VendorQueryRq {
1111
+ ListID?: string[] | string;
1112
+ FullName?: string[] | string;
1113
+ MaxReturned?: number;
1114
+ ActiveStatus?: ActiveStatus;
1115
+ FromModifiedDate?: string;
1116
+ ToModifiedDate?: string;
1117
+ NameFilter?: NameFilter;
1118
+ NameRangeFilter?: NameRangeFilter;
1119
+ TotalBalanceFilter?: TotalBalanceFilter;
1120
+ CurrencyFilter?: CurrencyFilter;
1121
+ ClassFilter?: ClassFilter;
1122
+ IncludeRetElement?: string[] | string;
1123
+ OwnerID?: string[] | string;
1124
+ }
1014
1125
  export interface VendorQueryRs {
1015
1126
  VendorRet?: VendorRet | VendorRet[];
1016
1127
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Conductor API wrapper",
5
5
  "author": "Danny Nemer <hi@DannyNemer.com>",
6
6
  "license": "MIT",