@computec/uibase 1.0.3 → 1.0.6

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.
Files changed (181) hide show
  1. package/dist/communication/ConnectionOptions.d.ts +48 -0
  2. package/dist/communication/ConnectionOptions.d.ts.map +1 -0
  3. package/dist/communication/ConnectionOptions.js +9 -0
  4. package/dist/communication/HttpClient.d.ts +1 -0
  5. package/dist/communication/HttpClient.d.ts.map +1 -1
  6. package/dist/communication/HttpClient.js +6 -1
  7. package/dist/communication/IBaseHttpClientOptions.d.ts +1 -0
  8. package/dist/communication/IBaseHttpClientOptions.d.ts.map +1 -1
  9. package/dist/communication/IConnectionInfo.d.ts +17 -0
  10. package/dist/communication/IConnectionInfo.d.ts.map +1 -0
  11. package/dist/communication/IConnectionInfo.js +2 -0
  12. package/dist/communication/ISignalRHubClient.d.ts +47 -0
  13. package/dist/communication/ISignalRHubClient.d.ts.map +1 -0
  14. package/dist/communication/ISignalRHubClient.js +2 -0
  15. package/dist/communication/ISignalRMessage.d.ts +8 -0
  16. package/dist/communication/ISignalRMessage.d.ts.map +1 -0
  17. package/dist/communication/ISignalRMessage.js +2 -0
  18. package/dist/communication/SignalRHubClient.d.ts +26 -0
  19. package/dist/communication/SignalRHubClient.d.ts.map +1 -0
  20. package/dist/communication/SignalRHubClient.js +133 -0
  21. package/dist/communication/SignalRMessage.d.ts +10 -0
  22. package/dist/communication/SignalRMessage.d.ts.map +1 -0
  23. package/dist/communication/SignalRMessage.js +9 -0
  24. package/dist/communication/SubscribeProperties.d.ts +17 -0
  25. package/dist/communication/SubscribeProperties.d.ts.map +1 -0
  26. package/dist/communication/SubscribeProperties.js +25 -0
  27. package/dist/helpers/ErrorHelper.d.ts.map +1 -1
  28. package/dist/helpers/ErrorHelper.js +12 -0
  29. package/dist/helpers/HttpClientHelper.d.ts.map +1 -1
  30. package/dist/helpers/HttpClientHelper.js +15 -4
  31. package/dist/index.d.ts +4 -0
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +7 -1
  34. package/dist/models/AppEngineException.d.ts +17 -7
  35. package/dist/models/AppEngineException.d.ts.map +1 -1
  36. package/dist/models/AppEngineException.js +31 -8
  37. package/dist/models/BaseBusinessObject.d.ts +1 -2
  38. package/dist/models/BaseBusinessObject.d.ts.map +1 -1
  39. package/dist/models/BaseError.d.ts +51 -0
  40. package/dist/models/BaseError.d.ts.map +1 -0
  41. package/dist/models/BaseError.js +53 -0
  42. package/dist/models/CompanyInfo.d.ts +4 -1
  43. package/dist/models/CompanyInfo.d.ts.map +1 -1
  44. package/dist/models/CompanyInfo.js +13 -0
  45. package/dist/models/DocumentedException.d.ts +22 -0
  46. package/dist/models/DocumentedException.d.ts.map +1 -0
  47. package/dist/models/DocumentedException.js +48 -0
  48. package/dist/models/HttpResponse.d.ts +7 -0
  49. package/dist/models/HttpResponse.d.ts.map +1 -0
  50. package/dist/models/HttpResponse.js +9 -0
  51. package/dist/models/IOdataResponse.d.ts +6 -0
  52. package/dist/models/IOdataResponse.d.ts.map +1 -0
  53. package/dist/models/IOdataResponse.js +2 -0
  54. package/dist/models/OdataError.d.ts +56 -0
  55. package/dist/models/OdataError.d.ts.map +1 -0
  56. package/dist/models/OdataError.js +88 -0
  57. package/dist/models/ProblemDetails.d.ts +23 -0
  58. package/dist/models/ProblemDetails.d.ts.map +1 -0
  59. package/dist/models/ProblemDetails.js +37 -0
  60. package/dist/models/Session.d.ts +2 -1
  61. package/dist/models/Session.d.ts.map +1 -1
  62. package/dist/models/Session.js +5 -1
  63. package/dist/models/UserInfo.d.ts +27 -1
  64. package/dist/models/UserInfo.d.ts.map +1 -1
  65. package/dist/models/ValidationProblemDetails.d.ts +19 -0
  66. package/dist/models/ValidationProblemDetails.d.ts.map +1 -0
  67. package/dist/models/ValidationProblemDetails.js +41 -0
  68. package/dist/models/Version.d.ts +35 -0
  69. package/dist/models/Version.d.ts.map +1 -0
  70. package/dist/models/Version.js +185 -0
  71. package/dist/models/enums/HeadersContentTypeEnum.d.ts +7 -0
  72. package/dist/models/enums/HeadersContentTypeEnum.d.ts.map +1 -1
  73. package/dist/models/enums/HeadersContentTypeEnum.js +7 -0
  74. package/dist/models/interfaces/IAppEngineException.d.ts +54 -4
  75. package/dist/models/interfaces/IAppEngineException.d.ts.map +1 -1
  76. package/dist/models/interfaces/IDocumentedException.d.ts +60 -0
  77. package/dist/models/interfaces/IDocumentedException.d.ts.map +1 -0
  78. package/dist/models/interfaces/IDocumentedException.js +2 -0
  79. package/dist/models/interfaces/IHttpResponse.d.ts +5 -0
  80. package/dist/models/interfaces/IHttpResponse.d.ts.map +1 -0
  81. package/dist/models/interfaces/IHttpResponse.js +2 -0
  82. package/dist/models/interfaces/IOdataError.d.ts +182 -0
  83. package/dist/models/interfaces/IOdataError.d.ts.map +1 -0
  84. package/dist/models/interfaces/IOdataError.js +2 -0
  85. package/dist/models/interfaces/IProblemDetails.d.ts +93 -0
  86. package/dist/models/interfaces/IProblemDetails.d.ts.map +1 -0
  87. package/dist/models/interfaces/IProblemDetails.js +2 -0
  88. package/dist/models/interfaces/IValidationProblemDetails.d.ts +82 -0
  89. package/dist/models/interfaces/IValidationProblemDetails.d.ts.map +1 -0
  90. package/dist/models/interfaces/IValidationProblemDetails.js +2 -0
  91. package/dist-ui5/resources/computec/appengine/uibase/.library +1 -1
  92. package/dist-ui5/resources/computec/appengine/uibase/communication/ConnectionOptions-dbg.js +20 -0
  93. package/dist-ui5/resources/computec/appengine/uibase/communication/ConnectionOptions.js +2 -0
  94. package/dist-ui5/resources/computec/appengine/uibase/communication/ConnectionOptions.js.map +1 -0
  95. package/dist-ui5/resources/computec/appengine/uibase/communication/HttpClient-dbg.js +41 -22
  96. package/dist-ui5/resources/computec/appengine/uibase/communication/HttpClient.js +1 -1
  97. package/dist-ui5/resources/computec/appengine/uibase/communication/HttpClient.js.map +1 -1
  98. package/dist-ui5/resources/computec/appengine/uibase/communication/IConnectionInfo-dbg.js +7 -0
  99. package/dist-ui5/resources/computec/appengine/uibase/communication/IConnectionInfo.js +2 -0
  100. package/dist-ui5/resources/computec/appengine/uibase/communication/IConnectionInfo.js.map +1 -0
  101. package/dist-ui5/resources/computec/appengine/uibase/communication/ISignalRHubClient-dbg.js +7 -0
  102. package/dist-ui5/resources/computec/appengine/uibase/communication/ISignalRHubClient.js +2 -0
  103. package/dist-ui5/resources/computec/appengine/uibase/communication/ISignalRHubClient.js.map +1 -0
  104. package/dist-ui5/resources/computec/appengine/uibase/communication/ISignalRMessage-dbg.js +7 -0
  105. package/dist-ui5/resources/computec/appengine/uibase/communication/ISignalRMessage.js +2 -0
  106. package/dist-ui5/resources/computec/appengine/uibase/communication/ISignalRMessage.js.map +1 -0
  107. package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRHubClient-dbg.js +213 -0
  108. package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRHubClient.js +2 -0
  109. package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRHubClient.js.map +1 -0
  110. package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRMessage-dbg.js +31 -0
  111. package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRMessage.js +2 -0
  112. package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRMessage.js.map +1 -0
  113. package/dist-ui5/resources/computec/appengine/uibase/communication/SubscribeProperties-dbg.js +49 -0
  114. package/dist-ui5/resources/computec/appengine/uibase/communication/SubscribeProperties.js +2 -0
  115. package/dist-ui5/resources/computec/appengine/uibase/communication/SubscribeProperties.js.map +1 -0
  116. package/dist-ui5/resources/computec/appengine/uibase/helpers/ErrorHelper-dbg.js +13 -1
  117. package/dist-ui5/resources/computec/appengine/uibase/helpers/ErrorHelper.js +1 -1
  118. package/dist-ui5/resources/computec/appengine/uibase/helpers/ErrorHelper.js.map +1 -1
  119. package/dist-ui5/resources/computec/appengine/uibase/helpers/HttpClientHelper-dbg.js +76 -85
  120. package/dist-ui5/resources/computec/appengine/uibase/helpers/HttpClientHelper.js +1 -1
  121. package/dist-ui5/resources/computec/appengine/uibase/helpers/HttpClientHelper.js.map +1 -1
  122. package/dist-ui5/resources/computec/appengine/uibase/index-dbg.js +5 -1
  123. package/dist-ui5/resources/computec/appengine/uibase/index.js +1 -1
  124. package/dist-ui5/resources/computec/appengine/uibase/index.js.map +1 -1
  125. package/dist-ui5/resources/computec/appengine/uibase/library-dbg.js +1 -1
  126. package/dist-ui5/resources/computec/appengine/uibase/library-preload.js +70 -10
  127. package/dist-ui5/resources/computec/appengine/uibase/library-preload.js.map +1 -1
  128. package/dist-ui5/resources/computec/appengine/uibase/library.js +1 -1
  129. package/dist-ui5/resources/computec/appengine/uibase/manifest.json +1 -1
  130. package/dist-ui5/resources/computec/appengine/uibase/models/AppEngineException-dbg.js +49 -12
  131. package/dist-ui5/resources/computec/appengine/uibase/models/AppEngineException.js +1 -1
  132. package/dist-ui5/resources/computec/appengine/uibase/models/AppEngineException.js.map +1 -1
  133. package/dist-ui5/resources/computec/appengine/uibase/models/BaseError-dbg.js +92 -0
  134. package/dist-ui5/resources/computec/appengine/uibase/models/BaseError.js +2 -0
  135. package/dist-ui5/resources/computec/appengine/uibase/models/BaseError.js.map +1 -0
  136. package/dist-ui5/resources/computec/appengine/uibase/models/CompanyInfo-dbg.js +34 -6
  137. package/dist-ui5/resources/computec/appengine/uibase/models/CompanyInfo.js +1 -1
  138. package/dist-ui5/resources/computec/appengine/uibase/models/CompanyInfo.js.map +1 -1
  139. package/dist-ui5/resources/computec/appengine/uibase/models/DocumentedException-dbg.js +75 -0
  140. package/dist-ui5/resources/computec/appengine/uibase/models/DocumentedException.js +2 -0
  141. package/dist-ui5/resources/computec/appengine/uibase/models/DocumentedException.js.map +1 -0
  142. package/dist-ui5/resources/computec/appengine/uibase/models/HttpResponse-dbg.js +17 -0
  143. package/dist-ui5/resources/computec/appengine/uibase/models/HttpResponse.js +2 -0
  144. package/dist-ui5/resources/computec/appengine/uibase/models/HttpResponse.js.map +1 -0
  145. package/dist-ui5/resources/computec/appengine/uibase/models/IOdataResponse-dbg.js +7 -0
  146. package/dist-ui5/resources/computec/appengine/uibase/models/IOdataResponse.js +2 -0
  147. package/dist-ui5/resources/computec/appengine/uibase/models/IOdataResponse.js.map +1 -0
  148. package/dist-ui5/resources/computec/appengine/uibase/models/OdataError-dbg.js +122 -0
  149. package/dist-ui5/resources/computec/appengine/uibase/models/OdataError.js +2 -0
  150. package/dist-ui5/resources/computec/appengine/uibase/models/OdataError.js.map +1 -0
  151. package/dist-ui5/resources/computec/appengine/uibase/models/ProblemDetails-dbg.js +71 -0
  152. package/dist-ui5/resources/computec/appengine/uibase/models/ProblemDetails.js +2 -0
  153. package/dist-ui5/resources/computec/appengine/uibase/models/ProblemDetails.js.map +1 -0
  154. package/dist-ui5/resources/computec/appengine/uibase/models/Session-dbg.js +20 -4
  155. package/dist-ui5/resources/computec/appengine/uibase/models/Session.js +1 -1
  156. package/dist-ui5/resources/computec/appengine/uibase/models/Session.js.map +1 -1
  157. package/dist-ui5/resources/computec/appengine/uibase/models/ValidationProblemDetails-dbg.js +83 -0
  158. package/dist-ui5/resources/computec/appengine/uibase/models/ValidationProblemDetails.js +2 -0
  159. package/dist-ui5/resources/computec/appengine/uibase/models/ValidationProblemDetails.js.map +1 -0
  160. package/dist-ui5/resources/computec/appengine/uibase/models/Version-dbg.js +253 -0
  161. package/dist-ui5/resources/computec/appengine/uibase/models/Version.js +2 -0
  162. package/dist-ui5/resources/computec/appengine/uibase/models/Version.js.map +1 -0
  163. package/dist-ui5/resources/computec/appengine/uibase/models/enums/HeadersContentTypeEnum-dbg.js +7 -0
  164. package/dist-ui5/resources/computec/appengine/uibase/models/enums/HeadersContentTypeEnum.js +1 -1
  165. package/dist-ui5/resources/computec/appengine/uibase/models/enums/HeadersContentTypeEnum.js.map +1 -1
  166. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IDocumentedException-dbg.js +7 -0
  167. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IDocumentedException.js +2 -0
  168. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IDocumentedException.js.map +1 -0
  169. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IHttpResponse-dbg.js +1 -0
  170. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IHttpResponse.js +2 -0
  171. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IHttpResponse.js.map +1 -0
  172. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IOdataError-dbg.js +1 -0
  173. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IOdataError.js +2 -0
  174. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IOdataError.js.map +1 -0
  175. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IProblemDetails-dbg.js +1 -0
  176. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IProblemDetails.js +2 -0
  177. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IProblemDetails.js.map +1 -0
  178. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IValidationProblemDetails-dbg.js +1 -0
  179. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IValidationProblemDetails.js +2 -0
  180. package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IValidationProblemDetails.js.map +1 -0
  181. package/package.json +11 -6
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @name ConnectionOptions
3
+ * ConnectionOptions is used to configure the connection to the server.
4
+ */
5
+ declare class ConnectionOptions {
6
+ /**
7
+ * The root path for the connection. If not provided default is `${window.location.origin}/tnc`.
8
+ */
9
+ rootPath?: string;
10
+ /**
11
+ * Indicates whether to use a shared connection. False by default
12
+ */
13
+ useSharedConnection?: boolean;
14
+ /**
15
+ * Indicates whether to automatically connect to the server. True by default. If true connection is made after creagin the object.
16
+ */
17
+ autoConnect?: boolean;
18
+ /**
19
+ * Indicates whether to automatically reconnect to the server.
20
+ */
21
+ autoReconnect?: boolean;
22
+ /**
23
+ * The interval or intervals (in milliseconds) at which to attempt auto reconnection.
24
+ */
25
+ autoReconnectInterval?: number | number[];
26
+ /**
27
+ * The retry policy for auto reconnection. If policy is provided, autoReconnectInterval is ignored.
28
+ */
29
+ autoReconnectPolicy?: signalR.IRetryPolicy;
30
+ /**
31
+ * The interval (in milliseconds) at which to send keep-alive messages to the server.
32
+ */
33
+ keepAliveIntervalInMilliseconds?: number;
34
+ /**
35
+ * The timeout (in milliseconds) for server responses.
36
+ */
37
+ serverTimeoutInMilliseconds?: number;
38
+ /**
39
+ * The Company Api Key used for authentication
40
+ */
41
+ companyApiKey?: string;
42
+ /**
43
+ * The Company id used for authentication
44
+ */
45
+ companyId?: string;
46
+ }
47
+ export default ConnectionOptions;
48
+ //# sourceMappingURL=ConnectionOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConnectionOptions.d.ts","sourceRoot":"","sources":["../../src/communication/ConnectionOptions.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,cAAM,iBAAiB;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE1C;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;IAE3C;;OAEG;IACH,+BAA+B,CAAC,EAAE,MAAM,CAAC;IAEzC;;OAEG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;IAErC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * @name ConnectionOptions
5
+ * ConnectionOptions is used to configure the connection to the server.
6
+ */
7
+ class ConnectionOptions {
8
+ }
9
+ exports.default = ConnectionOptions;
@@ -70,6 +70,7 @@ export default class HttpClient {
70
70
  * @param {IBasicHttpRequest} options - The options for the request.
71
71
  * @param {boolean} failHandling - If true, the request will be handled as a failure.
72
72
  * @param {boolean} handleBusy - If true, the request will be handled as a busy request.
73
+ * @param {boolean} includeResponse - If true, the full response will be returned and data (HttpResponse<T>) will be in the "data" property.
73
74
  * @param {MBusyIndicator} busyIndicator - The busy indicator to show.
74
75
  * @returns {Promise<T>} - The response of the request.
75
76
  * @example
@@ -1 +1 @@
1
- {"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../src/communication/HttpClient.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,MAAM,0BAA0B,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAE9B;;;;;;;;;OASG;WACW,UAAU;IAUxB;;;;;;;;;;;OAWG;WACW,WAAW,CAAC,GAAG,EAAE,MAAM;IAIrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;WACiB,OAAO,CAAC,CAAC,EAAE,OAAO,GAAE,iBAAsB;IAmC9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;WACW,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B;IAWrE;;;;;;;;;;;;;;;;;;;;OAoBG;WACW,QAAQ,CAAC,CAAC,EACvB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,qBAER;IAKF;;;;;;;;;;;;;;;;;OAiBG;WACW,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B;IASrF;;;;;;;;;;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AG,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B;IAYzE,OAAO,CAAC,MAAM,CAAC,gBAAgB;CAW/B"}
@@ -17,6 +17,7 @@ const ErrorHelper_1 = __importDefault(require("../helpers/ErrorHelper"));
17
17
  const HeadersContentTypeEnum_1 = __importDefault(require("../models/enums/HeadersContentTypeEnum"));
18
18
  const HttpClientHelper_1 = __importDefault(require("../helpers/HttpClientHelper"));
19
19
  const HttpClientCacheOptions_1 = __importDefault(require("./HttpClientCacheOptions"));
20
+ const HttpResponse_1 = __importDefault(require("../models/HttpResponse"));
20
21
  /**
21
22
  * @class
22
23
  * @description This class is used to make requests to the server. It is a wrapper for the jQuery.ajax method.
@@ -101,6 +102,7 @@ class HttpClient {
101
102
  * @param {IBasicHttpRequest} options - The options for the request.
102
103
  * @param {boolean} failHandling - If true, the request will be handled as a failure.
103
104
  * @param {boolean} handleBusy - If true, the request will be handled as a busy request.
105
+ * @param {boolean} includeResponse - If true, the full response will be returned and data (HttpResponse<T>) will be in the "data" property.
104
106
  * @param {MBusyIndicator} busyIndicator - The busy indicator to show.
105
107
  * @returns {Promise<T>} - The response of the request.
106
108
  * @example
@@ -129,7 +131,7 @@ class HttpClient {
129
131
  const restOptions = Object.assign({ headers: new Headers({
130
132
  "Content-Type": "application/json",
131
133
  Accepted: "application/json",
132
- }) }, options);
134
+ }), includeResponse: false }, options);
133
135
  if (companyId) {
134
136
  this._appendToHeaders(restOptions.headers, "x-b1-companyid", companyId);
135
137
  }
@@ -145,6 +147,9 @@ class HttpClient {
145
147
  try {
146
148
  const response = yield fetch(url, restOptions);
147
149
  yield HttpClientHelper_1.default.validateResponse(response, restOptions);
150
+ if (options.includeResponse) {
151
+ return new HttpResponse_1.default(yield HttpClientHelper_1.default.fetchData(response), response);
152
+ }
148
153
  return HttpClientHelper_1.default.fetchData(response);
149
154
  }
150
155
  catch (e) {
@@ -2,6 +2,7 @@ import HttpClientCacheOptions from "./HttpClientCacheOptions";
2
2
  export interface IBaseHttpClientOptions {
3
3
  headers?: HeadersInit;
4
4
  cacheOptions?: HttpClientCacheOptions;
5
+ includeResponse?: boolean;
5
6
  }
6
7
  export interface IGetHttpClientOptions extends IBaseHttpClientOptions {
7
8
  useCache?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"IBaseHttpClientOptions.d.ts","sourceRoot":"","sources":["../../src/communication/IBaseHttpClientOptions.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAE9D,MAAM,WAAW,sBAAsB;IACtC,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,YAAY,CAAC,EAAE,sBAAsB,CAAC;CACtC;AAED,MAAM,WAAW,qBAAsB,SAAQ,sBAAsB;IAEpE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,4BAA6B,SAAQ,qBAAqB;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAkB,SAAQ,WAAW,EAAE,sBAAsB;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC;CACb"}
1
+ {"version":3,"file":"IBaseHttpClientOptions.d.ts","sourceRoot":"","sources":["../../src/communication/IBaseHttpClientOptions.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAE9D,MAAM,WAAW,sBAAsB;IACtC,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAsB,SAAQ,sBAAsB;IAEpE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,4BAA6B,SAAQ,qBAAqB;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAkB,SAAQ,WAAW,EAAE,sBAAsB;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC;CACb"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Represents the connection information for a SignalR hub.
3
+ * @interface IConnectionInfo
4
+ * @property {string} path - The path to the SignalR hub endpoint.
5
+ * @property {signalR.HubConnection} connection - The SignalR HubConnection instance.
6
+ */
7
+ export default interface IConnectionInfo {
8
+ /**
9
+ * The path to the SignalR hub endpoint.
10
+ */
11
+ path: string;
12
+ /**
13
+ * The SignalR HubConnection instance.
14
+ */
15
+ connection: signalR.HubConnection;
16
+ }
17
+ //# sourceMappingURL=IConnectionInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IConnectionInfo.d.ts","sourceRoot":"","sources":["../../src/communication/IConnectionInfo.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,WAAW,eAAe;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC,aAAa,CAAC;CAClC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,47 @@
1
+ import * as signalR from "@microsoft/signalr";
2
+ import { SubscribeProperties } from "./SubscribeProperties";
3
+ /**
4
+ * Interface for a SignalR Hub client, providing methods and properties to manage SignalR connections and subscriptions.
5
+ * @interface ISignalRHubClient
6
+ */
7
+ export default interface ISignalRHubClient {
8
+ /**
9
+ * @deprecated Use {@link initialized} promise instead.
10
+ * A promise that resolves when the client is initialized (deprecated).
11
+ */
12
+ promise: Promise<void>;
13
+ /**
14
+ * A promise that resolves when the client is initialized.
15
+ */
16
+ initialized: Promise<void>;
17
+ /**
18
+ * Gets the current SignalR HubConnection instance.
19
+ */
20
+ get connection(): signalR.HubConnection;
21
+ /**
22
+ * Gets a promise that resolves when the client is automatically connected.
23
+ */
24
+ get autoConnectPromise(): Promise<void>;
25
+ /**
26
+ * Connects to the SignalR hub.
27
+ * @returns {Promise<void>} A promise that resolves when the connection is established.
28
+ */
29
+ connect(): Promise<void>;
30
+ /**
31
+ * Disconnects from the SignalR hub.
32
+ */
33
+ disconnect(): void;
34
+ /**
35
+ * Subscribes to a SignalR hub.
36
+ * @param {SubscribeProperties} options - Options for the subscription.
37
+ * @returns {Promise<void>} A promise that resolves when the subscription is successful.
38
+ */
39
+ subscribe(options: SubscribeProperties): Promise<void>;
40
+ /**
41
+ * Registers a handler for a specific method name received from the SignalR hub.
42
+ * @param {string} methodName - The name of the method to handle.
43
+ * @param {(...args: any[]) => any} newMethod - The handler function to execute when the method is received.
44
+ */
45
+ on(methodName: string, newMethod: (...args: any[]) => any): void;
46
+ }
47
+ //# sourceMappingURL=ISignalRHubClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISignalRHubClient.d.ts","sourceRoot":"","sources":["../../src/communication/ISignalRHubClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACzC;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B;;OAEG;IACH,IAAI,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC;IAExC;;OAEG;IACH,IAAI,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;IAEnB;;;;OAIG;IACH,SAAS,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvD;;;;OAIG;IACH,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,IAAI,CAAC;CACjE"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export default interface ISignalRMessage {
2
+ CompanyId: string;
3
+ EventType: string;
4
+ FormType: string;
5
+ ObjectKey: string;
6
+ UserName: string;
7
+ }
8
+ //# sourceMappingURL=ISignalRMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISignalRMessage.d.ts","sourceRoot":"","sources":["../../src/communication/ISignalRMessage.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,eAAe;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,26 @@
1
+ import IConnectionInfo from "./IConnectionInfo";
2
+ import ConnectionOptions from "./ConnectionOptions";
3
+ import ISignalRHubClient from "./ISignalRHubClient";
4
+ import { SubscribeProperties } from "./SubscribeProperties";
5
+ export default class SignalRHubClient implements ISignalRHubClient {
6
+ protected _globalConnections: Array<IConnectionInfo>;
7
+ protected _connection: signalR.HubConnection;
8
+ options: ConnectionOptions;
9
+ initialized: Promise<void>;
10
+ get promise(): Promise<void>;
11
+ get autoConnectPromise(): Promise<void>;
12
+ get connection(): import("@microsoft/signalr").HubConnection;
13
+ constructor(options?: ConnectionOptions);
14
+ connect(): Promise<void>;
15
+ disconnect(): void;
16
+ subscribe(options: SubscribeProperties): Promise<void>;
17
+ on<T, TU>(methodName: string, callback: (message: T) => TU): void;
18
+ off: (methodName: string) => void;
19
+ protected _subscribe(options: SubscribeProperties): Promise<void>;
20
+ private _addQueries;
21
+ private _initNewConnection;
22
+ private _setAutoReconnect;
23
+ private _getSharedConnection;
24
+ private _getConnection;
25
+ }
26
+ //# sourceMappingURL=SignalRHubClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignalRHubClient.d.ts","sourceRoot":"","sources":["../../src/communication/SignalRHubClient.ts"],"names":[],"mappings":"AAGA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,CAAC,OAAO,OAAO,gBAAiB,YAAW,iBAAiB;IACjE,SAAS,CAAC,kBAAkB,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IACrD,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC,aAAa,CAAC;IAC7C,OAAO,EAAE,iBAAiB,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,IAAW,OAAO,kBAEjB;IACD,IAAW,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAE7C;IACD,IAAW,UAAU,+CAEpB;gBACW,OAAO,CAAC,EAAE,iBAAiB;IAiBjC,OAAO;IAIb,UAAU;IAKH,SAAS,CAAC,OAAO,EAAE,mBAAmB;IAGtC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE;IAI1D,GAAG,GAAI,YAAY,MAAM,UAAsC;cAEtD,UAAU,CAAC,OAAO,EAAE,mBAAmB;IAavD,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,iBAAiB;IAoBzB,OAAO,CAAC,oBAAoB;IAc5B,OAAO,CAAC,cAAc;CAOtB"}
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const ErrorHelper_1 = __importDefault(require("../helpers/ErrorHelper"));
16
+ class SignalRHubClient {
17
+ get promise() {
18
+ return this.initialized;
19
+ }
20
+ get autoConnectPromise() {
21
+ return this.initialized;
22
+ }
23
+ get connection() {
24
+ return this._connection;
25
+ }
26
+ constructor(options) {
27
+ this.off = (methodName) => this._connection.off(methodName);
28
+ options = Object.assign({ useSharedConnection: false, rootPath: `${window.location.origin}/tnc`, autoConnect: true }, options);
29
+ this._globalConnections = [];
30
+ this.options = options;
31
+ this._connection = this._getConnection(this.options);
32
+ if (this.options.autoConnect) {
33
+ this.initialized = this.connect();
34
+ }
35
+ return this;
36
+ }
37
+ connect() {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ return yield this.connection.start();
40
+ });
41
+ }
42
+ disconnect() {
43
+ this.connection.stop();
44
+ return;
45
+ }
46
+ subscribe(options) {
47
+ return this._subscribe(options);
48
+ }
49
+ on(methodName, callback) {
50
+ this.connection.on(methodName, callback);
51
+ }
52
+ _subscribe(options) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ try {
55
+ yield this.initialized;
56
+ const args = options.getAttributes();
57
+ yield this.connection.invoke(options.Name, ...args);
58
+ }
59
+ catch (error) {
60
+ const err = ErrorHelper_1.default.getError(error);
61
+ console.error(`${err.name}:${err.message}`);
62
+ console.error(err.stack);
63
+ throw new Error(`Error while subscribing to function: ${err.name} ${err.message}`);
64
+ }
65
+ });
66
+ }
67
+ _addQueries(options) {
68
+ const queries = [];
69
+ if (options.companyId)
70
+ queries.push(`CompanyId=${options.companyId}`);
71
+ if (options.companyApiKey) {
72
+ queries.push(`ApiKey=${options.companyApiKey}`);
73
+ }
74
+ if (queries.length == 0)
75
+ return "";
76
+ return "?" + queries.join("&");
77
+ }
78
+ _initNewConnection(options) {
79
+ var _a;
80
+ let connection;
81
+ let hubConnectionBuilder = new signalR.HubConnectionBuilder();
82
+ if (options.rootPath) {
83
+ const args = `${(_a = options.companyId) !== null && _a !== void 0 ? _a : ""} `;
84
+ hubConnectionBuilder = hubConnectionBuilder.withUrl(`${options.rootPath}${this._addQueries(options)}`);
85
+ }
86
+ hubConnectionBuilder = this._setAutoReconnect(hubConnectionBuilder, options);
87
+ if (options.keepAliveIntervalInMilliseconds && options.keepAliveIntervalInMilliseconds > 0) {
88
+ hubConnectionBuilder = hubConnectionBuilder.withKeepAliveInterval(options.keepAliveIntervalInMilliseconds);
89
+ }
90
+ if (options.serverTimeoutInMilliseconds && options.serverTimeoutInMilliseconds > 0) {
91
+ hubConnectionBuilder = hubConnectionBuilder.withServerTimeout(options.serverTimeoutInMilliseconds);
92
+ }
93
+ connection = hubConnectionBuilder.build();
94
+ return connection;
95
+ }
96
+ _setAutoReconnect(hubConnectionBuilder, options) {
97
+ if (!options.autoReconnect) {
98
+ return hubConnectionBuilder;
99
+ }
100
+ if (options.autoReconnectPolicy) {
101
+ return hubConnectionBuilder.withAutomaticReconnect(options.autoReconnectPolicy);
102
+ }
103
+ if (typeof options.autoReconnectInterval === "number") {
104
+ return hubConnectionBuilder.withAutomaticReconnect([options.autoReconnectInterval]);
105
+ }
106
+ if (Array.isArray(options.autoReconnectInterval) && options.autoReconnectInterval.length > 0) {
107
+ return hubConnectionBuilder.withAutomaticReconnect(options.autoReconnectInterval);
108
+ }
109
+ return hubConnectionBuilder.withAutomaticReconnect();
110
+ }
111
+ _getSharedConnection(options) {
112
+ let existingConnectionInfo = this._globalConnections.find((ci) => ci.path === options.rootPath);
113
+ let connection;
114
+ if (!existingConnectionInfo) {
115
+ connection = this._initNewConnection(this.options);
116
+ existingConnectionInfo = {
117
+ path: options.rootPath,
118
+ connection: connection,
119
+ };
120
+ this._globalConnections.push(existingConnectionInfo);
121
+ }
122
+ return existingConnectionInfo === null || existingConnectionInfo === void 0 ? void 0 : existingConnectionInfo.connection;
123
+ }
124
+ _getConnection(options) {
125
+ if (this.options.useSharedConnection) {
126
+ return this._getSharedConnection(options);
127
+ }
128
+ else {
129
+ return this._initNewConnection(this.options);
130
+ }
131
+ }
132
+ }
133
+ exports.default = SignalRHubClient;
@@ -0,0 +1,10 @@
1
+ import BaseBusinessObject from "../models/BaseBusinessObject";
2
+ import ISignalRMessage from "./ISignalRMessage";
3
+ export default class SignalRMessage extends BaseBusinessObject implements ISignalRMessage {
4
+ CompanyId: string;
5
+ EventType: string;
6
+ FormType: string;
7
+ ObjectKey: string;
8
+ UserName: string;
9
+ }
10
+ //# sourceMappingURL=SignalRMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignalRMessage.d.ts","sourceRoot":"","sources":["../../src/communication/SignalRMessage.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,8BAA8B,CAAC;AAC9D,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,kBAAmB,YAAW,eAAe;IACxF,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const BaseBusinessObject_1 = __importDefault(require("../models/BaseBusinessObject"));
7
+ class SignalRMessage extends BaseBusinessObject_1.default {
8
+ }
9
+ exports.default = SignalRMessage;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Represents properties used for subscribing to a SignalR hub or similar event source.
3
+ */
4
+ export declare class SubscribeProperties {
5
+ Name: string;
6
+ /**
7
+ * Creates an instance of SubscribeProperties.
8
+ * @param {string} Name - The name of the subscription property.
9
+ */
10
+ constructor(Name: string);
11
+ /**
12
+ * Returns all attributes of the instance except the 'Name' property.
13
+ * @returns {any[]} An array of attribute values excluding 'Name'.
14
+ */
15
+ getAttributes(): any[];
16
+ }
17
+ //# sourceMappingURL=SubscribeProperties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubscribeProperties.d.ts","sourceRoot":"","sources":["../../src/communication/SubscribeProperties.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,mBAAmB;IAKZ,IAAI,EAAE,MAAM;IAJ/B;;;OAGG;gBACgB,IAAI,EAAE,MAAM;IAE/B;;;OAGG;IACH,aAAa;CAKb"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscribeProperties = void 0;
4
+ /**
5
+ * Represents properties used for subscribing to a SignalR hub or similar event source.
6
+ */
7
+ class SubscribeProperties {
8
+ /**
9
+ * Creates an instance of SubscribeProperties.
10
+ * @param {string} Name - The name of the subscription property.
11
+ */
12
+ constructor(Name) {
13
+ this.Name = Name;
14
+ }
15
+ /**
16
+ * Returns all attributes of the instance except the 'Name' property.
17
+ * @returns {any[]} An array of attribute values excluding 'Name'.
18
+ */
19
+ getAttributes() {
20
+ const idx = Object.keys(this).indexOf("Name");
21
+ const args = [...Object.values(this).slice(0, idx), ...Object.values(this).slice(idx + 1)];
22
+ return args;
23
+ }
24
+ }
25
+ exports.SubscribeProperties = SubscribeProperties;
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/ErrorHelper.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B;;;OAGG;WACW,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK;IAezC;;;;;OAKG;WACW,oBAAoB,CAAC,KAAK,EAAE,GAAG;CAG9C"}
1
+ {"version":3,"file":"ErrorHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/ErrorHelper.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,OAAO,WAAW;IAC/B;;;OAGG;WACW,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK;IAuBzC;;;;;OAKG;WACW,oBAAoB,CAAC,KAAK,EAAE,GAAG;CAG7C"}
@@ -3,7 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ const ValidationProblemDetails_1 = __importDefault(require("../models/ValidationProblemDetails"));
6
7
  const AppEngineException_1 = __importDefault(require("../models/AppEngineException"));
8
+ const ProblemDetails_1 = __importDefault(require("../models/ProblemDetails"));
9
+ const OdataError_1 = __importDefault(require("../models/OdataError"));
10
+ const DocumentedException_1 = __importDefault(require("../models/DocumentedException"));
7
11
  class ErrorHelper {
8
12
  /**
9
13
  * @description Helper method that try to return Error type
@@ -16,6 +20,14 @@ class ErrorHelper {
16
20
  return error;
17
21
  case typeof error === "string":
18
22
  return new Error(error);
23
+ case OdataError_1.default.is(error):
24
+ return OdataError_1.default.create(error).error;
25
+ case ValidationProblemDetails_1.default.is(error):
26
+ return ValidationProblemDetails_1.default.create(error).error;
27
+ case DocumentedException_1.default.is(error):
28
+ return new DocumentedException_1.default(error).error;
29
+ case ProblemDetails_1.default.is(error):
30
+ return ProblemDetails_1.default.create(error).error;
19
31
  case AppEngineException_1.default.is(error):
20
32
  return new AppEngineException_1.default(error).error;
21
33
  case (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.message:
@@ -1 +1 @@
1
- {"version":3,"file":"HttpClientHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/HttpClientHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAK5E,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACpC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,SAAmB;IACnD,MAAM,CAAC,QAAQ,CAAC,4BAA4B,gCAAgC;IAC5E;;OAEG;WACiB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB;IASvF;;OAEG;WACW,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;IAiBrF;;;;OAIG;WACW,SAAS,CAAC,QAAQ,EAAE,QAAQ;IAO1C;;;;OAIG;WACW,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM;IAMrC;;;;OAIG;IACH,OAAc,kBAAkB,GAAI,OAAO,KAAK,aACc;IAG9D,OAAO,CAAC,MAAM,CAAC,qBAAqB;mBAqBf,0BAA0B;IAyB/C,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAU/B,OAAO,CAAC,MAAM,CAAC,WAAW;IAI1B,OAAO,CAAC,MAAM,CAAC,WAAW;IAI1B,OAAO,CAAC,MAAM,CAAC,WAAW;IAI1B,OAAO,CAAC,MAAM,CAAC,WAAW;mBAIL,cAAc;mBASd,cAAc;mBASd,cAAc;CASnC"}
1
+ {"version":3,"file":"HttpClientHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/HttpClientHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAI5E,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACpC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,SAAmB;IACnD,MAAM,CAAC,QAAQ,CAAC,4BAA4B,gCAAgC;IAC5E;;OAEG;WACiB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB;IASvF;;OAEG;WACW,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;IAiBrF;;;;OAIG;WACW,SAAS,CAAC,QAAQ,EAAE,QAAQ;IAO1C;;;;OAIG;WACW,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM;IAMrC;;;;OAIG;IACH,OAAc,kBAAkB,GAAI,OAAO,KAAK,aACc;IAG9D,OAAO,CAAC,MAAM,CAAC,qBAAqB;mBAqBf,0BAA0B;IAwB/C,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAU/B,OAAO,CAAC,MAAM,CAAC,WAAW;IAI1B,OAAO,CAAC,MAAM,CAAC,WAAW;IAoB1B,OAAO,CAAC,MAAM,CAAC,WAAW;IAI1B,OAAO,CAAC,MAAM,CAAC,WAAW;mBAIL,cAAc;mBASd,cAAc;mBASd,cAAc;CASnC"}
@@ -12,7 +12,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- const AppEngineException_1 = __importDefault(require("../models/AppEngineException"));
16
15
  const ErrorHelper_1 = __importDefault(require("./ErrorHelper"));
17
16
  const HeadersContentTypeEnum_1 = __importDefault(require("../models/enums/HeadersContentTypeEnum"));
18
17
  class HttpClientHelper {
@@ -101,8 +100,6 @@ class HttpClientHelper {
101
100
  throw new Error(`Method ${restOptions.method} not allowed for endpoint: ${restOptions.url}`);
102
101
  }
103
102
  const result = yield this.fetchData(response);
104
- if (AppEngineException_1.default.is(result))
105
- throw new AppEngineException_1.default(result).error;
106
103
  throw ErrorHelper_1.default.getError(result);
107
104
  });
108
105
  }
@@ -122,7 +119,21 @@ class HttpClientHelper {
122
119
  return type === null || type === void 0 ? void 0 : type.includes(HeadersContentTypeEnum_1.default.Json);
123
120
  }
124
121
  static _isFileType(type) {
125
- return type === null || type === void 0 ? void 0 : type.includes(HeadersContentTypeEnum_1.default.OctetStream);
122
+ if (!type)
123
+ return false;
124
+ // Explicitly exclude JSON and text types
125
+ if (this._isJsonType(type) || this._isTextType(type))
126
+ return false;
127
+ return (type.includes(HeadersContentTypeEnum_1.default.OctetStream) ||
128
+ type.includes(HeadersContentTypeEnum_1.default.Pdf) ||
129
+ type.includes(HeadersContentTypeEnum_1.default.Csv) ||
130
+ type.includes(HeadersContentTypeEnum_1.default.Excel) ||
131
+ type.includes(HeadersContentTypeEnum_1.default.ExcelOpenXml) ||
132
+ type.includes(HeadersContentTypeEnum_1.default.Word) ||
133
+ type.includes(HeadersContentTypeEnum_1.default.Zip) ||
134
+ type.includes("image/") ||
135
+ type.includes("audio/") ||
136
+ type.includes("video/"));
126
137
  }
127
138
  static _isTextType(type) {
128
139
  return type === null || type === void 0 ? void 0 : type.includes(HeadersContentTypeEnum_1.default.Text);
package/dist/index.d.ts CHANGED
@@ -11,6 +11,8 @@ export { default as AppEngineConfiguration } from './models/AppEngineConfigurati
11
11
  export * from './models/AppEngineConfiguration';
12
12
  export { default as AppEngineException } from './models/AppEngineException';
13
13
  export * from './models/AppEngineException';
14
+ export { default as DocumentedException } from './models/DocumentedException';
15
+ export * from './models/DocumentedException';
14
16
  export { default as BaseBusinessObject } from './models/BaseBusinessObject';
15
17
  export * from './models/BaseBusinessObject';
16
18
  export { default as CompanyInfo } from './models/CompanyInfo';
@@ -28,4 +30,6 @@ export { default as Session } from './models/Session';
28
30
  export * from './models/Session';
29
31
  export { default as UserInfo } from './models/UserInfo';
30
32
  export * from './models/UserInfo';
33
+ export { default as Version } from './models/Version';
34
+ export * from './models/Version';
31
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACnE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAC3F,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC/D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACpF,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC1F,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACjG,cAAc,6CAA6C,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACzF,cAAc,yCAAyC,CAAC;AAC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,MAAM,uCAAuC,CAAC;AAC1F,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACjG,cAAc,6CAA6C,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACzF,cAAc,yCAAyC,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACtD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACtD,cAAc,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.UserInfo = exports.Session = exports.LocalStorage = exports.HeadersContentTypeEnum = exports.CompanyInfo = exports.BaseBusinessObject = exports.AppEngineException = exports.AppEngineConfiguration = exports.HttpClientHelper = exports.ErrorHelper = exports.HttpClientCacheOptions = exports.HttpClient = void 0;
20
+ exports.Version = exports.UserInfo = exports.Session = exports.LocalStorage = exports.HeadersContentTypeEnum = exports.CompanyInfo = exports.BaseBusinessObject = exports.DocumentedException = exports.AppEngineException = exports.AppEngineConfiguration = exports.HttpClientHelper = exports.ErrorHelper = exports.HttpClientCacheOptions = exports.HttpClient = void 0;
21
21
  var HttpClient_1 = require("./communication/HttpClient");
22
22
  Object.defineProperty(exports, "HttpClient", { enumerable: true, get: function () { return __importDefault(HttpClient_1).default; } });
23
23
  __exportStar(require("./communication/HttpClient"), exports);
@@ -37,6 +37,9 @@ __exportStar(require("./models/AppEngineConfiguration"), exports);
37
37
  var AppEngineException_1 = require("./models/AppEngineException");
38
38
  Object.defineProperty(exports, "AppEngineException", { enumerable: true, get: function () { return __importDefault(AppEngineException_1).default; } });
39
39
  __exportStar(require("./models/AppEngineException"), exports);
40
+ var DocumentedException_1 = require("./models/DocumentedException");
41
+ Object.defineProperty(exports, "DocumentedException", { enumerable: true, get: function () { return __importDefault(DocumentedException_1).default; } });
42
+ __exportStar(require("./models/DocumentedException"), exports);
40
43
  var BaseBusinessObject_1 = require("./models/BaseBusinessObject");
41
44
  Object.defineProperty(exports, "BaseBusinessObject", { enumerable: true, get: function () { return __importDefault(BaseBusinessObject_1).default; } });
42
45
  __exportStar(require("./models/BaseBusinessObject"), exports);
@@ -58,3 +61,6 @@ __exportStar(require("./models/Session"), exports);
58
61
  var UserInfo_1 = require("./models/UserInfo");
59
62
  Object.defineProperty(exports, "UserInfo", { enumerable: true, get: function () { return __importDefault(UserInfo_1).default; } });
60
63
  __exportStar(require("./models/UserInfo"), exports);
64
+ var Version_1 = require("./models/Version");
65
+ Object.defineProperty(exports, "Version", { enumerable: true, get: function () { return __importDefault(Version_1).default; } });
66
+ __exportStar(require("./models/Version"), exports);