conductor-node 4.0.1 → 4.0.2
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
|
@@ -21,8 +21,8 @@ import Conductor from "conductor-node";
|
|
|
21
21
|
// Instantiate `Conductor` with your account's secret key.
|
|
22
22
|
const conductor = new Conductor("sk_test_...");
|
|
23
23
|
|
|
24
|
-
// Fetch all authorized integration-
|
|
25
|
-
const qbdConnections = await client.
|
|
24
|
+
// Fetch all authorized integration-connections.
|
|
25
|
+
const qbdConnections = await client.getIntegrationConnections();
|
|
26
26
|
|
|
27
27
|
// Execute any QBD API against your QBD connection id.
|
|
28
28
|
const newAccount = await conductor.qbd.account.add(qbdConnections[0].id, {
|
package/dist/package.json
CHANGED
package/dist/src/Client.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export interface ClientOptions {
|
|
|
5
5
|
verbose?: boolean;
|
|
6
6
|
serverEnvironment?: Environment;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
interface IntegrationRequestParams {
|
|
9
|
+
integrationConnectionId: string;
|
|
10
10
|
requestObject: object;
|
|
11
11
|
}
|
|
12
12
|
export default class Client {
|
|
@@ -16,9 +16,10 @@ export default class Client {
|
|
|
16
16
|
private readonly gqlClient;
|
|
17
17
|
private readonly verbose;
|
|
18
18
|
constructor(apiKey: string, { verbose, serverEnvironment }?: ClientOptions);
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
getIntegrationConnection(integrationConnectionId: string): Promise<object>;
|
|
20
|
+
getIntegrationConnections(): Promise<object[]>;
|
|
21
21
|
integrationRequest(integrationRequestParams: IntegrationRequestParams): Promise<object>;
|
|
22
22
|
private request;
|
|
23
23
|
private checkForUpdates;
|
|
24
24
|
}
|
|
25
|
+
export {};
|
package/dist/src/Client.js
CHANGED
|
@@ -27,10 +27,10 @@ class Client {
|
|
|
27
27
|
});
|
|
28
28
|
this.qbd = new QbdIntegration_1.default(this);
|
|
29
29
|
}
|
|
30
|
-
async
|
|
30
|
+
async getIntegrationConnection(integrationConnectionId) {
|
|
31
31
|
const data = await this.request(`#graphql
|
|
32
|
-
query
|
|
33
|
-
|
|
32
|
+
query GetIntegrationConnection($integrationConnectionId: ID!) {
|
|
33
|
+
integrationConnection(id: $integrationConnectionId) {
|
|
34
34
|
id
|
|
35
35
|
integration {
|
|
36
36
|
id
|
|
@@ -40,14 +40,14 @@ class Client {
|
|
|
40
40
|
lastHeartbeatAt
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
`, {
|
|
43
|
+
`, { integrationConnectionId });
|
|
44
44
|
// @ts-expect-error - This will pass after we integrate GQL codegen.
|
|
45
|
-
return data.
|
|
45
|
+
return data.integrationConnection;
|
|
46
46
|
}
|
|
47
|
-
async
|
|
47
|
+
async getIntegrationConnections() {
|
|
48
48
|
const data = await this.request(`#graphql
|
|
49
49
|
query {
|
|
50
|
-
|
|
50
|
+
integrationConnections {
|
|
51
51
|
id
|
|
52
52
|
integration {
|
|
53
53
|
id
|
|
@@ -59,7 +59,7 @@ class Client {
|
|
|
59
59
|
}
|
|
60
60
|
`);
|
|
61
61
|
// @ts-expect-error - This will pass after we integrate GQL codegen.
|
|
62
|
-
return data.
|
|
62
|
+
return data.integrationConnections;
|
|
63
63
|
}
|
|
64
64
|
// TODO: Hide this method from the dev user while still allowing the
|
|
65
65
|
// integration clients to access it.
|
|
@@ -9,13 +9,13 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
9
9
|
*
|
|
10
10
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountAdd
|
|
11
11
|
*/
|
|
12
|
-
add: (
|
|
12
|
+
add: (integrationConnectionId: string, params: QbdTypes.AccountAddRq["AccountAdd"]) => Promise<NonNullable<QbdTypes.AccountAddRs["AccountRet"]>>;
|
|
13
13
|
/**
|
|
14
14
|
* Modifies an account.
|
|
15
15
|
*
|
|
16
16
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountMod
|
|
17
17
|
*/
|
|
18
|
-
mod: (
|
|
18
|
+
mod: (integrationConnectionId: string, params: QbdTypes.AccountModRq["AccountMod"]) => Promise<NonNullable<QbdTypes.AccountModRs["AccountRet"]>>;
|
|
19
19
|
/**
|
|
20
20
|
* `AccountQuery` is a list query that returns data for all accounts that
|
|
21
21
|
* match the provided filter criteria. Notice that it returns only data
|
|
@@ -26,7 +26,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
26
26
|
*
|
|
27
27
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountQuery
|
|
28
28
|
*/
|
|
29
|
-
query: (
|
|
29
|
+
query: (integrationConnectionId: string, params: QbdTypes.AccountQueryRq) => Promise<NonNullable<QbdTypes.AccountQueryRs["AccountRet"]>>;
|
|
30
30
|
};
|
|
31
31
|
bill: {
|
|
32
32
|
/**
|
|
@@ -81,7 +81,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
81
81
|
*
|
|
82
82
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillAdd
|
|
83
83
|
*/
|
|
84
|
-
add: (
|
|
84
|
+
add: (integrationConnectionId: string, params: QbdTypes.BillAddRq["BillAdd"]) => Promise<NonNullable<QbdTypes.BillAddRs["BillRet"]>>;
|
|
85
85
|
/**
|
|
86
86
|
* Edit an existing Bill, similar to editing a Bill in the Enter Bills form
|
|
87
87
|
* in the QuickBooks UI.
|
|
@@ -117,7 +117,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
117
117
|
*
|
|
118
118
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillMod
|
|
119
119
|
*/
|
|
120
|
-
mod: (
|
|
120
|
+
mod: (integrationConnectionId: string, params: QbdTypes.BillModRq["BillMod"]) => Promise<NonNullable<QbdTypes.BillModRs["BillRet"]>>;
|
|
121
121
|
/**
|
|
122
122
|
* Provides functionality found in the Find/Advanced-Find window to find
|
|
123
123
|
* bills that are to be paid by check. The Find/Advanced-Find windows can be
|
|
@@ -164,7 +164,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
164
164
|
*
|
|
165
165
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillQuery
|
|
166
166
|
*/
|
|
167
|
-
query: (
|
|
167
|
+
query: (integrationConnectionId: string, params: QbdTypes.BillQueryRq) => Promise<NonNullable<QbdTypes.BillQueryRs["BillRet"]>>;
|
|
168
168
|
};
|
|
169
169
|
billPaymentCheck: {
|
|
170
170
|
/**
|
|
@@ -200,7 +200,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
200
200
|
*
|
|
201
201
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillPaymentCheckAdd
|
|
202
202
|
*/
|
|
203
|
-
add: (
|
|
203
|
+
add: (integrationConnectionId: string, params: QbdTypes.BillPaymentCheckAddRq["BillPaymentCheckAdd"]) => Promise<NonNullable<QbdTypes.BillPaymentCheckAddRs["BillPaymentCheckRet"]>>;
|
|
204
204
|
/**
|
|
205
205
|
* Modifies the specified bill payment check.
|
|
206
206
|
*
|
|
@@ -247,7 +247,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
247
247
|
*
|
|
248
248
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillPaymentCheckMod
|
|
249
249
|
*/
|
|
250
|
-
mod: (
|
|
250
|
+
mod: (integrationConnectionId: string, params: QbdTypes.BillPaymentCheckModRq["BillPaymentCheckMod"]) => Promise<NonNullable<QbdTypes.BillPaymentCheckModRs["BillPaymentCheckRet"]>>;
|
|
251
251
|
/**
|
|
252
252
|
* Provides functionality found in the Find/Advanced-Find window to find
|
|
253
253
|
* bill payments paid by check. The Find/Advanced-Find windows can be
|
|
@@ -281,7 +281,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
281
281
|
*
|
|
282
282
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillPaymentCheckQuery
|
|
283
283
|
*/
|
|
284
|
-
query: (
|
|
284
|
+
query: (integrationConnectionId: string, params: QbdTypes.BillPaymentCheckQueryRq) => Promise<NonNullable<QbdTypes.BillPaymentCheckQueryRs["BillPaymentCheckRet"]>>;
|
|
285
285
|
};
|
|
286
286
|
check: {
|
|
287
287
|
/**
|
|
@@ -302,13 +302,13 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
302
302
|
*
|
|
303
303
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CheckAdd
|
|
304
304
|
*/
|
|
305
|
-
add: (
|
|
305
|
+
add: (integrationConnectionId: string, params: QbdTypes.CheckAddRq["CheckAdd"]) => Promise<NonNullable<QbdTypes.CheckAddRs["CheckRet"]>>;
|
|
306
306
|
/**
|
|
307
307
|
* Modifies an existing Check. Notice that you cannot use this to modify BillPaymentChecks.
|
|
308
308
|
*
|
|
309
309
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CheckMod
|
|
310
310
|
*/
|
|
311
|
-
mod: (
|
|
311
|
+
mod: (integrationConnectionId: string, params: QbdTypes.CheckModRq["CheckMod"]) => Promise<NonNullable<QbdTypes.CheckModRs["CheckRet"]>>;
|
|
312
312
|
/**
|
|
313
313
|
* Returns certain types of checks based on the supplied query criteria.
|
|
314
314
|
* Note that `BillPaymentChecks`, payroll checks, and liability checks are
|
|
@@ -316,7 +316,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
316
316
|
*
|
|
317
317
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CheckQuery
|
|
318
318
|
*/
|
|
319
|
-
query: (
|
|
319
|
+
query: (integrationConnectionId: string, params: QbdTypes.CheckQueryRq) => Promise<NonNullable<QbdTypes.CheckQueryRs["CheckRet"]>>;
|
|
320
320
|
};
|
|
321
321
|
class: {
|
|
322
322
|
/**
|
|
@@ -338,19 +338,19 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
338
338
|
*
|
|
339
339
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ClassAdd
|
|
340
340
|
*/
|
|
341
|
-
add: (
|
|
341
|
+
add: (integrationConnectionId: string, params: QbdTypes.ClassAddRq["ClassAdd"]) => Promise<NonNullable<QbdTypes.ClassAddRs["ClassRet"]>>;
|
|
342
342
|
/**
|
|
343
343
|
* Modifies the specified class.
|
|
344
344
|
*
|
|
345
345
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ClassMod
|
|
346
346
|
*/
|
|
347
|
-
mod: (
|
|
347
|
+
mod: (integrationConnectionId: string, params: QbdTypes.ClassModRq["ClassMod"]) => Promise<NonNullable<QbdTypes.ClassModRs["ClassRet"]>>;
|
|
348
348
|
/**
|
|
349
349
|
* Queries for existing classes.
|
|
350
350
|
*
|
|
351
351
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ClassQuery
|
|
352
352
|
*/
|
|
353
|
-
query: (
|
|
353
|
+
query: (integrationConnectionId: string, params: QbdTypes.ClassQueryRq) => Promise<NonNullable<QbdTypes.ClassQueryRs["ClassRet"]>>;
|
|
354
354
|
};
|
|
355
355
|
customer: {
|
|
356
356
|
/**
|
|
@@ -375,13 +375,13 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
375
375
|
*
|
|
376
376
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerAdd
|
|
377
377
|
*/
|
|
378
|
-
add: (
|
|
378
|
+
add: (integrationConnectionId: string, params: QbdTypes.CustomerAddRq["CustomerAdd"]) => Promise<NonNullable<QbdTypes.CustomerAddRs["CustomerRet"]>>;
|
|
379
379
|
/**
|
|
380
380
|
* Modifies the customer record.
|
|
381
381
|
*
|
|
382
382
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerMod
|
|
383
383
|
*/
|
|
384
|
-
mod: (
|
|
384
|
+
mod: (integrationConnectionId: string, params: QbdTypes.CustomerModRq["CustomerMod"]) => Promise<NonNullable<QbdTypes.CustomerModRs["CustomerRet"]>>;
|
|
385
385
|
/**
|
|
386
386
|
* Returns data for the specified customers.
|
|
387
387
|
*
|
|
@@ -394,7 +394,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
394
394
|
*
|
|
395
395
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerQuery
|
|
396
396
|
*/
|
|
397
|
-
query: (
|
|
397
|
+
query: (integrationConnectionId: string, params: QbdTypes.CustomerQueryRq) => Promise<NonNullable<QbdTypes.CustomerQueryRs["CustomerRet"]>>;
|
|
398
398
|
};
|
|
399
399
|
deposit: {
|
|
400
400
|
/**
|
|
@@ -405,19 +405,19 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
405
405
|
*
|
|
406
406
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/DepositAdd
|
|
407
407
|
*/
|
|
408
|
-
add: (
|
|
408
|
+
add: (integrationConnectionId: string, params: QbdTypes.DepositAddRq["DepositAdd"]) => Promise<NonNullable<QbdTypes.DepositAddRs["DepositRet"]>>;
|
|
409
409
|
/**
|
|
410
410
|
* Modifies an existing deposit.
|
|
411
411
|
*
|
|
412
412
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/DepositMod
|
|
413
413
|
*/
|
|
414
|
-
mod: (
|
|
414
|
+
mod: (integrationConnectionId: string, params: QbdTypes.DepositModRq["DepositMod"]) => Promise<NonNullable<QbdTypes.DepositModRs["DepositRet"]>>;
|
|
415
415
|
/**
|
|
416
416
|
* This request searches for deposits that match the supplied filters.
|
|
417
417
|
*
|
|
418
418
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/DepositQuery
|
|
419
419
|
*/
|
|
420
|
-
query: (
|
|
420
|
+
query: (integrationConnectionId: string, params: QbdTypes.DepositQueryRq) => Promise<NonNullable<QbdTypes.DepositQueryRs["DepositRet"]>>;
|
|
421
421
|
};
|
|
422
422
|
employee: {
|
|
423
423
|
/**
|
|
@@ -426,19 +426,19 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
426
426
|
*
|
|
427
427
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeAdd
|
|
428
428
|
*/
|
|
429
|
-
add: (
|
|
429
|
+
add: (integrationConnectionId: string, params: QbdTypes.EmployeeAddRq["EmployeeAdd"]) => Promise<NonNullable<QbdTypes.EmployeeAddRs["EmployeeRet"]>>;
|
|
430
430
|
/**
|
|
431
431
|
* Modifies an existing employee.
|
|
432
432
|
*
|
|
433
433
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeMod
|
|
434
434
|
*/
|
|
435
|
-
mod: (
|
|
435
|
+
mod: (integrationConnectionId: string, params: QbdTypes.EmployeeModRq["EmployeeMod"]) => Promise<NonNullable<QbdTypes.EmployeeModRs["EmployeeRet"]>>;
|
|
436
436
|
/**
|
|
437
437
|
* Returns employee data.
|
|
438
438
|
*
|
|
439
439
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeQuery
|
|
440
440
|
*/
|
|
441
|
-
query: (
|
|
441
|
+
query: (integrationConnectionId: string, params: QbdTypes.EmployeeQueryRq) => Promise<NonNullable<QbdTypes.EmployeeQueryRs["EmployeeRet"]>>;
|
|
442
442
|
};
|
|
443
443
|
itemService: {
|
|
444
444
|
/**
|
|
@@ -455,7 +455,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
455
455
|
* `ItemServiceRef` and `CustomerRef`.
|
|
456
456
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemServiceAdd
|
|
457
457
|
*/
|
|
458
|
-
add: (
|
|
458
|
+
add: (integrationConnectionId: string, params: QbdTypes.ItemServiceAddRq["ItemServiceAdd"]) => Promise<NonNullable<QbdTypes.ItemServiceAddRs["ItemServiceRet"]>>;
|
|
459
459
|
/**
|
|
460
460
|
* Modifies an existing service item.
|
|
461
461
|
*
|
|
@@ -487,13 +487,13 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
487
487
|
*
|
|
488
488
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemServiceMod
|
|
489
489
|
*/
|
|
490
|
-
mod: (
|
|
490
|
+
mod: (integrationConnectionId: string, params: QbdTypes.ItemServiceModRq["ItemServiceMod"]) => Promise<NonNullable<QbdTypes.ItemServiceModRs["ItemServiceRet"]>>;
|
|
491
491
|
/**
|
|
492
492
|
* Queries for the specified service item or set of items.
|
|
493
493
|
*
|
|
494
494
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemServiceQuery
|
|
495
495
|
*/
|
|
496
|
-
query: (
|
|
496
|
+
query: (integrationConnectionId: string, params: QbdTypes.ItemServiceQueryRq) => Promise<NonNullable<QbdTypes.ItemServiceQueryRs["ItemServiceRet"]>>;
|
|
497
497
|
};
|
|
498
498
|
journalEntry: {
|
|
499
499
|
/**
|
|
@@ -527,7 +527,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
527
527
|
*
|
|
528
528
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryAdd
|
|
529
529
|
*/
|
|
530
|
-
add: (
|
|
530
|
+
add: (integrationConnectionId: string, params: QbdTypes.JournalEntryAddRq["JournalEntryAdd"]) => Promise<NonNullable<QbdTypes.JournalEntryAddRs["JournalEntryRet"]>>;
|
|
531
531
|
/**
|
|
532
532
|
* Modifies a journal entry.
|
|
533
533
|
*
|
|
@@ -537,7 +537,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
537
537
|
*
|
|
538
538
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryMod
|
|
539
539
|
*/
|
|
540
|
-
mod: (
|
|
540
|
+
mod: (integrationConnectionId: string, params: QbdTypes.JournalEntryModRq["JournalEntryMod"]) => Promise<NonNullable<QbdTypes.JournalEntryModRs["JournalEntryRet"]>>;
|
|
541
541
|
/**
|
|
542
542
|
* In traditional accounting, transactions are entered into the general
|
|
543
543
|
* journal and categorized exclusively by account. In QuickBooks, most
|
|
@@ -562,7 +562,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
562
562
|
*
|
|
563
563
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryQuery
|
|
564
564
|
*/
|
|
565
|
-
query: (
|
|
565
|
+
query: (integrationConnectionId: string, params: QbdTypes.JournalEntryQueryRq) => Promise<NonNullable<QbdTypes.JournalEntryQueryRs["JournalEntryRet"]>>;
|
|
566
566
|
};
|
|
567
567
|
timeTracking: {
|
|
568
568
|
/**
|
|
@@ -575,7 +575,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
575
575
|
*
|
|
576
576
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/TimeTrackingQuery
|
|
577
577
|
*/
|
|
578
|
-
add: (
|
|
578
|
+
add: (integrationConnectionId: string, params: QbdTypes.TimeTrackingAddRq["TimeTrackingAdd"]) => Promise<NonNullable<QbdTypes.TimeTrackingAddRs["TimeTrackingRet"]>>;
|
|
579
579
|
/**
|
|
580
580
|
* Modifies a time tracking transaction.
|
|
581
581
|
*
|
|
@@ -602,7 +602,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
602
602
|
*
|
|
603
603
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/TimeTrackingMod
|
|
604
604
|
*/
|
|
605
|
-
mod: (
|
|
605
|
+
mod: (integrationConnectionId: string, params: QbdTypes.TimeTrackingModRq["TimeTrackingMod"]) => Promise<NonNullable<QbdTypes.TimeTrackingModRs["TimeTrackingRet"]>>;
|
|
606
606
|
/**
|
|
607
607
|
* The time-tracking transactions that are returned in this query include
|
|
608
608
|
* time tracking information that was entered into QuickBooks manually or
|
|
@@ -613,7 +613,7 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
613
613
|
*
|
|
614
614
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/TimeTrackingQuery
|
|
615
615
|
*/
|
|
616
|
-
query: (
|
|
616
|
+
query: (integrationConnectionId: string, params: QbdTypes.TimeTrackingQueryRq) => Promise<NonNullable<QbdTypes.TimeTrackingQueryRs["TimeTrackingRet"]>>;
|
|
617
617
|
};
|
|
618
618
|
vendor: {
|
|
619
619
|
/**
|
|
@@ -629,19 +629,19 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
629
629
|
*
|
|
630
630
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorAdd
|
|
631
631
|
*/
|
|
632
|
-
add: (
|
|
632
|
+
add: (integrationConnectionId: string, params: QbdTypes.VendorAddRq["VendorAdd"]) => Promise<NonNullable<QbdTypes.VendorAddRs["VendorRet"]>>;
|
|
633
633
|
/**
|
|
634
634
|
* Modifies a vendor.
|
|
635
635
|
*
|
|
636
636
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorMod
|
|
637
637
|
*/
|
|
638
|
-
mod: (
|
|
638
|
+
mod: (integrationConnectionId: string, params: QbdTypes.VendorModRq["VendorMod"]) => Promise<NonNullable<QbdTypes.VendorModRs["VendorRet"]>>;
|
|
639
639
|
/**
|
|
640
640
|
* Queries for the specified vendor or set of vendors.
|
|
641
641
|
*
|
|
642
642
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorQuery
|
|
643
643
|
*/
|
|
644
|
-
query: (
|
|
644
|
+
query: (integrationConnectionId: string, params: QbdTypes.VendorQueryRq) => Promise<NonNullable<QbdTypes.VendorQueryRs["VendorRet"]>>;
|
|
645
645
|
};
|
|
646
646
|
/**
|
|
647
647
|
* Send any QBXML request to QuickBooks Desktop.
|
|
@@ -649,6 +649,6 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
649
649
|
* Available APIs:
|
|
650
650
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop
|
|
651
651
|
*/
|
|
652
|
-
sendRequest(
|
|
652
|
+
sendRequest(integrationConnectionId: string, requestObject: object): Promise<object>;
|
|
653
653
|
private sendRequestBase;
|
|
654
654
|
}
|
|
@@ -13,13 +13,13 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
13
13
|
*
|
|
14
14
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountAdd
|
|
15
15
|
*/
|
|
16
|
-
add: async (
|
|
16
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { AccountAddRq: { AccountAdd: params } }, "AccountAddRs", "AccountRet"),
|
|
17
17
|
/**
|
|
18
18
|
* Modifies an account.
|
|
19
19
|
*
|
|
20
20
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountMod
|
|
21
21
|
*/
|
|
22
|
-
mod: async (
|
|
22
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { AccountModRq: { AccountMod: params } }, "AccountModRs", "AccountRet"),
|
|
23
23
|
/**
|
|
24
24
|
* `AccountQuery` is a list query that returns data for all accounts that
|
|
25
25
|
* match the provided filter criteria. Notice that it returns only data
|
|
@@ -30,7 +30,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
30
30
|
*
|
|
31
31
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/AccountQuery
|
|
32
32
|
*/
|
|
33
|
-
query: async (
|
|
33
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { AccountQueryRq: params }, "AccountQueryRs", "AccountRet"),
|
|
34
34
|
};
|
|
35
35
|
bill = {
|
|
36
36
|
/**
|
|
@@ -85,7 +85,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
85
85
|
*
|
|
86
86
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillAdd
|
|
87
87
|
*/
|
|
88
|
-
add: async (
|
|
88
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { BillAddRq: { BillAdd: params } }, "BillAddRs", "BillRet"),
|
|
89
89
|
/**
|
|
90
90
|
* Edit an existing Bill, similar to editing a Bill in the Enter Bills form
|
|
91
91
|
* in the QuickBooks UI.
|
|
@@ -121,7 +121,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
121
121
|
*
|
|
122
122
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillMod
|
|
123
123
|
*/
|
|
124
|
-
mod: async (
|
|
124
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { BillModRq: { BillMod: params } }, "BillModRs", "BillRet"),
|
|
125
125
|
/**
|
|
126
126
|
* Provides functionality found in the Find/Advanced-Find window to find
|
|
127
127
|
* bills that are to be paid by check. The Find/Advanced-Find windows can be
|
|
@@ -168,7 +168,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
168
168
|
*
|
|
169
169
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillQuery
|
|
170
170
|
*/
|
|
171
|
-
query: async (
|
|
171
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { BillQueryRq: params }, "BillQueryRs", "BillRet"),
|
|
172
172
|
};
|
|
173
173
|
billPaymentCheck = {
|
|
174
174
|
/**
|
|
@@ -204,7 +204,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
204
204
|
*
|
|
205
205
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillPaymentCheckAdd
|
|
206
206
|
*/
|
|
207
|
-
add: async (
|
|
207
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { BillPaymentCheckAddRq: { BillPaymentCheckAdd: params } }, "BillPaymentCheckAddRs", "BillPaymentCheckRet"),
|
|
208
208
|
/**
|
|
209
209
|
* Modifies the specified bill payment check.
|
|
210
210
|
*
|
|
@@ -251,7 +251,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
251
251
|
*
|
|
252
252
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillPaymentCheckMod
|
|
253
253
|
*/
|
|
254
|
-
mod: async (
|
|
254
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { BillPaymentCheckModRq: { BillPaymentCheckMod: params } }, "BillPaymentCheckModRs", "BillPaymentCheckRet"),
|
|
255
255
|
/**
|
|
256
256
|
* Provides functionality found in the Find/Advanced-Find window to find
|
|
257
257
|
* bill payments paid by check. The Find/Advanced-Find windows can be
|
|
@@ -285,7 +285,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
285
285
|
*
|
|
286
286
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/BillPaymentCheckQuery
|
|
287
287
|
*/
|
|
288
|
-
query: async (
|
|
288
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { BillPaymentCheckQueryRq: params }, "BillPaymentCheckQueryRs", "BillPaymentCheckRet"),
|
|
289
289
|
};
|
|
290
290
|
check = {
|
|
291
291
|
/**
|
|
@@ -306,13 +306,13 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
306
306
|
*
|
|
307
307
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CheckAdd
|
|
308
308
|
*/
|
|
309
|
-
add: async (
|
|
309
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { CheckAddRq: { CheckAdd: params } }, "CheckAddRs", "CheckRet"),
|
|
310
310
|
/**
|
|
311
311
|
* Modifies an existing Check. Notice that you cannot use this to modify BillPaymentChecks.
|
|
312
312
|
*
|
|
313
313
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CheckMod
|
|
314
314
|
*/
|
|
315
|
-
mod: async (
|
|
315
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { CheckModRq: { CheckMod: params } }, "CheckModRs", "CheckRet"),
|
|
316
316
|
/**
|
|
317
317
|
* Returns certain types of checks based on the supplied query criteria.
|
|
318
318
|
* Note that `BillPaymentChecks`, payroll checks, and liability checks are
|
|
@@ -320,7 +320,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
320
320
|
*
|
|
321
321
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CheckQuery
|
|
322
322
|
*/
|
|
323
|
-
query: async (
|
|
323
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { CheckQueryRq: params }, "CheckQueryRs", "CheckRet"),
|
|
324
324
|
};
|
|
325
325
|
class = {
|
|
326
326
|
/**
|
|
@@ -342,19 +342,19 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
342
342
|
*
|
|
343
343
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ClassAdd
|
|
344
344
|
*/
|
|
345
|
-
add: async (
|
|
345
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { ClassAddRq: { ClassAdd: params } }, "ClassAddRs", "ClassRet"),
|
|
346
346
|
/**
|
|
347
347
|
* Modifies the specified class.
|
|
348
348
|
*
|
|
349
349
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ClassMod
|
|
350
350
|
*/
|
|
351
|
-
mod: async (
|
|
351
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { ClassModRq: { ClassMod: params } }, "ClassModRs", "ClassRet"),
|
|
352
352
|
/**
|
|
353
353
|
* Queries for existing classes.
|
|
354
354
|
*
|
|
355
355
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ClassQuery
|
|
356
356
|
*/
|
|
357
|
-
query: async (
|
|
357
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { ClassQueryRq: params }, "ClassQueryRs", "ClassRet"),
|
|
358
358
|
};
|
|
359
359
|
customer = {
|
|
360
360
|
/**
|
|
@@ -379,13 +379,13 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
379
379
|
*
|
|
380
380
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerAdd
|
|
381
381
|
*/
|
|
382
|
-
add: async (
|
|
382
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { CustomerAddRq: { CustomerAdd: params } }, "CustomerAddRs", "CustomerRet"),
|
|
383
383
|
/**
|
|
384
384
|
* Modifies the customer record.
|
|
385
385
|
*
|
|
386
386
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerMod
|
|
387
387
|
*/
|
|
388
|
-
mod: async (
|
|
388
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { CustomerModRq: { CustomerMod: params } }, "CustomerModRs", "CustomerRet"),
|
|
389
389
|
/**
|
|
390
390
|
* Returns data for the specified customers.
|
|
391
391
|
*
|
|
@@ -398,7 +398,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
398
398
|
*
|
|
399
399
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CustomerQuery
|
|
400
400
|
*/
|
|
401
|
-
query: async (
|
|
401
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { CustomerQueryRq: params }, "CustomerQueryRs", "CustomerRet"),
|
|
402
402
|
};
|
|
403
403
|
deposit = {
|
|
404
404
|
/**
|
|
@@ -409,19 +409,19 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
409
409
|
*
|
|
410
410
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/DepositAdd
|
|
411
411
|
*/
|
|
412
|
-
add: async (
|
|
412
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { DepositAddRq: { DepositAdd: params } }, "DepositAddRs", "DepositRet"),
|
|
413
413
|
/**
|
|
414
414
|
* Modifies an existing deposit.
|
|
415
415
|
*
|
|
416
416
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/DepositMod
|
|
417
417
|
*/
|
|
418
|
-
mod: async (
|
|
418
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { DepositModRq: { DepositMod: params } }, "DepositModRs", "DepositRet"),
|
|
419
419
|
/**
|
|
420
420
|
* This request searches for deposits that match the supplied filters.
|
|
421
421
|
*
|
|
422
422
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/DepositQuery
|
|
423
423
|
*/
|
|
424
|
-
query: async (
|
|
424
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { DepositQueryRq: params }, "DepositQueryRs", "DepositRet"),
|
|
425
425
|
};
|
|
426
426
|
employee = {
|
|
427
427
|
/**
|
|
@@ -430,19 +430,19 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
430
430
|
*
|
|
431
431
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeAdd
|
|
432
432
|
*/
|
|
433
|
-
add: async (
|
|
433
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { EmployeeAddRq: { EmployeeAdd: params } }, "EmployeeAddRs", "EmployeeRet"),
|
|
434
434
|
/**
|
|
435
435
|
* Modifies an existing employee.
|
|
436
436
|
*
|
|
437
437
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeMod
|
|
438
438
|
*/
|
|
439
|
-
mod: async (
|
|
439
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { EmployeeModRq: { EmployeeMod: params } }, "EmployeeModRs", "EmployeeRet"),
|
|
440
440
|
/**
|
|
441
441
|
* Returns employee data.
|
|
442
442
|
*
|
|
443
443
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/EmployeeQuery
|
|
444
444
|
*/
|
|
445
|
-
query: async (
|
|
445
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { EmployeeQueryRq: params }, "EmployeeQueryRs", "EmployeeRet"),
|
|
446
446
|
};
|
|
447
447
|
itemService = {
|
|
448
448
|
/**
|
|
@@ -459,7 +459,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
459
459
|
* `ItemServiceRef` and `CustomerRef`.
|
|
460
460
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemServiceAdd
|
|
461
461
|
*/
|
|
462
|
-
add: async (
|
|
462
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { ItemServiceAddRq: { ItemServiceAdd: params } }, "ItemServiceAddRs", "ItemServiceRet"),
|
|
463
463
|
/**
|
|
464
464
|
* Modifies an existing service item.
|
|
465
465
|
*
|
|
@@ -491,13 +491,13 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
491
491
|
*
|
|
492
492
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemServiceMod
|
|
493
493
|
*/
|
|
494
|
-
mod: async (
|
|
494
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { ItemServiceModRq: { ItemServiceMod: params } }, "ItemServiceModRs", "ItemServiceRet"),
|
|
495
495
|
/**
|
|
496
496
|
* Queries for the specified service item or set of items.
|
|
497
497
|
*
|
|
498
498
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ItemServiceQuery
|
|
499
499
|
*/
|
|
500
|
-
query: async (
|
|
500
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { ItemServiceQueryRq: params }, "ItemServiceQueryRs", "ItemServiceRet"),
|
|
501
501
|
};
|
|
502
502
|
journalEntry = {
|
|
503
503
|
/**
|
|
@@ -531,7 +531,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
531
531
|
*
|
|
532
532
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryAdd
|
|
533
533
|
*/
|
|
534
|
-
add: async (
|
|
534
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { JournalEntryAddRq: { JournalEntryAdd: params } }, "JournalEntryAddRs", "JournalEntryRet"),
|
|
535
535
|
/**
|
|
536
536
|
* Modifies a journal entry.
|
|
537
537
|
*
|
|
@@ -541,7 +541,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
541
541
|
*
|
|
542
542
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryMod
|
|
543
543
|
*/
|
|
544
|
-
mod: async (
|
|
544
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { JournalEntryModRq: { JournalEntryMod: params } }, "JournalEntryModRs", "JournalEntryRet"),
|
|
545
545
|
/**
|
|
546
546
|
* In traditional accounting, transactions are entered into the general
|
|
547
547
|
* journal and categorized exclusively by account. In QuickBooks, most
|
|
@@ -566,7 +566,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
566
566
|
*
|
|
567
567
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/JournalEntryQuery
|
|
568
568
|
*/
|
|
569
|
-
query: async (
|
|
569
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { JournalEntryQueryRq: params }, "JournalEntryQueryRs", "JournalEntryRet"),
|
|
570
570
|
};
|
|
571
571
|
timeTracking = {
|
|
572
572
|
/**
|
|
@@ -579,7 +579,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
579
579
|
*
|
|
580
580
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/TimeTrackingQuery
|
|
581
581
|
*/
|
|
582
|
-
add: async (
|
|
582
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { TimeTrackingAddRq: { TimeTrackingAdd: params } }, "TimeTrackingAddRs", "TimeTrackingRet"),
|
|
583
583
|
/**
|
|
584
584
|
* Modifies a time tracking transaction.
|
|
585
585
|
*
|
|
@@ -606,7 +606,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
606
606
|
*
|
|
607
607
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/TimeTrackingMod
|
|
608
608
|
*/
|
|
609
|
-
mod: async (
|
|
609
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { TimeTrackingModRq: { TimeTrackingMod: params } }, "TimeTrackingModRs", "TimeTrackingRet"),
|
|
610
610
|
/**
|
|
611
611
|
* The time-tracking transactions that are returned in this query include
|
|
612
612
|
* time tracking information that was entered into QuickBooks manually or
|
|
@@ -617,7 +617,7 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
617
617
|
*
|
|
618
618
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/TimeTrackingQuery
|
|
619
619
|
*/
|
|
620
|
-
query: async (
|
|
620
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { TimeTrackingQueryRq: params }, "TimeTrackingQueryRs", "TimeTrackingRet"),
|
|
621
621
|
};
|
|
622
622
|
vendor = {
|
|
623
623
|
/**
|
|
@@ -633,19 +633,19 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
633
633
|
*
|
|
634
634
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorAdd
|
|
635
635
|
*/
|
|
636
|
-
add: async (
|
|
636
|
+
add: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { VendorAddRq: { VendorAdd: params } }, "VendorAddRs", "VendorRet"),
|
|
637
637
|
/**
|
|
638
638
|
* Modifies a vendor.
|
|
639
639
|
*
|
|
640
640
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorMod
|
|
641
641
|
*/
|
|
642
|
-
mod: async (
|
|
642
|
+
mod: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { VendorModRq: { VendorMod: params } }, "VendorModRs", "VendorRet"),
|
|
643
643
|
/**
|
|
644
644
|
* Queries for the specified vendor or set of vendors.
|
|
645
645
|
*
|
|
646
646
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/VendorQuery
|
|
647
647
|
*/
|
|
648
|
-
query: async (
|
|
648
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { VendorQueryRq: params }, "VendorQueryRs", "VendorRet"),
|
|
649
649
|
};
|
|
650
650
|
/**
|
|
651
651
|
* Send any QBXML request to QuickBooks Desktop.
|
|
@@ -653,14 +653,14 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
653
653
|
* Available APIs:
|
|
654
654
|
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop
|
|
655
655
|
*/
|
|
656
|
-
async sendRequest(
|
|
656
|
+
async sendRequest(integrationConnectionId, requestObject) {
|
|
657
657
|
return this.client.integrationRequest({
|
|
658
|
-
|
|
658
|
+
integrationConnectionId,
|
|
659
659
|
requestObject,
|
|
660
660
|
});
|
|
661
661
|
}
|
|
662
|
-
async sendRequestBase(
|
|
663
|
-
const response = (await this.sendRequest(
|
|
662
|
+
async sendRequestBase(integrationConnectionId, params, responseKey, responseBodyKey) {
|
|
663
|
+
const response = (await this.sendRequest(integrationConnectionId, params));
|
|
664
664
|
const responseBody = response[responseKey]?.[responseBodyKey];
|
|
665
665
|
if (responseBody === undefined) {
|
|
666
666
|
throw new Error("No response");
|
package/package.json
CHANGED