conductor-node 0.0.8 → 0.0.11

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
@@ -1,12 +1,10 @@
1
1
  # Conductor Node.js Library
2
2
 
3
- The Conductor Node.js library provides convenient access to the Conductor API from applications written in server-side JavaScript.
4
-
5
- There are zero dependencies.
3
+ The Conductor Node.js library provides convenient access to the Conductor API from applications written in server-side JavaScript. Zero dependencies.
6
4
 
7
5
  ## Requirements
8
6
 
9
- 1. A running version of QuickBooks Desktop with QuickBooks Web Connector configured for Conductor. See the [Conductor Getting Started guide](https://www.notion.so/conductor-io/Conductor-Documentation-Getting-Started-7f0f42593d444337b0b3200c771d98e6) for help.
7
+ 1. A running version of QuickBooks Desktop with QuickBooks Web Connector configured for Conductor. See the [Conductor Getting Started guide](https://www.notion.so/conductor-io/Conductor-Documentation-Getting-Started-7f0f42593d444337b0b3200c771d98e6).
10
8
  2. A Conductor API key from Danny.
11
9
 
12
10
  ## Installation
@@ -21,7 +19,7 @@ The package must be configured with your account's secret key, which is availabl
21
19
 
22
20
  Currently supports executing any [QuickBooks Desktop API](https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop) via JSON and receiving the response in JSON. In the future, Conductor will incorporate extensive typings for these APIs.
23
21
 
24
- To send a request to a specific QuickBooks Desktop user, you must also supply the username in their `.qwc` file that you provided them.
22
+ To send a request to a specific QuickBooks Desktop user, you must also supply the username that is in their `.qwc` file that you provided them.
25
23
 
26
24
  ```ts
27
25
  import Conductor from "conductor-node";
package/dist/Client.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import ClientQBD from "./qb/ClientQBD";
2
2
  export default class Client {
3
- readonly apiKey: string;
4
- readonly verbose: boolean;
3
+ /** QuickBooks Desktop integration. */
5
4
  readonly qbd: ClientQBD;
6
5
  constructor(apiKey: string, verbose?: boolean);
7
6
  }
package/dist/Client.js CHANGED
@@ -5,13 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const ClientQBD_1 = __importDefault(require("./qb/ClientQBD"));
7
7
  class Client {
8
- apiKey;
9
- verbose;
8
+ /** QuickBooks Desktop integration. */
10
9
  qbd;
11
10
  constructor(apiKey, verbose = false) {
12
- this.apiKey = apiKey;
13
- this.verbose = verbose;
14
- this.qbd = new ClientQBD_1.default(this);
11
+ // Do not assign `apiKey` and `verbose` to the root `Client` to not expose
12
+ // the properties to the user (amid the integrations, like `ClientQBD`).
13
+ this.qbd = new ClientQBD_1.default(apiKey, verbose);
15
14
  }
16
15
  }
17
16
  exports.default = Client;
@@ -1,24 +1,51 @@
1
- import type Client from "../Client";
2
1
  import type { AccountAdd, AccountQueryRq, AccountRet } from "../qb/qbXMLTypes/Account";
2
+ import type { CustomerQueryRq, CustomerRet } from "../qb/qbXMLTypes/Customer";
3
3
  import type { EmployeeAdd, EmployeeMod, EmployeeQueryRq, EmployeeRet } from "../qb/qbXMLTypes/Employee";
4
+ import type { VendorQueryRq, VendorRet } from "../qb/qbXMLTypes/Vendor";
4
5
  export default class ClientQBD {
5
- private readonly client;
6
- constructor(rootClient: Client);
6
+ private readonly apiKey;
7
+ private readonly verbose;
8
+ constructor(apiKey: string, verbose: boolean);
9
+ /**
10
+ * Send any QBXML request to QuickBooks Desktop.
11
+ *
12
+ * Available APIs: https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop
13
+ */
7
14
  sendRequest(qbwcUsername: string, requestObj: object): Promise<object>;
15
+ /**
16
+ * Perform the same activities as a user does in the QB New Account form,
17
+ * which can be accessed in QB by selecting "Lists" → "Chart of Accounts" →
18
+ * "Accounts" → "New".
19
+ *
20
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountadd
21
+ */
8
22
  accountAdd(qbwcUsername: string, params: AccountAdd): Promise<AccountRet>;
9
23
  /**
10
- * `AccountQuery` is a list query that returns data for all accounts that match
11
- * the provided filter criteria. Notice that it returns only data internal to
12
- * the account itself. It does not return any data about transactions
13
- * involving the account. It does, however, return the parent account, if
14
- * there is one. You can search across all accounts or you can specify an
15
- * account type and search only those.
24
+ * `AccountQuery` is a list query that returns data for all accounts that
25
+ * match the provided filter criteria. Notice that it returns only data
26
+ * internal to the account itself. It does not return any data about
27
+ * transactions involving the account. It does, however, return the parent
28
+ * account, if there is one. You can search across all accounts or you can
29
+ * specify an account type and search only those.
16
30
  *
17
31
  * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountquery
18
32
  */
19
33
  accountQuery(qbwcUsername: string, params: AccountQueryRq): Promise<AccountRet>;
20
34
  /**
21
- * Adds an employee with personal data about the employee as well as certain payroll-related data.
35
+ * Returns data for the specified customers.
36
+ *
37
+ * Important: We highly recommend that you use the `IncludeRetElement` tag in
38
+ * your `CustomerQuery` to include any data you want but do NOT include the
39
+ * `ShipAddress` data in the `Response`, unless you need to get the shipping
40
+ * address for a particular customer. Excluding the shipping address data will
41
+ * significantly improve the performance of the `CustomerQuery`.
42
+ *
43
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/customerquery
44
+ */
45
+ customerQuery(qbwcUsername: string, params: CustomerQueryRq): Promise<CustomerRet>;
46
+ /**
47
+ * Adds an employee with personal data about the employee as well as certain
48
+ * payroll-related data.
22
49
  *
23
50
  * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/employeeAdd
24
51
  */
@@ -35,4 +62,10 @@ export default class ClientQBD {
35
62
  * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/employeeQuery
36
63
  */
37
64
  employeeQuery(qbwcUsername: string, params: EmployeeQueryRq): Promise<EmployeeRet>;
65
+ /**
66
+ * Queries for the specified vendor or set of vendors.
67
+ *
68
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/vendorQuery
69
+ */
70
+ vendorQuery(qbwcUsername: string, params: VendorQueryRq): Promise<VendorRet>;
38
71
  }
@@ -1,29 +1,43 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const SERVER_URL = "https://conductor.ngrok.io";
3
4
  class ClientQBD {
4
- client;
5
- constructor(rootClient) {
6
- this.client = rootClient;
5
+ apiKey;
6
+ verbose;
7
+ constructor(apiKey, verbose) {
8
+ this.apiKey = apiKey;
9
+ this.verbose = verbose;
7
10
  }
11
+ /**
12
+ * Send any QBXML request to QuickBooks Desktop.
13
+ *
14
+ * Available APIs: https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop
15
+ */
8
16
  async sendRequest(qbwcUsername, requestObj) {
9
- if (this.client.verbose) {
17
+ if (this.verbose) {
10
18
  console.log(`Client sent request for user ${qbwcUsername}:`, JSON.stringify(requestObj, null, 2));
11
19
  }
12
- const response = await fetch("https://conductor.ngrok.io", {
20
+ const response = await fetch(SERVER_URL, {
13
21
  body: JSON.stringify({ qbwcUsername, requestObj }),
14
22
  headers: {
15
23
  "Content-Type": "application/json",
16
- Authorization: `Bearer ${this.client.apiKey}`,
24
+ Authorization: `Bearer ${this.apiKey}`,
17
25
  },
18
26
  method: "POST",
19
27
  });
20
28
  const responseObj = (await response.json());
21
- if (this.client.verbose) {
29
+ if (this.verbose) {
22
30
  console.log(`Client received response for user ${qbwcUsername}:`, JSON.stringify(responseObj, null, 2));
23
31
  }
24
32
  return responseObj;
25
33
  }
26
- // https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountadd
34
+ /**
35
+ * Perform the same activities as a user does in the QB New Account form,
36
+ * which can be accessed in QB by selecting "Lists" → "Chart of Accounts" →
37
+ * "Accounts" → "New".
38
+ *
39
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountadd
40
+ */
27
41
  async accountAdd(qbwcUsername, params) {
28
42
  const response = (await this.sendRequest(qbwcUsername, {
29
43
  AccountAddRq: { AccountAdd: params },
@@ -35,12 +49,12 @@ class ClientQBD {
35
49
  return responseBody;
36
50
  }
37
51
  /**
38
- * `AccountQuery` is a list query that returns data for all accounts that match
39
- * the provided filter criteria. Notice that it returns only data internal to
40
- * the account itself. It does not return any data about transactions
41
- * involving the account. It does, however, return the parent account, if
42
- * there is one. You can search across all accounts or you can specify an
43
- * account type and search only those.
52
+ * `AccountQuery` is a list query that returns data for all accounts that
53
+ * match the provided filter criteria. Notice that it returns only data
54
+ * internal to the account itself. It does not return any data about
55
+ * transactions involving the account. It does, however, return the parent
56
+ * account, if there is one. You can search across all accounts or you can
57
+ * specify an account type and search only those.
44
58
  *
45
59
  * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountquery
46
60
  */
@@ -55,7 +69,29 @@ class ClientQBD {
55
69
  return responseBody;
56
70
  }
57
71
  /**
58
- * Adds an employee with personal data about the employee as well as certain payroll-related data.
72
+ * Returns data for the specified customers.
73
+ *
74
+ * Important: We highly recommend that you use the `IncludeRetElement` tag in
75
+ * your `CustomerQuery` to include any data you want but do NOT include the
76
+ * `ShipAddress` data in the `Response`, unless you need to get the shipping
77
+ * address for a particular customer. Excluding the shipping address data will
78
+ * significantly improve the performance of the `CustomerQuery`.
79
+ *
80
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/customerquery
81
+ */
82
+ async customerQuery(qbwcUsername, params) {
83
+ const response = (await this.sendRequest(qbwcUsername, {
84
+ CustomerQueryRq: params,
85
+ }));
86
+ const responseBody = response.CustomerQueryRs.CustomerRet;
87
+ if (!responseBody) {
88
+ throw new Error("No response");
89
+ }
90
+ return responseBody;
91
+ }
92
+ /**
93
+ * Adds an employee with personal data about the employee as well as certain
94
+ * payroll-related data.
59
95
  *
60
96
  * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/employeeAdd
61
97
  */
@@ -99,5 +135,20 @@ class ClientQBD {
99
135
  }
100
136
  return responseBody;
101
137
  }
138
+ /**
139
+ * Queries for the specified vendor or set of vendors.
140
+ *
141
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/vendorQuery
142
+ */
143
+ async vendorQuery(qbwcUsername, params) {
144
+ const response = (await this.sendRequest(qbwcUsername, {
145
+ VendorQueryRq: params,
146
+ }));
147
+ const responseBody = response.VendorQueryRs.VendorRet;
148
+ if (!responseBody) {
149
+ throw new Error("No response");
150
+ }
151
+ return responseBody;
152
+ }
102
153
  }
103
154
  exports.default = ClientQBD;
@@ -1,4 +1,4 @@
1
- import type { ActiveStatus, DataExtRet, NameFilter, NameRangeFilter } from "../../qb/qbXMLTypes/shared";
1
+ import type { ActiveStatus, CurrencyFilter, CurrencyRef, DataExtRet, NameFilter, NameRangeFilter, ParentRef, SalesTaxCodeRef } from "../../qb/qbXMLTypes/shared";
2
2
  export interface AccountAddRq {
3
3
  AccountAdd: AccountAdd;
4
4
  IncludeRetElement?: string;
@@ -238,22 +238,6 @@ export interface AccountRet {
238
238
  CurrencyRef?: CurrencyRef;
239
239
  DataExtRet?: DataExtRet;
240
240
  }
241
- interface CurrencyFilter {
242
- ListID?: string;
243
- FullName?: string;
244
- }
245
- interface ParentRef {
246
- ListID?: string;
247
- FullName?: string;
248
- }
249
- interface SalesTaxCodeRef {
250
- ListID?: string;
251
- FullName?: string;
252
- }
253
- interface CurrencyRef {
254
- ListID?: string;
255
- FullName?: string;
256
- }
257
241
  declare type AccountType = "AccountsPayable" | "AccountsReceivable" | "Bank" | "CostOfGoodsSold" | "CreditCard" | "Equity" | "Expense" | "FixedAsset" | "Income" | "LongTermLiability" | "NonPosting" | "OtherAsset" | "OtherCurrentAsset" | "OtherCurrentLiability" | "OtherExpense" | "OtherIncome";
258
242
  declare type SpecialAccountType = "AccountsPayable" | "AccountsReceivable" | "CondenseItemAdjustmentExpenses" | "CostOfGoodsSold" | "DirectDepositLiabilities" | "Estimates" | "ExchangeGainLoss" | "InventoryAssets" | "ItemReceiptAccount" | "OpeningBalanceEquity" | "PayrollExpenses" | "PayrollLiabilities" | "PettyCash" | "PurchaseOrders" | "ReconciliationDifferences" | "RetainedEarnings" | "SalesOrders" | "SalesTaxPayable" | "UncategorizedExpenses" | "UncategorizedIncome" | "UndepositedFunds";
259
243
  declare type CashFlowClassification = "Financing" | "Investing" | "None" | "NotApplicable" | "Operating";
@@ -0,0 +1,152 @@
1
+ import type { ActiveStatus, AdditionalContactRef, AdditionalNotesRet, ClassFilter, ClassRef, ContactsRet, CurrencyFilter, CurrencyRef, DataExtRet, NameFilter, NameRangeFilter, ParentRef, SalesTaxCodeRef, SalesTaxCountry, ShipAddress, TermsRef, TotalBalanceFilter } from "../../qb/qbXMLTypes/shared";
2
+ export interface CustomerQueryRq {
3
+ ListID?: string;
4
+ FullName?: string;
5
+ MaxReturned?: number;
6
+ ActiveStatus?: ActiveStatus;
7
+ FromModifiedDate?: Date;
8
+ ToModifiedDate?: Date;
9
+ NameFilter?: NameFilter;
10
+ NameRangeFilter?: NameRangeFilter;
11
+ TotalBalanceFilter?: TotalBalanceFilter;
12
+ CurrencyFilter?: CurrencyFilter;
13
+ ClassFilter?: ClassFilter;
14
+ IncludeRetElement?: string;
15
+ OwnerID?: string;
16
+ }
17
+ export interface CustomerQueryRs {
18
+ CustomerRet?: CustomerRet;
19
+ }
20
+ export interface CustomerRet {
21
+ ListID: string;
22
+ TimeCreated: Date;
23
+ TimeModified: Date;
24
+ EditSequence: string;
25
+ Name: string;
26
+ FullName: string;
27
+ IsActive?: boolean;
28
+ ClassRef?: ClassRef;
29
+ ParentRef?: ParentRef;
30
+ Sublevel: number;
31
+ CompanyName?: string;
32
+ Salutation?: string;
33
+ FirstName?: string;
34
+ MiddleName?: string;
35
+ LastName?: string;
36
+ JobTitle?: string;
37
+ BillAddress?: BillAddress;
38
+ BillAddressBlock?: BillAddressBlock;
39
+ ShipAddress?: ShipAddress;
40
+ ShipAddressBlock?: ShipAddressBlock;
41
+ ShipToAddress?: ShipToAddress;
42
+ Phone?: string;
43
+ AltPhone?: string;
44
+ Fax?: string;
45
+ Email?: string;
46
+ Cc?: string;
47
+ Contact?: string;
48
+ AltContact?: string;
49
+ AdditionalContactRef?: AdditionalContactRef;
50
+ ContactsRet?: ContactsRet;
51
+ CustomerTypeRef?: CustomerTypeRef;
52
+ TermsRef?: TermsRef;
53
+ SalesRepRef?: SalesRepRef;
54
+ Balance?: string;
55
+ TotalBalance?: string;
56
+ SalesTaxCodeRef?: SalesTaxCodeRef;
57
+ ItemSalesTaxRef?: ItemSalesTaxRef;
58
+ SalesTaxCountry?: SalesTaxCountry;
59
+ ResaleNumber?: string;
60
+ AccountNumber?: string;
61
+ CreditLimit?: string;
62
+ PreferredPaymentMethodRef?: PreferredPaymentMethodRef;
63
+ CreditCardInfo?: CreditCardInfo;
64
+ JobStatus?: JobStatus;
65
+ JobStartDate?: Date;
66
+ JobProjectedEndDate?: Date;
67
+ JobEndDate?: Date;
68
+ JobDesc?: string;
69
+ JobTypeRef?: JobTypeRef;
70
+ Notes?: string;
71
+ AdditionalNotesRet?: AdditionalNotesRet;
72
+ PreferredDeliveryMethod?: PreferredDeliveryMethod;
73
+ PriceLevelRef?: PriceLevelRef;
74
+ ExternalGUID?: string;
75
+ TaxRegistrationNumber?: string;
76
+ CurrencyRef?: CurrencyRef;
77
+ DataExtRet?: DataExtRet;
78
+ }
79
+ interface BillAddress {
80
+ Addr1?: string;
81
+ Addr2?: string;
82
+ Addr3?: string;
83
+ Addr4?: string;
84
+ Addr5?: string;
85
+ City?: string;
86
+ State?: string;
87
+ PostalCode?: string;
88
+ Country?: string;
89
+ Note?: string;
90
+ }
91
+ interface BillAddressBlock {
92
+ Addr1?: string;
93
+ Addr2?: string;
94
+ Addr3?: string;
95
+ Addr4?: string;
96
+ Addr5?: string;
97
+ }
98
+ interface ShipAddressBlock {
99
+ Addr1?: string;
100
+ Addr2?: string;
101
+ Addr3?: string;
102
+ Addr4?: string;
103
+ Addr5?: string;
104
+ }
105
+ interface ShipToAddress {
106
+ Addr1?: string;
107
+ Addr2?: string;
108
+ Addr3?: string;
109
+ Addr4?: string;
110
+ Addr5?: string;
111
+ City?: string;
112
+ State?: string;
113
+ PostalCode?: string;
114
+ Country?: string;
115
+ Note?: string;
116
+ DefaultShipTo?: boolean;
117
+ }
118
+ interface CustomerTypeRef {
119
+ ListID?: string;
120
+ FullName?: string;
121
+ }
122
+ interface SalesRepRef {
123
+ ListID?: string;
124
+ FullName?: string;
125
+ }
126
+ interface ItemSalesTaxRef {
127
+ ListID?: string;
128
+ FullName?: string;
129
+ }
130
+ interface PreferredPaymentMethodRef {
131
+ ListID?: string;
132
+ FullName?: string;
133
+ }
134
+ interface CreditCardInfo {
135
+ CreditCardNumber?: string;
136
+ ExpirationMonth?: number;
137
+ ExpirationYear?: number;
138
+ NameOnCard?: string;
139
+ CreditCardAddress?: string;
140
+ CreditCardPostalCode?: string;
141
+ }
142
+ declare type JobStatus = "Awarded" | "Closed" | "InProgress" | "None" | "NotAwarded" | "Pending";
143
+ interface JobTypeRef {
144
+ ListID?: string;
145
+ FullName?: string;
146
+ }
147
+ declare type PreferredDeliveryMethod = "Email" | "Fax" | "None";
148
+ interface PriceLevelRef {
149
+ ListID?: string;
150
+ FullName?: string;
151
+ }
152
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
- import type { ActiveStatus, DataExtRet, NameFilter, NameRangeFilter } from "../../qb/qbXMLTypes/shared";
1
+ import type { ActiveStatus, AdditionalContactRef, AdditionalNotesRet, BillingRateRef, ClassRef, DataExtRet, NameFilter, NameRangeFilter } from "../../qb/qbXMLTypes/shared";
2
2
  export interface EmployeeAddRq {
3
3
  EmployeeAdd: EmployeeAdd;
4
4
  IncludeRetElement?: string;
@@ -295,10 +295,6 @@ interface EmployeeAddress {
295
295
  */
296
296
  PostalCode?: string;
297
297
  }
298
- interface AdditionalContactRef {
299
- ContactName: string;
300
- ContactValue: string;
301
- }
302
298
  interface EmergencyContacts {
303
299
  PrimaryContact?: {
304
300
  ContactName: string;
@@ -326,26 +322,29 @@ declare type MilitaryStatus = "Active" | "Reserve";
326
322
  interface AdditionalNotes {
327
323
  Note: string;
328
324
  }
329
- interface AdditionalNotesRet {
330
- NoteID: number;
331
- Date: Date;
332
- Note: string;
333
- }
334
325
  interface AdditionalNotesMod {
335
326
  NoteID: number;
336
327
  Note: string;
337
328
  }
338
- interface BillingRateRef {
339
- ListID?: string;
340
- FullName?: string;
341
- }
342
329
  interface EmployeePayrollInfo {
343
330
  PayPeriod?: PayPeriod;
344
331
  ClassRef?: ClassRef;
345
332
  ClearEarnings?: boolean;
346
333
  Earnings?: Earnings;
334
+ /**
335
+ * Indicates whether or not paychecks are generated from time-tracking data.
336
+ * If you include a blank `IsUsingTimeDataToCreatePaychecks` element in an
337
+ * `EmployeeMod` message, you’ll receive an error.
338
+ */
347
339
  IsUsingTimeDataToCreatePaychecks?: boolean;
340
+ /**
341
+ * Indicates whether time data is used to create paychecks for this employee.
342
+ */
348
343
  UseTimeDataToCreatePaychecks?: UseTimeDataToCreatePaychecks;
344
+ /**
345
+ * Describes how “sick time” is accrued for this employee, along with how many
346
+ * sick hours the employee has accrued.
347
+ */
349
348
  SickHours?: SickHours;
350
349
  VacationHours?: VacationHours;
351
350
  }
@@ -360,10 +359,6 @@ interface EmployeePayrollInfoMod {
360
359
  VacationHours?: VacationHours;
361
360
  }
362
361
  declare type PayPeriod = "Biweekly" | "Daily" | "Monthly" | "Quarterly" | "Semimonthly" | "Weekly" | "Yearly";
363
- interface ClassRef {
364
- ListID?: string;
365
- FullName?: string;
366
- }
367
362
  interface Earnings {
368
363
  PayrollItemWageRef?: PayrollItemWageRef;
369
364
  Rate?: string;
@@ -375,12 +370,47 @@ interface PayrollItemWageRef {
375
370
  }
376
371
  declare type UseTimeDataToCreatePaychecks = "DoNotUseTimeData" | "NotSet" | "UseTimeData";
377
372
  interface SickHours {
373
+ /**
374
+ * The total number of hours currently available for the employee to use. If
375
+ * this value is empty, it will default to 0.
376
+ */
378
377
  HoursAvailable?: string;
378
+ /**
379
+ * Indicates how an employee accrues time off. If you include a blank
380
+ * `AccrualPeriod` element in an `EmployeeMod` message, you’ll receive an
381
+ * error. The default value is whatever the QuickBooks user has set in the
382
+ * QuickBooks Employee Preferences.
383
+ */
379
384
  AccrualPeriod?: AccrualPeriod;
385
+ /**
386
+ * The number of hours that the employee will accrue per accrual period. The
387
+ * default value is whatever the QuickBooks user has set in the QuickBooks
388
+ * Employee Preferences.
389
+ */
380
390
  HoursAccrued?: string;
391
+ /**
392
+ * The maximum number of hours that the employee can accrue. (QuickBooks
393
+ * itself does not enforce this limit, however. HoursAvailable can be greater
394
+ * than MaximumHours.) The default value is whatever the QuickBooks user has
395
+ * set in the QuickBooks Employee Preferences.
396
+ */
381
397
  MaximumHours?: string;
398
+ /**
399
+ * Indicates whether or not the hours accrued resets to zero at the beginning
400
+ * of the new year. If you include a blank `IsResettingHoursEachNewYear`
401
+ * element in an `EmployeeMod` message, you’ll receive an error.
402
+ */
382
403
  IsResettingHoursEachNewYear?: boolean;
404
+ /**
405
+ * When used in the `SickHours` or `VacationHours` aggregates, refers to the
406
+ * number of sick leave or vacation hours used in the current year.
407
+ */
383
408
  HoursUsed?: string;
409
+ /**
410
+ * When used in the `SickHours` or `VacationHours` aggregates, refers to the
411
+ * date on which sick leave or vacation hours in the current year began to
412
+ * accrue.
413
+ */
384
414
  AccrualStartDate?: Date;
385
415
  }
386
416
  declare type AccrualPeriod = "BeginningOfYear" | "EveryHourOnPaycheck" | "EveryPaycheck";