@computec/uibase 1.0.8 → 1.0.10

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 (134) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +4 -1
  4. package/dist-amd/communication/ConnectionOptions.d.ts +48 -0
  5. package/dist-amd/communication/ConnectionOptions.d.ts.map +1 -0
  6. package/dist-amd/communication/ConnectionOptions.js +11 -0
  7. package/dist-amd/communication/HttpClient.d.ts +249 -0
  8. package/dist-amd/communication/HttpClient.d.ts.map +1 -0
  9. package/dist-amd/communication/HttpClient.js +362 -0
  10. package/dist-amd/communication/HttpClientCacheOptions.d.ts +9 -0
  11. package/dist-amd/communication/HttpClientCacheOptions.d.ts.map +1 -0
  12. package/dist-amd/communication/HttpClientCacheOptions.js +27 -0
  13. package/dist-amd/communication/IBaseHttpClientOptions.d.ts +18 -0
  14. package/dist-amd/communication/IBaseHttpClientOptions.d.ts.map +1 -0
  15. package/dist-amd/communication/IBaseHttpClientOptions.js +4 -0
  16. package/dist-amd/communication/IConnectionInfo.d.ts +17 -0
  17. package/dist-amd/communication/IConnectionInfo.d.ts.map +1 -0
  18. package/dist-amd/communication/IConnectionInfo.js +4 -0
  19. package/dist-amd/communication/ISignalRHubClient.d.ts +47 -0
  20. package/dist-amd/communication/ISignalRHubClient.d.ts.map +1 -0
  21. package/dist-amd/communication/ISignalRHubClient.js +4 -0
  22. package/dist-amd/communication/ISignalRMessage.d.ts +8 -0
  23. package/dist-amd/communication/ISignalRMessage.d.ts.map +1 -0
  24. package/dist-amd/communication/ISignalRMessage.js +4 -0
  25. package/dist-amd/communication/SignalRHubClient.d.ts +26 -0
  26. package/dist-amd/communication/SignalRHubClient.d.ts.map +1 -0
  27. package/dist-amd/communication/SignalRHubClient.js +135 -0
  28. package/dist-amd/communication/SignalRMessage.d.ts +10 -0
  29. package/dist-amd/communication/SignalRMessage.d.ts.map +1 -0
  30. package/dist-amd/communication/SignalRMessage.js +11 -0
  31. package/dist-amd/communication/SubscribeProperties.d.ts +17 -0
  32. package/dist-amd/communication/SubscribeProperties.d.ts.map +1 -0
  33. package/dist-amd/communication/SubscribeProperties.js +27 -0
  34. package/dist-amd/helpers/ErrorHelper.d.ts +15 -0
  35. package/dist-amd/helpers/ErrorHelper.d.ts.map +1 -0
  36. package/dist-amd/helpers/ErrorHelper.js +51 -0
  37. package/dist-amd/helpers/HttpClientHelper.d.ts +42 -0
  38. package/dist-amd/helpers/HttpClientHelper.d.ts.map +1 -0
  39. package/dist-amd/helpers/HttpClientHelper.js +188 -0
  40. package/dist-amd/helpers/NavigationHelper.d.ts +52 -0
  41. package/dist-amd/helpers/NavigationHelper.d.ts.map +1 -0
  42. package/dist-amd/helpers/NavigationHelper.js +73 -0
  43. package/dist-amd/helpers/WebClientNavigationHelper.d.ts +52 -0
  44. package/dist-amd/helpers/WebClientNavigationHelper.d.ts.map +1 -0
  45. package/dist-amd/helpers/WebClientNavigationHelper.js +73 -0
  46. package/dist-amd/index.d.ts +37 -0
  47. package/dist-amd/index.d.ts.map +1 -0
  48. package/dist-amd/index.js +56 -0
  49. package/dist-amd/models/AppEngineConfiguration.d.ts +26 -0
  50. package/dist-amd/models/AppEngineConfiguration.d.ts.map +1 -0
  51. package/dist-amd/models/AppEngineConfiguration.js +11 -0
  52. package/dist-amd/models/AppEngineException.d.ts +21 -0
  53. package/dist-amd/models/AppEngineException.d.ts.map +1 -0
  54. package/dist-amd/models/AppEngineException.js +46 -0
  55. package/dist-amd/models/BaseBusinessObject.d.ts +157 -0
  56. package/dist-amd/models/BaseBusinessObject.d.ts.map +1 -0
  57. package/dist-amd/models/BaseBusinessObject.js +189 -0
  58. package/dist-amd/models/BaseError.d.ts +51 -0
  59. package/dist-amd/models/BaseError.d.ts.map +1 -0
  60. package/dist-amd/models/BaseError.js +55 -0
  61. package/dist-amd/models/CompanyInfo.d.ts +11 -0
  62. package/dist-amd/models/CompanyInfo.d.ts.map +1 -0
  63. package/dist-amd/models/CompanyInfo.js +24 -0
  64. package/dist-amd/models/DocumentedException.d.ts +22 -0
  65. package/dist-amd/models/DocumentedException.d.ts.map +1 -0
  66. package/dist-amd/models/DocumentedException.js +50 -0
  67. package/dist-amd/models/HttpResponse.d.ts +7 -0
  68. package/dist-amd/models/HttpResponse.d.ts.map +1 -0
  69. package/dist-amd/models/HttpResponse.js +11 -0
  70. package/dist-amd/models/IOdataResponse.d.ts +6 -0
  71. package/dist-amd/models/IOdataResponse.d.ts.map +1 -0
  72. package/dist-amd/models/IOdataResponse.js +4 -0
  73. package/dist-amd/models/LocalStorage.d.ts +9 -0
  74. package/dist-amd/models/LocalStorage.d.ts.map +1 -0
  75. package/dist-amd/models/LocalStorage.js +55 -0
  76. package/dist-amd/models/OdataError.d.ts +56 -0
  77. package/dist-amd/models/OdataError.d.ts.map +1 -0
  78. package/dist-amd/models/OdataError.js +90 -0
  79. package/dist-amd/models/ProblemDetails.d.ts +23 -0
  80. package/dist-amd/models/ProblemDetails.d.ts.map +1 -0
  81. package/dist-amd/models/ProblemDetails.js +39 -0
  82. package/dist-amd/models/Session.d.ts +19 -0
  83. package/dist-amd/models/Session.d.ts.map +1 -0
  84. package/dist-amd/models/Session.js +11 -0
  85. package/dist-amd/models/UserInfo.d.ts +33 -0
  86. package/dist-amd/models/UserInfo.d.ts.map +1 -0
  87. package/dist-amd/models/UserInfo.js +11 -0
  88. package/dist-amd/models/ValidationProblemDetails.d.ts +19 -0
  89. package/dist-amd/models/ValidationProblemDetails.d.ts.map +1 -0
  90. package/dist-amd/models/ValidationProblemDetails.js +43 -0
  91. package/dist-amd/models/Version.d.ts +35 -0
  92. package/dist-amd/models/Version.d.ts.map +1 -0
  93. package/dist-amd/models/Version.js +187 -0
  94. package/dist-amd/models/enums/HeadersContentTypeEnum.d.ts +15 -0
  95. package/dist-amd/models/enums/HeadersContentTypeEnum.d.ts.map +1 -0
  96. package/dist-amd/models/enums/HeadersContentTypeEnum.js +19 -0
  97. package/dist-amd/models/enums/StorageTypeEnum.d.ts +5 -0
  98. package/dist-amd/models/enums/StorageTypeEnum.d.ts.map +1 -0
  99. package/dist-amd/models/enums/StorageTypeEnum.js +10 -0
  100. package/dist-amd/models/interfaces/IAppEngineConfiguration.d.ts +24 -0
  101. package/dist-amd/models/interfaces/IAppEngineConfiguration.d.ts.map +1 -0
  102. package/dist-amd/models/interfaces/IAppEngineConfiguration.js +4 -0
  103. package/dist-amd/models/interfaces/IAppEngineException.d.ts +57 -0
  104. package/dist-amd/models/interfaces/IAppEngineException.d.ts.map +1 -0
  105. package/dist-amd/models/interfaces/IAppEngineException.js +4 -0
  106. package/dist-amd/models/interfaces/IDocumentedException.d.ts +60 -0
  107. package/dist-amd/models/interfaces/IDocumentedException.d.ts.map +1 -0
  108. package/dist-amd/models/interfaces/IDocumentedException.js +4 -0
  109. package/dist-amd/models/interfaces/IHttpResponse.d.ts +5 -0
  110. package/dist-amd/models/interfaces/IHttpResponse.d.ts.map +1 -0
  111. package/dist-amd/models/interfaces/IHttpResponse.js +4 -0
  112. package/dist-amd/models/interfaces/IOdataError.d.ts +182 -0
  113. package/dist-amd/models/interfaces/IOdataError.d.ts.map +1 -0
  114. package/dist-amd/models/interfaces/IOdataError.js +4 -0
  115. package/dist-amd/models/interfaces/IProblemDetails.d.ts +93 -0
  116. package/dist-amd/models/interfaces/IProblemDetails.d.ts.map +1 -0
  117. package/dist-amd/models/interfaces/IProblemDetails.js +4 -0
  118. package/dist-amd/models/interfaces/IValidationProblemDetails.d.ts +82 -0
  119. package/dist-amd/models/interfaces/IValidationProblemDetails.d.ts.map +1 -0
  120. package/dist-amd/models/interfaces/IValidationProblemDetails.js +4 -0
  121. package/dist-ui5/resources/computec/appengine/uibase/.library +1 -1
  122. package/dist-ui5/resources/computec/appengine/uibase/helpers/WebClientNavigationHelper-dbg.js +100 -0
  123. package/dist-ui5/resources/computec/appengine/uibase/helpers/WebClientNavigationHelper.js +2 -0
  124. package/dist-ui5/resources/computec/appengine/uibase/helpers/WebClientNavigationHelper.js.map +1 -0
  125. package/dist-ui5/resources/computec/appengine/uibase/index-dbg.js +3 -1
  126. package/dist-ui5/resources/computec/appengine/uibase/index.js +1 -1
  127. package/dist-ui5/resources/computec/appengine/uibase/index.js.map +1 -1
  128. package/dist-ui5/resources/computec/appengine/uibase/library-dbg.js +1 -1
  129. package/dist-ui5/resources/computec/appengine/uibase/library-preload.js +6 -3
  130. package/dist-ui5/resources/computec/appengine/uibase/library-preload.js.map +1 -1
  131. package/dist-ui5/resources/computec/appengine/uibase/library.js +1 -1
  132. package/dist-ui5/resources/computec/appengine/uibase/library.js.map +1 -1
  133. package/dist-ui5/resources/computec/appengine/uibase/manifest.json +1 -1
  134. package/package.json +2 -1
@@ -0,0 +1,189 @@
1
+ define(["require", "exports"], function (require, exports) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ /**
5
+ * @experimental
6
+ * It is possible that this class will be removed or change name in the future.
7
+ * @class
8
+ * @abstract
9
+ * This abstract class is used to transform data from the server to business logic.
10
+ * It's currently marked as experimental, which means it may change in the future.
11
+ *
12
+ * **Static methods**:
13
+ *
14
+ * @static {function} `create` - This method is used to create a new instance of the class filled with the provided data.
15
+ * @static {function} `createMany` - This method is used to create multiple new instances of the class filled with the provided data.
16
+ *
17
+ * **Methods and properties**:
18
+ *
19
+ * @property {boolean} `USE_RAW_DATA` - This property is used to determine if the instance should use the raw data from the server.
20
+ * @property {function} `fillData` - This method is used to fill the instance with data from the server.
21
+ * @property {function} `clone` - This abstract method should be implemented in child classes to clone the instance.
22
+ * @property {function} `toJSON` - This method is used to remove the _rawData property from the object before converting it to JSON.
23
+ * @property {function} `getField` - This method is used to retrieve the value of a specific field from the _rawData object.
24
+ * @property {function} `cleanRaw` - This method is to reset the _rawData property to an empty object.
25
+ */
26
+ class BaseBusinessObject {
27
+ constructor() {
28
+ /**
29
+ * This property is used to determine if the instance should use the raw data from the server.
30
+ * If set to true, the instance will store the raw data in the _rawData property.
31
+ * This property is set to false by default.
32
+ * @method getField - This method is used to retrieve the value of a specific field from the _rawData object.
33
+ */
34
+ this.USE_RAW_DATA = false;
35
+ /**
36
+ * This property is used to store the raw data from the server.
37
+ * It is an empty object by default.
38
+ * The property is only used if the USE_RAW_DATA property is set to true.
39
+ * _rawData can be usefull when you need initial data to be able to revert the object to its original state.
40
+ * @method getField - This method is used to retrieve the value of a specific field from the _rawData object.
41
+ * @private
42
+ * @type {Record<string, unknown>}
43
+ * @memberof BaseBusinessObject
44
+ */
45
+ this._rawData = {};
46
+ }
47
+ /**
48
+ * This method is to reset the _rawData property to an empty object.
49
+ *
50
+ * **Recommendations**
51
+ *
52
+ * - Use this method aware that you will lose the initial data of the object.
53
+ * - **IMPORTANT** The method is recommended to use in `fillData` method when you don't use `getField` method in `toJSON` method.
54
+ * - It is useful when you need to clean the raw data from the object or you want to optimize the memory usage.
55
+ * @returns {}
56
+ */
57
+ cleanRaw() {
58
+ return (this._rawData = {});
59
+ }
60
+ /**
61
+ * Creates a new instance of the class filled with the provided data.
62
+ *
63
+ * @template T The type of the instance to create.
64
+ * @param {new () => T} this The constructor of the class to create an instance of.
65
+ * @param {Record<string, unknown>} data The data to fill the instance with.
66
+ * @returns {T} The new instance of the class filled with the provided data.
67
+ *
68
+ * @example
69
+ * // Example data from the server
70
+ * const data = { Code: 'US', Name: 'United States' };
71
+ *
72
+ * // Create a new Country instance filled with the data
73
+ * const country = Country.create(data);
74
+ *
75
+ * console.log(country.Code); // 'US'
76
+ * console.log(country.Name); // 'United States'
77
+ */
78
+ static create(data) {
79
+ const instance = new this();
80
+ instance.fillData(data);
81
+ return instance;
82
+ }
83
+ /**
84
+ * Creates multiple new instances of the class filled with the provided data.
85
+ *
86
+ * @template T The type of the instances to create.
87
+ * @param {new () => T} this The constructor of the class to create instances of.
88
+ * @param {Record<string, unknown>[]} data The array of data to fill the instances with.
89
+ * @returns {T[]} The new instances of the class filled with the provided data.
90
+ *
91
+ * @example
92
+ * // Example array of data from the server
93
+ * const dataArray = [{ Code: 'US', Name: 'United States' }, { Code: 'CA', Name: 'Canada' }];
94
+ *
95
+ * // Create new Country instances filled with the data
96
+ * const countries = Country.createMany(dataArray);
97
+ *
98
+ * console.log(countries[0].Code); // 'US'
99
+ * console.log(countries[0].Name); // 'United States'
100
+ * console.log(countries[1].Code); // 'CA'
101
+ * console.log(countries[1].Name); // 'Canada'
102
+ */
103
+ static createMany(data) {
104
+ return (data || []).map((item) => this.create(item));
105
+ }
106
+ /**
107
+ * This method is used to retrieve the value of a specific field from the _rawData object.
108
+ * It takes in a field parameter which represents the name of the field to retrieve.
109
+ * It tries to access the value of the field from the _rawData object using the provided field name.
110
+ * If the field exists, it returns the value casted to the specified type T.
111
+ * If the field does not exist or an error occurs, it returns null.
112
+ *
113
+ * @param field The name of the field to retrieve.
114
+ * @returns The value of the specified field casted to type T, or null if the field does not exist or an error occurs.
115
+ */
116
+ getField(field) {
117
+ try {
118
+ return this._rawData[field];
119
+ }
120
+ catch (error) {
121
+ return null;
122
+ }
123
+ }
124
+ /**
125
+ * Fills the instance with data from the server.
126
+ *
127
+ * @param {Record<string, unknown>} data - The data from the server.
128
+ * @returns {BaseBusinessObject} The instance of the class filled with the server data.
129
+ */
130
+ fillData(data) {
131
+ const useRawData = this.USE_RAW_DATA;
132
+ const result = (data || {});
133
+ result["_rawData"] = undefined;
134
+ Object.assign(this, result);
135
+ if (useRawData)
136
+ this._rawData = result;
137
+ return this;
138
+ }
139
+ /**
140
+ * Creates a clone of the instance.
141
+ *
142
+ * It is more optimized than structuredClone method. It is recommended to use this method when you don't need to deep clone the object.
143
+ *
144
+ * **Recommendations**
145
+ *
146
+ * - Use this method when you don't need to deep clone the object.
147
+ * - It is useful when you need to create a new instance of the class filled with the same data as the original instance.
148
+ * - Remember that the method doesn't clone the lower level objects.
149
+ *
150
+ * @returns {BaseBusinessObject} A clone of the instance.
151
+ */
152
+ clone() {
153
+ return this.cloneInternal(this);
154
+ }
155
+ /**
156
+ * Creates a structured clone of the instance.
157
+ *
158
+ * Simple method that use `create` method to create a new instance of the class filled with the same data as the original instance.
159
+ *
160
+ * It is more expensive than the `clone` method. It is recommended to use this method when you need to deep clone the object.
161
+ *
162
+ * **Important**
163
+ * - Remember that you decide what nested objects is cloned. Please check `fillData` method.
164
+ * - `fillData` method give possibility to clone nested objects that what you need to clone.
165
+ *
166
+ * **Recommendations**
167
+ *
168
+ * - Use this method when you need to deep clone the object.
169
+ * - The method is more expensive than the `clone` method.
170
+ *
171
+ * @returns {BaseBusinessObject} A clone of the instance.
172
+ */
173
+ structuredClone() {
174
+ return this.constructor.create(this);
175
+ }
176
+ cloneInternal(objectToClone) {
177
+ return Object.assign(new this.constructor(), objectToClone);
178
+ }
179
+ /**
180
+ * Remove the _rawData property from the object before converting it to JSON.
181
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
182
+ * @returns Record<string, unknown>
183
+ */
184
+ toJSON() {
185
+ return Object.assign(Object.assign({}, this), { _rawData: undefined, USE_RAW_DATA: undefined });
186
+ }
187
+ }
188
+ exports.default = BaseBusinessObject;
189
+ });
@@ -0,0 +1,51 @@
1
+ import BaseBusinessObject from "./BaseBusinessObject";
2
+ /**
3
+ * Abstract base class for application errors in the AppEngine system.
4
+ * Extends BaseBusinessObject and implements the Error interface to provide
5
+ * a consistent error handling mechanism throughout the application.
6
+ *
7
+ * @abstract
8
+ * @extends BaseBusinessObject
9
+ * @implements Error
10
+ */
11
+ export default abstract class BaseError extends BaseBusinessObject implements Error {
12
+ protected _stack: string;
13
+ protected static exceptionName: string;
14
+ constructor();
15
+ /**
16
+ * Gets the error message describing what went wrong.
17
+ * Must be implemented by concrete error classes.
18
+ *
19
+ * @abstract
20
+ * @returns The error message
21
+ */
22
+ abstract get message(): string;
23
+ /**
24
+ * Gets the underlying Error object that caused this error.
25
+ * Must be implemented by concrete error classes.
26
+ *
27
+ * @abstract
28
+ * @returns The underlying Error object
29
+ */
30
+ abstract get error(): Error;
31
+ /**
32
+ * The name of the error type.
33
+ * Returns a standard name for all AppEngine errors.
34
+ *
35
+ * @example "AppEngine Error"
36
+ */
37
+ get name(): string;
38
+ /**
39
+ * Gets the stack trace for the error.
40
+ *
41
+ */
42
+ get stack(): string;
43
+ /**
44
+ * Converts the error to a JSON representation.
45
+ * Useful for serialization, logging, and API responses.
46
+ *
47
+ * @returns An object containing the error's name, message, and stack trace
48
+ */
49
+ toJSON(): Record<string, unknown>;
50
+ }
51
+ //# sourceMappingURL=BaseError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseError.d.ts","sourceRoot":"","sources":["../../src/models/BaseError.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,SAAU,SAAQ,kBAAmB,YAAW,KAAK;IAClF,SAAS,CAAC,MAAM,EAAE,MAAM,CAAM;IAC9B,SAAS,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAe;;IAMrD;;;;;;OAMG;IACH,QAAQ,KAAK,OAAO,IAAI,MAAM,CAAC;IAC/B;;;;;;OAMG;IACH,QAAQ,KAAK,KAAK,IAAI,KAAK,CAAC;IAE5B;;;;;OAKG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;OAGG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IAED;;;;;OAKG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAOjC"}
@@ -0,0 +1,55 @@
1
+ var __importDefault = (this && this.__importDefault) || function (mod) {
2
+ return (mod && mod.__esModule) ? mod : { "default": mod };
3
+ };
4
+ define(["require", "exports", "./BaseBusinessObject"], function (require, exports, BaseBusinessObject_1) {
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ BaseBusinessObject_1 = __importDefault(BaseBusinessObject_1);
8
+ /**
9
+ * Abstract base class for application errors in the AppEngine system.
10
+ * Extends BaseBusinessObject and implements the Error interface to provide
11
+ * a consistent error handling mechanism throughout the application.
12
+ *
13
+ * @abstract
14
+ * @extends BaseBusinessObject
15
+ * @implements Error
16
+ */
17
+ class BaseError extends BaseBusinessObject_1.default {
18
+ constructor() {
19
+ super();
20
+ this._stack = "";
21
+ this._stack = new Error().stack;
22
+ }
23
+ /**
24
+ * The name of the error type.
25
+ * Returns a standard name for all AppEngine errors.
26
+ *
27
+ * @example "AppEngine Error"
28
+ */
29
+ get name() {
30
+ return "AppEngine Error";
31
+ }
32
+ /**
33
+ * Gets the stack trace for the error.
34
+ *
35
+ */
36
+ get stack() {
37
+ return this._stack;
38
+ }
39
+ /**
40
+ * Converts the error to a JSON representation.
41
+ * Useful for serialization, logging, and API responses.
42
+ *
43
+ * @returns An object containing the error's name, message, and stack trace
44
+ */
45
+ toJSON() {
46
+ return {
47
+ name: this.name,
48
+ message: this.message,
49
+ stack: this.stack,
50
+ };
51
+ }
52
+ }
53
+ BaseError.exceptionName = "Exception";
54
+ exports.default = BaseError;
55
+ });
@@ -0,0 +1,11 @@
1
+ import BaseBusinessObject from "./BaseBusinessObject";
2
+ import Version from "./Version";
3
+ export default class CompanyInfo extends BaseBusinessObject {
4
+ Version: Version;
5
+ LanguageCode: string;
6
+ CompanyName: string;
7
+ Localization: string;
8
+ fillData(data: Record<string, unknown> | object): this;
9
+ toJSON(): Record<string, unknown>;
10
+ }
11
+ //# sourceMappingURL=CompanyInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CompanyInfo.d.ts","sourceRoot":"","sources":["../../src/models/CompanyInfo.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,kBAAkB;IACzD,OAAO,UAAiB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI;IAOtD,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMlC"}
@@ -0,0 +1,24 @@
1
+ var __importDefault = (this && this.__importDefault) || function (mod) {
2
+ return (mod && mod.__esModule) ? mod : { "default": mod };
3
+ };
4
+ define(["require", "exports", "./BaseBusinessObject", "./Version"], function (require, exports, BaseBusinessObject_1, Version_1) {
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ BaseBusinessObject_1 = __importDefault(BaseBusinessObject_1);
8
+ Version_1 = __importDefault(Version_1);
9
+ class CompanyInfo extends BaseBusinessObject_1.default {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.Version = new Version_1.default();
13
+ }
14
+ fillData(data) {
15
+ super.fillData(data);
16
+ this.Version = new Version_1.default(this.Version);
17
+ return this;
18
+ }
19
+ toJSON() {
20
+ return Object.assign(Object.assign({}, super.toJSON()), { Version: this.Version.toString() });
21
+ }
22
+ }
23
+ exports.default = CompanyInfo;
24
+ });
@@ -0,0 +1,22 @@
1
+ import BaseError from "./BaseError";
2
+ import IDocumentedException from "./interfaces/IDocumentedException";
3
+ /**
4
+ * Concrete implementation of AppEngine-specific documented exceptions.
5
+ * Handles business logic errors and application-specific error conditions
6
+ * with structured Title and Detail information following RFC 7807 principles.
7
+ *
8
+ * @extends BaseError
9
+ * @implements IDocumentedException
10
+ */
11
+ export default class DocumentedException extends BaseError implements IDocumentedException {
12
+ protected static exceptionName: string;
13
+ documentationUrl: string;
14
+ title: string;
15
+ detail: string;
16
+ constructor(error?: any);
17
+ fillData(data: Record<string, unknown> | object): this;
18
+ get message(): string;
19
+ get error(): this;
20
+ static is(obj: any): obj is IDocumentedException;
21
+ }
22
+ //# sourceMappingURL=DocumentedException.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentedException.d.ts","sourceRoot":"","sources":["../../src/models/DocumentedException.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,oBAAoB,MAAM,mCAAmC,CAAC;AAGrE;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,SAAU,YAAW,oBAAoB;IACzF,SAAS,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAyB;IAC/D,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;gBAEH,KAAK,CAAC,EAAE,GAAG;IASvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI;IAMtD,IAAI,OAAO,WAEV;IAED,IAAI,KAAK,SAER;IAED,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,oBAAoB;CAchD"}
@@ -0,0 +1,50 @@
1
+ var __importDefault = (this && this.__importDefault) || function (mod) {
2
+ return (mod && mod.__esModule) ? mod : { "default": mod };
3
+ };
4
+ define(["require", "exports", "./BaseError"], function (require, exports, BaseError_1) {
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ BaseError_1 = __importDefault(BaseError_1);
8
+ /**
9
+ * Concrete implementation of AppEngine-specific documented exceptions.
10
+ * Handles business logic errors and application-specific error conditions
11
+ * with structured Title and Detail information following RFC 7807 principles.
12
+ *
13
+ * @extends BaseError
14
+ * @implements IDocumentedException
15
+ */
16
+ class DocumentedException extends BaseError_1.default {
17
+ constructor(error) {
18
+ super();
19
+ if (error) {
20
+ this.title = error.title;
21
+ this.detail = error.detail;
22
+ this.documentationUrl = error.documentationUrl;
23
+ }
24
+ }
25
+ fillData(data) {
26
+ super.fillData(data);
27
+ return this;
28
+ }
29
+ get message() {
30
+ return this.detail;
31
+ }
32
+ get error() {
33
+ return this;
34
+ }
35
+ static is(obj) {
36
+ if (typeof obj !== "object" || obj === null)
37
+ return false;
38
+ const candidate = obj;
39
+ return ("title" in candidate &&
40
+ typeof candidate.title === "string" &&
41
+ "detail" in candidate &&
42
+ typeof candidate.detail === "string" &&
43
+ candidate.title === this.exceptionName &&
44
+ "documentationUrl" in candidate &&
45
+ typeof candidate.documentationUrl === "string");
46
+ }
47
+ }
48
+ DocumentedException.exceptionName = "DocumentedException";
49
+ exports.default = DocumentedException;
50
+ });
@@ -0,0 +1,7 @@
1
+ import { IHttpResponse } from "./interfaces/IHttpResponse";
2
+ export default class HttpResponse<T> implements IHttpResponse<T> {
3
+ data: T;
4
+ response: Response;
5
+ constructor(data: T, response: Response);
6
+ }
7
+ //# sourceMappingURL=HttpResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpResponse.d.ts","sourceRoot":"","sources":["../../src/models/HttpResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,CAAC,OAAO,OAAO,YAAY,CAAC,CAAC,CAAE,YAAW,aAAa,CAAC,CAAC,CAAC;IAC5C,IAAI,EAAE,CAAC;IAAS,QAAQ,EAAE,QAAQ;gBAAlC,IAAI,EAAE,CAAC,EAAS,QAAQ,EAAE,QAAQ;CACrD"}
@@ -0,0 +1,11 @@
1
+ define(["require", "exports"], function (require, exports) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ class HttpResponse {
5
+ constructor(data, response) {
6
+ this.data = data;
7
+ this.response = response;
8
+ }
9
+ }
10
+ exports.default = HttpResponse;
11
+ });
@@ -0,0 +1,6 @@
1
+ export default interface IODataResponse<T = object> {
2
+ "@odata.count": number;
3
+ "@odata.context": string;
4
+ value: T[];
5
+ }
6
+ //# sourceMappingURL=IOdataResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IOdataResponse.d.ts","sourceRoot":"","sources":["../../src/models/IOdataResponse.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC,CAAC,GAAG,MAAM;IACjD,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,CAAC,EAAE,CAAC;CACX"}
@@ -0,0 +1,4 @@
1
+ define(["require", "exports"], function (require, exports) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ });
@@ -0,0 +1,9 @@
1
+ import { StorageTypeEnum } from "./enums/StorageTypeEnum";
2
+ export default class LocalStorage {
3
+ static put<T>(key: string, value: T, type?: StorageTypeEnum): void;
4
+ static get<T>(key: string, type?: StorageTypeEnum): T | null;
5
+ static remove(key: string, type?: StorageTypeEnum): void;
6
+ private static _prepareValueForStorage;
7
+ private static _parseValue;
8
+ }
9
+ //# sourceMappingURL=LocalStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalStorage.d.ts","sourceRoot":"","sources":["../../src/models/LocalStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,YAAY;WAClB,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,GAAE,eAAyC;WAU7E,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,eAAyC,GAAG,CAAC,GAAG,IAAI;WAiB9E,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,eAAyC;IAQjF,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAItC,OAAO,CAAC,MAAM,CAAC,WAAW;CAO1B"}
@@ -0,0 +1,55 @@
1
+ define(["require", "exports", "./enums/StorageTypeEnum"], function (require, exports, StorageTypeEnum_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ class LocalStorage {
5
+ static put(key, value, type = StorageTypeEnum_1.StorageTypeEnum.session) {
6
+ const valueToStore = this._prepareValueForStorage(value);
7
+ if (valueToStore === null)
8
+ return;
9
+ if (type === StorageTypeEnum_1.StorageTypeEnum.session) {
10
+ window.sessionStorage.setItem(key, valueToStore);
11
+ }
12
+ else if (type == StorageTypeEnum_1.StorageTypeEnum.local) {
13
+ window.localStorage.setItem(key, valueToStore);
14
+ }
15
+ }
16
+ static get(key, type = StorageTypeEnum_1.StorageTypeEnum.session) {
17
+ let value;
18
+ switch (type) {
19
+ case StorageTypeEnum_1.StorageTypeEnum.session:
20
+ value = window.sessionStorage.getItem(key);
21
+ break;
22
+ case StorageTypeEnum_1.StorageTypeEnum.local:
23
+ value = window.localStorage.getItem(key);
24
+ break;
25
+ default:
26
+ return null;
27
+ }
28
+ if (value === null)
29
+ return null;
30
+ return this._parseValue(value);
31
+ }
32
+ static remove(key, type = StorageTypeEnum_1.StorageTypeEnum.session) {
33
+ if (type === StorageTypeEnum_1.StorageTypeEnum.session) {
34
+ window.sessionStorage.removeItem(key);
35
+ }
36
+ else if (type === StorageTypeEnum_1.StorageTypeEnum.local) {
37
+ window.localStorage.removeItem(key);
38
+ }
39
+ }
40
+ static _prepareValueForStorage(value) {
41
+ if (typeof value === "object" && value !== null)
42
+ return JSON.stringify(value);
43
+ return value;
44
+ }
45
+ static _parseValue(str) {
46
+ try {
47
+ JSON.parse(str);
48
+ return JSON.parse(str);
49
+ }
50
+ catch (_a) { }
51
+ return str;
52
+ }
53
+ }
54
+ exports.default = LocalStorage;
55
+ });
@@ -0,0 +1,56 @@
1
+ import BaseError from "./BaseError";
2
+ import { IODataError, IODataErrorDetail, IOdataErrorObject, IODataInnerError } from "./interfaces/IOdataError";
3
+ /**
4
+ * Represents an OData error that occurs during web service operations.
5
+ * This class is designed to handle OData error responses from C# backend services,
6
+ * providing structured error information including error codes, messages, details, and inner errors.
7
+ *
8
+ * OData errors typically follow the OData specification format with a hierarchical structure
9
+ * containing error details that can be used for debugging and user feedback.
10
+ *
11
+ * @extends BaseError
12
+ * @implements IOdataErrorObject
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * const odataError = OdataError.create({
17
+ * error: {
18
+ * code: "ValidationError",
19
+ * message: "Invalid input data",
20
+ * details: [...],
21
+ * innererror: {...}
22
+ * }
23
+ * });
24
+ * ```
25
+ */
26
+ export default class OdataError extends BaseError implements IOdataErrorObject {
27
+ private _message;
28
+ code: string;
29
+ details: IODataErrorDetail[];
30
+ innererror: IODataInnerError;
31
+ fillData(data: Record<string, unknown> | object): this;
32
+ get name(): string;
33
+ get message(): string;
34
+ set message(value: string);
35
+ get error(): this;
36
+ /**
37
+ * Type guard to check if an object is a valid IODataError structure.
38
+ * Validates that the object has the expected OData error format with
39
+ * nested error object containing required properties.
40
+ *
41
+ * This is particularly useful when handling responses from C# OData services
42
+ * that return errors in the standard OData format.
43
+ *
44
+ * @param obj - The object to check
45
+ * @returns True if the object matches the IODataError structure
46
+ *
47
+ * @example
48
+ * ```typescript
49
+ * if (OdataError.is(responseData)) {
50
+ * const error = OdataError.create(responseData);
51
+ * }
52
+ * ```
53
+ */
54
+ static is(obj: any): obj is IODataError;
55
+ }
56
+ //# sourceMappingURL=OdataError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OdataError.d.ts","sourceRoot":"","sources":["../../src/models/OdataError.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EACN,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,MAAM,0BAA0B,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,SAAU,YAAW,iBAAiB;IAC7E,OAAO,CAAC,QAAQ,CAAc;IAC9B,IAAI,EAAE,MAAM,CAAM;IAClB,OAAO,EAAE,iBAAiB,EAAE,CAAM;IAClC,UAAU,EAAE,gBAAgB,CAAM;IAElC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI;IAUtD,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,MAAM,EAExB;IAED,IAAI,KAAK,SAER;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,WAAW;CAavC"}