@ignos/api-client 20260608.148.1 → 20260612.150.1-alpha
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/lib/AuthorizedApiBase.js +7 -3
- package/lib/ignosportal-api.d.ts +220 -214
- package/lib/ignosportal-api.js +4354 -4188
- package/package.json +1 -1
- package/src/AuthorizedApiBase.ts +9 -4
- package/src/ignosportal-api.ts +6125 -5961
package/package.json
CHANGED
package/src/AuthorizedApiBase.ts
CHANGED
|
@@ -21,7 +21,8 @@ export class AuthorizedApiBase {
|
|
|
21
21
|
protected transformOptions = async (options: any): Promise<any> => {
|
|
22
22
|
options.headers = {
|
|
23
23
|
...options.headers,
|
|
24
|
-
Authorization:
|
|
24
|
+
Authorization:
|
|
25
|
+
"Bearer " + (await this.config.accessTokenProvider.getAccessToken()),
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
const tenantId = this.config.tenantIdProvider.getTenantId();
|
|
@@ -31,14 +32,18 @@ export class AuthorizedApiBase {
|
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
protected jsonParseReviver = (_: any, value: any) => {
|
|
34
|
-
// Matches starts with "2025-12-09T13:19:39"
|
|
35
|
-
// Will also match "2025-12-09T13:19:39.4576289+00:00"
|
|
36
35
|
if (typeof value !== "string") return value;
|
|
37
36
|
|
|
37
|
+
// Matches starts with "2025-12-09T13:19:39"
|
|
38
|
+
// Will also match "2025-12-09T13:19:39.4576289+00:00"
|
|
38
39
|
const regex = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/;
|
|
39
40
|
if (!regex.test(value)) return value;
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
// JS Date only supports millisecond precision (3 fractional digits).
|
|
43
|
+
// Timestamps with microseconds or higher (e.g. ".4576289") produce Invalid Date.
|
|
44
|
+
// Truncate any excess fractional digits before parsing.
|
|
45
|
+
const normalized = value.replace(/(\.\d{3})\d+/, "$1");
|
|
46
|
+
const date = new Date(normalized);
|
|
42
47
|
|
|
43
48
|
// Prevent values like "2025-12-09T13:19:39.4576289+00:00 bla bla bla" from being parsed as Date
|
|
44
49
|
// (values not starting with an ISO date-time are already filtered out by the regex above)
|