conductor-node 10.5.4 → 10.5.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/dist/package.json
CHANGED
|
@@ -2443,6 +2443,9 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
2443
2443
|
query: async (endUserId, params) => this.sendRequestWrapper(endUserId, { WorkersCompCodeQueryRq: params }, "WorkersCompCodeQueryRs", "WorkersCompCodeRet"),
|
|
2444
2444
|
};
|
|
2445
2445
|
async sendRequestWrapper(endUserId, params, responseWrapperKey, responseBodyKey) {
|
|
2446
|
+
if (endUserId.startsWith("int_conn")) {
|
|
2447
|
+
console.warn("Deprecation warning: `int_conn` Conductor ID format used. Support for this format will be removed in a future release. Please use the new `end_usr` format.");
|
|
2448
|
+
}
|
|
2446
2449
|
const response = (endUserId.startsWith("int_conn")
|
|
2447
2450
|
? await this.sendRequestDeprecated(endUserId, params)
|
|
2448
2451
|
: await this.sendRequest(endUserId, "quickbooks-desktop", params));
|
|
@@ -50,6 +50,7 @@ class IntegrationConnectionsResource extends BaseResource_1.default {
|
|
|
50
50
|
*/
|
|
51
51
|
async ping(id) {
|
|
52
52
|
if (id.startsWith("int_conn")) {
|
|
53
|
+
console.warn("Deprecation warning: `int_conn` Conductor ID format used. Support for this format will be removed in a future release. Please use the new `end_usr` format.");
|
|
53
54
|
const { data } = await this.httpClient.get(`${this.ROUTE}/${id}/ping`);
|
|
54
55
|
return data;
|
|
55
56
|
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
export declare const DEFAULT_USER_FACING_MESSAGE = "An internal server error occurred. Please try again later.";
|
|
2
2
|
export interface ConductorErrorOptions {
|
|
3
3
|
readonly message: string;
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated Use `userFacingMessage` instead.
|
|
6
|
-
*/
|
|
7
|
-
readonly endUserMessage?: string;
|
|
8
4
|
readonly userFacingMessage?: string;
|
|
9
5
|
readonly type: string;
|
|
10
6
|
readonly code: string;
|
|
@@ -19,10 +15,6 @@ export interface ConductorErrorOptions {
|
|
|
19
15
|
export interface ConductorServerError {
|
|
20
16
|
readonly error: {
|
|
21
17
|
readonly message: string;
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated Use `userFacingMessage` instead.
|
|
24
|
-
*/
|
|
25
|
-
readonly endUserMessage?: string;
|
|
26
18
|
readonly userFacingMessage: string;
|
|
27
19
|
readonly type: string;
|
|
28
20
|
readonly code: string;
|
|
@@ -41,10 +33,6 @@ export declare abstract class ConductorError extends Error {
|
|
|
41
33
|
* The developer error message for your logs.
|
|
42
34
|
*/
|
|
43
35
|
readonly message: string;
|
|
44
|
-
/**
|
|
45
|
-
* @deprecated Use `userFacingMessage` instead.
|
|
46
|
-
*/
|
|
47
|
-
readonly endUserMessage: string;
|
|
48
36
|
/**
|
|
49
37
|
* The user-friendly error message, written specifically for displaying to
|
|
50
38
|
* your end-users in your app's UI.
|
package/dist/src/utils/error.js
CHANGED
|
@@ -8,9 +8,8 @@ function isWellFormedConductorServerError(error) {
|
|
|
8
8
|
return (error instanceof Object &&
|
|
9
9
|
typeof error.error === "object" &&
|
|
10
10
|
typeof error.error.message === "string" &&
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"string") &&
|
|
11
|
+
typeof error.error.userFacingMessage ===
|
|
12
|
+
"string" &&
|
|
14
13
|
typeof error.error.type === "string" &&
|
|
15
14
|
typeof error.error.code === "string" &&
|
|
16
15
|
typeof error.error.httpStatusCode === "number");
|
|
@@ -25,10 +24,6 @@ class ConductorError extends Error {
|
|
|
25
24
|
* The developer error message for your logs.
|
|
26
25
|
*/
|
|
27
26
|
message;
|
|
28
|
-
/**
|
|
29
|
-
* @deprecated Use `userFacingMessage` instead.
|
|
30
|
-
*/
|
|
31
|
-
endUserMessage;
|
|
32
27
|
/**
|
|
33
28
|
* The user-friendly error message, written specifically for displaying to
|
|
34
29
|
* your end-users in your app's UI.
|
|
@@ -103,14 +98,8 @@ class ConductorError extends Error {
|
|
|
103
98
|
// instantiated with the wrong options.
|
|
104
99
|
this.type = this.constructor.name;
|
|
105
100
|
this.message = options.message;
|
|
106
|
-
this.endUserMessage =
|
|
107
|
-
options.endUserMessage ??
|
|
108
|
-
options.userFacingMessage ??
|
|
109
|
-
exports.DEFAULT_USER_FACING_MESSAGE;
|
|
110
101
|
this.userFacingMessage =
|
|
111
|
-
options.userFacingMessage ??
|
|
112
|
-
options.endUserMessage ??
|
|
113
|
-
exports.DEFAULT_USER_FACING_MESSAGE;
|
|
102
|
+
options.userFacingMessage ?? exports.DEFAULT_USER_FACING_MESSAGE;
|
|
114
103
|
this.code = options.code;
|
|
115
104
|
this.httpStatusCode = options.httpStatusCode;
|
|
116
105
|
this.integrationCode = options.integrationCode;
|