conductor-node 8.5.1 → 8.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -54,13 +54,13 @@ Create a new integration-connection.
54
54
  const newQbdConnection = await conductor.createIntegrationConnection({
55
55
  // The identifier of the third-party platform to integrate.
56
56
  integrationKey: "quickbooks-desktop",
57
- // Your end-user's unique ID in your product's database. Must be distinct
58
- // from your other connections for the same integration.
57
+ // Your end-user's unique ID in your product's database. Must be
58
+ // distinct from your other connections for the same integration.
59
59
  endUserSourceId: "1234-abcd",
60
60
  // Your end-user's email address for identification only. No emails
61
61
  // will be sent.
62
62
  endUserEmail: "danny@constructionco.com",
63
- // Your end-user's company name that will be shown elsewhere in Conductor.
63
+ // Your end-user's company name shown elsewhere in Conductor.
64
64
  endUserCompanyName: "Construction Corp",
65
65
  });
66
66
  ```
@@ -194,31 +194,7 @@ The error object you receive will have one of the following error types:
194
194
 
195
195
  ### Example
196
196
 
197
- Using `async`/`await`:
198
-
199
- ```ts
200
- try {
201
- const newAccount = await conductor.qbd.account.add(qbdConnectionId, {
202
- Name: "Test Account",
203
- AccountType: "Bank",
204
- OpenBalance: "100",
205
- });
206
- } catch (error) {
207
- if (error instanceof ConductorError) {
208
- // TODO: Update your app's UI to display `error.endUserMessage`.
209
-
210
- // RECOMMENDED: Send a *warning* to Sentry for integration-errors, which are
211
- // your end-user's fault (e.g., cannot connect to QBD on your end-user's
212
- // computer) or an *error* for other errors (e.g., invalid API key).
213
- Sentry.captureException(error, {
214
- level: error instanceof ConductorIntegrationError ? "warning" : "error",
215
- });
216
- }
217
- // ...
218
- }
219
- ```
220
-
221
- Or in the form of a rejected promise:
197
+ In the form of a rejected promise:
222
198
 
223
199
  ```ts
224
200
  conductor.qbd.account
@@ -232,9 +208,36 @@ conductor.qbd.account
232
208
  })
233
209
  .catch((error) => {
234
210
  if (error instanceof ConductorError) {
235
- // TODO: Update your app's UI to display `error.endUserMessage`.
211
+ // TODO: Update your app's UI to display `error.endUserMessage`.
212
+
213
+ // RECOMMENDED: Send a *warning* to Sentry for integration-errors,
214
+ // which are your end-user's fault (e.g., cannot connect to QBD on
215
+ // your end-user's computer) or an *error* for other errors (e.g.,
216
+ // invalid API key).
217
+ Sentry.captureException(error, {
218
+ level: error instanceof ConductorIntegrationError ? "warning" : "error",
219
+ });
220
+ } else {
236
221
  // ...
237
222
  }
238
- // ...
239
223
  });
240
224
  ```
225
+
226
+ Or using `async`/`await`:
227
+
228
+ ```ts
229
+ try {
230
+ const newAccount = await conductor.qbd.account.add(qbdConnectionId, {
231
+ Name: "Test Account",
232
+ AccountType: "Bank",
233
+ OpenBalance: "100",
234
+ });
235
+ } catch (error) {
236
+ if (error instanceof ConductorError) {
237
+ // ❗ TODO: Update your app's UI to display `error.endUserMessage`.
238
+ // ...
239
+ } else {
240
+ // ...
241
+ }
242
+ }
243
+ ```
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "8.5.1",
3
+ "version": "8.5.2",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "8.5.1",
3
+ "version": "8.5.2",
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",