conductor-node 0.1.5 → 0.2.1

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.
@@ -15,9 +15,15 @@ export default class ClientQBD extends BaseClient {
15
15
  * which can be accessed in QB by selecting "Lists" → "Chart of Accounts" →
16
16
  * "Accounts" → "New".
17
17
  *
18
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountadd
18
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountAdd
19
19
  */
20
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"]>;
21
27
  /**
22
28
  * `AccountQuery` is a list query that returns data for all accounts that
23
29
  * match the provided filter criteria. Notice that it returns only data
@@ -26,9 +32,37 @@ export default class ClientQBD extends BaseClient {
26
32
  * account, if there is one. You can search across all accounts or you can
27
33
  * specify an account type and search only those.
28
34
  *
29
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountquery
35
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountQuery
30
36
  */
31
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"]>;
32
66
  /**
33
67
  * Returns data for the specified customers.
34
68
  *
@@ -38,32 +72,99 @@ export default class ClientQBD extends BaseClient {
38
72
  * address for a particular customer. Excluding the shipping address data will
39
73
  * significantly improve the performance of the `CustomerQuery`.
40
74
  *
41
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/customerquery
75
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerQuery
42
76
  */
43
77
  customerQuery(qbwcUsername: string, params: qbd.CustomerQueryRq): Promise<qbd.CustomerQueryRs["CustomerRet"]>;
44
78
  /**
45
79
  * Adds an employee with personal data about the employee as well as certain
46
80
  * payroll-related data.
47
81
  *
48
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/employeeAdd
82
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeAdd
49
83
  */
50
84
  employeeAdd(qbwcUsername: string, params: qbd.EmployeeAddRq["EmployeeAdd"]): Promise<qbd.EmployeeAddRs["EmployeeRet"]>;
51
85
  /**
52
86
  * Modifies an existing employee.
53
87
  *
54
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/employeemod
88
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeMod
55
89
  */
56
90
  employeeMod(qbwcUsername: string, params: qbd.EmployeeModRq["EmployeeMod"]): Promise<qbd.EmployeeModRs["EmployeeRet"]>;
57
91
  /**
58
92
  * Returns employee data.
59
93
  *
60
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/employeeQuery
94
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeQuery
61
95
  */
62
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"]>;
63
164
  /**
64
165
  * Queries for the specified vendor or set of vendors.
65
166
  *
66
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/vendorQuery
167
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorQuery
67
168
  */
68
169
  vendorQuery(qbwcUsername: string, params: qbd.VendorQueryRq): Promise<qbd.VendorQueryRs["VendorRet"]>;
69
170
  }
@@ -18,7 +18,7 @@ class ClientQBD extends BaseClient_1.default {
18
18
  * which can be accessed in QB by selecting "Lists" → "Chart of Accounts" →
19
19
  * "Accounts" → "New".
20
20
  *
21
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountadd
21
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountAdd
22
22
  */
23
23
  async accountAdd(qbwcUsername, params) {
24
24
  const response = (await this.sendRequest(qbwcUsername, {
@@ -30,6 +30,21 @@ class ClientQBD extends BaseClient_1.default {
30
30
  }
31
31
  return responseBody;
32
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
+ }
33
48
  /**
34
49
  * `AccountQuery` is a list query that returns data for all accounts that
35
50
  * match the provided filter criteria. Notice that it returns only data
@@ -38,7 +53,7 @@ class ClientQBD extends BaseClient_1.default {
38
53
  * account, if there is one. You can search across all accounts or you can
39
54
  * specify an account type and search only those.
40
55
  *
41
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountquery
56
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountQuery
42
57
  */
43
58
  async accountQuery(qbwcUsername, params) {
44
59
  const response = (await this.sendRequest(qbwcUsername, {
@@ -50,6 +65,52 @@ class ClientQBD extends BaseClient_1.default {
50
65
  }
51
66
  return responseBody;
52
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
+ }
53
114
  /**
54
115
  * Returns data for the specified customers.
55
116
  *
@@ -59,7 +120,7 @@ class ClientQBD extends BaseClient_1.default {
59
120
  * address for a particular customer. Excluding the shipping address data will
60
121
  * significantly improve the performance of the `CustomerQuery`.
61
122
  *
62
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/customerquery
123
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerQuery
63
124
  */
64
125
  async customerQuery(qbwcUsername, params) {
65
126
  const response = (await this.sendRequest(qbwcUsername, {
@@ -75,7 +136,7 @@ class ClientQBD extends BaseClient_1.default {
75
136
  * Adds an employee with personal data about the employee as well as certain
76
137
  * payroll-related data.
77
138
  *
78
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/employeeAdd
139
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeAdd
79
140
  */
80
141
  async employeeAdd(qbwcUsername, params) {
81
142
  const response = (await this.sendRequest(qbwcUsername, {
@@ -90,7 +151,7 @@ class ClientQBD extends BaseClient_1.default {
90
151
  /**
91
152
  * Modifies an existing employee.
92
153
  *
93
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/employeemod
154
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeMod
94
155
  */
95
156
  async employeeMod(qbwcUsername, params) {
96
157
  const response = (await this.sendRequest(qbwcUsername, {
@@ -105,7 +166,7 @@ class ClientQBD extends BaseClient_1.default {
105
166
  /**
106
167
  * Returns employee data.
107
168
  *
108
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/employeeQuery
169
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeQuery
109
170
  */
110
171
  async employeeQuery(qbwcUsername, params) {
111
172
  const response = (await this.sendRequest(qbwcUsername, {
@@ -117,10 +178,104 @@ class ClientQBD extends BaseClient_1.default {
117
178
  }
118
179
  return responseBody;
119
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
+ }
120
275
  /**
121
276
  * Queries for the specified vendor or set of vendors.
122
277
  *
123
- * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/vendorQuery
278
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorQuery
124
279
  */
125
280
  async vendorQuery(qbwcUsername, params) {
126
281
  const response = (await this.sendRequest(qbwcUsername, {
@@ -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;
@@ -78,6 +78,30 @@ export interface AccountAddRs {
78
78
  AccountRet?: AccountRet;
79
79
  ErrorRecovery?: ErrorRecovery;
80
80
  }
81
+ interface AccountMod {
82
+ ListID: string;
83
+ EditSequence: string;
84
+ Name?: string;
85
+ IsActive?: boolean;
86
+ ParentRef?: ParentRef;
87
+ AccountType?: AccountType;
88
+ AccountNumber?: string;
89
+ BankNumber?: string;
90
+ Desc?: string;
91
+ OpenBalance?: string;
92
+ OpenBalanceDate?: string;
93
+ SalesTaxCodeRef?: SalesTaxCodeRef;
94
+ TaxLineID?: number;
95
+ CurrencyRef?: CurrencyRef;
96
+ }
97
+ export interface AccountModRq {
98
+ AccountMod: AccountMod;
99
+ IncludeRetElement?: string[] | string;
100
+ }
101
+ export interface AccountModRs {
102
+ AccountRet?: AccountRet;
103
+ ErrorRecovery?: ErrorRecovery;
104
+ }
81
105
  /** @default: ActiveOnly */
82
106
  declare type ActiveStatus = "ActiveOnly" | "All" | "InactiveOnly";
83
107
  declare type MatchCriterion = "Contains" | "EndsWith" | "StartsWith";
@@ -102,7 +126,7 @@ export interface AccountQueryRq {
102
126
  ToModifiedDate?: string;
103
127
  NameFilter?: NameFilter;
104
128
  NameRangeFilter?: NameRangeFilter;
105
- AccountType?: AccountType[] | AccountType;
129
+ AccountType?: AccountType | AccountType[];
106
130
  CurrencyFilter?: CurrencyFilter;
107
131
  IncludeRetElement?: string[] | string;
108
132
  OwnerID?: string[] | string;
@@ -110,32 +134,6 @@ export interface AccountQueryRq {
110
134
  export interface AccountQueryRs {
111
135
  AccountRet?: AccountRet | AccountRet[];
112
136
  }
113
- declare type Operator = "Equal" | "GreaterThan" | "GreaterThanEqual" | "LessThan" | "LessThanEqual";
114
- interface TotalBalanceFilter {
115
- Operator: Operator;
116
- Amount: string;
117
- }
118
- interface ClassFilter {
119
- ListID?: string[] | string;
120
- FullName?: string[] | string;
121
- ListIDWithChildren?: string;
122
- FullNameWithChildren?: string;
123
- }
124
- export interface CustomerQueryRq {
125
- ListID?: string[] | string;
126
- FullName?: string[] | string;
127
- MaxReturned?: number;
128
- ActiveStatus?: ActiveStatus;
129
- FromModifiedDate?: string;
130
- ToModifiedDate?: string;
131
- NameFilter?: NameFilter;
132
- NameRangeFilter?: NameRangeFilter;
133
- TotalBalanceFilter?: TotalBalanceFilter;
134
- CurrencyFilter?: CurrencyFilter;
135
- ClassFilter?: ClassFilter;
136
- IncludeRetElement?: string[] | string;
137
- OwnerID?: string[] | string;
138
- }
139
137
  interface ClassRef {
140
138
  ListID?: string;
141
139
  FullName?: string;
@@ -152,13 +150,6 @@ interface BillAddress {
152
150
  Country?: string;
153
151
  Note?: string;
154
152
  }
155
- interface BillAddressBlock {
156
- Addr1?: string;
157
- Addr2?: string;
158
- Addr3?: string;
159
- Addr4?: string;
160
- Addr5?: string;
161
- }
162
153
  interface ShipAddress {
163
154
  Addr1?: string;
164
155
  Addr2?: string;
@@ -171,13 +162,6 @@ interface ShipAddress {
171
162
  Country?: string;
172
163
  Note?: string;
173
164
  }
174
- interface ShipAddressBlock {
175
- Addr1?: string;
176
- Addr2?: string;
177
- Addr3?: string;
178
- Addr4?: string;
179
- Addr5?: string;
180
- }
181
165
  interface ShipToAddress {
182
166
  Name: string;
183
167
  Addr1?: string;
@@ -196,12 +180,7 @@ interface AdditionalContactRef {
196
180
  ContactName: string;
197
181
  ContactValue: string;
198
182
  }
199
- interface ContactsRet {
200
- ListID: string;
201
- TimeCreated: string;
202
- TimeModified: string;
203
- EditSequence: string;
204
- Contact?: string;
183
+ interface Contacts {
205
184
  Salutation?: string;
206
185
  FirstName: string;
207
186
  MiddleName?: string;
@@ -245,9 +224,7 @@ interface JobTypeRef {
245
224
  ListID?: string;
246
225
  FullName?: string;
247
226
  }
248
- interface AdditionalNotesRet {
249
- NoteID: number;
250
- Date: string;
227
+ interface AdditionalNotes {
251
228
  Note: string;
252
229
  }
253
230
  /** @default: None */
@@ -256,6 +233,92 @@ interface PriceLevelRef {
256
233
  ListID?: string;
257
234
  FullName?: string;
258
235
  }
236
+ interface CustomerAdd {
237
+ Name: string;
238
+ IsActive?: boolean;
239
+ ClassRef?: ClassRef;
240
+ ParentRef?: ParentRef;
241
+ CompanyName?: string;
242
+ Salutation?: string;
243
+ FirstName?: string;
244
+ MiddleName?: string;
245
+ LastName?: string;
246
+ JobTitle?: string;
247
+ BillAddress?: BillAddress;
248
+ ShipAddress?: ShipAddress;
249
+ ShipToAddress?: ShipToAddress | ShipToAddress[];
250
+ Phone?: string;
251
+ AltPhone?: string;
252
+ Fax?: string;
253
+ Email?: string;
254
+ Cc?: string;
255
+ Contact?: string;
256
+ AltContact?: string;
257
+ AdditionalContactRef?: AdditionalContactRef | AdditionalContactRef[];
258
+ Contacts?: Contacts | Contacts[];
259
+ CustomerTypeRef?: CustomerTypeRef;
260
+ TermsRef?: TermsRef;
261
+ SalesRepRef?: SalesRepRef;
262
+ OpenBalance?: string;
263
+ OpenBalanceDate?: string;
264
+ SalesTaxCodeRef?: SalesTaxCodeRef;
265
+ ItemSalesTaxRef?: ItemSalesTaxRef;
266
+ SalesTaxCountry?: SalesTaxCountry;
267
+ ResaleNumber?: string;
268
+ AccountNumber?: string;
269
+ CreditLimit?: string;
270
+ PreferredPaymentMethodRef?: PreferredPaymentMethodRef;
271
+ CreditCardInfo?: CreditCardInfo;
272
+ JobStatus?: JobStatus;
273
+ JobStartDate?: string;
274
+ JobProjectedEndDate?: string;
275
+ JobEndDate?: string;
276
+ JobDesc?: string;
277
+ JobTypeRef?: JobTypeRef;
278
+ Notes?: string;
279
+ AdditionalNotes?: AdditionalNotes | AdditionalNotes[];
280
+ PreferredDeliveryMethod?: PreferredDeliveryMethod;
281
+ PriceLevelRef?: PriceLevelRef;
282
+ ExternalGUID?: string;
283
+ TaxRegistrationNumber?: string;
284
+ CurrencyRef?: CurrencyRef;
285
+ }
286
+ export interface CustomerAddRq {
287
+ CustomerAdd: CustomerAdd;
288
+ IncludeRetElement?: string[] | string;
289
+ }
290
+ interface BillAddressBlock {
291
+ Addr1?: string;
292
+ Addr2?: string;
293
+ Addr3?: string;
294
+ Addr4?: string;
295
+ Addr5?: string;
296
+ }
297
+ interface ShipAddressBlock {
298
+ Addr1?: string;
299
+ Addr2?: string;
300
+ Addr3?: string;
301
+ Addr4?: string;
302
+ Addr5?: string;
303
+ }
304
+ interface ContactsRet {
305
+ ListID: string;
306
+ TimeCreated: string;
307
+ TimeModified: string;
308
+ EditSequence: string;
309
+ Contact?: string;
310
+ Salutation?: string;
311
+ FirstName: string;
312
+ MiddleName?: string;
313
+ LastName?: string;
314
+ JobTitle?: string;
315
+ AdditionalContactRef?: AdditionalContactRef | AdditionalContactRef[];
316
+ }
317
+ interface AdditionalNotesRet {
318
+ NoteID: number;
319
+ Date: string;
320
+ Note: string;
321
+ }
259
322
  interface CustomerRet {
260
323
  ListID: string;
261
324
  TimeCreated: string;
@@ -315,6 +378,107 @@ interface CustomerRet {
315
378
  CurrencyRef?: CurrencyRef;
316
379
  DataExtRet?: DataExtRet | DataExtRet[];
317
380
  }
381
+ export interface CustomerAddRs {
382
+ CustomerRet?: CustomerRet;
383
+ ErrorRecovery?: ErrorRecovery;
384
+ }
385
+ interface ContactsMod {
386
+ ListID: string;
387
+ EditSequence: string;
388
+ Salutation?: string;
389
+ FirstName: string;
390
+ MiddleName?: string;
391
+ LastName?: string;
392
+ JobTitle?: string;
393
+ AdditionalContactRef?: AdditionalContactRef | AdditionalContactRef[];
394
+ }
395
+ interface AdditionalNotesMod {
396
+ NoteID: number;
397
+ Note: string;
398
+ }
399
+ interface CustomerMod {
400
+ ListID: string;
401
+ EditSequence: string;
402
+ Name?: string;
403
+ IsActive?: boolean;
404
+ ClassRef?: ClassRef;
405
+ ParentRef?: ParentRef;
406
+ CompanyName?: string;
407
+ Salutation?: string;
408
+ FirstName?: string;
409
+ MiddleName?: string;
410
+ LastName?: string;
411
+ JobTitle?: string;
412
+ BillAddress?: BillAddress;
413
+ ShipAddress?: ShipAddress;
414
+ ShipToAddress?: ShipToAddress | ShipToAddress[];
415
+ Phone?: string;
416
+ AltPhone?: string;
417
+ Fax?: string;
418
+ Email?: string;
419
+ Cc?: string;
420
+ Contact?: string;
421
+ AltContact?: string;
422
+ AdditionalContactRef?: AdditionalContactRef | AdditionalContactRef[];
423
+ ContactsMod?: ContactsMod | ContactsMod[];
424
+ CustomerTypeRef?: CustomerTypeRef;
425
+ TermsRef?: TermsRef;
426
+ SalesRepRef?: SalesRepRef;
427
+ SalesTaxCodeRef?: SalesTaxCodeRef;
428
+ ItemSalesTaxRef?: ItemSalesTaxRef;
429
+ SalesTaxCountry?: SalesTaxCountry;
430
+ ResaleNumber?: string;
431
+ AccountNumber?: string;
432
+ CreditLimit?: string;
433
+ PreferredPaymentMethodRef?: PreferredPaymentMethodRef;
434
+ CreditCardInfo?: CreditCardInfo;
435
+ JobStatus?: JobStatus;
436
+ JobStartDate?: string;
437
+ JobProjectedEndDate?: string;
438
+ JobEndDate?: string;
439
+ JobDesc?: string;
440
+ JobTypeRef?: JobTypeRef;
441
+ Notes?: string;
442
+ AdditionalNotesMod?: AdditionalNotesMod | AdditionalNotesMod[];
443
+ PreferredDeliveryMethod?: PreferredDeliveryMethod;
444
+ PriceLevelRef?: PriceLevelRef;
445
+ TaxRegistrationNumber?: string;
446
+ CurrencyRef?: CurrencyRef;
447
+ }
448
+ export interface CustomerModRq {
449
+ CustomerMod: CustomerMod;
450
+ IncludeRetElement?: string[] | string;
451
+ }
452
+ export interface CustomerModRs {
453
+ CustomerRet?: CustomerRet;
454
+ ErrorRecovery?: ErrorRecovery;
455
+ }
456
+ declare type Operator = "Equal" | "GreaterThan" | "GreaterThanEqual" | "LessThan" | "LessThanEqual";
457
+ interface TotalBalanceFilter {
458
+ Operator: Operator;
459
+ Amount: string;
460
+ }
461
+ interface ClassFilter {
462
+ ListID?: string[] | string;
463
+ FullName?: string[] | string;
464
+ ListIDWithChildren?: string;
465
+ FullNameWithChildren?: string;
466
+ }
467
+ export interface CustomerQueryRq {
468
+ ListID?: string[] | string;
469
+ FullName?: string[] | string;
470
+ MaxReturned?: number;
471
+ ActiveStatus?: ActiveStatus;
472
+ FromModifiedDate?: string;
473
+ ToModifiedDate?: string;
474
+ NameFilter?: NameFilter;
475
+ NameRangeFilter?: NameRangeFilter;
476
+ TotalBalanceFilter?: TotalBalanceFilter;
477
+ CurrencyFilter?: CurrencyFilter;
478
+ ClassFilter?: ClassFilter;
479
+ IncludeRetElement?: string[] | string;
480
+ OwnerID?: string[] | string;
481
+ }
318
482
  export interface CustomerQueryRs {
319
483
  CustomerRet?: CustomerRet | CustomerRet[];
320
484
  }
@@ -356,9 +520,6 @@ declare type Disabled = "No" | "Yes";
356
520
  declare type OnFile = "No" | "Yes";
357
521
  declare type USVeteran = "No" | "Yes";
358
522
  declare type MilitaryStatus = "Active" | "Reserve";
359
- interface AdditionalNotes {
360
- Note: string;
361
- }
362
523
  interface BillingRateRef {
363
524
  ListID?: string;
364
525
  FullName?: string;
@@ -513,10 +674,6 @@ export interface EmployeeAddRs {
513
674
  EmployeeRet?: EmployeeRet;
514
675
  ErrorRecovery?: ErrorRecovery;
515
676
  }
516
- interface AdditionalNotesMod {
517
- NoteID: number;
518
- Note: string;
519
- }
520
677
  interface EmployeePayrollInfoMod {
521
678
  PayPeriod?: PayPeriod;
522
679
  ClassRef?: ClassRef;
@@ -597,6 +754,153 @@ export interface EmployeeQueryRq {
597
754
  export interface EmployeeQueryRs {
598
755
  EmployeeRet?: EmployeeRet | EmployeeRet[];
599
756
  }
757
+ interface AccountRef {
758
+ ListID?: string;
759
+ FullName?: string;
760
+ }
761
+ interface EntityRef {
762
+ ListID?: string;
763
+ FullName?: string;
764
+ }
765
+ declare type BillableStatus = "Billable" | "HasBeenBilled" | "NotBillable";
766
+ interface JournalDebitLine {
767
+ TxnLineID?: string;
768
+ AccountRef?: AccountRef;
769
+ Amount?: string;
770
+ Memo?: string;
771
+ EntityRef?: EntityRef;
772
+ ClassRef?: ClassRef;
773
+ ItemSalesTaxRef?: ItemSalesTaxRef;
774
+ BillableStatus?: BillableStatus;
775
+ }
776
+ interface JournalCreditLine {
777
+ TxnLineID?: string;
778
+ AccountRef?: AccountRef;
779
+ Amount?: string;
780
+ Memo?: string;
781
+ EntityRef?: EntityRef;
782
+ ClassRef?: ClassRef;
783
+ ItemSalesTaxRef?: ItemSalesTaxRef;
784
+ BillableStatus?: BillableStatus;
785
+ }
786
+ interface JournalEntryAdd {
787
+ TxnDate?: string;
788
+ RefNumber?: string;
789
+ IsAdjustment?: boolean;
790
+ IsHomeCurrencyAdjustment?: boolean;
791
+ IsAmountsEnteredInHomeCurrency?: boolean;
792
+ CurrencyRef?: CurrencyRef;
793
+ ExchangeRate?: number;
794
+ ExternalGUID?: string;
795
+ JournalDebitLine?: JournalDebitLine;
796
+ JournalCreditLine?: JournalCreditLine;
797
+ }
798
+ export interface JournalEntryAddRq {
799
+ JournalEntryAdd: JournalEntryAdd;
800
+ IncludeRetElement?: string[] | string;
801
+ }
802
+ interface JournalEntryRet {
803
+ TxnID: string;
804
+ TimeCreated: string;
805
+ TimeModified: string;
806
+ EditSequence: string;
807
+ TxnNumber?: number;
808
+ TxnDate: string;
809
+ RefNumber?: string;
810
+ IsAdjustment?: boolean;
811
+ IsHomeCurrencyAdjustment?: boolean;
812
+ IsAmountsEnteredInHomeCurrency?: boolean;
813
+ CurrencyRef?: CurrencyRef;
814
+ ExchangeRate?: number;
815
+ ExternalGUID?: string;
816
+ JournalDebitLine?: JournalDebitLine;
817
+ JournalCreditLine?: JournalCreditLine;
818
+ DataExtRet?: DataExtRet | DataExtRet[];
819
+ }
820
+ export interface JournalEntryAddRs {
821
+ JournalEntryRet?: JournalEntryRet;
822
+ ErrorRecovery?: ErrorRecovery;
823
+ }
824
+ declare type JournalLineType = "Credit" | "Debit";
825
+ interface JournalLineMod {
826
+ TxnLineID: string;
827
+ JournalLineType?: JournalLineType;
828
+ AccountRef?: AccountRef;
829
+ Amount?: string;
830
+ Memo?: string;
831
+ EntityRef?: EntityRef;
832
+ ClassRef?: ClassRef;
833
+ ItemSalesTaxRef?: ItemSalesTaxRef;
834
+ BillableStatus?: BillableStatus;
835
+ }
836
+ interface JournalEntryMod {
837
+ TxnID: string;
838
+ EditSequence: string;
839
+ TxnDate?: string;
840
+ RefNumber?: string;
841
+ IsAdjustment?: boolean;
842
+ IsAmountsEnteredInHomeCurrency?: boolean;
843
+ CurrencyRef?: CurrencyRef;
844
+ ExchangeRate?: number;
845
+ JournalLineMod?: JournalLineMod | JournalLineMod[];
846
+ }
847
+ export interface JournalEntryModRq {
848
+ JournalEntryMod: JournalEntryMod;
849
+ IncludeRetElement?: string[] | string;
850
+ }
851
+ export interface JournalEntryModRs {
852
+ JournalEntryRet?: JournalEntryRet;
853
+ ErrorRecovery?: ErrorRecovery;
854
+ }
855
+ interface ModifiedDateRangeFilter {
856
+ FromModifiedDate?: string;
857
+ ToModifiedDate?: string;
858
+ }
859
+ declare type DateMacro = "All" | "LastCalendarQuarter" | "LastCalendarQuarterToDate" | "LastCalendarYear" | "LastCalendarYearToDate" | "LastFiscalQuarter" | "LastFiscalQuarterToDate" | "LastFiscalYear" | "LastFiscalYearToDate" | "LastMonth" | "LastMonthToDate" | "LastWeek" | "LastWeekToDate" | "NextCalendarQuarter" | "NextCalendarYear" | "NextFiscalQuarter" | "NextFiscalYear" | "NextFourWeeks" | "NextMonth" | "NextWeek" | "ThisCalendarQuarter" | "ThisCalendarQuarterToDate" | "ThisCalendarYear" | "ThisCalendarYearToDate" | "ThisFiscalQuarter" | "ThisFiscalQuarterToDate" | "ThisFiscalYear" | "ThisFiscalYearToDate" | "ThisMonth" | "ThisMonthToDate" | "ThisWeek" | "ThisWeekToDate" | "Today" | "Yesterday";
860
+ interface TxnDateRangeFilter {
861
+ FromTxnDate?: string;
862
+ ToTxnDate?: string;
863
+ DateMacro?: DateMacro;
864
+ }
865
+ interface EntityFilter {
866
+ ListID?: string[] | string;
867
+ FullName?: string[] | string;
868
+ ListIDWithChildren?: string;
869
+ FullNameWithChildren?: string;
870
+ }
871
+ interface AccountFilter {
872
+ ListID?: string[] | string;
873
+ FullName?: string[] | string;
874
+ ListIDWithChildren?: string;
875
+ FullNameWithChildren?: string;
876
+ }
877
+ interface RefNumberFilter {
878
+ MatchCriterion: MatchCriterion;
879
+ RefNumber: string;
880
+ }
881
+ interface RefNumberRangeFilter {
882
+ FromRefNumber?: string;
883
+ ToRefNumber?: string;
884
+ }
885
+ export interface JournalEntryQueryRq {
886
+ TxnID?: string[] | string;
887
+ RefNumber?: string[] | string;
888
+ RefNumberCaseSensitive?: string[] | string;
889
+ MaxReturned?: number;
890
+ ModifiedDateRangeFilter?: ModifiedDateRangeFilter;
891
+ TxnDateRangeFilter?: TxnDateRangeFilter;
892
+ EntityFilter?: EntityFilter;
893
+ AccountFilter?: AccountFilter;
894
+ RefNumberFilter?: RefNumberFilter;
895
+ RefNumberRangeFilter?: RefNumberRangeFilter;
896
+ CurrencyFilter?: CurrencyFilter;
897
+ IncludeLineItems?: boolean;
898
+ IncludeRetElement?: string[] | string;
899
+ OwnerID?: string[] | string;
900
+ }
901
+ export interface JournalEntryQueryRs {
902
+ JournalEntryRet?: JournalEntryRet | JournalEntryRet[];
903
+ }
600
904
  export interface VendorQueryRq {
601
905
  ListID?: string[] | string;
602
906
  FullName?: string[] | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "0.1.5",
3
+ "version": "0.2.1",
4
4
  "description": "Conductor API wrapper",
5
5
  "author": "Danny Nemer <hi@DannyNemer.com>",
6
6
  "license": "MIT",