conductor-node 11.0.3 → 11.0.5
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 +10 -271
- package/dist/package.json +1 -1
- package/dist/src/Client.d.ts +3 -3
- package/dist/src/Client.js +7 -4
- package/dist/src/integrations/BaseIntegration.js +1 -1
- package/dist/src/interceptors/errorHandling.js +7 -2
- package/dist/src/interceptors/logging.js +3 -1
- package/dist/src/resources/AuthSessionsResource.d.ts +52 -0
- package/dist/src/resources/{IntegrationConnectionAuthSessionsResource.js → AuthSessionsResource.js} +7 -7
- package/dist/src/resources/EndUsersResource.d.ts +10 -7
- package/dist/src/resources/EndUsersResource.js +7 -7
- package/dist/src/resources/IntegrationConnectionsResource.d.ts +4 -8
- package/dist/src/resources/IntegrationConnectionsResource.js +3 -9
- package/dist/src/utils/checkForUpdates.js +3 -0
- package/dist/src/utils/error.d.ts +7 -2
- package/dist/src/utils/error.js +10 -2
- package/dist/src/utils/http.d.ts +1 -1
- package/dist/src/utils/http.js +8 -6
- package/package.json +1 -1
- package/dist/src/resources/IntegrationConnectionAuthSessionsResource.d.ts +0 -50
package/README.md
CHANGED
|
@@ -1,28 +1,9 @@
|
|
|
1
1
|
# [Conductor](https://conductor.is/) - The best QuickBooks Desktop integration on the planet
|
|
2
2
|
|
|
3
|
-
Execute _any_ read or write
|
|
3
|
+
Execute _any_ read or write QuickBooks Desktop API through async TypeScript and receive a fully-typed response.
|
|
4
4
|
|
|
5
5
|
<!-- markdownlint-disable MD033 -->
|
|
6
|
-
<img src="https://user-images.githubusercontent.com/170023/213273732-83dd6881-0b36-4787-820b-bd55cdc8444f.jpg" alt="
|
|
7
|
-
|
|
8
|
-
## Table of Contents
|
|
9
|
-
|
|
10
|
-
1. [Requirements](#requirements)
|
|
11
|
-
2. [Installation](#installation)
|
|
12
|
-
3. [Usage](#usage)
|
|
13
|
-
4. [APIs](#apis)
|
|
14
|
-
5. [TypeScript](#typescript)
|
|
15
|
-
6. [Error Handling](#error-handling)
|
|
16
|
-
|
|
17
|
-
## Requirements
|
|
18
|
-
|
|
19
|
-
1. A Conductor API key. Please visit [our website](https://conductor.is/) to join the private beta.
|
|
20
|
-
|
|
21
|
-
## Installation
|
|
22
|
-
|
|
23
|
-
```sh
|
|
24
|
-
yarn add conductor-node
|
|
25
|
-
```
|
|
6
|
+
<img src="https://user-images.githubusercontent.com/170023/213273732-83dd6881-0b36-4787-820b-bd55cdc8444f.jpg" alt="QuickBooks Desktop autocomplete" width="600"/>
|
|
26
7
|
|
|
27
8
|
## Usage
|
|
28
9
|
|
|
@@ -30,12 +11,12 @@ yarn add conductor-node
|
|
|
30
11
|
import Conductor from "conductor-node";
|
|
31
12
|
|
|
32
13
|
// Instantiate `Conductor` with your account's secret key.
|
|
33
|
-
const conductor = new Conductor("
|
|
14
|
+
const conductor = new Conductor("{{YOUR_SECRET_KEY}}");
|
|
34
15
|
|
|
35
|
-
// Fetch all authorized
|
|
16
|
+
// Fetch all authorized EndUsers.
|
|
36
17
|
const endUsers = await conductor.endUsers.list();
|
|
37
18
|
|
|
38
|
-
// Execute any QBD API against your
|
|
19
|
+
// Execute any QBD API against your EndUser.
|
|
39
20
|
const newAccount = await conductor.qbd.account.add(endUsers[0].id, {
|
|
40
21
|
Name: "Test Account",
|
|
41
22
|
AccountType: "Bank",
|
|
@@ -43,251 +24,9 @@ const newAccount = await conductor.qbd.account.add(endUsers[0].id, {
|
|
|
43
24
|
});
|
|
44
25
|
```
|
|
45
26
|
|
|
46
|
-
##
|
|
47
|
-
|
|
48
|
-
### `qbd.*`
|
|
49
|
-
|
|
50
|
-
Executes any QuickBooks Desktop (QBD) API against the specified end-user. See the official [QuickBooks Desktop API Reference](https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop) for a complete list of available APIs.
|
|
51
|
-
|
|
52
|
-
```ts
|
|
53
|
-
const qbdAccount = await conductor.qbd.account.add(endUserId, {
|
|
54
|
-
Name: "Test Account",
|
|
55
|
-
AccountType: "Bank",
|
|
56
|
-
OpenBalance: "100",
|
|
57
|
-
});
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### `endUsers.create(input: EndUserCreateInput)`
|
|
61
|
-
|
|
62
|
-
Creates a new end-user.
|
|
63
|
-
|
|
64
|
-
```ts
|
|
65
|
-
const newEndUser = await conductor.endUsers.create({
|
|
66
|
-
// Your end-user's unique ID in *your* database. Must be
|
|
67
|
-
// distinct from your other end-users.
|
|
68
|
-
sourceId: "1234-abcd",
|
|
69
|
-
// Your end-user's email address.
|
|
70
|
-
email: "danny@constructionco.com",
|
|
71
|
-
// Your end-user's company name shown elsewhere in Conductor.
|
|
72
|
-
name: "Construction Corp",
|
|
73
|
-
});
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
The response looks like the following:
|
|
77
|
-
|
|
78
|
-
```ts
|
|
79
|
-
{
|
|
80
|
-
// ❗ Save this `id` to your database for executing requests to this
|
|
81
|
-
// end-user's integration(s) in the future.
|
|
82
|
-
id: 'end_usr_1234abcd',
|
|
83
|
-
sourceId: "1234-abcd",
|
|
84
|
-
email: 'danny@construction.com',
|
|
85
|
-
name: 'Construction Corp',
|
|
86
|
-
}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### `endUsers.list()`
|
|
90
|
-
|
|
91
|
-
Returns a list of all end-users associated with your Conductor account.
|
|
92
|
-
|
|
93
|
-
```ts
|
|
94
|
-
const endUsers = await conductor.endUsers.list();
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### `endUsers.retrieve(id: string)`
|
|
98
|
-
|
|
99
|
-
Retrieves the specified end-User.
|
|
100
|
-
|
|
101
|
-
```ts
|
|
102
|
-
const endUser = await conductor.endUsers.retrieve(endUserId);
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### `endUsers.ping(id: string, integrationSlug: string)`
|
|
106
|
-
|
|
107
|
-
Checks whether the specified integration-connection can connect and process requests end-to-end.
|
|
108
|
-
|
|
109
|
-
If the connection fails, the error we encountered will be thrown as a [`ConductorError`](#error-handling) (like any request). This information is useful for showing a "connection status" indicator in your app. If an error occurs, we strongly recommend displaying the property `error.userFacingMessage` to your end-user in your app's UI.
|
|
110
|
-
|
|
111
|
-
Using `async`/`await`:
|
|
112
|
-
|
|
113
|
-
```ts
|
|
114
|
-
try {
|
|
115
|
-
await conductor.endUsers.ping(endUserId, "quickbooks-desktop");
|
|
116
|
-
} catch (error) {
|
|
117
|
-
if (error instanceof ConductorError) {
|
|
118
|
-
// Update your app's UI to display `error.userFacingMessage`.
|
|
119
|
-
}
|
|
120
|
-
// ...
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
Or in the form of a rejected promise:
|
|
125
|
-
|
|
126
|
-
```ts
|
|
127
|
-
conductor.endUsers.ping(endUserId, "quickbooks-desktop").catch((error) => {
|
|
128
|
-
if (error instanceof ConductorError) {
|
|
129
|
-
// Update your app's UI to display `error.userFacingMessage`.
|
|
130
|
-
}
|
|
131
|
-
// ...
|
|
132
|
-
});
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
## TypeScript
|
|
136
|
-
|
|
137
|
-
Access the entire QuickBooks Desktop API through TypeScript. The `qbd.*` APIs are fully typed with inline documentation and will autocomplete in your editor.
|
|
138
|
-
|
|
139
|
-
To access the QBD types directly, import them from `conductor-node` like so:
|
|
140
|
-
|
|
141
|
-
```ts
|
|
142
|
-
import { QbdTypes } from "conductor-node";
|
|
143
|
-
|
|
144
|
-
const accountAddInput: QbdTypes.AccountAdd = {
|
|
145
|
-
Name: "Test Account",
|
|
146
|
-
AccountType: "Bank",
|
|
147
|
-
OpenBalance: "100",
|
|
148
|
-
};
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## Error Handling
|
|
152
|
-
|
|
153
|
-
### `ConductorError`
|
|
154
|
-
|
|
155
|
-
All errors thrown by the Conductor API are instances of `ConductorError` or its subclasses. These errors have the following properties:
|
|
156
|
-
|
|
157
|
-
| Property | Type | Description |
|
|
158
|
-
| ------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
159
|
-
| `message` | `string` | The developer error message for your logs. |
|
|
160
|
-
| `userFacingMessage` | `string` | The user-friendly error message, written specifically for displaying to your end-users in your app's UI.<br><br>This value exists for _every_ error. E.g., for a QBD connection error, it might recommend the end-user to check that their QuickBooks Desktop is open and that they're logged in. But if a Conductor API key is expired, e.g., this message will just say "An internal server error occurred. Please try again later.". |
|
|
161
|
-
| `type` | `string` | Categorizes the error. See [Error Types](#error-types) below.<br><br>This value is the same as the subclass name. E.g., `"ConductorIntegrationError"` or `"ConductorInvalidRequestError"`. |
|
|
162
|
-
| `code` | `string` | The unique error code from Conductor, which is useful for adding special handling for specific errors. E.g., `"RESOURCE_MISSING"`, `"API_KEY_INVALID"`, or `"QBD_REQUEST_ERROR"`.<br><br>In contrast, `type` is more general and categorizes the error. |
|
|
163
|
-
| `httpStatusCode` | `number` or `undefined` | The HTTP status code of the response that included the error. |
|
|
164
|
-
| `integrationCode` | `string` or `undefined` | The unique error code supplied by the third-party integration for errors returned by the integration (i.e., `ConductorIntegrationError`) or integration connector (i.e., `ConductorIntegrationConnectorError`). This is useful for adding special handling for specific errors from the third-party integration or connector.<br><br>The integration's corresponding error message for this code is in `error.message`.<br><br>The third-party integrations' error codes are not standardized, so you should not rely on this code to be the same across integrations. |
|
|
165
|
-
| `requestId` | `string` or `undefined` | The unique identifier for the request that caused the error.<br><br>If you need to contact us about a specific request, providing the request identifier will ensure the fastest possible resolution. |
|
|
166
|
-
| `headers` | `object` or `undefined` | The headers of the response that included the error. |
|
|
167
|
-
|
|
168
|
-
### Error Types
|
|
169
|
-
|
|
170
|
-
The error object you receive will have one of the following error types:
|
|
171
|
-
|
|
172
|
-
| Name | Description |
|
|
173
|
-
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
174
|
-
| `ConductorIntegrationError` | Raised when the third-party integration encounters an error while processing the end-user's request. This often results from an issue with the request or data handling that requires your attention to resolve.<br><br>E.g., a `ListID` you provided was not found in QuickBooks Desktop, or an accounting value you supplied did not adhere to the integration's accounting rules.<br><br>Refer to `error.integrationCode` for the error code returned by the integration, if available. |
|
|
175
|
-
| `ConductorIntegrationConnectionError` | Raised when a connection error occurs with the third-party integration on the end-user's side. This typically indicates an issue with the end-user's integration-connection or configuration, which they must resolve. In other words, you cannot take action to fix these errors.<br><br>E.g., QuickBooks Web Connector (QBWC) failed to connect to QuickBooks Desktop on the end-user's computer.<br><br>Refer to `error.integrationCode` for the error code returned by the integration connector, if available.<br><br>❗ We recommend _not_ triggering alerts for these errors because only the end-user can fix them. See [Global Error Handling](#global-error-handling) for an example of this. |
|
|
176
|
-
| `ConductorInvalidRequestError` | Raised when you make an API call with the wrong parameters, in the wrong state, or in an invalid way. |
|
|
177
|
-
| `ConductorAuthenticationError` | Raised when Conductor cannot authenticate you with the credentials you provided. E.g., an incorrect API key. |
|
|
178
|
-
| `ConductorPermissionError` | Raised when you attempt to access a resource that is not allowed. |
|
|
179
|
-
| `ConductorConnectionError` | Raised when there was a network problem between the client (on your server) and Conductor's servers. E.g., a downed network or a bad TLS certificate. |
|
|
180
|
-
| `ConductorInternalError` | Raised when something went wrong on Conductor's end. (These are rare.) |
|
|
181
|
-
|
|
182
|
-
### Specific Error Handling
|
|
183
|
-
|
|
184
|
-
If you need special handling for specific errors, you can wrap individual API calls, as shown below.
|
|
185
|
-
|
|
186
|
-
Using `async`/`await`:
|
|
187
|
-
|
|
188
|
-
```ts
|
|
189
|
-
try {
|
|
190
|
-
const newAccount = await conductor.qbd.account.add(endUserId, {
|
|
191
|
-
Name: "Test Account",
|
|
192
|
-
AccountType: "Bank",
|
|
193
|
-
OpenBalance: "100",
|
|
194
|
-
});
|
|
195
|
-
} catch (error) {
|
|
196
|
-
if (error instanceof ConductorError) {
|
|
197
|
-
// Check `error.code`, `error.integrationCode`, etc., for special handling.
|
|
198
|
-
} else {
|
|
199
|
-
// ...
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
Or in the form of a rejected promise:
|
|
205
|
-
|
|
206
|
-
```ts
|
|
207
|
-
conductor.qbd.account
|
|
208
|
-
.add(endUserId, {
|
|
209
|
-
Name: "Test Account",
|
|
210
|
-
AccountType: "Bank",
|
|
211
|
-
OpenBalance: "100",
|
|
212
|
-
})
|
|
213
|
-
.then((newAccount) => {
|
|
214
|
-
// ...
|
|
215
|
-
})
|
|
216
|
-
.catch((error) => {
|
|
217
|
-
if (error instanceof ConductorError) {
|
|
218
|
-
// Check `error.code`, `error.integrationCode`, etc., for special handling.
|
|
219
|
-
} else {
|
|
220
|
-
// ...
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
### Global Error Handling
|
|
226
|
-
|
|
227
|
-
It is unnecessary to wrap each API call individually, as demonstrated in the examples above. Instead, we suggest implementing a Global error handler for your server, such as [`app.use((error, ...) => { ... })` in Express](https://expressjs.com/en/guide/error-handling.html#writing-error-handlers) or [`formatError` in Apollo Server](https://apollographql.com/docs/apollo-server/data/errors/#for-client-responses). Within this handler, perform the following actions:
|
|
228
|
-
|
|
229
|
-
1. For any `ConductorError` instance, display the `error.userFacingMessage` property to the end-user in your app's UI while logging the complete error object.
|
|
230
|
-
2. For all `ConductorError` instances, transmit the full error object to your error-tracking service (e.g., Sentry):
|
|
231
|
-
- Send a **warning** for instances of `ConductorIntegrationConnectionError`, which are not actionable by you and can only be resolved by the end-user; for example, failure to connect to QuickBooks Desktop on the end-user's computer.
|
|
232
|
-
- Send an **error** for all other `ConductorError` instances, such as an invalid API key.
|
|
233
|
-
|
|
234
|
-
For example, using an [Express error handler](https://expressjs.com/en/guide/error-handling.html#writing-error-handlers):
|
|
235
|
-
|
|
236
|
-
```ts
|
|
237
|
-
import * as Sentry from "@sentry/node";
|
|
238
|
-
import {
|
|
239
|
-
ConductorError,
|
|
240
|
-
ConductorIntegrationConnectionError,
|
|
241
|
-
} from "conductor-node";
|
|
242
|
-
// ...
|
|
243
|
-
app.use((error, req, res, next) => {
|
|
244
|
-
if (error instanceof ConductorError) {
|
|
245
|
-
Sentry.captureException(error, {
|
|
246
|
-
level:
|
|
247
|
-
error instanceof ConductorIntegrationConnectionError
|
|
248
|
-
? "warning"
|
|
249
|
-
: "error",
|
|
250
|
-
});
|
|
251
|
-
// Return a different error message for your end-user to see in your
|
|
252
|
-
// app's UI.
|
|
253
|
-
res.status(500).send({ error: { message: error.userFacingMessage } });
|
|
254
|
-
} else {
|
|
255
|
-
// ...
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
Or using [Apollo Server's error handler](https://apollographql.com/docs/apollo-server/data/errors/#for-client-responses):
|
|
27
|
+
## Documentation
|
|
261
28
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
import {
|
|
267
|
-
ConductorError,
|
|
268
|
-
ConductorIntegrationConnectionError,
|
|
269
|
-
} from "conductor-node";
|
|
270
|
-
// ...
|
|
271
|
-
const server = new ApolloServer({
|
|
272
|
-
// ...
|
|
273
|
-
formatError: (formattedError, error) => {
|
|
274
|
-
const origError = unwrapResolverError(error);
|
|
275
|
-
if (origError instanceof ConductorError) {
|
|
276
|
-
Sentry.captureException(origError, {
|
|
277
|
-
level:
|
|
278
|
-
origError instanceof ConductorIntegrationConnectionError
|
|
279
|
-
? "warning"
|
|
280
|
-
: "error",
|
|
281
|
-
});
|
|
282
|
-
return {
|
|
283
|
-
...formattedError,
|
|
284
|
-
// Return a different error message for your end-user to see in
|
|
285
|
-
// your app's UI.
|
|
286
|
-
message: origError.userFacingMessage,
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
// ...
|
|
290
|
-
return formattedError;
|
|
291
|
-
},
|
|
292
|
-
});
|
|
293
|
-
```
|
|
29
|
+
1. [Getting Started](https://docs.conductor.is/getting-started)
|
|
30
|
+
2. [API Reference](https://docs.conductor.is/apis)
|
|
31
|
+
3. [QuickBooks Desktop](https://docs.conductor.is/quickbooks-desktop)
|
|
32
|
+
4. [Error Handling](https://docs.conductor.is/error-handling)
|
package/dist/package.json
CHANGED
package/dist/src/Client.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import QbdIntegration from "./integrations/qbd/QbdIntegration";
|
|
2
|
+
import AuthSessionsResource from "./resources/AuthSessionsResource";
|
|
2
3
|
import EndUsersResource from "./resources/EndUsersResource";
|
|
3
4
|
import IntegrationConnectionsResource from "./resources/IntegrationConnectionsResource";
|
|
4
|
-
import { getServerUrlForEnvironment } from "./utils/http";
|
|
5
5
|
export interface ClientOptions {
|
|
6
6
|
/**
|
|
7
7
|
* Enables logging each request, response, and error.
|
|
8
8
|
*/
|
|
9
9
|
readonly verbose?: boolean;
|
|
10
|
-
readonly serverEnvironment?: Parameters<typeof getServerUrlForEnvironment>[0];
|
|
11
10
|
}
|
|
12
11
|
export default class Client {
|
|
13
12
|
readonly endUsers: EndUsersResource;
|
|
14
13
|
readonly integrationConnections: IntegrationConnectionsResource;
|
|
14
|
+
readonly authSessions: AuthSessionsResource;
|
|
15
15
|
/**
|
|
16
16
|
* Executes any QuickBooks Desktop (QBD) API against the specified end-user.
|
|
17
17
|
* See the official [QuickBooks Desktop API
|
|
@@ -20,7 +20,7 @@ export default class Client {
|
|
|
20
20
|
*/
|
|
21
21
|
readonly qbd: QbdIntegration;
|
|
22
22
|
private readonly httpClient;
|
|
23
|
-
constructor(apiKey: string, { verbose
|
|
23
|
+
constructor(apiKey: string, { verbose }?: ClientOptions);
|
|
24
24
|
private createHttpClient;
|
|
25
25
|
private createHeaders;
|
|
26
26
|
}
|
package/dist/src/Client.js
CHANGED
|
@@ -7,6 +7,7 @@ const package_json_1 = __importDefault(require("./../package.json"));
|
|
|
7
7
|
const QbdIntegration_1 = __importDefault(require("./integrations/qbd/QbdIntegration"));
|
|
8
8
|
const errorHandling_1 = require("./interceptors/errorHandling");
|
|
9
9
|
const logging_1 = require("./interceptors/logging");
|
|
10
|
+
const AuthSessionsResource_1 = __importDefault(require("./resources/AuthSessionsResource"));
|
|
10
11
|
const EndUsersResource_1 = __importDefault(require("./resources/EndUsersResource"));
|
|
11
12
|
const IntegrationConnectionsResource_1 = __importDefault(require("./resources/IntegrationConnectionsResource"));
|
|
12
13
|
const checkForUpdates_1 = require("./utils/checkForUpdates");
|
|
@@ -15,6 +16,7 @@ const axios_1 = __importDefault(require("axios"));
|
|
|
15
16
|
class Client {
|
|
16
17
|
endUsers;
|
|
17
18
|
integrationConnections;
|
|
19
|
+
authSessions;
|
|
18
20
|
/**
|
|
19
21
|
* Executes any QuickBooks Desktop (QBD) API against the specified end-user.
|
|
20
22
|
* See the official [QuickBooks Desktop API
|
|
@@ -23,16 +25,17 @@ class Client {
|
|
|
23
25
|
*/
|
|
24
26
|
qbd;
|
|
25
27
|
httpClient;
|
|
26
|
-
constructor(apiKey, { verbose = false
|
|
28
|
+
constructor(apiKey, { verbose = false } = {}) {
|
|
27
29
|
(0, checkForUpdates_1.checkForUpdates)();
|
|
28
|
-
this.httpClient = this.createHttpClient(apiKey, verbose
|
|
30
|
+
this.httpClient = this.createHttpClient(apiKey, verbose);
|
|
29
31
|
this.endUsers = new EndUsersResource_1.default(this.httpClient);
|
|
30
32
|
this.integrationConnections = new IntegrationConnectionsResource_1.default(this.httpClient);
|
|
33
|
+
this.authSessions = new AuthSessionsResource_1.default(this.httpClient);
|
|
31
34
|
this.qbd = new QbdIntegration_1.default(this.httpClient);
|
|
32
35
|
}
|
|
33
|
-
createHttpClient(apiKey, verbose
|
|
36
|
+
createHttpClient(apiKey, verbose) {
|
|
34
37
|
const httpClient = axios_1.default.create({
|
|
35
|
-
baseURL: `${(0, http_1.
|
|
38
|
+
baseURL: `${(0, http_1.getApiServerUrlForEnvironment)()}/v1`,
|
|
36
39
|
headers: this.createHeaders(apiKey),
|
|
37
40
|
timeout: 0, // No timeout (default).
|
|
38
41
|
});
|
|
@@ -7,7 +7,7 @@ class BaseIntegration {
|
|
|
7
7
|
}
|
|
8
8
|
/** Not intended for public use. */
|
|
9
9
|
async sendRequest(endUserId, integrationSlug, payload) {
|
|
10
|
-
const { data } = await this.httpClient.post(`/
|
|
10
|
+
const { data } = await this.httpClient.post(`/end_users/${endUserId}/request/${integrationSlug}`, payload);
|
|
11
11
|
return data;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -12,6 +12,8 @@ function addErrorHandlingInterceptors(httpClient) {
|
|
|
12
12
|
const errorData = error.response.data;
|
|
13
13
|
if ((0, error_1.isWellFormedConductorServerError)(errorData)) {
|
|
14
14
|
throw (0, error_1.generateConductorErrorFromType)({
|
|
15
|
+
// The request ID is already in the response body, so no need to
|
|
16
|
+
// copy it from the headers.
|
|
15
17
|
...errorData.error,
|
|
16
18
|
httpStatusCode: error.response.status,
|
|
17
19
|
headers,
|
|
@@ -21,9 +23,12 @@ function addErrorHandlingInterceptors(httpClient) {
|
|
|
21
23
|
message: "Invalid JSON received from the Conductor API.",
|
|
22
24
|
code: "INVALID_JSON_RESPONSE",
|
|
23
25
|
httpStatusCode: error.status ?? axios_1.HttpStatusCode.InternalServerError,
|
|
24
|
-
// @ts-expect-error -- `error.response.headers`
|
|
26
|
+
// @ts-expect-error -- `error.response.headers` always exists as an `AxiosHeaders` instance.
|
|
25
27
|
requestId: error.response.headers.get("request-id"),
|
|
26
28
|
headers,
|
|
29
|
+
// Include to understand why `isWellFormedConductorServerError()`
|
|
30
|
+
// failed.
|
|
31
|
+
raw: errorData,
|
|
27
32
|
});
|
|
28
33
|
}
|
|
29
34
|
if (error.code === axios_1.AxiosError.ECONNABORTED) {
|
|
@@ -41,7 +46,7 @@ function addErrorHandlingInterceptors(httpClient) {
|
|
|
41
46
|
// Conductor API is offline) or an error ocurred when setting up the
|
|
42
47
|
// request (e.g., no network connection).
|
|
43
48
|
throw new error_1.ConductorConnectionError({
|
|
44
|
-
message:
|
|
49
|
+
message: `An error occurred with our connection to Conductor: ${error.message}`,
|
|
45
50
|
code: error.code ?? "NETWORK_ERROR",
|
|
46
51
|
httpStatusCode: error.status,
|
|
47
52
|
});
|
|
@@ -24,7 +24,9 @@ function addLoggingInterceptors(httpClient, verbose) {
|
|
|
24
24
|
// NOTE: We cannot include duration because we lack access to
|
|
25
25
|
// `AxiosError.config` because we already wrapped the error.
|
|
26
26
|
if (verbose) {
|
|
27
|
-
|
|
27
|
+
// No prefix "Conductor error:" because the error already includes a
|
|
28
|
+
// prefix (e.g., `ConductorConnectionError`).
|
|
29
|
+
console.log(stringifyForLogs(error));
|
|
28
30
|
}
|
|
29
31
|
throw error;
|
|
30
32
|
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import BaseResource from "../resources/BaseResource";
|
|
2
|
+
export interface AuthSession {
|
|
3
|
+
/**
|
|
4
|
+
* The unique identifier for the object.
|
|
5
|
+
*/
|
|
6
|
+
readonly id: string;
|
|
7
|
+
/**
|
|
8
|
+
* The ID of the EndUser for whom to create an IntegrationConnection in this
|
|
9
|
+
* AuthSession.
|
|
10
|
+
*/
|
|
11
|
+
readonly endUserId: string;
|
|
12
|
+
/**
|
|
13
|
+
* The value that you will pass to the client to launch the authentication
|
|
14
|
+
* flow.
|
|
15
|
+
*/
|
|
16
|
+
readonly clientSecret: string;
|
|
17
|
+
/**
|
|
18
|
+
* The time at which this AuthSession expires.
|
|
19
|
+
*/
|
|
20
|
+
readonly expiresAt: string;
|
|
21
|
+
}
|
|
22
|
+
export interface AuthSessionCreateInput {
|
|
23
|
+
/**
|
|
24
|
+
* Your Conductor publishable key, which we use to create the session's
|
|
25
|
+
* `authUrl`.
|
|
26
|
+
*/
|
|
27
|
+
readonly publishableKey: string;
|
|
28
|
+
/**
|
|
29
|
+
* The ID of the EndUser for whom to create the IntegrationConnection.
|
|
30
|
+
*/
|
|
31
|
+
readonly endUserId: string;
|
|
32
|
+
}
|
|
33
|
+
export interface AuthSessionCreateOutput extends AuthSession {
|
|
34
|
+
/**
|
|
35
|
+
* The URL of the authentication flow for the specified EndUser to set up the
|
|
36
|
+
* IntegrationConnection.
|
|
37
|
+
*/
|
|
38
|
+
readonly authUrl: string;
|
|
39
|
+
}
|
|
40
|
+
export default class AuthSessionsResource extends BaseResource {
|
|
41
|
+
protected readonly ROUTE = "/auth_sessions";
|
|
42
|
+
/**
|
|
43
|
+
* Creates an AuthSession for launching the client-side IntegrationConnection
|
|
44
|
+
* authentication flow. Use the returned session’s `clientSecret` to launch
|
|
45
|
+
* the auth flow using Conductor.js.
|
|
46
|
+
*/
|
|
47
|
+
create(input: AuthSessionCreateInput): Promise<AuthSessionCreateOutput>;
|
|
48
|
+
/**
|
|
49
|
+
* Retrieves the specified AuthSession.
|
|
50
|
+
*/
|
|
51
|
+
retrieve(id: AuthSession["id"]): Promise<AuthSession>;
|
|
52
|
+
}
|
package/dist/src/resources/{IntegrationConnectionAuthSessionsResource.js → AuthSessionsResource.js}
RENAMED
|
@@ -4,23 +4,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const BaseResource_1 = __importDefault(require("../resources/BaseResource"));
|
|
7
|
-
class
|
|
8
|
-
ROUTE = "/
|
|
7
|
+
class AuthSessionsResource extends BaseResource_1.default {
|
|
8
|
+
ROUTE = "/auth_sessions";
|
|
9
9
|
/**
|
|
10
|
-
* Creates an
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* Creates an AuthSession for launching the client-side IntegrationConnection
|
|
11
|
+
* authentication flow. Use the returned session’s `clientSecret` to launch
|
|
12
|
+
* the auth flow using Conductor.js.
|
|
13
13
|
*/
|
|
14
14
|
async create(input) {
|
|
15
15
|
const { data } = await this.httpClient.post(this.ROUTE, input);
|
|
16
16
|
return data;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Retrieves the specified
|
|
19
|
+
* Retrieves the specified AuthSession.
|
|
20
20
|
*/
|
|
21
21
|
async retrieve(id) {
|
|
22
22
|
const { data } = await this.httpClient.get(`${this.ROUTE}/${id}`);
|
|
23
23
|
return data;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
exports.default =
|
|
26
|
+
exports.default = AuthSessionsResource;
|
|
@@ -25,24 +25,27 @@ export interface EndUser {
|
|
|
25
25
|
}
|
|
26
26
|
export type EndUserCreateInput = Pick<EndUser, "email" | "name" | "sourceId">;
|
|
27
27
|
export interface EndUserPingOutput {
|
|
28
|
+
/**
|
|
29
|
+
* The time, in milliseconds, that it took to ping the connection.
|
|
30
|
+
*/
|
|
28
31
|
readonly duration: number;
|
|
29
32
|
}
|
|
30
33
|
export default class EndUsersResource extends BaseResource {
|
|
31
|
-
protected readonly ROUTE = "/
|
|
34
|
+
protected readonly ROUTE = "/end_users";
|
|
32
35
|
/**
|
|
33
|
-
* Returns a list of your
|
|
36
|
+
* Returns a list of your EndUsers.
|
|
34
37
|
*/
|
|
35
38
|
list(): Promise<EndUser[]>;
|
|
36
39
|
/**
|
|
37
|
-
* Creates a new
|
|
40
|
+
* Creates a new EndUser.
|
|
38
41
|
*/
|
|
39
42
|
create(input: EndUserCreateInput): Promise<EndUser>;
|
|
40
43
|
/**
|
|
41
|
-
* Retrieves the specified
|
|
44
|
+
* Retrieves the specified EndUser.
|
|
42
45
|
*/
|
|
43
46
|
retrieve(id: EndUser["id"]): Promise<EndUser>;
|
|
44
47
|
/**
|
|
45
|
-
* Checks whether the specified
|
|
48
|
+
* Checks whether the specified IntegrationConnection can connect and process
|
|
46
49
|
* requests end-to-end.
|
|
47
50
|
*
|
|
48
51
|
* If the connection fails, the error we encountered will be thrown as a
|
|
@@ -52,8 +55,8 @@ export default class EndUsersResource extends BaseResource {
|
|
|
52
55
|
* your end-user in your app's UI.
|
|
53
56
|
*
|
|
54
57
|
* @param id The ID of the end-user to ping.
|
|
55
|
-
* @param integrationSlug The integration identifier for the
|
|
56
|
-
*
|
|
58
|
+
* @param integrationSlug The integration identifier for the end-user's
|
|
59
|
+
* connection you want to ping (e.g. "quickbooks-desktop").
|
|
57
60
|
* @returns The ping result with the duration in milliseconds.
|
|
58
61
|
*/
|
|
59
62
|
ping(id: EndUser["id"], integrationSlug: IntegrationSlug): Promise<EndUserPingOutput>;
|
|
@@ -5,30 +5,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const BaseResource_1 = __importDefault(require("../resources/BaseResource"));
|
|
7
7
|
class EndUsersResource extends BaseResource_1.default {
|
|
8
|
-
ROUTE = "/
|
|
8
|
+
ROUTE = "/end_users";
|
|
9
9
|
/**
|
|
10
|
-
* Returns a list of your
|
|
10
|
+
* Returns a list of your EndUsers.
|
|
11
11
|
*/
|
|
12
12
|
async list() {
|
|
13
13
|
const { data } = await this.httpClient.get(this.ROUTE);
|
|
14
14
|
return data;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Creates a new
|
|
17
|
+
* Creates a new EndUser.
|
|
18
18
|
*/
|
|
19
19
|
async create(input) {
|
|
20
20
|
const { data } = await this.httpClient.post(this.ROUTE, input);
|
|
21
21
|
return data;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Retrieves the specified
|
|
24
|
+
* Retrieves the specified EndUser.
|
|
25
25
|
*/
|
|
26
26
|
async retrieve(id) {
|
|
27
27
|
const { data } = await this.httpClient.get(`${this.ROUTE}/${id}`);
|
|
28
28
|
return data;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* Checks whether the specified
|
|
31
|
+
* Checks whether the specified IntegrationConnection can connect and process
|
|
32
32
|
* requests end-to-end.
|
|
33
33
|
*
|
|
34
34
|
* If the connection fails, the error we encountered will be thrown as a
|
|
@@ -38,8 +38,8 @@ class EndUsersResource extends BaseResource_1.default {
|
|
|
38
38
|
* your end-user in your app's UI.
|
|
39
39
|
*
|
|
40
40
|
* @param id The ID of the end-user to ping.
|
|
41
|
-
* @param integrationSlug The integration identifier for the
|
|
42
|
-
*
|
|
41
|
+
* @param integrationSlug The integration identifier for the end-user's
|
|
42
|
+
* connection you want to ping (e.g. "quickbooks-desktop").
|
|
43
43
|
* @returns The ping result with the duration in milliseconds.
|
|
44
44
|
*/
|
|
45
45
|
async ping(id, integrationSlug) {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import BaseResource from "../resources/BaseResource";
|
|
2
|
-
import IntegrationConnectionAuthSessionsResource from "../resources/IntegrationConnectionAuthSessionsResource";
|
|
3
|
-
import type { AxiosInstance } from "axios";
|
|
4
2
|
export type IntegrationSlug = "quickbooks-desktop";
|
|
5
3
|
export interface IntegrationConnection {
|
|
6
4
|
/**
|
|
@@ -8,7 +6,7 @@ export interface IntegrationConnection {
|
|
|
8
6
|
*/
|
|
9
7
|
readonly id: string;
|
|
10
8
|
/**
|
|
11
|
-
* The ID of the
|
|
9
|
+
* The ID of the EndUser who owns this IntegrationConnection.
|
|
12
10
|
*/
|
|
13
11
|
readonly endUserId: string;
|
|
14
12
|
/**
|
|
@@ -25,15 +23,13 @@ export interface IntegrationConnectionPingOutput {
|
|
|
25
23
|
readonly duration: number;
|
|
26
24
|
}
|
|
27
25
|
export default class IntegrationConnectionsResource extends BaseResource {
|
|
28
|
-
readonly
|
|
29
|
-
protected readonly ROUTE = "/integration-connections";
|
|
30
|
-
constructor(httpClient: AxiosInstance);
|
|
26
|
+
protected readonly ROUTE = "/integration_connections";
|
|
31
27
|
/**
|
|
32
|
-
* Returns a list of all
|
|
28
|
+
* Returns a list of all IntegrationConnections of all your EndUsers.
|
|
33
29
|
*/
|
|
34
30
|
list(): Promise<IntegrationConnection[]>;
|
|
35
31
|
/**
|
|
36
|
-
* Retrieves the specified
|
|
32
|
+
* Retrieves the specified IntegrationConnection.
|
|
37
33
|
*/
|
|
38
34
|
retrieve(id: IntegrationConnection["id"]): Promise<IntegrationConnection>;
|
|
39
35
|
}
|
|
@@ -4,23 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const BaseResource_1 = __importDefault(require("../resources/BaseResource"));
|
|
7
|
-
const IntegrationConnectionAuthSessionsResource_1 = __importDefault(require("../resources/IntegrationConnectionAuthSessionsResource"));
|
|
8
7
|
class IntegrationConnectionsResource extends BaseResource_1.default {
|
|
9
|
-
|
|
10
|
-
ROUTE = "/integration-connections";
|
|
11
|
-
constructor(httpClient) {
|
|
12
|
-
super(httpClient);
|
|
13
|
-
this.authSessions = new IntegrationConnectionAuthSessionsResource_1.default(this.httpClient);
|
|
14
|
-
}
|
|
8
|
+
ROUTE = "/integration_connections";
|
|
15
9
|
/**
|
|
16
|
-
* Returns a list of all
|
|
10
|
+
* Returns a list of all IntegrationConnections of all your EndUsers.
|
|
17
11
|
*/
|
|
18
12
|
async list() {
|
|
19
13
|
const { data } = await this.httpClient.get(this.ROUTE);
|
|
20
14
|
return data;
|
|
21
15
|
}
|
|
22
16
|
/**
|
|
23
|
-
* Retrieves the specified
|
|
17
|
+
* Retrieves the specified IntegrationConnection.
|
|
24
18
|
*/
|
|
25
19
|
async retrieve(id) {
|
|
26
20
|
const { data } = await this.httpClient.get(`${this.ROUTE}/${id}`);
|
|
@@ -7,6 +7,9 @@ exports.checkForUpdates = void 0;
|
|
|
7
7
|
const package_json_1 = __importDefault(require("../../package.json"));
|
|
8
8
|
const node_child_process_1 = __importDefault(require("node:child_process"));
|
|
9
9
|
function checkForUpdates() {
|
|
10
|
+
if (process.env.NODE_ENV === "test") {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
10
13
|
// Exit early if npm is not installed.
|
|
11
14
|
try {
|
|
12
15
|
node_child_process_1.default.execSync("which npm");
|
|
@@ -8,6 +8,7 @@ export interface ConductorErrorOptions {
|
|
|
8
8
|
readonly integrationCode?: string | undefined;
|
|
9
9
|
readonly requestId?: string | undefined;
|
|
10
10
|
readonly headers?: Record<string, string>;
|
|
11
|
+
readonly raw?: unknown;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* The raw REST error response that Conductor's API returns.
|
|
@@ -89,7 +90,11 @@ export declare abstract class ConductorError extends Error {
|
|
|
89
90
|
*/
|
|
90
91
|
readonly headers: Record<string, string> | undefined;
|
|
91
92
|
/**
|
|
92
|
-
* The
|
|
93
|
+
* The raw REST error response that Conductor's API returned.
|
|
94
|
+
*/
|
|
95
|
+
protected readonly raw: unknown;
|
|
96
|
+
/**
|
|
97
|
+
* Conductor's internal representation of `type` for debugging.
|
|
93
98
|
*/
|
|
94
99
|
protected readonly rawType: string;
|
|
95
100
|
constructor(options: ConductorErrorOptions);
|
|
@@ -114,7 +119,7 @@ export declare class ConductorIntegrationError extends ConductorError {
|
|
|
114
119
|
/**
|
|
115
120
|
* Raised when a connection error occurs with the third-party integration on the
|
|
116
121
|
* end-user's side. This typically indicates an issue with the end-user's
|
|
117
|
-
*
|
|
122
|
+
* IntegrationConnection or configuration, which they must resolve. In other
|
|
118
123
|
* words, you cannot take action to fix these errors.
|
|
119
124
|
*
|
|
120
125
|
* E.g., QuickBooks Web Connector (QBWC) failed to connect to QuickBooks Desktop
|
package/dist/src/utils/error.js
CHANGED
|
@@ -80,7 +80,11 @@ class ConductorError extends Error {
|
|
|
80
80
|
*/
|
|
81
81
|
headers;
|
|
82
82
|
/**
|
|
83
|
-
* The
|
|
83
|
+
* The raw REST error response that Conductor's API returned.
|
|
84
|
+
*/
|
|
85
|
+
raw;
|
|
86
|
+
/**
|
|
87
|
+
* Conductor's internal representation of `type` for debugging.
|
|
84
88
|
*/
|
|
85
89
|
rawType;
|
|
86
90
|
constructor(options) {
|
|
@@ -105,6 +109,10 @@ class ConductorError extends Error {
|
|
|
105
109
|
this.integrationCode = options.integrationCode;
|
|
106
110
|
this.requestId = options.requestId;
|
|
107
111
|
this.headers = options.headers;
|
|
112
|
+
// Only set `raw` if provided instead of always setting it to `options`
|
|
113
|
+
// because the latter is usually a near duplicate of `this`, which we don't
|
|
114
|
+
// want to log unless necessary.
|
|
115
|
+
this.raw = options.raw;
|
|
108
116
|
this.rawType = options.type;
|
|
109
117
|
}
|
|
110
118
|
}
|
|
@@ -131,7 +139,7 @@ exports.ConductorIntegrationError = ConductorIntegrationError;
|
|
|
131
139
|
/**
|
|
132
140
|
* Raised when a connection error occurs with the third-party integration on the
|
|
133
141
|
* end-user's side. This typically indicates an issue with the end-user's
|
|
134
|
-
*
|
|
142
|
+
* IntegrationConnection or configuration, which they must resolve. In other
|
|
135
143
|
* words, you cannot take action to fix these errors.
|
|
136
144
|
*
|
|
137
145
|
* E.g., QuickBooks Web Connector (QBWC) failed to connect to QuickBooks Desktop
|
package/dist/src/utils/http.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function
|
|
1
|
+
export declare function getApiServerUrlForEnvironment(): string;
|
package/dist/src/utils/http.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
function
|
|
5
|
-
if
|
|
6
|
-
|
|
3
|
+
exports.getApiServerUrlForEnvironment = void 0;
|
|
4
|
+
function getApiServerUrlForEnvironment() {
|
|
5
|
+
// Do not check if `NODE_ENV` is "production" because that requires the
|
|
6
|
+
// developer to have set `NODE_ENV` to use `conductor` as expected.
|
|
7
|
+
if (["development", "test"].includes(process.env.NODE_ENV)) {
|
|
8
|
+
return "http://localhost:4000";
|
|
7
9
|
}
|
|
8
|
-
return "
|
|
10
|
+
return "https://api.conductor.is";
|
|
9
11
|
}
|
|
10
|
-
exports.
|
|
12
|
+
exports.getApiServerUrlForEnvironment = getApiServerUrlForEnvironment;
|
package/package.json
CHANGED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import BaseResource from "../resources/BaseResource";
|
|
2
|
-
export interface IntegrationConnectionAuthSession {
|
|
3
|
-
/**
|
|
4
|
-
* The unique identifier for the object.
|
|
5
|
-
*/
|
|
6
|
-
readonly id: string;
|
|
7
|
-
/**
|
|
8
|
-
* The ID of the end-user for whom to create an integration-connection in this
|
|
9
|
-
* auth session.
|
|
10
|
-
*/
|
|
11
|
-
readonly endUserId: string;
|
|
12
|
-
/**
|
|
13
|
-
* The value that you will pass to the client to launch the authentication flow.
|
|
14
|
-
*/
|
|
15
|
-
readonly clientSecret: string;
|
|
16
|
-
/**
|
|
17
|
-
* The URL to which to redirect the end-user to return to your app after
|
|
18
|
-
* completing the authentication flow.
|
|
19
|
-
*/
|
|
20
|
-
readonly returnUrl: string;
|
|
21
|
-
/**
|
|
22
|
-
* The time at which the auth-session expires.
|
|
23
|
-
*/
|
|
24
|
-
readonly expiresAt: string;
|
|
25
|
-
}
|
|
26
|
-
export interface IntegrationConnectionAuthSessionCreateInput {
|
|
27
|
-
/**
|
|
28
|
-
* The ID of the end-user for whom to create an integration-connection in this
|
|
29
|
-
* auth session.
|
|
30
|
-
*/
|
|
31
|
-
readonly endUserId: string;
|
|
32
|
-
/**
|
|
33
|
-
* The URL to which to redirect the end-user to return to your app after
|
|
34
|
-
* completing the authentication flow.
|
|
35
|
-
*/
|
|
36
|
-
readonly returnUrl: string;
|
|
37
|
-
}
|
|
38
|
-
export default class IntegrationConnectionAuthSessionsResource extends BaseResource {
|
|
39
|
-
protected readonly ROUTE = "/integration-connection-auth-sessions";
|
|
40
|
-
/**
|
|
41
|
-
* Creates an auth session for launching the client-side
|
|
42
|
-
* integration-connection authentication flow. Use the returned session’s
|
|
43
|
-
* `clientSecret` to launch the auth flow using Conductor.js.
|
|
44
|
-
*/
|
|
45
|
-
create(input: IntegrationConnectionAuthSessionCreateInput): Promise<IntegrationConnectionAuthSession>;
|
|
46
|
-
/**
|
|
47
|
-
* Retrieves the specified integration-connection-auth-session.
|
|
48
|
-
*/
|
|
49
|
-
retrieve(id: IntegrationConnectionAuthSession["id"]): Promise<IntegrationConnectionAuthSession>;
|
|
50
|
-
}
|