@qnx/client 0.7.13 → 0.8.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/dist/client.cjs +1 -1
- package/dist/client.iife.js +1 -1
- package/dist/client.mjs +45 -99
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/client.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=class{constructor(e={}){this.response=e}getErrorCode(){return this.response.errorCode}getErrors(){return this.response.errors}getError(){return this.response.error}getMessage(){return this.response.message}getData(){return this.response.data}},t=class{constructor(e){this.response=e}getData(){return this.response.data}getMessage(){return this.response.message}},n=class{constructor(e){this.response=e}getError(){return this.response.error}getErrors(){return this.response.errors}getErrorCode(){return this.response.errorCode}};exports.ApiErrorResponse=n,exports.ApiResponse=e,exports.ApiSuccessResponse=t;
|
package/dist/client.iife.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var client=(function(
|
|
1
|
+
var client=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=class{constructor(e={}){this.response=e}getErrorCode(){return this.response.errorCode}getErrors(){return this.response.errors}getError(){return this.response.error}getMessage(){return this.response.message}getData(){return this.response.data}},n=class{constructor(e){this.response=e}getData(){return this.response.data}getMessage(){return this.response.message}};return e.ApiErrorResponse=class{constructor(e){this.response=e}getError(){return this.response.error}getErrors(){return this.response.errors}getErrorCode(){return this.response.errorCode}},e.ApiResponse=t,e.ApiSuccessResponse=n,e})({});
|
package/dist/client.mjs
CHANGED
|
@@ -1,100 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
class t {
|
|
47
|
-
constructor(r) {
|
|
48
|
-
this.response = r;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Gets the data from the response.
|
|
52
|
-
*
|
|
53
|
-
* @returns The response data.
|
|
54
|
-
*/
|
|
55
|
-
getData() {
|
|
56
|
-
return this.response.data;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Gets the message from the response.
|
|
60
|
-
*
|
|
61
|
-
* @returns The response message.
|
|
62
|
-
*/
|
|
63
|
-
getMessage() {
|
|
64
|
-
return this.response.message;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
class o {
|
|
68
|
-
constructor(r) {
|
|
69
|
-
this.response = r;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Gets the error message from the response.
|
|
73
|
-
*
|
|
74
|
-
* @returns The error message.
|
|
75
|
-
*/
|
|
76
|
-
getError() {
|
|
77
|
-
return this.response.error;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Gets the errors from the response.
|
|
81
|
-
*
|
|
82
|
-
* @returns An object containing the errors, if present.
|
|
83
|
-
*/
|
|
84
|
-
getErrors() {
|
|
85
|
-
return this.response.errors;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Gets the error code from the response.
|
|
89
|
-
*
|
|
90
|
-
* @returns The error code, if present.
|
|
91
|
-
*/
|
|
92
|
-
getErrorCode() {
|
|
93
|
-
return this.response.errorCode;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
export {
|
|
97
|
-
o as ApiErrorResponse,
|
|
98
|
-
s as ApiResponse,
|
|
99
|
-
t as ApiSuccessResponse
|
|
1
|
+
//#region src/lib/response/index.ts
|
|
2
|
+
var e = class {
|
|
3
|
+
constructor(e = {}) {
|
|
4
|
+
this.response = e;
|
|
5
|
+
}
|
|
6
|
+
getErrorCode() {
|
|
7
|
+
return this.response.errorCode;
|
|
8
|
+
}
|
|
9
|
+
getErrors() {
|
|
10
|
+
return this.response.errors;
|
|
11
|
+
}
|
|
12
|
+
getError() {
|
|
13
|
+
return this.response.error;
|
|
14
|
+
}
|
|
15
|
+
getMessage() {
|
|
16
|
+
return this.response.message;
|
|
17
|
+
}
|
|
18
|
+
getData() {
|
|
19
|
+
return this.response.data;
|
|
20
|
+
}
|
|
21
|
+
}, t = class {
|
|
22
|
+
constructor(e) {
|
|
23
|
+
this.response = e;
|
|
24
|
+
}
|
|
25
|
+
getData() {
|
|
26
|
+
return this.response.data;
|
|
27
|
+
}
|
|
28
|
+
getMessage() {
|
|
29
|
+
return this.response.message;
|
|
30
|
+
}
|
|
31
|
+
}, n = class {
|
|
32
|
+
constructor(e) {
|
|
33
|
+
this.response = e;
|
|
34
|
+
}
|
|
35
|
+
getError() {
|
|
36
|
+
return this.response.error;
|
|
37
|
+
}
|
|
38
|
+
getErrors() {
|
|
39
|
+
return this.response.errors;
|
|
40
|
+
}
|
|
41
|
+
getErrorCode() {
|
|
42
|
+
return this.response.errorCode;
|
|
43
|
+
}
|
|
100
44
|
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { n as ApiErrorResponse, e as ApiResponse, t as ApiSuccessResponse };
|
package/dist/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@qnx/client",
|
|
3
3
|
"description": "@qnx/client for handling response",
|
|
4
4
|
"author": "Yatendra Kushwaha <https://github.com/yatendra121>",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.8.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/yatendra121",
|
|
8
8
|
"homepage": "https://github.com/yatendra121/qnx/tree/main/packages/client",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@qnx/client",
|
|
3
3
|
"description": "@qnx/client for handling response",
|
|
4
4
|
"author": "Yatendra Kushwaha <https://github.com/yatendra121>",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.8.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/yatendra121",
|
|
8
8
|
"homepage": "https://github.com/yatendra121/qnx/tree/main/packages/client",
|