conductor-node 0.0.4 → 0.0.7

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.
@@ -0,0 +1,471 @@
1
+ import type {
2
+ ActiveStatus,
3
+ DataExtRet,
4
+ NameFilter,
5
+ NameRangeFilter,
6
+ } from "conductor-node/qb/qbXMLTypes/shared";
7
+
8
+ export interface EmployeeAddRq {
9
+ EmployeeAdd: EmployeeAdd;
10
+ IncludeRetElement?: string;
11
+ }
12
+
13
+ export interface EmployeeAddRs {
14
+ EmployeeRet?: EmployeeRet;
15
+ }
16
+
17
+ export interface EmployeeModRq {
18
+ EmployeeMod: EmployeeMod;
19
+ IncludeRetElement?: string;
20
+ }
21
+
22
+ export interface EmployeeModRs {
23
+ EmployeeRet?: EmployeeRet;
24
+ }
25
+
26
+ export interface EmployeeQueryRq {
27
+ // TODO: Look into use of "OR" and "may repeat" in the XMLOps.
28
+ ListID?: string;
29
+ FullName?: string;
30
+ MaxReturned?: number;
31
+ ActiveStatus?: ActiveStatus;
32
+ FromModifiedDate?: Date;
33
+ ToModifiedDate?: Date;
34
+ NameFilter?: NameFilter;
35
+ NameRangeFilter?: NameRangeFilter;
36
+ }
37
+
38
+ export interface EmployeeQueryRs {
39
+ EmployeeRet?: EmployeeRet;
40
+ }
41
+
42
+ export interface EmployeeAdd {
43
+ /**
44
+ * If `IsActive` is true, this object is currently enabled for use by
45
+ * QuickBooks. The default value is `true`.
46
+ */
47
+ IsActive?: boolean;
48
+ /**
49
+ * A formal reference, such as Mr. or Dr., that precedes a name.
50
+ */
51
+ Salutation?: string;
52
+ /**
53
+ * The first name of a customer, vendor, employee, or person on the “other
54
+ * names” list.
55
+ */
56
+ FirstName?: string;
57
+ /**
58
+ * The middle name of a customer, vendor, employee, or person on the “other
59
+ * names” list.
60
+ */
61
+ MiddleName?: string;
62
+ /**
63
+ * The last name of a customer, vendor, employee, or person on the “other
64
+ * names” list.
65
+ */
66
+ LastName?: string;
67
+ /**
68
+ * The job title of a customer, vendor, employee, or person on the “other
69
+ * names” list.
70
+ */
71
+ JobTitle?: string;
72
+ /**
73
+ * The name of a customer, vendor, employee, or person on the “other names”
74
+ * list in the employment job details section.
75
+ */
76
+ SupervisorRef?: SupervisorRef;
77
+ /**
78
+ * The name of the department in the employment job details section.
79
+ */
80
+ Department?: string;
81
+ /**
82
+ * The description details in the employment job details section.
83
+ */
84
+ Description?: string;
85
+ /**
86
+ * The target bonus amount in the employment job details section.
87
+ */
88
+ TargetBonus?: string;
89
+ /**
90
+ * If an address request fails, some combination of address fields might be
91
+ * too long. If you use payroll, you must specify the employee’s city, state
92
+ * (or province), ZIP (or postal) code, and at least one line of the street
93
+ * address. (Note that the State element has restrictions when it’s used in
94
+ * the `EmployeeAddress` aggregate. For more information, click State in the
95
+ * table.)
96
+ */
97
+ EmployeeAddress?: EmployeeAddress;
98
+ /**
99
+ * By default within QuickBooks, the `PrintAs` element is the same as the
100
+ * `Name` element.
101
+ */
102
+ PrintAs?: string;
103
+ /**
104
+ * The telephone number.
105
+ */
106
+ Phone?: string;
107
+ /**
108
+ * Mobile telephone number.
109
+ */
110
+ Mobile?: string;
111
+ /**
112
+ * The pager number.
113
+ */
114
+ Pager?: string;
115
+ /**
116
+ * A personal identification number for this employee’s pager.
117
+ */
118
+ PagerPIN?: string;
119
+ /**
120
+ * A telephone number given as an alternative to `Phone`.
121
+ */
122
+ AltPhone?: string;
123
+ /**
124
+ * Fax number.
125
+ */
126
+ Fax?: string;
127
+ /**
128
+ * Social security number. When you add an SSN value to an employee record, it
129
+ * does not have to include dashes; for example, either 123-45-6789 or
130
+ * 123456789 would be valid.
131
+ */
132
+ SSN?: string;
133
+ /**
134
+ * E-mail address.
135
+ */
136
+ Email?: string;
137
+ /**
138
+ * List of additional contacts.
139
+ */
140
+ AdditionalContactRef?: AdditionalContactRef;
141
+ /**
142
+ * Emergency Contact information for the employee.
143
+ */
144
+ EmergencyContacts?: EmergencyContacts;
145
+ /**
146
+ * `EmployeeType` can affect payroll taxes for an employee. A statutory
147
+ * employee is a person who is defined as an employee by statute. Usually an
148
+ * owner or partner will be on the `Other Names` list, but if they are on the
149
+ * `Employee` list, their `EmployeeType` will be `Owner`.
150
+ */
151
+ EmployeeType?: EmployeeType;
152
+ /**
153
+ * Full or Part time status of the employee.
154
+ */
155
+ PartOrFullTime?: PartOrFullTime;
156
+ Exempt?: Exempt;
157
+ KeyEmployee?: KeyEmployee;
158
+ Gender?: Gender;
159
+ HiredDate?: Date;
160
+ OriginalHireDate?: Date;
161
+ AdjustedServiceDate?: Date;
162
+ ReleasedDate?: Date;
163
+ BirthDate?: Date;
164
+ USCitizen?: USCitizen;
165
+ Ethnicity?: Ethnicity;
166
+ Disabled?: Disabled;
167
+ DisabilityDesc?: string;
168
+ OnFile?: OnFile;
169
+ WorkAuthExpireDate?: Date;
170
+ USVeteran?: USVeteran;
171
+ MilitaryStatus?: MilitaryStatus;
172
+ AccountNumber?: string;
173
+ Notes?: string;
174
+ AdditionalNotes?: AdditionalNotes;
175
+ BillingRateRef?: BillingRateRef;
176
+ EmployeePayrollInfo?: EmployeePayrollInfo;
177
+ ExternalGUID?: string;
178
+ }
179
+
180
+ export interface EmployeeRet {
181
+ ListID: string;
182
+ TimeCreated: Date;
183
+ TimeModified: Date;
184
+ EditSequence: string;
185
+ Name: string;
186
+ IsActive?: boolean;
187
+ Salutation?: string;
188
+ FirstName?: string;
189
+ MiddleName?: string;
190
+ LastName?: string;
191
+ JobTitle?: string;
192
+ SupervisorRef?: SupervisorRef;
193
+ Department?: string;
194
+ Description?: string;
195
+ TargetBonus?: string;
196
+ EmployeeAddress?: EmployeeAddress;
197
+ PrintAs?: string;
198
+ Phone?: string;
199
+ Mobile?: string;
200
+ Pager?: string;
201
+ PagerPIN?: string;
202
+ AltPhone?: string;
203
+ Fax?: string;
204
+ SSN?: string;
205
+ Email?: string;
206
+ AdditionalContactRef?: AdditionalContactRef;
207
+ EmergencyContacts?: EmergencyContacts;
208
+ EmployeeType?: EmployeeType;
209
+ PartOrFullTime?: PartOrFullTime;
210
+ Exempt?: Exempt;
211
+ KeyEmployee?: KeyEmployee;
212
+ Gender?: Gender;
213
+ HiredDate?: Date;
214
+ OriginalHireDate?: Date;
215
+ AdjustedServiceDate?: Date;
216
+ ReleasedDate?: Date;
217
+ BirthDate?: Date;
218
+ USCitizen?: USCitizen;
219
+ Ethnicity?: Ethnicity;
220
+ Disabled?: Disabled;
221
+ DisabilityDesc?: string;
222
+ OnFile?: OnFile;
223
+ WorkAuthExpireDate?: Date;
224
+ USVeteran?: USVeteran;
225
+ MilitaryStatus?: MilitaryStatus;
226
+ AccountNumber?: string;
227
+ Notes?: string;
228
+ AdditionalNotesRet?: AdditionalNotesRet;
229
+ BillingRateRef?: BillingRateRef;
230
+ EmployeePayrollInfo?: EmployeePayrollInfo;
231
+ ExternalGUID?: string;
232
+ DataExtRet?: DataExtRet;
233
+ }
234
+
235
+ export interface EmployeeMod {
236
+ ListID: string;
237
+ EditSequence: string;
238
+ IsActive?: boolean;
239
+ Salutation?: string;
240
+ FirstName?: string;
241
+ MiddleName?: string;
242
+ LastName?: string;
243
+ JobTitle?: string;
244
+ SupervisorRef?: SupervisorRef;
245
+ Department?: string;
246
+ Description?: string;
247
+ TargetBonus?: string;
248
+ EmployeeAddress?: EmployeeAddress;
249
+ PrintAs?: string;
250
+ Phone?: string;
251
+ Mobile?: string;
252
+ Pager?: string;
253
+ PagerPIN?: string;
254
+ AltPhone?: string;
255
+ Fax?: string;
256
+ Email?: string;
257
+ AdditionalContactRef?: AdditionalContactRef;
258
+ EmergencyContacts?: EmergencyContacts;
259
+ EmployeeType?: EmployeeType;
260
+ PartOrFullTime?: PartOrFullTime;
261
+ Exempt?: Exempt;
262
+ KeyEmployee?: KeyEmployee;
263
+ HiredDate?: Date;
264
+ OriginalHireDate?: Date;
265
+ AdjustedServiceDate?: Date;
266
+ ReleasedDate?: Date;
267
+ BirthDate?: Date;
268
+ USCitizen?: USCitizen;
269
+ Ethnicity?: Ethnicity;
270
+ Disabled?: Disabled;
271
+ DisabilityDesc?: string;
272
+ OnFile?: OnFile;
273
+ WorkAuthExpireDate?: Date;
274
+ USVeteran?: USVeteran;
275
+ MilitaryStatus?: MilitaryStatus;
276
+ AccountNumber?: string;
277
+ Notes?: string;
278
+ AdditionalNotesMod?: AdditionalNotesMod;
279
+ BillingRateRef?: BillingRateRef;
280
+ EmployeePayrollInfoMod?: EmployeePayrollInfoMod;
281
+ }
282
+
283
+ interface SupervisorRef {
284
+ ListID?: string;
285
+ FullName?: string;
286
+ }
287
+
288
+ interface EmployeeAddress {
289
+ /**
290
+ * The first line of an address.
291
+ */
292
+ Addr1?: string;
293
+ /**
294
+ * The second line of an address (if a second line is needed).
295
+ */
296
+ Addr2?: string;
297
+ /**
298
+ * The city name in an address.
299
+ */
300
+ City?: string;
301
+ /**
302
+ * When it appears in the EmployeeAddress aggregate, the State element acts
303
+ * like an `ENUMTYPE` with the following possible values: None, AA (military),
304
+ * AE (military), AK, AL, AP (military), AR, AZ, CA, CO, CT, DC, DE, FL, GA,
305
+ * HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE,
306
+ * NH, NJ, NM, NV, NY, OH, OK, OR, PA, PR, RI, SC, SD, TN, TX, UT, VA, VT, WA,
307
+ * WI, WV, and WY.
308
+ */
309
+ State?: string;
310
+ /**
311
+ * The postal code in an address.
312
+ */
313
+ PostalCode?: string;
314
+ }
315
+
316
+ interface AdditionalContactRef {
317
+ ContactName: string;
318
+ ContactValue: string;
319
+ }
320
+
321
+ interface EmergencyContacts {
322
+ PrimaryContact?: {
323
+ ContactName: string;
324
+ ContactValue: string;
325
+ Relation?: Relation;
326
+ };
327
+ SecondaryContact?: {
328
+ ContactName: string;
329
+ ContactValue: string;
330
+ Relation?: Relation;
331
+ };
332
+ }
333
+
334
+ type Relation =
335
+ | "Brother"
336
+ | "Daughter"
337
+ | "Father"
338
+ | "Friend"
339
+ | "Mother"
340
+ | "Other"
341
+ | "Partner"
342
+ | "Sister"
343
+ | "Son"
344
+ | "Spouse";
345
+
346
+ // Default is Regular
347
+ type EmployeeType = "Officer" | "Owner" | "Regular" | "Statutory";
348
+
349
+ type PartOrFullTime = "FullTime" | "PartTime";
350
+
351
+ type Exempt = "Exempt" | "NonExempt";
352
+
353
+ type KeyEmployee = "No" | "Yes";
354
+
355
+ type Gender = "Female" | "Male";
356
+
357
+ type USCitizen = "No" | "Yes";
358
+
359
+ type Ethnicity =
360
+ | "AmericianIndian"
361
+ | "Asian"
362
+ | "Black"
363
+ | "Hawaiian"
364
+ | "Hispanic"
365
+ | "TwoOrMoreRaces"
366
+ | "White";
367
+
368
+ type Disabled = "No" | "Yes";
369
+
370
+ type OnFile = "No" | "Yes";
371
+
372
+ type USVeteran = "No" | "Yes";
373
+
374
+ type MilitaryStatus = "Active" | "Reserve";
375
+
376
+ interface AdditionalNotes {
377
+ Note: string;
378
+ }
379
+
380
+ interface AdditionalNotesRet {
381
+ NoteID: number;
382
+ Date: Date;
383
+ Note: string;
384
+ }
385
+
386
+ interface AdditionalNotesMod {
387
+ NoteID: number;
388
+ Note: string;
389
+ }
390
+
391
+ interface BillingRateRef {
392
+ ListID?: string;
393
+ FullName?: string;
394
+ }
395
+
396
+ interface EmployeePayrollInfo {
397
+ PayPeriod?: PayPeriod;
398
+ ClassRef?: ClassRef;
399
+ ClearEarnings?: boolean;
400
+ Earnings?: Earnings;
401
+ IsUsingTimeDataToCreatePaychecks?: boolean;
402
+ UseTimeDataToCreatePaychecks?: UseTimeDataToCreatePaychecks;
403
+ SickHours?: SickHours;
404
+ VacationHours?: VacationHours;
405
+ }
406
+
407
+ interface EmployeePayrollInfoMod {
408
+ PayPeriod?: PayPeriod;
409
+ ClassRef?: ClassRef;
410
+ ClearEarnings?: boolean;
411
+ Earnings?: Earnings;
412
+ IsUsingTimeDataToCreatePaychecks?: boolean;
413
+ UseTimeDataToCreatePaychecks?: UseTimeDataToCreatePaychecks;
414
+ SickHours?: SickHours;
415
+ VacationHours?: VacationHours;
416
+ }
417
+
418
+ type PayPeriod =
419
+ | "Biweekly"
420
+ | "Daily"
421
+ | "Monthly"
422
+ | "Quarterly"
423
+ | "Semimonthly"
424
+ | "Weekly"
425
+ | "Yearly";
426
+
427
+ interface ClassRef {
428
+ ListID?: string;
429
+ FullName?: string;
430
+ }
431
+
432
+ interface Earnings {
433
+ PayrollItemWageRef?: PayrollItemWageRef;
434
+ Rate?: string;
435
+ RatePercent?: string;
436
+ }
437
+
438
+ interface PayrollItemWageRef {
439
+ ListID?: string;
440
+ FullName?: string;
441
+ }
442
+
443
+ type UseTimeDataToCreatePaychecks =
444
+ | "DoNotUseTimeData"
445
+ | "NotSet"
446
+ | "UseTimeData";
447
+
448
+ interface SickHours {
449
+ HoursAvailable?: string;
450
+ AccrualPeriod?: AccrualPeriod;
451
+ HoursAccrued?: string;
452
+ MaximumHours?: string;
453
+ IsResettingHoursEachNewYear?: boolean;
454
+ HoursUsed?: string;
455
+ AccrualStartDate?: Date;
456
+ }
457
+
458
+ type AccrualPeriod =
459
+ | "BeginningOfYear"
460
+ | "EveryHourOnPaycheck"
461
+ | "EveryPaycheck";
462
+
463
+ interface VacationHours {
464
+ HoursAvailable?: string;
465
+ AccrualPeriod?: AccrualPeriod;
466
+ HoursAccrued?: string;
467
+ MaximumHours?: string;
468
+ IsResettingHoursEachNewYear?: boolean;
469
+ HoursUsed?: string;
470
+ AccrualStartDate?: Date;
471
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Filters according to the object’s `Name`.
3
+ */
4
+ export interface NameFilter {
5
+ /**
6
+ * The criterion to match.
7
+ */
8
+ MatchCriterion: MatchCriterion;
9
+ /**
10
+ * The string to match.
11
+ */
12
+ Name: string;
13
+ }
14
+
15
+ type MatchCriterion = "Contains" | "EndsWith" | "StartsWith";
16
+
17
+ export interface NameRangeFilter {
18
+ /**
19
+ * The first name or item in the search range. If `FromName` is omitted, the
20
+ * range will begin with first name on the list.
21
+ */
22
+ FromName?: string;
23
+ /**
24
+ * The final name or item in the search range. If `ToName` is omitted, the
25
+ * range will end with last name on the list.
26
+ */
27
+ ToName?: string;
28
+ }
29
+
30
+ // Default is `ActiveOnly`
31
+ export type ActiveStatus = "ActiveOnly" | "All" | "InactiveOnly";
32
+
33
+ export interface DataExtRet {
34
+ OwnerID?: string;
35
+ DataExtName: string;
36
+ DataExtType: DataExtType;
37
+ DataExtValue: string;
38
+ }
39
+
40
+ type DataExtType =
41
+ | "AMTTYPE"
42
+ | "Date"
43
+ | "number"
44
+ | "PERCENTTYPE"
45
+ | "PRICETYPE"
46
+ | "QUANTYPE"
47
+ | "STR255TYPE"
48
+ | "STR1024TYPE";
@@ -1,98 +0,0 @@
1
- export interface AccountAddRq {
2
- AccountAdd: AccountAdd;
3
- }
4
- export interface AccountAddRs {
5
- AccountRet?: AccountRet;
6
- }
7
- interface AccountAdd {
8
- Name: string;
9
- IsActive?: boolean;
10
- ParentRef?: ParentRef;
11
- AccountType: AccountType;
12
- AccountNumber?: string;
13
- BankNumber?: string;
14
- Desc?: string;
15
- OpenBalance?: string;
16
- OpenBalanceDate?: Date;
17
- SalesTaxCodeRef?: SalesTaxCodeRef;
18
- TaxLineID?: number;
19
- CurrencyRef?: CurrencyRef;
20
- }
21
- export interface AccountQueryRq {
22
- ListID?: string;
23
- FullName?: string;
24
- MaxReturned?: number;
25
- ActiveStatus?: ActiveStatus;
26
- FromModifiedDate?: Date;
27
- ToModifiedDate?: Date;
28
- NameFilter?: NameFilter;
29
- NameRangeFilter?: NameRangeFilter;
30
- AccountType?: AccountType;
31
- CurrencyFilter?: CurrencyFilter;
32
- }
33
- export interface AccountQueryRs {
34
- AccountRet?: AccountRet;
35
- }
36
- interface AccountRet {
37
- ListID: string;
38
- TimeCreated: string;
39
- TimeModified: string;
40
- EditSequence: string;
41
- Name: string;
42
- FullName: string;
43
- IsActive?: boolean;
44
- ParentRef?: ParentRef;
45
- Sublevel: number;
46
- AccountType: AccountType;
47
- SpecialAccountType?: SpecialAccountType;
48
- IsTaxAccount?: boolean;
49
- AccountNumber?: string;
50
- BankNumber?: string;
51
- Desc?: string;
52
- Balance?: string;
53
- TotalBalance?: string;
54
- SalesTaxCodeRef?: SalesTaxCodeRef;
55
- TaxLineInfoRet?: {
56
- TaxLineID: number;
57
- TaxLineName?: string;
58
- };
59
- CashFlowClassification?: CashFlowClassification;
60
- CurrencyRef?: CurrencyRef;
61
- DataExtRet?: {
62
- OwnerID?: string;
63
- DataExtName: string;
64
- DataExtType: DataExtType;
65
- DataExtValue: string;
66
- };
67
- }
68
- interface NameFilter {
69
- MatchCriterion: MatchCriterion;
70
- Name: string;
71
- }
72
- interface NameRangeFilter {
73
- FromName?: string;
74
- ToName?: string;
75
- }
76
- interface CurrencyFilter {
77
- ListID?: string;
78
- FullName?: string;
79
- }
80
- declare type MatchCriterion = "Contains" | "EndsWith" | "StartsWith";
81
- declare type ActiveStatus = "ActiveOnly" | "All" | "InactiveOnly";
82
- interface ParentRef {
83
- ListID?: string;
84
- FullName?: string;
85
- }
86
- interface SalesTaxCodeRef {
87
- ListID?: string;
88
- FullName?: string;
89
- }
90
- interface CurrencyRef {
91
- ListID?: string;
92
- FullName?: string;
93
- }
94
- declare type AccountType = "AccountsPayable" | "AccountsReceivable" | "Bank" | "CostOfGoodsSold" | "CreditCard" | "Equity" | "Expense" | "FixedAsset" | "Income" | "LongTermLiability" | "NonPosting" | "OtherAsset" | "OtherCurrentAsset" | "OtherCurrentLiability" | "OtherExpense" | "OtherIncome";
95
- declare type SpecialAccountType = "AccountsPayable" | "AccountsReceivable" | "CondenseItemAdjustmentExpenses" | "CostOfGoodsSold" | "DirectDepositLiabilities" | "Estimates" | "ExchangeGainLoss" | "InventoryAssets" | "ItemReceiptAccount" | "OpeningBalanceEquity" | "PayrollExpenses" | "PayrollLiabilities" | "PettyCash" | "PurchaseOrders" | "ReconciliationDifferences" | "RetainedEarnings" | "SalesOrders" | "SalesTaxPayable" | "UncategorizedExpenses" | "UncategorizedIncome" | "UndepositedFunds";
96
- declare type CashFlowClassification = "Financing" | "Investing" | "None" | "NotApplicable" | "Operating";
97
- declare type DataExtType = "AMTTYPE" | "Date" | "number" | "PERCENTTYPE" | "PRICETYPE" | "QUANTYPE" | "STR255TYPE" | "STR1024TYPE";
98
- export {};
@@ -1,15 +0,0 @@
1
- import type { AccountAddRq, AccountAddRs, AccountQueryRq, AccountQueryRs } from "@client/qbXMLTypes/Account";
2
- export declare type QBXMLRequest = {
3
- AccountAddRq: AccountAddRq;
4
- } | {
5
- AccountQueryRq: AccountQueryRq;
6
- };
7
- declare type GetSubtype<T> = T extends {
8
- [key: string]: infer U;
9
- } ? U : never;
10
- export declare type QBXMLResponse<T extends QBXMLRequest> = GetSubtype<T> extends AccountAddRq ? {
11
- AccountAddRs: AccountAddRs;
12
- } : GetSubtype<T> extends AccountQueryRq ? {
13
- AccountQueryRs: AccountQueryRs;
14
- } : unknown;
15
- export {};