conductor-node 9.6.0 → 9.6.1
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/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-node",
|
|
3
|
-
"version": "9.6.
|
|
3
|
+
"version": "9.6.1",
|
|
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",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dist/package.json"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"prepack": "yarn tsc && yarn delete-compiled-dev-files && yarn tsc-alias
|
|
15
|
+
"prepack": "yarn --silent tsc && yarn --silent delete-compiled-dev-files && yarn --silent tsc-alias",
|
|
16
16
|
"delete-compiled-dev-files": "rm -rf `find ./dist -type d -name __tests__` ./dist/src/utils/testing.* ./dist/src/graphql/codegenConfig.*",
|
|
17
17
|
"postpack": "rm -rf dist",
|
|
18
18
|
"clean": "rm -rf dist package conductor-node-*.tgz tsconfig.tsbuildinfo",
|
|
@@ -67,11 +67,7 @@ function wrapError(error) {
|
|
|
67
67
|
if (error instanceof graphql_request_1.ClientError) {
|
|
68
68
|
const { response } = error;
|
|
69
69
|
if ([404, 502, 503].includes(response.status)) {
|
|
70
|
-
return
|
|
71
|
-
code: "SERVER_UNAVAILABLE",
|
|
72
|
-
message: `The Conductor server returned a ${response.status} error, which may indicate that the server is unavailable. Please alert the Conductor team if this error persists.`,
|
|
73
|
-
httpStatusCode: response.status,
|
|
74
|
-
});
|
|
70
|
+
return createConnectionError(String(response.status), response.status);
|
|
75
71
|
}
|
|
76
72
|
const nestedError = response.errors?.[0];
|
|
77
73
|
const errorExtensions = nestedError?.extensions;
|
|
@@ -91,6 +87,11 @@ function wrapError(error) {
|
|
|
91
87
|
...errorExtensions,
|
|
92
88
|
});
|
|
93
89
|
}
|
|
90
|
+
// Ideally, we would check for instances of `FetchError` but we don't have
|
|
91
|
+
// that type available.
|
|
92
|
+
}
|
|
93
|
+
else if (error.name === "FetchError") {
|
|
94
|
+
return createConnectionError(error.message, 502);
|
|
94
95
|
}
|
|
95
96
|
return new error_1.ConductorInternalError({
|
|
96
97
|
code: "INVALID_JSON_RESPONSE",
|
|
@@ -98,3 +99,10 @@ function wrapError(error) {
|
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
exports.wrapError = wrapError;
|
|
102
|
+
function createConnectionError(originalMessage, httpStatusCode) {
|
|
103
|
+
return new error_1.ConductorConnectionError({
|
|
104
|
+
code: "SERVER_UNAVAILABLE",
|
|
105
|
+
message: `Conductor failed to connect to the server: ${originalMessage}. Please alert the Conductor team if this error persists.`,
|
|
106
|
+
httpStatusCode,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
@@ -3573,9 +3573,9 @@ export interface EstimateAdd {
|
|
|
3573
3573
|
/** Allows for the attachment of a user defined GUID value. */
|
|
3574
3574
|
ExternalGUID?: string;
|
|
3575
3575
|
/** One line of this estimate. Compare with `EstimateLineGroup`, which represents a previously defined group of lines in the estimate. In a Mod request, you can add a new line by supplying a `TxnLineID` value of -1. */
|
|
3576
|
-
EstimateLineAdd?: EstimateLineAdd;
|
|
3576
|
+
EstimateLineAdd?: EstimateLineAdd | EstimateLineAdd[];
|
|
3577
3577
|
/** Represents a previously defined group of lines in the estimate. Compare with `EstimateLine`, which represents just one line in the estimate. */
|
|
3578
|
-
EstimateLineGroupAdd?: EstimateLineGroupAdd;
|
|
3578
|
+
EstimateLineGroupAdd?: EstimateLineGroupAdd | EstimateLineGroupAdd[];
|
|
3579
3579
|
}
|
|
3580
3580
|
export interface EstimateAddRq {
|
|
3581
3581
|
EstimateAdd: EstimateAdd;
|
|
@@ -8208,9 +8208,9 @@ export interface PurchaseOrderAdd {
|
|
|
8208
8208
|
/** Allows for the attachment of a user defined GUID value. */
|
|
8209
8209
|
ExternalGUID?: string;
|
|
8210
8210
|
/** One line of the purchase order. Compare with `PurchaseOrderLineGroup`, which represents a previously defined group of lines in the purchase order. */
|
|
8211
|
-
PurchaseOrderLineAdd?: PurchaseOrderLineAdd;
|
|
8211
|
+
PurchaseOrderLineAdd?: PurchaseOrderLineAdd | PurchaseOrderLineAdd[];
|
|
8212
8212
|
/** Represents a previously defined group of lines in the purchase order. Compare with `PurchaseOrderLine`, which represents just one line in the purchase order. */
|
|
8213
|
-
PurchaseOrderLineGroupAdd?: PurchaseOrderLineGroupAdd;
|
|
8213
|
+
PurchaseOrderLineGroupAdd?: PurchaseOrderLineGroupAdd | PurchaseOrderLineGroupAdd[];
|
|
8214
8214
|
}
|
|
8215
8215
|
export interface PurchaseOrderAddRq {
|
|
8216
8216
|
PurchaseOrderAdd: PurchaseOrderAdd;
|
|
@@ -8832,11 +8832,11 @@ export interface ReportClassFilter {
|
|
|
8832
8832
|
}
|
|
8833
8833
|
export interface ReportData {
|
|
8834
8834
|
/** A data row contains the actual data for each column. */
|
|
8835
|
-
DataRow?: DataRow;
|
|
8835
|
+
DataRow?: DataRow | DataRow[];
|
|
8836
8836
|
/** A text row contains only text and is used mainly for headings. */
|
|
8837
|
-
TextRow?: TextRow;
|
|
8837
|
+
TextRow?: TextRow | TextRow[];
|
|
8838
8838
|
/** A row that contains a calculated subtotal of the data in all the rows since the last `SubTotalRow` and, usually, a single underline. There can be multiple `SubTotalRow` aggregates in a report. */
|
|
8839
|
-
SubtotalRow?: SubtotalRow;
|
|
8839
|
+
SubtotalRow?: SubtotalRow | SubtotalRow[];
|
|
8840
8840
|
/** A row that contains a calculated total of all the data that has come before and a double underline. There will only be one `TotalRow` per report. If `TotalRow` does not include any numerical values, the columns required to show the total values are not part of the report. These columns were not included when the report was customized. */
|
|
8841
8841
|
TotalRow?: TotalRow;
|
|
8842
8842
|
}
|
|
@@ -9034,9 +9034,9 @@ export interface SalesReceiptAdd {
|
|
|
9034
9034
|
/** Allows for the attachment of a user defined GUID value. */
|
|
9035
9035
|
ExternalGUID?: string;
|
|
9036
9036
|
/** One line of the sales receipt. Compare with `SalesReceiptLineGroup`, which represents a previously defined group of lines in the sales receipt. */
|
|
9037
|
-
SalesReceiptLineAdd?: SalesReceiptLineAdd;
|
|
9037
|
+
SalesReceiptLineAdd?: SalesReceiptLineAdd | SalesReceiptLineAdd[];
|
|
9038
9038
|
/** Represents a previously defined group of lines in the sales receipt. Compare with `SalesReceiptLine`, which represents just one line in the sales receipt. */
|
|
9039
|
-
SalesReceiptLineGroupAdd?: SalesReceiptLineGroupAdd;
|
|
9039
|
+
SalesReceiptLineGroupAdd?: SalesReceiptLineGroupAdd | SalesReceiptLineGroupAdd[];
|
|
9040
9040
|
}
|
|
9041
9041
|
export interface SalesReceiptAddRq {
|
|
9042
9042
|
SalesReceiptAdd: SalesReceiptAdd;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-node",
|
|
3
|
-
"version": "9.6.
|
|
3
|
+
"version": "9.6.1",
|
|
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",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dist/package.json"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"prepack": "yarn tsc && yarn delete-compiled-dev-files && yarn tsc-alias
|
|
15
|
+
"prepack": "yarn --silent tsc && yarn --silent delete-compiled-dev-files && yarn --silent tsc-alias",
|
|
16
16
|
"delete-compiled-dev-files": "rm -rf `find ./dist -type d -name __tests__` ./dist/src/utils/testing.* ./dist/src/graphql/codegenConfig.*",
|
|
17
17
|
"postpack": "rm -rf dist",
|
|
18
18
|
"clean": "rm -rf dist package conductor-node-*.tgz tsconfig.tsbuildinfo",
|