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.
@@ -1,313 +0,0 @@
1
- import type {
2
- ActiveStatus,
3
- CurrencyFilter,
4
- CurrencyRef,
5
- DataExtRet,
6
- NameFilter,
7
- NameRangeFilter,
8
- SalesTaxCodeRef,
9
- } from "@conductor/client/qb/qbXMLTypes/shared";
10
-
11
- // https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountadd
12
- export interface AccountAddRq {
13
- AccountAdd: AccountAdd;
14
- IncludeRetElement?: string;
15
- }
16
-
17
- export interface AccountAddRs {
18
- // TODO: Confirm whether this is an array or not.
19
- AccountRet?: AccountRet;
20
- }
21
-
22
- export interface AccountAdd {
23
- /**
24
- * The case-insensitive name of a list object, not including the names of its
25
- * ancestors. Name must be unique, unless it is the Name of a “hierarchical”
26
- * list object. List objects in different hierarchies can have duplicate names
27
- * because their FullNames will still be unique. For example, two objects
28
- * could both have the Name kitchen, but they could have unique FullNames,
29
- * such as Job12:kitchen and Baker:kitchen. For built-in currencies, Name is
30
- * the internationally accepted currency name and is not editable.
31
- */
32
- Name: string;
33
- /**
34
- * If `IsActive` is `true`, this object is currently enabled for use by
35
- * QuickBooks. The default value is `true`.
36
- */
37
- IsActive?: boolean;
38
- /**
39
- * A reference to the list object that is one level above this one. For
40
- * example, an inventory item with the `FullName` of
41
- * `GermanCars:Mercedes-Benz:CL500I99AA` might have a parent object with the
42
- * `FullName` of `GermanCars:Mercedes-Benz`. In a request, if a `ParentRef`
43
- * aggregate includes both `FullName` and `ListID`, `FullName` will be
44
- * ignored.
45
- */
46
- ParentRef?: ParentRef;
47
- /**
48
- * The type of QuickBooks account. You cannot create or modify a non-posting
49
- * account through the SDK, because QuickBooks creates these accounts behind
50
- * the scenes. This means that you cannot send an AccountAdd request with an
51
- * AccountType of NonPosting.
52
- */
53
- AccountType: AccountType;
54
- /**
55
- * Account numbers appear in the QuickBooks chart of accounts, Account fields,
56
- * and reports and graphs. If the `IsUsingAccountNumber` preference is `false`
57
- * (that is, if the QuickBooks user has the account numbers Preference turned
58
- * off), you can still set account numbers through the SDK, but the numbers
59
- * will not be visible in the user interface.
60
- */
61
- AccountNumber?: string;
62
- /**
63
- * The bank account number or an identifying note about the account. If a
64
- * `BankNumber` exists in a QuickBooks company file, it will only be returned
65
- * to applications that have been granted permission to access sensitive data
66
- * and that are using SDK v2.0 or greater.
67
- */
68
- BankNumber?: string;
69
- /**
70
- * A descriptive text field.
71
- */
72
- Desc?: string;
73
- /**
74
- * The amount of money in, or the value of, this account as of
75
- * `OpenBalanceDate`. On a bank statement, the amount of money in the account
76
- * at the beginning of the statement period.
77
- */
78
- OpenBalance?: string;
79
- /**
80
- * The date when an opening balance was entered for this account.
81
- */
82
- OpenBalanceDate?: Date;
83
- /**
84
- * Each item on a sales form is assigned a sales-tax code that indicates
85
- * whether the item is taxable or non-taxable, and why. Two general codes,
86
- * which can be modified but not deleted, appear on the sales-tax code list by
87
- * default: `Non-taxable (Name = NON; Desc = Non-Taxable; IsTaxable = false)`,
88
- * `Taxable (Name = TAX; Desc = Taxable; IsTaxable = true)`. A sales-tax code
89
- * can be deleted only if it is no longer associated with any customer, item,
90
- * or transaction. If the “Do You Charge Sales Tax?” preference within
91
- * QuickBooks is set to No, QuickBooks will assign the default non-taxable
92
- * sales-tax code to all sales. A `SalesTaxCodeRef` aggregate refers to a
93
- * sales-tax code on the list. In a request, if a `SalesTaxCodeRef` aggregate
94
- * includes both FullName and `ListID`, FullName will be ignored. In a
95
- * Customer message, `SalesTaxCodeRef` refers to the sales-tax code that will
96
- * be used for items related to this customer. In an ItemInventory message,
97
- * `SalesTaxCodeRef` refers to the type of sales tax that will be charged for
98
- * this item, if it is a taxable item and if sales tax is set up within
99
- * QuickBooks.
100
- */
101
- SalesTaxCodeRef?: SalesTaxCodeRef;
102
- /**
103
- * An internal representation of the tax line associated with this account.
104
- */
105
- TaxLineID?: number;
106
- /**
107
- * The currency object contains all of the information needed by QuickBooks to
108
- * display and use. For built-in currencies, the name and currency code values
109
- * are internationally accepted values and thus are not editable. The comma
110
- * format is editable, as is the IsActive status. For user-defined currencies,
111
- * every value in the object is editable including name and currency code.
112
- * When used with PriceLevels, the CurrencyRef should only be used with “per
113
- * item” price levels.
114
- */
115
- CurrencyRef?: CurrencyRef;
116
- }
117
-
118
- // https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountquery
119
- // FIXME: This does not account for the use of "OR" and "may repeat" in the
120
- // XMLOps, which might indicate using an array.
121
- export interface AccountQueryRq {
122
- ListID?: string;
123
- FullName?: string;
124
- /**
125
- * Limits the number of objects that a query returns. (To get a count of how
126
- * many objects could possibly be returned, use the metaData query attribute.)
127
- * If you include a `MaxReturned` value, it must be at least 1.
128
- */
129
- MaxReturned?: number;
130
- /**
131
- * Used in filters to select list objects based on whether or not they are
132
- * currently enabled for use by QuickBooks. The default value is `ActiveOnly`,
133
- * which selects only list objects that are active.
134
- */
135
- ActiveStatus?: ActiveStatus;
136
- FromModifiedDate?: Date;
137
- ToModifiedDate?: Date;
138
- /**
139
- * Filters according to the object’s `Name`.
140
- */
141
- NameFilter?: NameFilter;
142
- /**
143
- * Filters according to the object’s `Name`.
144
- */
145
- NameRangeFilter?: NameRangeFilter;
146
- AccountType?: AccountType;
147
- CurrencyFilter?: CurrencyFilter;
148
- }
149
-
150
- export interface AccountQueryRs {
151
- // TODO: Confirm whether this is an array or not.
152
- AccountRet?: AccountRet;
153
- }
154
-
155
- export interface AccountRet {
156
- /**
157
- * Along with `FullName`, `ListID` is a way to identify a list object. When a
158
- * list object is added to QuickBooks through the SDK or through the
159
- * QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is
160
- * not unique across lists, but it is unique across each particular type of
161
- * list. For example, two customers could not have the same `ListID`, and a
162
- * customer could not have the same `ListID` as an employee (because Customer
163
- * and Employee are both name lists). But a customer could have the same
164
- * `ListID` as a non-inventory item.
165
- */
166
- ListID: string;
167
- /**
168
- * Time the object was created.
169
- */
170
- TimeCreated: string;
171
- /**
172
- * Time the object was last modified.
173
- */
174
- TimeModified: string;
175
- /**
176
- * A number that the server generates and assigns to this object. Every time
177
- * the object is changed, the server will change its `EditSequence` value.
178
- * When you try to modify a list object, you must provide its `EditSequence`.
179
- * The server compares the `EditSequence` you provide with the `EditSequence`
180
- * in memory to make sure you are dealing with the latest copy of the object.
181
- * If you are not, the server will reject the request and return an error.
182
- * Because `EditSequence` is only used to check whether two objects match,
183
- * there is no reason to interpret its value.
184
- */
185
- EditSequence: string;
186
- /**
187
- * The case-insensitive name of a list object, not including the names of its
188
- * ancestors. `Name` must be unique, unless it is the `Name` of a
189
- * “hierarchical” list object. List objects in different hierarchies can have
190
- * duplicate names because their `FullNames` will still be unique. For
191
- * example, two objects could both have the `Name` kitchen, but they could
192
- * have unique `FullNames`, such as Job12:kitchen and Baker:kitchen. For
193
- * built-in currencies, `Name` is the internationally accepted currency name
194
- * and is not editable.
195
- */
196
- Name: string;
197
- /**
198
- * `FullName` (along with `ListID`) is a way to identify a list object. The
199
- * `FullName` is the name prefixed by the names of each ancestor, for example
200
- * `Jones:Kitchen:Cabinets`. `FullName` values are not case-sensitive.
201
- */
202
- FullName: string;
203
- /**
204
- * If `IsActive` is true, this object is currently enabled for use by
205
- * QuickBooks. The default value is `true`.
206
- */
207
- IsActive?: boolean;
208
- /**
209
- * A reference to the list object that is one level above this one. For
210
- * example, an inventory item with the `FullName` of
211
- * `GermanCars:Mercedes-Benz:CL500I99AA` might have a parent object with the
212
- * `FullName` of `GermanCars:Mercedes-Benz`. In a request, if a `ParentRef`
213
- * aggregate includes both `FullName` and `ListID`, `FullName` will be
214
- * ignored.
215
- */
216
- ParentRef?: ParentRef;
217
- /**
218
- * The number of ancestors. For example, The customer job with `Name =
219
- * carpets` and `FullName = Jones:Building2:carpets` would have a sublevel of
220
- * 2.
221
- */
222
- Sublevel: number;
223
- /**
224
- * The type of QuickBooks account. You cannot create or modify a non-posting
225
- * account through the SDK, because QuickBooks creates these accounts behind
226
- * the scenes. This means that you cannot send an `AccountAdd` request with an
227
- * `AccountType` of `NonPosting`.
228
- */
229
- AccountType: AccountType;
230
- /**
231
- * If `SpecialAccountType` returns a value, then QuickBooks automatically
232
- * created this account when it was needed. Some special accounts cannot be
233
- * overridden, because QuickBooks uses them exclusively for special purposes.
234
- */
235
- SpecialAccountType?: SpecialAccountType;
236
- /**
237
- * Indicates whether the account is used for tax.
238
- */
239
- IsTaxAccount?: boolean;
240
- /**
241
- * Account numbers appear in the QuickBooks chart of accounts, `Account`
242
- * fields, and reports and graphs. If the `IsUsingAccountNumber` preference is
243
- * false (that is, if the QuickBooks user has the account numbers Preference
244
- * turned off), you can still set account numbers through the SDK, but the
245
- * numbers will not be visible in the user interface.
246
- */
247
- AccountNumber?: string;
248
- BankNumber?: string;
249
- Desc?: string;
250
- Balance?: string;
251
- TotalBalance?: string;
252
- SalesTaxCodeRef?: SalesTaxCodeRef;
253
- TaxLineInfoRet?: {
254
- TaxLineID: number;
255
- TaxLineName?: string;
256
- };
257
- CashFlowClassification?: CashFlowClassification;
258
- CurrencyRef?: CurrencyRef;
259
- DataExtRet?: DataExtRet;
260
- }
261
-
262
- interface ParentRef {
263
- ListID?: string;
264
- FullName?: string;
265
- }
266
-
267
- type AccountType =
268
- | "AccountsPayable"
269
- | "AccountsReceivable"
270
- | "Bank"
271
- | "CostOfGoodsSold"
272
- | "CreditCard"
273
- | "Equity"
274
- | "Expense"
275
- | "FixedAsset"
276
- | "Income"
277
- | "LongTermLiability"
278
- | "NonPosting"
279
- | "OtherAsset"
280
- | "OtherCurrentAsset"
281
- | "OtherCurrentLiability"
282
- | "OtherExpense"
283
- | "OtherIncome";
284
-
285
- type SpecialAccountType =
286
- | "AccountsPayable"
287
- | "AccountsReceivable"
288
- | "CondenseItemAdjustmentExpenses"
289
- | "CostOfGoodsSold"
290
- | "DirectDepositLiabilities"
291
- | "Estimates"
292
- | "ExchangeGainLoss"
293
- | "InventoryAssets"
294
- | "ItemReceiptAccount"
295
- | "OpeningBalanceEquity"
296
- | "PayrollExpenses"
297
- | "PayrollLiabilities"
298
- | "PettyCash"
299
- | "PurchaseOrders"
300
- | "ReconciliationDifferences"
301
- | "RetainedEarnings"
302
- | "SalesOrders"
303
- | "SalesTaxPayable"
304
- | "UncategorizedExpenses"
305
- | "UncategorizedIncome"
306
- | "UndepositedFunds";
307
-
308
- type CashFlowClassification =
309
- | "Financing"
310
- | "Investing"
311
- | "None"
312
- | "NotApplicable"
313
- | "Operating";