conductor-node 0.0.9 → 0.0.12

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
- constructor(apiKey: string, verbose?: boolean);
5
+ constructor(apiKey: string, verbose?: boolean, environment?: string);
7
6
  }
package/dist/Client.js CHANGED
@@ -5,13 +5,14 @@ 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
- constructor(apiKey, verbose = false) {
12
- this.apiKey = apiKey;
13
- this.verbose = verbose;
14
- this.qbd = new ClientQBD_1.default(this);
10
+ constructor(apiKey, verbose = false, environment = "development") {
11
+ // Do not assign the passed parameters to the root `Client` to avoid
12
+ // exposing them as properties to the user and mixing them with the
13
+ // integrations, like `qbd`.
14
+ this.qbd = new ClientQBD_1.default(apiKey, verbose, environment);
15
15
  }
16
16
  }
17
17
  exports.default = Client;
18
+ //# sourceMappingURL=Client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Client.js","sourceRoot":"","sources":["../src/Client.ts"],"names":[],"mappings":";;;;;AAAA,+EAAuD;AAEvD,MAAqB,MAAM;IACzB,sCAAsC;IACtB,GAAG,CAAY;IAE/B,YACE,MAAc,EACd,UAAmB,KAAK,EACxB,cAAsB,aAAa;QAEnC,oEAAoE;QACpE,mEAAmE;QACnE,4BAA4B;QAC5B,IAAI,CAAC,GAAG,GAAG,IAAI,mBAAS,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IACzD,CAAC;CACF;AAdD,yBAcC"}
@@ -1,31 +1,52 @@
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
+ private readonly serverURL;
9
+ constructor(apiKey: string, verbose: boolean, environment: string);
10
+ /**
11
+ * Send any QBXML request to QuickBooks Desktop.
12
+ *
13
+ * Available APIs: https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop
14
+ */
7
15
  sendRequest(qbwcUsername: string, requestObj: object): Promise<object>;
8
16
  /**
9
- * This message allows you to perform the same activities as a user does in
10
- * the QB New Account form, which can be accessed in QB by selecting
11
- * Lists->Chart of Accounts->Accounts->New.
17
+ * Perform the same activities as a user does in the QB New Account form,
18
+ * which can be accessed in QB by selecting "Lists" → "Chart of Accounts" →
19
+ * "Accounts" "New".
12
20
  *
13
21
  * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountadd
14
22
  */
15
23
  accountAdd(qbwcUsername: string, params: AccountAdd): Promise<AccountRet>;
16
24
  /**
17
- * `AccountQuery` is a list query that returns data for all accounts that match
18
- * the provided filter criteria. Notice that it returns only data internal to
19
- * the account itself. It does not return any data about transactions
20
- * involving the account. It does, however, return the parent account, if
21
- * there is one. You can search across all accounts or you can specify an
22
- * account type and search only those.
25
+ * `AccountQuery` is a list query that returns data for all accounts that
26
+ * match the provided filter criteria. Notice that it returns only data
27
+ * internal to the account itself. It does not return any data about
28
+ * transactions involving the account. It does, however, return the parent
29
+ * account, if there is one. You can search across all accounts or you can
30
+ * specify an account type and search only those.
23
31
  *
24
32
  * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountquery
25
33
  */
26
34
  accountQuery(qbwcUsername: string, params: AccountQueryRq): Promise<AccountRet>;
27
35
  /**
28
- * Adds an employee with personal data about the employee as well as certain payroll-related data.
36
+ * Returns data for the specified customers.
37
+ *
38
+ * Important: We highly recommend that you use the `IncludeRetElement` tag in
39
+ * your `CustomerQuery` to include any data you want but do NOT include the
40
+ * `ShipAddress` data in the `Response`, unless you need to get the shipping
41
+ * address for a particular customer. Excluding the shipping address data will
42
+ * significantly improve the performance of the `CustomerQuery`.
43
+ *
44
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/customerquery
45
+ */
46
+ customerQuery(qbwcUsername: string, params: CustomerQueryRq): Promise<CustomerRet>;
47
+ /**
48
+ * Adds an employee with personal data about the employee as well as certain
49
+ * payroll-related data.
29
50
  *
30
51
  * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/employeeAdd
31
52
  */
@@ -42,4 +63,10 @@ export default class ClientQBD {
42
63
  * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/employeeQuery
43
64
  */
44
65
  employeeQuery(qbwcUsername: string, params: EmployeeQueryRq): Promise<EmployeeRet>;
66
+ /**
67
+ * Queries for the specified vendor or set of vendors.
68
+ *
69
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/vendorQuery
70
+ */
71
+ vendorQuery(qbwcUsername: string, params: VendorQueryRq): Promise<VendorRet>;
45
72
  }
@@ -1,32 +1,46 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  class ClientQBD {
4
- client;
5
- constructor(rootClient) {
6
- this.client = rootClient;
4
+ apiKey;
5
+ verbose;
6
+ serverURL;
7
+ constructor(apiKey, verbose, environment) {
8
+ this.apiKey = apiKey;
9
+ this.verbose = verbose;
10
+ if (environment === "development") {
11
+ this.serverURL = "https://conductor.ngrok.io";
12
+ }
13
+ else {
14
+ throw new Error(`Unsupported environment: ${environment}`);
15
+ }
7
16
  }
17
+ /**
18
+ * Send any QBXML request to QuickBooks Desktop.
19
+ *
20
+ * Available APIs: https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop
21
+ */
8
22
  async sendRequest(qbwcUsername, requestObj) {
9
- if (this.client.verbose) {
23
+ if (this.verbose) {
10
24
  console.log(`Client sent request for user ${qbwcUsername}:`, JSON.stringify(requestObj, null, 2));
11
25
  }
12
- const response = await fetch("https://conductor.ngrok.io", {
26
+ const response = await fetch(this.serverURL, {
13
27
  body: JSON.stringify({ qbwcUsername, requestObj }),
14
28
  headers: {
15
29
  "Content-Type": "application/json",
16
- Authorization: `Bearer ${this.client.apiKey}`,
30
+ Authorization: `Bearer ${this.apiKey}`,
17
31
  },
18
32
  method: "POST",
19
33
  });
20
34
  const responseObj = (await response.json());
21
- if (this.client.verbose) {
35
+ if (this.verbose) {
22
36
  console.log(`Client received response for user ${qbwcUsername}:`, JSON.stringify(responseObj, null, 2));
23
37
  }
24
38
  return responseObj;
25
39
  }
26
40
  /**
27
- * This message allows you to perform the same activities as a user does in
28
- * the QB New Account form, which can be accessed in QB by selecting
29
- * Lists->Chart of Accounts->Accounts->New.
41
+ * Perform the same activities as a user does in the QB New Account form,
42
+ * which can be accessed in QB by selecting "Lists" → "Chart of Accounts" →
43
+ * "Accounts" "New".
30
44
  *
31
45
  * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountadd
32
46
  */
@@ -41,12 +55,12 @@ class ClientQBD {
41
55
  return responseBody;
42
56
  }
43
57
  /**
44
- * `AccountQuery` is a list query that returns data for all accounts that match
45
- * the provided filter criteria. Notice that it returns only data internal to
46
- * the account itself. It does not return any data about transactions
47
- * involving the account. It does, however, return the parent account, if
48
- * there is one. You can search across all accounts or you can specify an
49
- * account type and search only those.
58
+ * `AccountQuery` is a list query that returns data for all accounts that
59
+ * match the provided filter criteria. Notice that it returns only data
60
+ * internal to the account itself. It does not return any data about
61
+ * transactions involving the account. It does, however, return the parent
62
+ * account, if there is one. You can search across all accounts or you can
63
+ * specify an account type and search only those.
50
64
  *
51
65
  * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountquery
52
66
  */
@@ -61,7 +75,29 @@ class ClientQBD {
61
75
  return responseBody;
62
76
  }
63
77
  /**
64
- * Adds an employee with personal data about the employee as well as certain payroll-related data.
78
+ * Returns data for the specified customers.
79
+ *
80
+ * Important: We highly recommend that you use the `IncludeRetElement` tag in
81
+ * your `CustomerQuery` to include any data you want but do NOT include the
82
+ * `ShipAddress` data in the `Response`, unless you need to get the shipping
83
+ * address for a particular customer. Excluding the shipping address data will
84
+ * significantly improve the performance of the `CustomerQuery`.
85
+ *
86
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/customerquery
87
+ */
88
+ async customerQuery(qbwcUsername, params) {
89
+ const response = (await this.sendRequest(qbwcUsername, {
90
+ CustomerQueryRq: params,
91
+ }));
92
+ const responseBody = response.CustomerQueryRs.CustomerRet;
93
+ if (!responseBody) {
94
+ throw new Error("No response");
95
+ }
96
+ return responseBody;
97
+ }
98
+ /**
99
+ * Adds an employee with personal data about the employee as well as certain
100
+ * payroll-related data.
65
101
  *
66
102
  * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/employeeAdd
67
103
  */
@@ -105,5 +141,21 @@ class ClientQBD {
105
141
  }
106
142
  return responseBody;
107
143
  }
144
+ /**
145
+ * Queries for the specified vendor or set of vendors.
146
+ *
147
+ * https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/vendorQuery
148
+ */
149
+ async vendorQuery(qbwcUsername, params) {
150
+ const response = (await this.sendRequest(qbwcUsername, {
151
+ VendorQueryRq: params,
152
+ }));
153
+ const responseBody = response.VendorQueryRs.VendorRet;
154
+ if (!responseBody) {
155
+ throw new Error("No response");
156
+ }
157
+ return responseBody;
158
+ }
108
159
  }
109
160
  exports.default = ClientQBD;
161
+ //# sourceMappingURL=ClientQBD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientQBD.js","sourceRoot":"","sources":["../../src/qb/ClientQBD.ts"],"names":[],"mappings":";;AA2BA,MAAqB,SAAS;IACX,MAAM,CAAS;IAEf,OAAO,CAAU;IAEjB,SAAS,CAAS;IAEnC,YAAmB,MAAc,EAAE,OAAgB,EAAE,WAAmB;QACtE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,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iveStatus, 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";
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Account.js","sourceRoot":"","sources":["../../../src/qb/qbXMLTypes/Account.ts"],"names":[],"mappings":""}
@@ -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,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Customer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Customer.js","sourceRoot":"","sources":["../../../src/qb/qbXMLTypes/Customer.ts"],"names":[],"mappings":""}
@@ -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";
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Employee.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Employee.js","sourceRoot":"","sources":["../../../src/qb/qbXMLTypes/Employee.ts"],"names":[],"mappings":""}