conductor-node 7.1.2 → 7.2.0
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 +8 -5
- package/dist/package.json +2 -2
- package/dist/src/Client.d.ts +25 -5
- package/dist/src/Client.js +27 -3
- package/dist/src/environment.d.ts +1 -1
- package/dist/src/graphql/__generated__/operationTypes.d.ts +50 -30
- package/dist/src/graphql/__generated__/operationTypes.js +15 -1
- package/dist/src/integrations/qbd/QbdIntegration.d.ts +14 -0
- package/dist/src/integrations/qbd/QbdIntegration.js +14 -0
- package/dist/src/integrations/qbd/qbdTypes.d.ts +163 -32
- package/dist/src/utils/testing.d.ts +2 -2
- package/dist/src/utils/testing.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -40,8 +40,13 @@ Create a new integration-connection.
|
|
|
40
40
|
|
|
41
41
|
```ts
|
|
42
42
|
const newQbdConnection = await conductor.createIntegrationConnection({
|
|
43
|
+
// The identifier of the third-party platform to integrate.
|
|
43
44
|
integrationKey: "quickbooks-desktop",
|
|
45
|
+
// Your end-user's email address for identification only. No emails
|
|
46
|
+
// will be sent. Must be distinct from your other connections for the
|
|
47
|
+
// same `integrationKey`.
|
|
44
48
|
endUserEmail: "danny@constructionco.com",
|
|
49
|
+
// Your end-user's name that will be shown elsewhere in Conductor.
|
|
45
50
|
endUserName: "Construction Corp",
|
|
46
51
|
});
|
|
47
52
|
```
|
|
@@ -76,7 +81,7 @@ The response includes the following:
|
|
|
76
81
|
Execute any QuickBooks Desktop (QBD) API against a specific integration-connection id. See the official [QuickBooks Desktop API Reference](https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop) for a full list of available APIs.
|
|
77
82
|
|
|
78
83
|
```ts
|
|
79
|
-
const newAccount = await conductor.qbd.account.add(
|
|
84
|
+
const newAccount = await conductor.qbd.account.add(qbdConnectionId, {
|
|
80
85
|
Name: "Test Account",
|
|
81
86
|
AccountType: "Bank",
|
|
82
87
|
OpenBalance: "100",
|
|
@@ -97,7 +102,7 @@ Fetch a single integration-connection by id.
|
|
|
97
102
|
|
|
98
103
|
```ts
|
|
99
104
|
const qbdConnection = await conductor.getIntegrationConnectionById(
|
|
100
|
-
|
|
105
|
+
qbdConnectionId
|
|
101
106
|
);
|
|
102
107
|
```
|
|
103
108
|
|
|
@@ -106,7 +111,5 @@ const qbdConnection = await conductor.getIntegrationConnectionById(
|
|
|
106
111
|
Check if an integration-connection is active within the last `secondsSinceLastActive` seconds (defaults to 60 seconds).
|
|
107
112
|
|
|
108
113
|
```ts
|
|
109
|
-
const isActive = await conductor.isIntegrationConnectionActive(
|
|
110
|
-
qbdConnections[0].id
|
|
111
|
-
);
|
|
114
|
+
const isActive = await conductor.isIntegrationConnectionActive(qbdConnectionId);
|
|
112
115
|
```
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-node",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "Easily integrate with the entire QuickBooks Desktop API with fully-typed async TypeScript",
|
|
5
5
|
"author": "Danny Nemer <hi@DannyNemer.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"postpack": "rm -rf dist",
|
|
18
18
|
"clean": "rm -rf dist package conductor-node-*.tgz tsconfig.tsbuildinfo",
|
|
19
19
|
"gen:graphql-types": "yarn graphql-codegen --config ./src/graphql/codegenConfig.ts",
|
|
20
|
-
"
|
|
20
|
+
"status": "yarn ts-node ./bin/logConnectionStatuses.ts"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=16"
|
package/dist/src/Client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Environment } from "./environment";
|
|
2
|
-
import type { GraphqlCreateIntegrationConnectionInput, GraphqlCreateIntegrationConnectionMutation, GraphqlGetIntegrationConnectionQuery, GraphqlGetIntegrationConnectionQueryVariables, GraphqlGetIntegrationConnectionsQuery, GraphqlIntegrationRequestInput, GraphqlIntegrationRequestQuery, GraphqlIsIntegrationConnectionActiveQuery, GraphqlIsIntegrationConnectionActiveQueryVariables } from "./graphql/__generated__/operationTypes";
|
|
2
|
+
import type { GraphqlCreateIntegrationConnectionInput, GraphqlCreateIntegrationConnectionMutation, GraphqlGetConnectionStatusQuery, GraphqlGetConnectionStatusQueryVariables, GraphqlGetIntegrationConnectionQuery, GraphqlGetIntegrationConnectionQueryVariables, GraphqlGetIntegrationConnectionsQuery, GraphqlIntegrationRequestInput, GraphqlIntegrationRequestQuery, GraphqlIsIntegrationConnectionActiveQuery, GraphqlIsIntegrationConnectionActiveQueryVariables } from "./graphql/__generated__/operationTypes";
|
|
3
3
|
import QbdIntegration from "./integrations/qbd/QbdIntegration";
|
|
4
4
|
export interface ClientOptions {
|
|
5
5
|
/** Log each request and response. */
|
|
@@ -23,16 +23,36 @@ export default class Client {
|
|
|
23
23
|
* @param input.integrationKey The identifier of the third-party platform to
|
|
24
24
|
* integrate.
|
|
25
25
|
* @param input.endUserEmail Your end-user's email address for identification
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* @param input.endUserName Your end-user's name
|
|
26
|
+
* only. No emails will be sent. Must be distinct from your other connections
|
|
27
|
+
* for the same integration.
|
|
28
|
+
* @param input.endUserName Your end-user's name that will be shown elsewhere
|
|
29
|
+
* in Conductor.
|
|
29
30
|
* @returns The newly created integration connection.
|
|
30
31
|
*/
|
|
31
32
|
createIntegrationConnection(input: GraphqlCreateIntegrationConnectionInput & {
|
|
32
33
|
integrationKey: "quickbooks-desktop";
|
|
33
34
|
}): Promise<GraphqlCreateIntegrationConnectionMutation["createIntegrationConnection"]>;
|
|
34
35
|
isIntegrationConnectionActive(integrationConnectionId: GraphqlIsIntegrationConnectionActiveQueryVariables["integrationConnectionId"], secondsSinceLastActive?: GraphqlIsIntegrationConnectionActiveQueryVariables["secondsSinceLastActive"]): Promise<GraphqlIsIntegrationConnectionActiveQuery["integrationConnection"]["isActive"]>;
|
|
36
|
+
/**
|
|
37
|
+
* Check whether we can successfully connect to the end-user's QBD instance.
|
|
38
|
+
*
|
|
39
|
+
* Unlike `lastHeartbeatAt`, which only checks if QBWC is running (i.e., is
|
|
40
|
+
* the user's computer on), this check fails if the user's computer is on but
|
|
41
|
+
* QBD is not running, the wrong company file is open, or there is a modal
|
|
42
|
+
* dialog open in QBD.
|
|
43
|
+
*
|
|
44
|
+
* @param integrationConnectionId The ID of the integration connection.
|
|
45
|
+
* @returns result Object with the following properties:
|
|
46
|
+
* @returns result.isConnected Whether we can connect to QBD.
|
|
47
|
+
* @returns result.devErrorMessage If `isConnected` is `false`, a
|
|
48
|
+
* developer-friendly error message; e.g., "The end-user's computer is likely
|
|
49
|
+
* off". Else, `null`.
|
|
50
|
+
* @returns result.endUserErrorMessage If `isConnected` is `false`, a
|
|
51
|
+
* user-friendly error message; e.g., "Please ensure your computer is on and
|
|
52
|
+
* QuickBooks Desktop is open". Else, `null`.
|
|
53
|
+
*/
|
|
54
|
+
getConnectionStatus(integrationConnectionId: GraphqlGetConnectionStatusQueryVariables["integrationConnectionId"]): Promise<GraphqlGetConnectionStatusQuery["integrationConnection"]["connectionStatus"]>;
|
|
35
55
|
integrationRequest(input: GraphqlIntegrationRequestInput): Promise<GraphqlIntegrationRequestQuery["integrationRequest"]>;
|
|
36
|
-
graphqlOperationWrapper
|
|
56
|
+
private graphqlOperationWrapper;
|
|
37
57
|
private checkForUpdates;
|
|
38
58
|
}
|
package/dist/src/Client.js
CHANGED
|
@@ -54,9 +54,10 @@ class Client {
|
|
|
54
54
|
* @param input.integrationKey The identifier of the third-party platform to
|
|
55
55
|
* integrate.
|
|
56
56
|
* @param input.endUserEmail Your end-user's email address for identification
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* @param input.endUserName Your end-user's name
|
|
57
|
+
* only. No emails will be sent. Must be distinct from your other connections
|
|
58
|
+
* for the same integration.
|
|
59
|
+
* @param input.endUserName Your end-user's name that will be shown elsewhere
|
|
60
|
+
* in Conductor.
|
|
60
61
|
* @returns The newly created integration connection.
|
|
61
62
|
*/
|
|
62
63
|
async createIntegrationConnection(input) {
|
|
@@ -72,6 +73,29 @@ class Client {
|
|
|
72
73
|
})
|
|
73
74
|
.then((result) => result.integrationConnection.isActive);
|
|
74
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Check whether we can successfully connect to the end-user's QBD instance.
|
|
78
|
+
*
|
|
79
|
+
* Unlike `lastHeartbeatAt`, which only checks if QBWC is running (i.e., is
|
|
80
|
+
* the user's computer on), this check fails if the user's computer is on but
|
|
81
|
+
* QBD is not running, the wrong company file is open, or there is a modal
|
|
82
|
+
* dialog open in QBD.
|
|
83
|
+
*
|
|
84
|
+
* @param integrationConnectionId The ID of the integration connection.
|
|
85
|
+
* @returns result Object with the following properties:
|
|
86
|
+
* @returns result.isConnected Whether we can connect to QBD.
|
|
87
|
+
* @returns result.devErrorMessage If `isConnected` is `false`, a
|
|
88
|
+
* developer-friendly error message; e.g., "The end-user's computer is likely
|
|
89
|
+
* off". Else, `null`.
|
|
90
|
+
* @returns result.endUserErrorMessage If `isConnected` is `false`, a
|
|
91
|
+
* user-friendly error message; e.g., "Please ensure your computer is on and
|
|
92
|
+
* QuickBooks Desktop is open". Else, `null`.
|
|
93
|
+
*/
|
|
94
|
+
async getConnectionStatus(integrationConnectionId) {
|
|
95
|
+
return this.graphqlOperations
|
|
96
|
+
.getConnectionStatus({ integrationConnectionId })
|
|
97
|
+
.then((result) => result.integrationConnection.connectionStatus);
|
|
98
|
+
}
|
|
75
99
|
// TODO: Hide this method from the dev-user while still allowing the
|
|
76
100
|
// integration clients to access it.
|
|
77
101
|
async integrationRequest(input) {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { GraphQLClient } from "graphql-request";
|
|
2
2
|
import * as Dom from "graphql-request/dist/types.dom";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
export type Maybe<T> = T | null;
|
|
4
|
+
export type InputMaybe<T> = Maybe<T>;
|
|
5
|
+
export type Exact<T extends {
|
|
6
6
|
[key: string]: unknown;
|
|
7
7
|
}> = {
|
|
8
8
|
[K in keyof T]: T[K];
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
11
11
|
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
14
14
|
[SubKey in K]: Maybe<T[SubKey]>;
|
|
15
15
|
};
|
|
16
16
|
/** All built-in and custom scalars, mapped to their actual values */
|
|
17
|
-
export
|
|
17
|
+
export type Scalars = {
|
|
18
18
|
ID: string;
|
|
19
19
|
String: string;
|
|
20
20
|
Boolean: boolean;
|
|
@@ -23,22 +23,28 @@ export declare type Scalars = {
|
|
|
23
23
|
DateTime: Date;
|
|
24
24
|
JSONObject: object;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type GraphqlConnectionStatusResult = {
|
|
27
|
+
devErrorMessage: Maybe<Scalars["String"]>;
|
|
28
|
+
endUserErrorMessage: Maybe<Scalars["String"]>;
|
|
29
|
+
isConnected: Scalars["Boolean"];
|
|
30
|
+
};
|
|
31
|
+
export type GraphqlCreateIntegrationConnectionInput = {
|
|
27
32
|
endUserEmail: Scalars["String"];
|
|
28
33
|
endUserName: Scalars["String"];
|
|
29
34
|
integrationKey: Scalars["String"];
|
|
30
35
|
};
|
|
31
|
-
export
|
|
36
|
+
export type GraphqlCreateIntegrationConnectionResult = {
|
|
32
37
|
integrationConnection: GraphqlIntegrationConnection;
|
|
33
38
|
qbwcPassword: Scalars["String"];
|
|
34
39
|
qwcFileDownloadUrl: Scalars["String"];
|
|
35
40
|
};
|
|
36
|
-
export
|
|
41
|
+
export type GraphqlIntegration = {
|
|
37
42
|
id: Scalars["ID"];
|
|
38
43
|
key: Scalars["String"];
|
|
39
44
|
name: Scalars["String"];
|
|
40
45
|
};
|
|
41
|
-
export
|
|
46
|
+
export type GraphqlIntegrationConnection = {
|
|
47
|
+
connectionStatus: GraphqlConnectionStatusResult;
|
|
42
48
|
devUserId: Scalars["ID"];
|
|
43
49
|
endUserEmail: Scalars["String"];
|
|
44
50
|
endUserName: Scalars["String"];
|
|
@@ -49,41 +55,41 @@ export declare type GraphqlIntegrationConnection = {
|
|
|
49
55
|
lastHeartbeatAt: Maybe<Scalars["DateTime"]>;
|
|
50
56
|
qbwcPassword: Scalars["String"];
|
|
51
57
|
};
|
|
52
|
-
export
|
|
58
|
+
export type GraphqlIntegrationConnectionIsActiveArgs = {
|
|
53
59
|
secondsSinceLastActive: Scalars["Int"];
|
|
54
60
|
};
|
|
55
|
-
export
|
|
61
|
+
export type GraphqlIntegrationRequestInput = {
|
|
56
62
|
integrationConnectionId: Scalars["ID"];
|
|
57
63
|
requestObject: Scalars["JSONObject"];
|
|
58
64
|
};
|
|
59
|
-
export
|
|
65
|
+
export type GraphqlMutation = {
|
|
60
66
|
createIntegrationConnection: GraphqlCreateIntegrationConnectionResult;
|
|
61
67
|
};
|
|
62
|
-
export
|
|
68
|
+
export type GraphqlMutationCreateIntegrationConnectionArgs = {
|
|
63
69
|
input: GraphqlCreateIntegrationConnectionInput;
|
|
64
70
|
};
|
|
65
|
-
export
|
|
71
|
+
export type GraphqlQuery = {
|
|
66
72
|
integrationConnection: GraphqlIntegrationConnection;
|
|
67
73
|
integrationConnections: Array<GraphqlIntegrationConnection>;
|
|
68
74
|
integrationRequest: Scalars["JSONObject"];
|
|
69
75
|
};
|
|
70
|
-
export
|
|
76
|
+
export type GraphqlQueryIntegrationConnectionArgs = {
|
|
71
77
|
id: Scalars["ID"];
|
|
72
78
|
};
|
|
73
|
-
export
|
|
79
|
+
export type GraphqlQueryIntegrationRequestArgs = {
|
|
74
80
|
input: GraphqlIntegrationRequestInput;
|
|
75
81
|
};
|
|
76
|
-
export
|
|
82
|
+
export type GraphqlIntegrationConnectionFragment = {
|
|
77
83
|
id: string;
|
|
78
84
|
integrationKey: string;
|
|
79
85
|
endUserEmail: string;
|
|
80
86
|
endUserName: string;
|
|
81
87
|
lastHeartbeatAt: Date | null;
|
|
82
88
|
};
|
|
83
|
-
export
|
|
89
|
+
export type GraphqlGetIntegrationConnectionQueryVariables = Exact<{
|
|
84
90
|
integrationConnectionId: Scalars["ID"];
|
|
85
91
|
}>;
|
|
86
|
-
export
|
|
92
|
+
export type GraphqlGetIntegrationConnectionQuery = {
|
|
87
93
|
integrationConnection: {
|
|
88
94
|
id: string;
|
|
89
95
|
integrationKey: string;
|
|
@@ -92,10 +98,10 @@ export declare type GraphqlGetIntegrationConnectionQuery = {
|
|
|
92
98
|
lastHeartbeatAt: Date | null;
|
|
93
99
|
};
|
|
94
100
|
};
|
|
95
|
-
export
|
|
101
|
+
export type GraphqlGetIntegrationConnectionsQueryVariables = Exact<{
|
|
96
102
|
[key: string]: never;
|
|
97
103
|
}>;
|
|
98
|
-
export
|
|
104
|
+
export type GraphqlGetIntegrationConnectionsQuery = {
|
|
99
105
|
integrationConnections: Array<{
|
|
100
106
|
id: string;
|
|
101
107
|
integrationKey: string;
|
|
@@ -104,10 +110,10 @@ export declare type GraphqlGetIntegrationConnectionsQuery = {
|
|
|
104
110
|
lastHeartbeatAt: Date | null;
|
|
105
111
|
}>;
|
|
106
112
|
};
|
|
107
|
-
export
|
|
113
|
+
export type GraphqlCreateIntegrationConnectionMutationVariables = Exact<{
|
|
108
114
|
input: GraphqlCreateIntegrationConnectionInput;
|
|
109
115
|
}>;
|
|
110
|
-
export
|
|
116
|
+
export type GraphqlCreateIntegrationConnectionMutation = {
|
|
111
117
|
createIntegrationConnection: {
|
|
112
118
|
qbwcPassword: string;
|
|
113
119
|
qwcFileDownloadUrl: string;
|
|
@@ -120,19 +126,31 @@ export declare type GraphqlCreateIntegrationConnectionMutation = {
|
|
|
120
126
|
};
|
|
121
127
|
};
|
|
122
128
|
};
|
|
123
|
-
export
|
|
129
|
+
export type GraphqlIsIntegrationConnectionActiveQueryVariables = Exact<{
|
|
124
130
|
integrationConnectionId: Scalars["ID"];
|
|
125
131
|
secondsSinceLastActive: Scalars["Int"];
|
|
126
132
|
}>;
|
|
127
|
-
export
|
|
133
|
+
export type GraphqlIsIntegrationConnectionActiveQuery = {
|
|
128
134
|
integrationConnection: {
|
|
129
135
|
isActive: boolean;
|
|
130
136
|
};
|
|
131
137
|
};
|
|
132
|
-
export
|
|
138
|
+
export type GraphqlGetConnectionStatusQueryVariables = Exact<{
|
|
139
|
+
integrationConnectionId: Scalars["ID"];
|
|
140
|
+
}>;
|
|
141
|
+
export type GraphqlGetConnectionStatusQuery = {
|
|
142
|
+
integrationConnection: {
|
|
143
|
+
connectionStatus: {
|
|
144
|
+
isConnected: boolean;
|
|
145
|
+
devErrorMessage: string | null;
|
|
146
|
+
endUserErrorMessage: string | null;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
export type GraphqlIntegrationRequestQueryVariables = Exact<{
|
|
133
151
|
input: GraphqlIntegrationRequestInput;
|
|
134
152
|
}>;
|
|
135
|
-
export
|
|
153
|
+
export type GraphqlIntegrationRequestQuery = {
|
|
136
154
|
integrationRequest: object;
|
|
137
155
|
};
|
|
138
156
|
export declare const IntegrationConnectionFragmentDoc = "\n fragment IntegrationConnection on IntegrationConnection {\n id\n integrationKey\n endUserEmail\n endUserName\n lastHeartbeatAt\n}\n ";
|
|
@@ -140,13 +158,15 @@ export declare const GetIntegrationConnectionDocument: string;
|
|
|
140
158
|
export declare const GetIntegrationConnectionsDocument: string;
|
|
141
159
|
export declare const CreateIntegrationConnectionDocument: string;
|
|
142
160
|
export declare const IsIntegrationConnectionActiveDocument = "\n query isIntegrationConnectionActive($integrationConnectionId: ID!, $secondsSinceLastActive: Int!) {\n integrationConnection(id: $integrationConnectionId) {\n isActive(secondsSinceLastActive: $secondsSinceLastActive)\n }\n}\n ";
|
|
161
|
+
export declare const GetConnectionStatusDocument = "\n query getConnectionStatus($integrationConnectionId: ID!) {\n integrationConnection(id: $integrationConnectionId) {\n connectionStatus {\n isConnected\n devErrorMessage\n endUserErrorMessage\n }\n }\n}\n ";
|
|
143
162
|
export declare const IntegrationRequestDocument = "\n query integrationRequest($input: IntegrationRequestInput!) {\n integrationRequest(input: $input)\n}\n ";
|
|
144
|
-
export
|
|
163
|
+
export type SdkFunctionWrapper = <T>(action: (requestHeaders?: Record<string, string>) => Promise<T>, operationName: string, operationType?: string) => Promise<T>;
|
|
145
164
|
export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionWrapper): {
|
|
146
165
|
getIntegrationConnection(variables: GraphqlGetIntegrationConnectionQueryVariables, requestHeaders?: (Record<string, string> | Dom.Headers | string[][]) | undefined): Promise<GraphqlGetIntegrationConnectionQuery>;
|
|
147
166
|
getIntegrationConnections(variables?: GraphqlGetIntegrationConnectionsQueryVariables, requestHeaders?: (Record<string, string> | Dom.Headers | string[][]) | undefined): Promise<GraphqlGetIntegrationConnectionsQuery>;
|
|
148
167
|
createIntegrationConnection(variables: GraphqlCreateIntegrationConnectionMutationVariables, requestHeaders?: (Record<string, string> | Dom.Headers | string[][]) | undefined): Promise<GraphqlCreateIntegrationConnectionMutation>;
|
|
149
168
|
isIntegrationConnectionActive(variables: GraphqlIsIntegrationConnectionActiveQueryVariables, requestHeaders?: (Record<string, string> | Dom.Headers | string[][]) | undefined): Promise<GraphqlIsIntegrationConnectionActiveQuery>;
|
|
169
|
+
getConnectionStatus(variables: GraphqlGetConnectionStatusQueryVariables, requestHeaders?: (Record<string, string> | Dom.Headers | string[][]) | undefined): Promise<GraphqlGetConnectionStatusQuery>;
|
|
150
170
|
integrationRequest(variables: GraphqlIntegrationRequestQueryVariables, requestHeaders?: (Record<string, string> | Dom.Headers | string[][]) | undefined): Promise<GraphqlIntegrationRequestQuery>;
|
|
151
171
|
};
|
|
152
|
-
export
|
|
172
|
+
export type Sdk = ReturnType<typeof getSdk>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSdk = exports.IntegrationRequestDocument = exports.IsIntegrationConnectionActiveDocument = exports.CreateIntegrationConnectionDocument = exports.GetIntegrationConnectionsDocument = exports.GetIntegrationConnectionDocument = exports.IntegrationConnectionFragmentDoc = void 0;
|
|
3
|
+
exports.getSdk = exports.IntegrationRequestDocument = exports.GetConnectionStatusDocument = exports.IsIntegrationConnectionActiveDocument = exports.CreateIntegrationConnectionDocument = exports.GetIntegrationConnectionsDocument = exports.GetIntegrationConnectionDocument = exports.IntegrationConnectionFragmentDoc = void 0;
|
|
4
4
|
exports.IntegrationConnectionFragmentDoc = `
|
|
5
5
|
fragment IntegrationConnection on IntegrationConnection {
|
|
6
6
|
id
|
|
@@ -42,6 +42,17 @@ exports.IsIntegrationConnectionActiveDocument = `
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
`;
|
|
45
|
+
exports.GetConnectionStatusDocument = `
|
|
46
|
+
query getConnectionStatus($integrationConnectionId: ID!) {
|
|
47
|
+
integrationConnection(id: $integrationConnectionId) {
|
|
48
|
+
connectionStatus {
|
|
49
|
+
isConnected
|
|
50
|
+
devErrorMessage
|
|
51
|
+
endUserErrorMessage
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
45
56
|
exports.IntegrationRequestDocument = `
|
|
46
57
|
query integrationRequest($input: IntegrationRequestInput!) {
|
|
47
58
|
integrationRequest(input: $input)
|
|
@@ -62,6 +73,9 @@ function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
62
73
|
isIntegrationConnectionActive(variables, requestHeaders) {
|
|
63
74
|
return withWrapper((wrappedRequestHeaders) => client.request(exports.IsIntegrationConnectionActiveDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "isIntegrationConnectionActive", "query");
|
|
64
75
|
},
|
|
76
|
+
getConnectionStatus(variables, requestHeaders) {
|
|
77
|
+
return withWrapper((wrappedRequestHeaders) => client.request(exports.GetConnectionStatusDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "getConnectionStatus", "query");
|
|
78
|
+
},
|
|
65
79
|
integrationRequest(variables, requestHeaders) {
|
|
66
80
|
return withWrapper((wrappedRequestHeaders) => client.request(exports.IntegrationRequestDocument, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "integrationRequest", "query");
|
|
67
81
|
},
|
|
@@ -352,6 +352,20 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
352
352
|
*/
|
|
353
353
|
query: (integrationConnectionId: string, params: QbdTypes.ClassQueryRq) => Promise<NonNullable<QbdTypes.ClassQueryRs["ClassRet"]>>;
|
|
354
354
|
};
|
|
355
|
+
company: {
|
|
356
|
+
/**
|
|
357
|
+
* Returns detailed information about a QuickBooks company file, such as the
|
|
358
|
+
* company’s address and legal name, certain preferences that are set, and
|
|
359
|
+
* any services that the company is subscribed to, such as payroll,
|
|
360
|
+
* QuickBooks Merchant Services, and so forth.
|
|
361
|
+
*
|
|
362
|
+
* Company information cannot be added or modified through the SDK, only
|
|
363
|
+
* through the QuickBooks user interface
|
|
364
|
+
*
|
|
365
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CompanyQuery
|
|
366
|
+
*/
|
|
367
|
+
query: (integrationConnectionId: string, params: QbdTypes.CompanyQueryRq) => Promise<NonNullable<QbdTypes.CompanyQueryRs["CompanyRet"]>>;
|
|
368
|
+
};
|
|
355
369
|
customer: {
|
|
356
370
|
/**
|
|
357
371
|
* The customer list includes information about the QuickBooks user’s
|
|
@@ -356,6 +356,20 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
356
356
|
*/
|
|
357
357
|
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { ClassQueryRq: params }, "ClassQueryRs", "ClassRet"),
|
|
358
358
|
};
|
|
359
|
+
company = {
|
|
360
|
+
/**
|
|
361
|
+
* Returns detailed information about a QuickBooks company file, such as the
|
|
362
|
+
* company’s address and legal name, certain preferences that are set, and
|
|
363
|
+
* any services that the company is subscribed to, such as payroll,
|
|
364
|
+
* QuickBooks Merchant Services, and so forth.
|
|
365
|
+
*
|
|
366
|
+
* Company information cannot be added or modified through the SDK, only
|
|
367
|
+
* through the QuickBooks user interface
|
|
368
|
+
*
|
|
369
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/CompanyQuery
|
|
370
|
+
*/
|
|
371
|
+
query: async (integrationConnectionId, params) => this.sendRequestBase(integrationConnectionId, { CompanyQueryRq: params }, "CompanyQueryRs", "CompanyRet"),
|
|
372
|
+
};
|
|
359
373
|
customer = {
|
|
360
374
|
/**
|
|
361
375
|
* The customer list includes information about the QuickBooks user’s
|
|
@@ -47,6 +47,12 @@ export interface AccountAddRs {
|
|
|
47
47
|
AccountRet?: AccountRet;
|
|
48
48
|
ErrorRecovery?: ErrorRecovery;
|
|
49
49
|
}
|
|
50
|
+
export interface AccountantCopy {
|
|
51
|
+
/** Indicates whether an accountant copy has been made for this company file, with a value of true meaning a copy has been made and a value of false meaning there is no accountant copy. */
|
|
52
|
+
AccountantCopyExists: boolean;
|
|
53
|
+
/** The dividing date indicates the fiscal period within which the accountant is working. This date is key because as long as the accountant copy exists, no transactions can be modified or created within that period. You can add new accounts, but you cannot add new subaccounts to existing accounts, and you cannot edit, merge, or make an existing account inactive. Finally, you cannot delete or merge list items. */
|
|
54
|
+
DividingDate?: string;
|
|
55
|
+
}
|
|
50
56
|
export interface AccountFilter {
|
|
51
57
|
/** One or more `ListID` values. Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`.
|
|
52
58
|
|
|
@@ -225,10 +231,10 @@ export interface AccountRet {
|
|
|
225
231
|
/** A list of `IDataExtRet` objects, each of which represents a field that has been added to QuickBooks as a data extension. */
|
|
226
232
|
DataExtRet?: DataExtRet | DataExtRet[];
|
|
227
233
|
}
|
|
228
|
-
export
|
|
229
|
-
export
|
|
234
|
+
export type AccountType = "AccountsPayable" | "AccountsReceivable" | "Bank" | "CostOfGoodsSold" | "CreditCard" | "Equity" | "Expense" | "FixedAsset" | "Income" | "LongTermLiability" | "NonPosting" | "OtherAsset" | "OtherCurrentAsset" | "OtherCurrentLiability" | "OtherExpense" | "OtherIncome";
|
|
235
|
+
export type AccrualPeriod = "BeginningOfYear" | "EveryHourOnPaycheck" | "EveryPaycheck";
|
|
230
236
|
/** @default: ActiveOnly */
|
|
231
|
-
export
|
|
237
|
+
export type ActiveStatus = "ActiveOnly" | "All" | "InactiveOnly";
|
|
232
238
|
export interface AdditionalContactRef {
|
|
233
239
|
/** The name of the contact. */
|
|
234
240
|
ContactName: string;
|
|
@@ -369,7 +375,7 @@ export interface BarCode {
|
|
|
369
375
|
/** Allows for barcode to be overridden for an item. */
|
|
370
376
|
AllowOverride?: boolean;
|
|
371
377
|
}
|
|
372
|
-
export
|
|
378
|
+
export type BillableStatus = "Billable" | "HasBeenBilled" | "NotBillable";
|
|
373
379
|
export interface BillAdd {
|
|
374
380
|
/** A vendor is any person or company from whom a small business owner buys goods and services. (Banks and tax agencies usually are included on the vendor list.) A company’s vendor list contains information such as account balance and contact information about each vendor. A `VendorRef` aggregate refers to one of the vendors on the list. In a request, if a `VendorRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored. */
|
|
375
381
|
VendorRef: VendorRef;
|
|
@@ -832,7 +838,7 @@ export interface CashBackInfoRet {
|
|
|
832
838
|
/** A monetary amount. */
|
|
833
839
|
Amount?: string;
|
|
834
840
|
}
|
|
835
|
-
export
|
|
841
|
+
export type CashFlowClassification = "Financing" | "Investing" | "None" | "NotApplicable" | "Operating";
|
|
836
842
|
export interface CheckAdd {
|
|
837
843
|
/** The Account list is the company file’s list of accounts. An `AccountRef` aggregate refers to one of these accounts. (If an `AccountRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored.)Special cases to note:In a Check message, `AccountRef` refers to the account from which the funds are being drawn for this check, for example, Checking or Savings.In an `ExpenseLineAdd` message, you must include `AccountRef` if the “Require accounts” check box is selected in the QuickBooks Accounting preferences. (It is selected by default.) In a `CreditCardCredit` message, `AccountRef` refers to the bank account or credit card account to which the credit is applied.In a `CreditCardCharge` message, `AccountRef` refers to the bank or credit card company to whom money is owed. How do you increase and decrease amounts in bank accounts?The following requests increase the balance in a bank account:Deposit Add `ReceivePaymentAdd` Journal Entry Add Sales `ReceiptAdd` The following requests decrease the balance in a bank account:`CheckAdd` Bill `PaymentCheckAdd` `JournalEntryAdd` */
|
|
838
844
|
AccountRef: AccountRef;
|
|
@@ -1105,6 +1111,93 @@ export interface ClassRet {
|
|
|
1105
1111
|
/** The number of ancestors. For example, The customer job with `Name` = carpets and `FullName` = Jones:Building2:carpets would have a sublevel of 2. */
|
|
1106
1112
|
Sublevel: number;
|
|
1107
1113
|
}
|
|
1114
|
+
export interface CompanyAddressBlockForCustomer {
|
|
1115
|
+
/** The first line of an address. */
|
|
1116
|
+
Addr1?: string;
|
|
1117
|
+
/** The second line of an address (if a second line is needed). */
|
|
1118
|
+
Addr2?: string;
|
|
1119
|
+
/** The third line of an address (if a third line is needed). */
|
|
1120
|
+
Addr3?: string;
|
|
1121
|
+
/** The fourth line of an address (if a fourth line is needed). */
|
|
1122
|
+
Addr4?: string;
|
|
1123
|
+
/** The fifth line of an address (if a fifth line is needed). */
|
|
1124
|
+
Addr5?: string;
|
|
1125
|
+
}
|
|
1126
|
+
export interface CompanyAddressForCustomer {
|
|
1127
|
+
/** The first line of an address. */
|
|
1128
|
+
Addr1?: string;
|
|
1129
|
+
/** The second line of an address (if a second line is needed). */
|
|
1130
|
+
Addr2?: string;
|
|
1131
|
+
/** The third line of an address (if a third line is needed). */
|
|
1132
|
+
Addr3?: string;
|
|
1133
|
+
/** The fourth line of an address (if a fourth line is needed). */
|
|
1134
|
+
Addr4?: string;
|
|
1135
|
+
/** The fifth line of an address (if a fifth line is needed). */
|
|
1136
|
+
Addr5?: string;
|
|
1137
|
+
/** The city name in an address. */
|
|
1138
|
+
City?: string;
|
|
1139
|
+
/** The state name in an address. */
|
|
1140
|
+
State?: string;
|
|
1141
|
+
/** The postal code in an address. */
|
|
1142
|
+
PostalCode?: string;
|
|
1143
|
+
/** The country name in an address, or, in returned Host information (`HostRet` or `HostInfo`), the country for which this edition of QuickBooks was designed. (Possible values are US, CA, UK, and AU.) */
|
|
1144
|
+
Country?: string;
|
|
1145
|
+
/** In a `BillAddress` or `ShipAddress` aggregate, the `Note` field value is written at the bottom of the address in the form in which it appears, such as the invoice form. */
|
|
1146
|
+
Note?: string;
|
|
1147
|
+
}
|
|
1148
|
+
export interface CompanyQueryRq {
|
|
1149
|
+
/** You use this if you want to limit the data that will be returned in the response. In this list, you specify the name of each top-level element or aggregate that you want to be returned in the response to the request. You cannot specify fields within an aggregate, for example, you cannot specify a `City` within an `Address`: you must specify `Address` and will get the entire address. The names specified in the list are not parsed, so you must be especially careful to supply valid names, properly cased. No error is returned in the status code if you specify an invalid name. Notice that if you want to return custom data or private data extensions, you must specify the `DataExtRet` element and you must supply the `OwnerID` set to either a value of 0 (custom data) or the GUID for the private data. */
|
|
1150
|
+
IncludeRetElement?: string[] | string;
|
|
1151
|
+
/** Zero or more `OwnerID` values. `OwnerID` refers to the owner of a data extension:If `OwnerID` is 0, this is a public data extension, also known as a custom field. Custom fields appear in the QuickBooks UI.If `OwnerID` is a GUID, for example `{6B063959-81B0-4622-85D6-F548C8CCB517}`, this field is a private data extension defined by an integrated application. Private data extensions do not appear in the QuickBooks UI. Note that `OwnerID` values are not case-sensitive, meaning that if you enter an `OwnerID` value with lower-case letters, the value will be saved and returned with upper-case letters. When you share a private data extension with another application, the other application must know both the `OwnerID` and the `DataExtName`, as these together form a data extension’s unique name. */
|
|
1152
|
+
OwnerID?: string[] | string;
|
|
1153
|
+
}
|
|
1154
|
+
export interface CompanyQueryRs {
|
|
1155
|
+
CompanyRet: CompanyRet[];
|
|
1156
|
+
}
|
|
1157
|
+
export interface CompanyRet {
|
|
1158
|
+
/** Indicates whether this company file is a QuickBooks “sample file.” */
|
|
1159
|
+
IsSampleCompany: boolean;
|
|
1160
|
+
/** The name of the QuickBooks user’s business, as specified in QuickBooks. `CompanyName` and `Address` are used on invoices, checks, and other forms. (`LegalCompanyName` and `LegalAddress`, on the other hand, are used on a company’s tax forms and pay stubs.) */
|
|
1161
|
+
CompanyName?: string;
|
|
1162
|
+
/** `LegalCompanyName` and `LegalAddress` are used on a company’s tax forms and pay stubs. (`CompanyName` and `Address`, on the other hand, are used on invoices, checks, and other forms.) */
|
|
1163
|
+
LegalCompanyName?: string;
|
|
1164
|
+
/** If an address request fails, some combination of address fields might be too long. In a Check, `BillPaymentCheck`, or `SalesTaxPaymentCheck` message, `Address` is the address that will print on the check. */
|
|
1165
|
+
Address?: Address;
|
|
1166
|
+
/** The address expressed as an address block of `Addr1` through `Addr5`, depending on the number of lines in the original request that created the address. */
|
|
1167
|
+
AddressBlock?: AddressBlock;
|
|
1168
|
+
/** `LegalAddress` and `LegalCompanyName` are used on a company’s tax forms and pay stubs. (Address and `CompanyName`, on the other hand, are used on invoices, checks, and other forms.) If an address request fails, some combination of address fields might be too long. */
|
|
1169
|
+
LegalAddress?: LegalAddress;
|
|
1170
|
+
/** The address where a QuickBooks company receives mail from its customers. If an address request fails, some combination of address fields might be too long. */
|
|
1171
|
+
CompanyAddressForCustomer?: CompanyAddressForCustomer;
|
|
1172
|
+
/** The company address for customers expressed as an address block of `Addr1` through `Addr5`. */
|
|
1173
|
+
CompanyAddressBlockForCustomer?: CompanyAddressBlockForCustomer;
|
|
1174
|
+
/** The telephone number. */
|
|
1175
|
+
Phone?: string;
|
|
1176
|
+
/** Fax number. */
|
|
1177
|
+
Fax?: string;
|
|
1178
|
+
/** E-mail address. */
|
|
1179
|
+
Email?: string;
|
|
1180
|
+
/** The company’s public Web address. */
|
|
1181
|
+
CompanyWebSite?: string;
|
|
1182
|
+
/** The first month in the 12-month period over which a company tracks its finances. The QuickBooks user sets this value. In QuickBooks, `FirstMonthFiscalYear` determines the default date range for some reports and graphs. */
|
|
1183
|
+
FirstMonthFiscalYear?: FirstMonthFiscalYear;
|
|
1184
|
+
/** In QuickBooks, `FirstMonthIncomeTaxYear` determines the default date range for income tax summary and detail reports. The QuickBooks user sets this value. */
|
|
1185
|
+
FirstMonthIncomeTaxYear?: FirstMonthIncomeTaxYear;
|
|
1186
|
+
/** The QuickBooks user selects a company type from a list when creating a company file. */
|
|
1187
|
+
CompanyType?: string;
|
|
1188
|
+
/** Employer Identification Number. */
|
|
1189
|
+
EIN?: string;
|
|
1190
|
+
/** Social security number. */
|
|
1191
|
+
SSN?: string;
|
|
1192
|
+
/** The tax form that the QuickBooks user expects to file for this company’s taxes. If a `TaxForm` value is assigned (that is, if it is not `OtherOrNone`), the QuickBooks user can associate each account with a tax form line. (An account’s tax form line information will show up in the response from an account query.) */
|
|
1193
|
+
TaxForm?: TaxForm;
|
|
1194
|
+
/** Information returned from a company query about the Intuit services that the company is currently subscribed to, for example, Intuit Payroll, QBMS, and so forth */
|
|
1195
|
+
SubscribedServices?: SubscribedServices;
|
|
1196
|
+
/** Aggregate containing information about accountant copy. An Accountant’s Copy is a version of your company file your accountant can use to make changes while the original company file continues to be used for most normal operations. The key part of the accountant copy “protocol” is the dividing date which defines the fiscal period within which the accountant will be working. Dividing date is key because there are enforced restrictions against certain types of operations on data that fall within the fiscal period the accountant is working on.continue to work. The restrictions are listed below: Transactions: You can work only on transactions dated after the dividing date. Accounts: You can add a new account, but you cannot add a new subaccount to an existing account. Existing accounts: You cannot edit, merge, or make an existing account inactive. New accounts: You can edit an account or make any account inactive that you created while your accountant has the Accountant’s Copy. Lists (other than Chart of Accounts): You can edit, sort, and make list items inactive. You cannot delete or merge list items. Reconciling:You can reconcile your accounts while your accountant has an Accountant’s Copy. All reconciliations that include transactions in the current period (after the dividing date) are saved and will not be undone.To prevent conflicts with your accountant’s changes, reconciliations that include transactions dated on or before the dividing date will be undone when you import your accountant’s changes. If your accountant has reconciled or undone a reconciliation for any period, any reconciliations you did will be undone when you import your accountant’s changes. */
|
|
1197
|
+
AccountantCopy?: AccountantCopy;
|
|
1198
|
+
/** A list of `IDataExtRet` objects, each of which represents a field that has been added to QuickBooks as a data extension. */
|
|
1199
|
+
DataExtRet?: DataExtRet | DataExtRet[];
|
|
1200
|
+
}
|
|
1108
1201
|
export interface Contacts {
|
|
1109
1202
|
/** A formal reference, such as Mr. or Dr., that precedes a name. */
|
|
1110
1203
|
Salutation?: string;
|
|
@@ -1586,8 +1679,8 @@ export interface DataExtRet {
|
|
|
1586
1679
|
/** The data in this field. The maximum length of `DataExtValue` will depend on the `DataExtType` of this data extension. For example, if `DataExtType` is `STR255TYPE`, the maximum length of `DataExtValue` is 255 characters. If `DataExtType` is `STR1024TYPE`, the maximum size of `DataExtValue` is `1KB`. */
|
|
1587
1680
|
DataExtValue: string;
|
|
1588
1681
|
}
|
|
1589
|
-
export
|
|
1590
|
-
export
|
|
1682
|
+
export type DataExtType = "AMTTYPE" | "DATETIMETYPE" | "INTTYPE" | "PERCENTTYPE" | "PRICETYPE" | "QUANTYPE" | "STR255TYPE" | "STR1024TYPE";
|
|
1683
|
+
export type DateMacro = "All" | "LastCalendarQuarter" | "LastCalendarQuarterToDate" | "LastCalendarYear" | "LastCalendarYearToDate" | "LastFiscalQuarter" | "LastFiscalQuarterToDate" | "LastFiscalYear" | "LastFiscalYearToDate" | "LastMonth" | "LastMonthToDate" | "LastWeek" | "LastWeekToDate" | "NextCalendarQuarter" | "NextCalendarYear" | "NextFiscalQuarter" | "NextFiscalYear" | "NextFourWeeks" | "NextMonth" | "NextWeek" | "ThisCalendarQuarter" | "ThisCalendarQuarterToDate" | "ThisCalendarYear" | "ThisCalendarYearToDate" | "ThisFiscalQuarter" | "ThisFiscalQuarterToDate" | "ThisFiscalYear" | "ThisFiscalYearToDate" | "ThisMonth" | "ThisMonthToDate" | "ThisWeek" | "ThisWeekToDate" | "Today" | "Yesterday";
|
|
1591
1684
|
export interface DepositAdd {
|
|
1592
1685
|
/** The date of the transaction. In some cases, if you leave `TxnDate` out of an -Add message, QuickBooks will prefill `TxnDate` with the date of the last-saved transaction of the same type. */
|
|
1593
1686
|
TxnDate?: string;
|
|
@@ -1787,7 +1880,7 @@ export interface DepositToAccountRef {
|
|
|
1787
1880
|
/** `FullName` (along with `ListID`) is a way to identify a list object. The `FullName` is the name prefixed by the names of each ancestor, for example `Jones:Kitchen:Cabinets`. `FullName` values are not case-sensitive. */
|
|
1788
1881
|
FullName?: string;
|
|
1789
1882
|
}
|
|
1790
|
-
export
|
|
1883
|
+
export type Disabled = "No" | "Yes";
|
|
1791
1884
|
export interface DiscountAccountRef {
|
|
1792
1885
|
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
1793
1886
|
ListID?: string;
|
|
@@ -2198,7 +2291,7 @@ export interface EmployeeRet {
|
|
|
2198
2291
|
DataExtRet?: DataExtRet | DataExtRet[];
|
|
2199
2292
|
}
|
|
2200
2293
|
/** @default: Regular */
|
|
2201
|
-
export
|
|
2294
|
+
export type EmployeeType = "Officer" | "Owner" | "Regular" | "Statutory";
|
|
2202
2295
|
export interface EntityFilter {
|
|
2203
2296
|
/** One or more `ListID` values. Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`.
|
|
2204
2297
|
|
|
@@ -2239,8 +2332,8 @@ export interface ErrorRecovery {
|
|
|
2239
2332
|
/** Allows for the attachment of a user defined GUID value. */
|
|
2240
2333
|
ExternalGUID?: string;
|
|
2241
2334
|
}
|
|
2242
|
-
export
|
|
2243
|
-
export
|
|
2335
|
+
export type Ethnicity = "AmericianIndian" | "Asian" | "Black" | "Hawaiian" | "Hispanic" | "TwoOrMoreRaces" | "White";
|
|
2336
|
+
export type Exempt = "Exempt" | "NonExempt";
|
|
2244
2337
|
export interface ExpenseAccountRef {
|
|
2245
2338
|
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
2246
2339
|
ListID?: string;
|
|
@@ -2399,7 +2492,9 @@ export interface ExpenseLineRet {
|
|
|
2399
2492
|
/** A list of `IDataExtRet` objects, each of which represents a field that has been added to QuickBooks as a data extension. */
|
|
2400
2493
|
DataExtRet?: DataExtRet | DataExtRet[];
|
|
2401
2494
|
}
|
|
2402
|
-
export
|
|
2495
|
+
export type FirstMonthFiscalYear = "April" | "August" | "December" | "February" | "January" | "July" | "June" | "March" | "May" | "November" | "October" | "September";
|
|
2496
|
+
export type FirstMonthIncomeTaxYear = "April" | "August" | "December" | "February" | "January" | "July" | "June" | "March" | "May" | "November" | "October" | "September";
|
|
2497
|
+
export type Gender = "Female" | "Male";
|
|
2403
2498
|
export interface IncomeAccountRef {
|
|
2404
2499
|
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
2405
2500
|
ListID?: string;
|
|
@@ -2788,7 +2883,7 @@ export interface ItemServiceRet {
|
|
|
2788
2883
|
DataExtRet?: DataExtRet | DataExtRet[];
|
|
2789
2884
|
}
|
|
2790
2885
|
/** @default: None */
|
|
2791
|
-
export
|
|
2886
|
+
export type JobStatus = "Awarded" | "Closed" | "InProgress" | "None" | "NotAwarded" | "Pending";
|
|
2792
2887
|
export interface JobTypeRef {
|
|
2793
2888
|
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
2794
2889
|
ListID?: string;
|
|
@@ -2978,8 +3073,30 @@ export interface JournalLineMod {
|
|
|
2978
3073
|
/** The billing status of this item line or expense line. */
|
|
2979
3074
|
BillableStatus?: BillableStatus;
|
|
2980
3075
|
}
|
|
2981
|
-
export
|
|
2982
|
-
export
|
|
3076
|
+
export type JournalLineType = "Credit" | "Debit";
|
|
3077
|
+
export type KeyEmployee = "No" | "Yes";
|
|
3078
|
+
export interface LegalAddress {
|
|
3079
|
+
/** The first line of an address. */
|
|
3080
|
+
Addr1?: string;
|
|
3081
|
+
/** The second line of an address (if a second line is needed). */
|
|
3082
|
+
Addr2?: string;
|
|
3083
|
+
/** The third line of an address (if a third line is needed). */
|
|
3084
|
+
Addr3?: string;
|
|
3085
|
+
/** The fourth line of an address (if a fourth line is needed). */
|
|
3086
|
+
Addr4?: string;
|
|
3087
|
+
/** The fifth line of an address (if a fifth line is needed). */
|
|
3088
|
+
Addr5?: string;
|
|
3089
|
+
/** The city name in an address. */
|
|
3090
|
+
City?: string;
|
|
3091
|
+
/** The state name in an address. */
|
|
3092
|
+
State?: string;
|
|
3093
|
+
/** The postal code in an address. */
|
|
3094
|
+
PostalCode?: string;
|
|
3095
|
+
/** The country name in an address, or, in returned Host information (`HostRet` or `HostInfo`), the country for which this edition of QuickBooks was designed. (Possible values are US, CA, UK, and AU.) */
|
|
3096
|
+
Country?: string;
|
|
3097
|
+
/** In a `BillAddress` or `ShipAddress` aggregate, the `Note` field value is written at the bottom of the address in the form in which it appears, such as the invoice form. */
|
|
3098
|
+
Note?: string;
|
|
3099
|
+
}
|
|
2983
3100
|
export interface LinkedTxn {
|
|
2984
3101
|
/** QuickBooks generates a unique `TxnID` for each transaction that is added to QuickBooks. A `TxnID` returned from a request can be used to refer to the transaction in subsequent requests.
|
|
2985
3102
|
|
|
@@ -3010,9 +3127,9 @@ export interface LinkToTxn {
|
|
|
3010
3127
|
If you need to add a new transaction line in a transaction Mod request, you can do so by setting the `TxnLineID` to -1. */
|
|
3011
3128
|
TxnLineID: string;
|
|
3012
3129
|
}
|
|
3013
|
-
export
|
|
3014
|
-
export
|
|
3015
|
-
export
|
|
3130
|
+
export type LinkType = "AMTTYPE" | "QUANTYPE";
|
|
3131
|
+
export type MatchCriterion = "Contains" | "EndsWith" | "StartsWith";
|
|
3132
|
+
export type MilitaryStatus = "Active" | "Reserve";
|
|
3016
3133
|
export interface ModifiedDateRangeFilter {
|
|
3017
3134
|
/** Selects objects modified on or after this date. See the note below regarding QBFC usage.
|
|
3018
3135
|
|
|
@@ -3043,8 +3160,8 @@ export interface NameRangeFilter {
|
|
|
3043
3160
|
/** The final name or item in the search range. If `ToName` is omitted, the range will end with last name on the list. */
|
|
3044
3161
|
ToName?: string;
|
|
3045
3162
|
}
|
|
3046
|
-
export
|
|
3047
|
-
export
|
|
3163
|
+
export type OnFile = "No" | "Yes";
|
|
3164
|
+
export type Operator = "Equal" | "GreaterThan" | "GreaterThanEqual" | "LessThan" | "LessThanEqual";
|
|
3048
3165
|
export interface OverrideClassRef {
|
|
3049
3166
|
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
3050
3167
|
ListID?: string;
|
|
@@ -3064,14 +3181,14 @@ export interface OverrideUOMSetRef {
|
|
|
3064
3181
|
FullName?: string;
|
|
3065
3182
|
}
|
|
3066
3183
|
/** @default: All */
|
|
3067
|
-
export
|
|
3184
|
+
export type PaidStatus = "All" | "NotPaidOnly" | "PaidOnly";
|
|
3068
3185
|
export interface ParentRef {
|
|
3069
3186
|
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
3070
3187
|
ListID?: string;
|
|
3071
3188
|
/** `FullName` (along with `ListID`) is a way to identify a list object. The `FullName` is the name prefixed by the names of each ancestor, for example `Jones:Kitchen:Cabinets`. `FullName` values are not case-sensitive. */
|
|
3072
3189
|
FullName?: string;
|
|
3073
3190
|
}
|
|
3074
|
-
export
|
|
3191
|
+
export type PartOrFullTime = "FullTime" | "PartTime";
|
|
3075
3192
|
export interface PayeeEntityRef {
|
|
3076
3193
|
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
3077
3194
|
ListID?: string;
|
|
@@ -3084,7 +3201,7 @@ export interface PaymentMethodRef {
|
|
|
3084
3201
|
/** `FullName` (along with `ListID`) is a way to identify a list object. The `FullName` is the name prefixed by the names of each ancestor, for example `Jones:Kitchen:Cabinets`. `FullName` values are not case-sensitive. */
|
|
3085
3202
|
FullName?: string;
|
|
3086
3203
|
}
|
|
3087
|
-
export
|
|
3204
|
+
export type PayPeriod = "Biweekly" | "Daily" | "Monthly" | "Quarterly" | "Semimonthly" | "Weekly" | "Yearly";
|
|
3088
3205
|
export interface PayrollItemWageRef {
|
|
3089
3206
|
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
3090
3207
|
ListID?: string;
|
|
@@ -3092,7 +3209,7 @@ export interface PayrollItemWageRef {
|
|
|
3092
3209
|
FullName?: string;
|
|
3093
3210
|
}
|
|
3094
3211
|
/** @default: None */
|
|
3095
|
-
export
|
|
3212
|
+
export type PreferredDeliveryMethod = "Email" | "Fax" | "None";
|
|
3096
3213
|
export interface PreferredPaymentMethodRef {
|
|
3097
3214
|
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
3098
3215
|
ListID?: string;
|
|
@@ -3147,9 +3264,9 @@ export interface RefNumberRangeFilter {
|
|
|
3147
3264
|
/** The final `RefNumber` in the search range. If `ToRefNumber` is omitted, the range will end with last number on the list. */
|
|
3148
3265
|
ToRefNumber?: string;
|
|
3149
3266
|
}
|
|
3150
|
-
export
|
|
3267
|
+
export type Relation = "Brother" | "Daughter" | "Father" | "Friend" | "Mother" | "Other" | "Partner" | "Sister" | "Son" | "Spouse";
|
|
3151
3268
|
/** @default: Quarterly */
|
|
3152
|
-
export
|
|
3269
|
+
export type ReportingPeriod = "Monthly" | "Quarterly";
|
|
3153
3270
|
export interface SalesAndPurchase {
|
|
3154
3271
|
/** Appears in the `Description` column of a sales form when the QuickBooks user sells this item. For a fixed asset, describes the sale of the asset (for accounting purposes). */
|
|
3155
3272
|
SalesDesc?: string;
|
|
@@ -3225,7 +3342,7 @@ export interface SalesTaxCodeRef {
|
|
|
3225
3342
|
FullName?: string;
|
|
3226
3343
|
}
|
|
3227
3344
|
/** @default: Canada */
|
|
3228
|
-
export
|
|
3345
|
+
export type SalesTaxCountry = "Australia" | "Canada" | "UK" | "US";
|
|
3229
3346
|
export interface SalesTaxReturnRef {
|
|
3230
3347
|
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
3231
3348
|
ListID?: string;
|
|
@@ -3240,6 +3357,15 @@ export interface SecondaryContact {
|
|
|
3240
3357
|
/** Relationship of emergency contact information to the employee. */
|
|
3241
3358
|
Relation?: Relation;
|
|
3242
3359
|
}
|
|
3360
|
+
export interface Service {
|
|
3361
|
+
/** The case-insensitive name of a list object, not including the names of its ancestors. `Name` must be unique, unless it is the `Name` of a “hierarchical” list object. List objects in different hierarchies can have duplicate names because their `FullNames` will still be unique. For example, two objects could both have the `Name` kitchen, but they could have unique `FullNames`, such as Job12:kitchen and Baker:kitchen. For built-in currencies, `Name` is the internationally accepted currency name and is not editable. */
|
|
3362
|
+
Name: string;
|
|
3363
|
+
/** Indicates the provider of the subscribed service, for example, Intuit. */
|
|
3364
|
+
Domain: string;
|
|
3365
|
+
/** The status of the Intuit services that the company is or has been subscribed to, for example, Intuit Payroll, QBMS. */
|
|
3366
|
+
ServiceStatus: ServiceStatus;
|
|
3367
|
+
}
|
|
3368
|
+
export type ServiceStatus = "Active" | "Expired" | "Never" | "Pending" | "Suspended" | "Terminated" | "Trial";
|
|
3243
3369
|
export interface SetCredit {
|
|
3244
3370
|
/** The ID of the credit memo that you are applying to this invoice or bill. */
|
|
3245
3371
|
CreditTxnID: string;
|
|
@@ -3324,13 +3450,18 @@ export interface SickHours {
|
|
|
3324
3450
|
/** When used in the `SickHours` or `VacationHours` aggregates, refers to the date on which sick leave or vacation hours in the current year began to accrue. */
|
|
3325
3451
|
AccrualStartDate?: string;
|
|
3326
3452
|
}
|
|
3327
|
-
export
|
|
3453
|
+
export type SpecialAccountType = "AccountsPayable" | "AccountsReceivable" | "CondenseItemAdjustmentExpenses" | "CostOfGoodsSold" | "DirectDepositLiabilities" | "Estimates" | "ExchangeGainLoss" | "InventoryAssets" | "ItemReceiptAccount" | "OpeningBalanceEquity" | "PayrollExpenses" | "PayrollLiabilities" | "PettyCash" | "PurchaseOrders" | "ReconciliationDifferences" | "RetainedEarnings" | "SalesOrders" | "SalesTaxPayable" | "UncategorizedExpenses" | "UncategorizedIncome" | "UndepositedFunds";
|
|
3454
|
+
export interface SubscribedServices {
|
|
3455
|
+
/** The list of the Intuit services that the company is or has been subscribed to, for example, Intuit Payroll, QBMS. */
|
|
3456
|
+
Service?: Service | Service[];
|
|
3457
|
+
}
|
|
3328
3458
|
export interface SupervisorRef {
|
|
3329
3459
|
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
3330
3460
|
ListID?: string;
|
|
3331
3461
|
/** `FullName` (along with `ListID`) is a way to identify a list object. The `FullName` is the name prefixed by the names of each ancestor, for example `Jones:Kitchen:Cabinets`. `FullName` values are not case-sensitive. */
|
|
3332
3462
|
FullName?: string;
|
|
3333
3463
|
}
|
|
3464
|
+
export type TaxForm = "Form990" | "Form990PF" | "Form990T" | "Form1040" | "Form1065" | "Form1120" | "Form1120S" | "OtherOrNone";
|
|
3334
3465
|
export interface TaxLineInfoRet {
|
|
3335
3466
|
/** An internal representation of the tax line associated with this account. */
|
|
3336
3467
|
TaxLineID: number;
|
|
@@ -3502,16 +3633,16 @@ export interface TxnDateRangeFilter {
|
|
|
3502
3633
|
The list given when you click `IQBENDateMacroType` shows the complete list of valid version 3.0 values. */
|
|
3503
3634
|
DateMacro?: DateMacro;
|
|
3504
3635
|
}
|
|
3505
|
-
export
|
|
3636
|
+
export type TxnType = "ARRefundCreditCard" | "Bill" | "BillPaymentCheck" | "BillPaymentCreditCard" | "BuildAssembly" | "Charge" | "Check" | "CreditCardCharge" | "CreditCardCredit" | "CreditMemo" | "Deposit" | "Estimate" | "InventoryAdjustment" | "Invoice" | "ItemReceipt" | "JournalEntry" | "LiabilityAdjustment" | "Paycheck" | "PayrollLiabilityCheck" | "PurchaseOrder" | "ReceivePayment" | "SalesOrder" | "SalesReceipt" | "SalesTaxPaymentCheck" | "Transfer" | "VendorCredit" | "YTDAdjustment";
|
|
3506
3637
|
export interface UnitOfMeasureSetRef {
|
|
3507
3638
|
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
3508
3639
|
ListID?: string;
|
|
3509
3640
|
/** `FullName` (along with `ListID`) is a way to identify a list object. The `FullName` is the name prefixed by the names of each ancestor, for example `Jones:Kitchen:Cabinets`. `FullName` values are not case-sensitive. */
|
|
3510
3641
|
FullName?: string;
|
|
3511
3642
|
}
|
|
3512
|
-
export
|
|
3513
|
-
export
|
|
3514
|
-
export
|
|
3643
|
+
export type USCitizen = "No" | "Yes";
|
|
3644
|
+
export type UseTimeDataToCreatePaychecks = "DoNotUseTimeData" | "NotSet" | "UseTimeData";
|
|
3645
|
+
export type USVeteran = "No" | "Yes";
|
|
3515
3646
|
export interface VacationHours {
|
|
3516
3647
|
/** The total number of hours currently available for the employee to use. If this value is empty, it will default to 0. */
|
|
3517
3648
|
HoursAvailable?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const CONDUCTOR_TEST_API_KEY = "063d95bc-a6f7-4b4b-841d-8007648a3112";
|
|
2
|
+
export declare const CONDUCTOR_TEST_QBD_CONNECTION_ID = "49ee2e46-ec5a-40a0-8c37-43913994b2a9";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
3
|
+
exports.CONDUCTOR_TEST_QBD_CONNECTION_ID = exports.CONDUCTOR_TEST_API_KEY = void 0;
|
|
4
|
+
exports.CONDUCTOR_TEST_API_KEY = "063d95bc-a6f7-4b4b-841d-8007648a3112";
|
|
5
|
+
exports.CONDUCTOR_TEST_QBD_CONNECTION_ID = "49ee2e46-ec5a-40a0-8c37-43913994b2a9";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-node",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "Easily integrate with the entire QuickBooks Desktop API with fully-typed async TypeScript",
|
|
5
5
|
"author": "Danny Nemer <hi@DannyNemer.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"postpack": "rm -rf dist",
|
|
18
18
|
"clean": "rm -rf dist package conductor-node-*.tgz tsconfig.tsbuildinfo",
|
|
19
19
|
"gen:graphql-types": "yarn graphql-codegen --config ./src/graphql/codegenConfig.ts",
|
|
20
|
-
"
|
|
20
|
+
"status": "yarn ts-node ./bin/logConnectionStatuses.ts"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=16"
|