conductor-node 12.0.0-beta.16 → 12.0.0-beta.18

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.
Files changed (60) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/package.json +8 -29
  3. package/resources/auth-sessions.d.ts +1 -1
  4. package/resources/auth-sessions.js +1 -1
  5. package/resources/auth-sessions.mjs +1 -1
  6. package/resources/qbd/checks.d.ts +1 -1
  7. package/resources/qbd/checks.d.ts.map +1 -1
  8. package/resources/qbd/company.d.ts +354 -0
  9. package/resources/qbd/company.d.ts.map +1 -0
  10. package/resources/qbd/company.js +22 -0
  11. package/resources/qbd/company.js.map +1 -0
  12. package/resources/qbd/company.mjs +18 -0
  13. package/resources/qbd/company.mjs.map +1 -0
  14. package/resources/qbd/customers.d.ts +2 -2
  15. package/resources/qbd/customers.d.ts.map +1 -1
  16. package/resources/qbd/employees.d.ts +2 -2
  17. package/resources/qbd/employees.d.ts.map +1 -1
  18. package/resources/qbd/index.d.ts +2 -0
  19. package/resources/qbd/index.d.ts.map +1 -1
  20. package/resources/qbd/index.js +6 -2
  21. package/resources/qbd/index.js.map +1 -1
  22. package/resources/qbd/index.mjs +2 -0
  23. package/resources/qbd/index.mjs.map +1 -1
  24. package/resources/qbd/preferences.d.ts +591 -0
  25. package/resources/qbd/preferences.d.ts.map +1 -0
  26. package/resources/qbd/preferences.js +21 -0
  27. package/resources/qbd/preferences.js.map +1 -0
  28. package/resources/qbd/preferences.mjs +17 -0
  29. package/resources/qbd/preferences.mjs.map +1 -0
  30. package/resources/qbd/qbd.d.ts +8 -0
  31. package/resources/qbd/qbd.d.ts.map +1 -1
  32. package/resources/qbd/qbd.js +6 -0
  33. package/resources/qbd/qbd.js.map +1 -1
  34. package/resources/qbd/qbd.mjs +6 -0
  35. package/resources/qbd/qbd.mjs.map +1 -1
  36. package/resources/qbd/receive-payments.d.ts +1 -1
  37. package/resources/qbd/receive-payments.d.ts.map +1 -1
  38. package/resources/qbd/vendors.d.ts +2 -2
  39. package/resources/qbd/vendors.d.ts.map +1 -1
  40. package/resources.d.ts +2 -0
  41. package/resources.d.ts.map +1 -0
  42. package/resources.js +18 -0
  43. package/resources.js.map +1 -0
  44. package/resources.mjs +2 -0
  45. package/resources.mjs.map +1 -0
  46. package/src/resources/auth-sessions.ts +1 -1
  47. package/src/resources/qbd/checks.ts +1 -1
  48. package/src/resources/qbd/company.ts +466 -0
  49. package/src/resources/qbd/customers.ts +2 -2
  50. package/src/resources/qbd/employees.ts +2 -2
  51. package/src/resources/qbd/index.ts +2 -0
  52. package/src/resources/qbd/preferences.ts +684 -0
  53. package/src/resources/qbd/qbd.ts +15 -0
  54. package/src/resources/qbd/receive-payments.ts +1 -1
  55. package/src/resources/qbd/vendors.ts +2 -2
  56. package/src/resources.ts +1 -0
  57. package/src/version.ts +1 -1
  58. package/version.d.ts +1 -1
  59. package/version.js +1 -1
  60. package/version.mjs +1 -1
@@ -0,0 +1,466 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+
6
+ export class CompanyResource extends APIResource {
7
+ /**
8
+ * Returns detailed information about the connected QuickBooks company file,
9
+ * including company address, legal name, preferences, and subscribed services.
10
+ * Note that company information cannot be modified through the API, only through
11
+ * the QuickBooks Desktop user interface.
12
+ */
13
+ retrieve(params: CompanyRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<Company> {
14
+ const { conductorEndUserId } = params;
15
+ return this._client.get('/quickbooks-desktop/company', {
16
+ ...options,
17
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
18
+ });
19
+ }
20
+ }
21
+
22
+ export interface Company {
23
+ /**
24
+ * Information about the accountant's copy for this company file. An accountant's
25
+ * copy allows an accountant to make changes while the business continues normal
26
+ * operations. It includes a dividing date that defines the fiscal period the
27
+ * accountant can work on, with restrictions on transactions and accounts within
28
+ * that period. While an accountant copy exists, users cannot modify transactions
29
+ * dated on or before the dividing date, cannot add subaccounts to existing
30
+ * accounts, and cannot edit, merge, or make existing accounts inactive.
31
+ */
32
+ accountantCopy: Company.AccountantCopy | null;
33
+
34
+ /**
35
+ * The company's address, used on its invoices, checks, and other forms (along with
36
+ * `companyName`). This is different from the company's legal address used on tax
37
+ * forms and pay stubs (along with `legalCompanyName`).
38
+ */
39
+ address: Company.Address | null;
40
+
41
+ /**
42
+ * The address where this company receives mail from its customers.
43
+ */
44
+ addressForCustomer: Company.AddressForCustomer | null;
45
+
46
+ /**
47
+ * The name of the QuickBooks user's business associated with this company. This
48
+ * name is used on invoices, checks, and other forms, while `legalCompanyName` is
49
+ * used on tax forms and pay stubs.
50
+ */
51
+ companyName: string | null;
52
+
53
+ /**
54
+ * The company type, which the QuickBooks user selected from a list when creating
55
+ * the company file.
56
+ */
57
+ companyType: string | null;
58
+
59
+ /**
60
+ * The custom fields for the company object, added as user-defined data extensions,
61
+ * not included in the standard QuickBooks object.
62
+ */
63
+ customFields: Array<Company.CustomField>;
64
+
65
+ /**
66
+ * The company's Employer Identification Number.
67
+ */
68
+ ein: string | null;
69
+
70
+ /**
71
+ * The company's email address.
72
+ */
73
+ email: string | null;
74
+
75
+ /**
76
+ * The company's fax number.
77
+ */
78
+ fax: string | null;
79
+
80
+ /**
81
+ * The first month of this company's fiscal year, which determines the default date
82
+ * range for financial reports.
83
+ */
84
+ fiscalYearStartMonth:
85
+ | 'january'
86
+ | 'february'
87
+ | 'march'
88
+ | 'april'
89
+ | 'may'
90
+ | 'june'
91
+ | 'july'
92
+ | 'august'
93
+ | 'september'
94
+ | 'october'
95
+ | 'november'
96
+ | 'december'
97
+ | null;
98
+
99
+ /**
100
+ * The first month of this company's income tax year, which determines the default
101
+ * date range for financial reports.
102
+ */
103
+ incomeTaxYearStartMonth:
104
+ | 'january'
105
+ | 'february'
106
+ | 'march'
107
+ | 'april'
108
+ | 'may'
109
+ | 'june'
110
+ | 'july'
111
+ | 'august'
112
+ | 'september'
113
+ | 'october'
114
+ | 'november'
115
+ | 'december'
116
+ | null;
117
+
118
+ /**
119
+ * Indicates whether the connected QuickBooks company file is a "sample file",
120
+ * which is a mock company file used for testing.
121
+ */
122
+ isSampleCompanyFile: boolean;
123
+
124
+ /**
125
+ * The company's legal address used on its tax forms and pay stubs (along with
126
+ * `legalCompanyName`). This is different from the company's `address` used on
127
+ * invoices, checks, and other forms (along with `companyName`).
128
+ */
129
+ legalAddress: Company.LegalAddress | null;
130
+
131
+ /**
132
+ * The legal name of this company's business, as specified in QuickBooks. This
133
+ * value is used on tax forms and pay stubs, while `companyName` is used on
134
+ * invoices, checks, and other forms.
135
+ */
136
+ legalCompanyName: string | null;
137
+
138
+ /**
139
+ * The company's primary telephone number.
140
+ */
141
+ phone: string | null;
142
+
143
+ /**
144
+ * The company's Social Security Number. The value can be with or without dashes.
145
+ *
146
+ * **NOTE**: This field cannot be changed after the company is created.
147
+ */
148
+ ssn: string | null;
149
+
150
+ /**
151
+ * The Intuit services that this company is or has been subscribed to, such as
152
+ * Intuit Payroll.
153
+ */
154
+ subscribedServices: Company.SubscribedServices | null;
155
+
156
+ /**
157
+ * The tax form that the QuickBooks user expects to file for this company's taxes.
158
+ * When a specific tax form is selected (any value other than `other_or_none`),
159
+ * QuickBooks allows associating each account with a specific tax form line. This
160
+ * association appears in account query responses.
161
+ */
162
+ taxForm:
163
+ | 'form_1040'
164
+ | 'form_1065'
165
+ | 'form_1120'
166
+ | 'form_1120s'
167
+ | 'form_990'
168
+ | 'form_990pf'
169
+ | 'form_990t'
170
+ | 'other_or_none'
171
+ | null;
172
+
173
+ /**
174
+ * The company's public website.
175
+ */
176
+ website: string | null;
177
+ }
178
+
179
+ export namespace Company {
180
+ /**
181
+ * Information about the accountant's copy for this company file. An accountant's
182
+ * copy allows an accountant to make changes while the business continues normal
183
+ * operations. It includes a dividing date that defines the fiscal period the
184
+ * accountant can work on, with restrictions on transactions and accounts within
185
+ * that period. While an accountant copy exists, users cannot modify transactions
186
+ * dated on or before the dividing date, cannot add subaccounts to existing
187
+ * accounts, and cannot edit, merge, or make existing accounts inactive.
188
+ */
189
+ export interface AccountantCopy {
190
+ /**
191
+ * Indicates whether an accountant copy has been made for this company file. An
192
+ * accountant copy allows an accountant to work on the books while the business
193
+ * continues daily operations.
194
+ */
195
+ accountantCopyExists: boolean;
196
+
197
+ /**
198
+ * The fiscal period dividing date for accountant work, in ISO 8601 format
199
+ * (YYYY-MM-DD). While an accountant copy exists, transactions within this period
200
+ * cannot be modified or created. New accounts can be added, but existing accounts
201
+ * cannot have new subaccounts, be edited, merged, or made inactive. List items
202
+ * cannot be deleted or merged.
203
+ */
204
+ dividingDate: string | null;
205
+ }
206
+
207
+ /**
208
+ * The company's address, used on its invoices, checks, and other forms (along with
209
+ * `companyName`). This is different from the company's legal address used on tax
210
+ * forms and pay stubs (along with `legalCompanyName`).
211
+ */
212
+ export interface Address {
213
+ /**
214
+ * The city, district, suburb, town, or village name of the address.
215
+ */
216
+ city: string | null;
217
+
218
+ /**
219
+ * The country name of the address.
220
+ */
221
+ country: string | null;
222
+
223
+ /**
224
+ * The first line of the address (e.g., street, PO Box, or company name).
225
+ */
226
+ line1: string | null;
227
+
228
+ /**
229
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
230
+ * building).
231
+ */
232
+ line2: string | null;
233
+
234
+ /**
235
+ * The third line of the address, if needed.
236
+ */
237
+ line3: string | null;
238
+
239
+ /**
240
+ * The fourth line of the address, if needed.
241
+ */
242
+ line4: string | null;
243
+
244
+ /**
245
+ * The fifth line of the address, if needed.
246
+ */
247
+ line5: string | null;
248
+
249
+ /**
250
+ * A note written at the bottom of the address in the form in which it appears,
251
+ * such as the invoice form.
252
+ */
253
+ note: string | null;
254
+
255
+ /**
256
+ * The postal code or ZIP code of the address.
257
+ */
258
+ postalCode: string | null;
259
+
260
+ /**
261
+ * The state, county, province, or region name of the address.
262
+ */
263
+ state: string | null;
264
+ }
265
+
266
+ /**
267
+ * The address where this company receives mail from its customers.
268
+ */
269
+ export interface AddressForCustomer {
270
+ /**
271
+ * The city, district, suburb, town, or village name of the address.
272
+ */
273
+ city: string | null;
274
+
275
+ /**
276
+ * The country name of the address.
277
+ */
278
+ country: string | null;
279
+
280
+ /**
281
+ * The first line of the address (e.g., street, PO Box, or company name).
282
+ */
283
+ line1: string | null;
284
+
285
+ /**
286
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
287
+ * building).
288
+ */
289
+ line2: string | null;
290
+
291
+ /**
292
+ * The third line of the address, if needed.
293
+ */
294
+ line3: string | null;
295
+
296
+ /**
297
+ * The fourth line of the address, if needed.
298
+ */
299
+ line4: string | null;
300
+
301
+ /**
302
+ * The fifth line of the address, if needed.
303
+ */
304
+ line5: string | null;
305
+
306
+ /**
307
+ * A note written at the bottom of the address in the form in which it appears,
308
+ * such as the invoice form.
309
+ */
310
+ note: string | null;
311
+
312
+ /**
313
+ * The postal code or ZIP code of the address.
314
+ */
315
+ postalCode: string | null;
316
+
317
+ /**
318
+ * The state, county, province, or region name of the address.
319
+ */
320
+ state: string | null;
321
+ }
322
+
323
+ export interface CustomField {
324
+ /**
325
+ * The name of the custom field, unique for the specified `ownerId`. For public
326
+ * custom fields, this name is visible as a label in the QuickBooks UI.
327
+ */
328
+ name: string;
329
+
330
+ /**
331
+ * The identifier of the owner of the custom field, which QuickBooks internally
332
+ * calls a "data extension". For public custom fields visible in the UI, such as
333
+ * those added by the QuickBooks user, this is always "0". For private custom
334
+ * fields that are only visible to the application that created them, this is a
335
+ * valid GUID identifying the owning application. Internally, Conductor always
336
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
337
+ * objects.
338
+ */
339
+ ownerId: string;
340
+
341
+ /**
342
+ * The data type of this custom field.
343
+ */
344
+ type:
345
+ | 'amount_type'
346
+ | 'date_time_type'
347
+ | 'integer_type'
348
+ | 'percent_type'
349
+ | 'price_type'
350
+ | 'quantity_type'
351
+ | 'string_1024_type'
352
+ | 'string_255_type';
353
+
354
+ /**
355
+ * The value of this custom field. The maximum length depends on the field's data
356
+ * type.
357
+ */
358
+ value: string;
359
+ }
360
+
361
+ /**
362
+ * The company's legal address used on its tax forms and pay stubs (along with
363
+ * `legalCompanyName`). This is different from the company's `address` used on
364
+ * invoices, checks, and other forms (along with `companyName`).
365
+ */
366
+ export interface LegalAddress {
367
+ /**
368
+ * The city, district, suburb, town, or village name of the address.
369
+ */
370
+ city: string | null;
371
+
372
+ /**
373
+ * The country name of the address.
374
+ */
375
+ country: string | null;
376
+
377
+ /**
378
+ * The first line of the address (e.g., street, PO Box, or company name).
379
+ */
380
+ line1: string | null;
381
+
382
+ /**
383
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
384
+ * building).
385
+ */
386
+ line2: string | null;
387
+
388
+ /**
389
+ * The third line of the address, if needed.
390
+ */
391
+ line3: string | null;
392
+
393
+ /**
394
+ * The fourth line of the address, if needed.
395
+ */
396
+ line4: string | null;
397
+
398
+ /**
399
+ * The fifth line of the address, if needed.
400
+ */
401
+ line5: string | null;
402
+
403
+ /**
404
+ * A note written at the bottom of the address in the form in which it appears,
405
+ * such as the invoice form.
406
+ */
407
+ note: string | null;
408
+
409
+ /**
410
+ * The postal code or ZIP code of the address.
411
+ */
412
+ postalCode: string | null;
413
+
414
+ /**
415
+ * The state, county, province, or region name of the address.
416
+ */
417
+ state: string | null;
418
+ }
419
+
420
+ /**
421
+ * The Intuit services that this company is or has been subscribed to, such as
422
+ * Intuit Payroll.
423
+ */
424
+ export interface SubscribedServices {
425
+ /**
426
+ * The list of Intuit services that this company is or has been subscribed to, for
427
+ * example, Intuit Payroll, QBMS.
428
+ */
429
+ services: Array<SubscribedServices.Service>;
430
+ }
431
+
432
+ export namespace SubscribedServices {
433
+ export interface Service {
434
+ /**
435
+ * The domain of this subscribed service
436
+ */
437
+ domain: string | null;
438
+
439
+ /**
440
+ * The case-insensitive unique name of this service, unique across all services.
441
+ *
442
+ * **NOTE**: Services do not have a `fullName` field because they are not
443
+ * hierarchical objects, which is why `name` is unique for them but not for objects
444
+ * that have parents.
445
+ */
446
+ name: string;
447
+
448
+ /**
449
+ * The status of this service's subscription.
450
+ */
451
+ serviceStatus: 'active' | 'expired' | 'never' | 'pending' | 'suspended' | 'terminated' | 'trial' | null;
452
+ }
453
+ }
454
+ }
455
+
456
+ export interface CompanyRetrieveParams {
457
+ /**
458
+ * The ID of the EndUser to receive this request (e.g.,
459
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
460
+ */
461
+ conductorEndUserId: string;
462
+ }
463
+
464
+ export declare namespace CompanyResource {
465
+ export { type Company as Company, type CompanyRetrieveParams as CompanyRetrieveParams };
466
+ }
@@ -522,7 +522,7 @@ export namespace Customer {
522
522
  /**
523
523
  * The date this note was last updated, in ISO 8601 format (YYYY-MM-DD).
524
524
  */
525
- date: string;
525
+ date: string | null;
526
526
 
527
527
  /**
528
528
  * The text of this note.
@@ -2085,7 +2085,7 @@ export namespace CustomerUpdateParams {
2085
2085
  /**
2086
2086
  * The text of this note.
2087
2087
  */
2088
- note?: string;
2088
+ note: string;
2089
2089
  }
2090
2090
 
2091
2091
  export interface AlternateShippingAddress {
@@ -393,7 +393,7 @@ export namespace Employee {
393
393
  /**
394
394
  * The date this note was last updated, in ISO 8601 format (YYYY-MM-DD).
395
395
  */
396
- date: string;
396
+ date: string | null;
397
397
 
398
398
  /**
399
399
  * The text of this note.
@@ -1834,7 +1834,7 @@ export namespace EmployeeUpdateParams {
1834
1834
  /**
1835
1835
  * The text of this note.
1836
1836
  */
1837
- note?: string;
1837
+ note: string;
1838
1838
  }
1839
1839
 
1840
1840
  /**
@@ -61,6 +61,7 @@ export {
61
61
  type ClassUpdateParams,
62
62
  type ClassListParams,
63
63
  } from './classes';
64
+ export { CompanyResource, type Company, type CompanyRetrieveParams } from './company';
64
65
  export {
65
66
  CreditCardChargesCursorPage,
66
67
  CreditCardCharges,
@@ -217,6 +218,7 @@ export {
217
218
  type PayrollWageItemRetrieveParams,
218
219
  type PayrollWageItemListParams,
219
220
  } from './payroll-wage-items';
221
+ export { Preferences, type PreferenceRetrieveParams } from './preferences';
220
222
  export {
221
223
  PurchaseOrdersCursorPage,
222
224
  PurchaseOrders,