@ignos/api-client 20260213.48.1 → 20260216.52.1
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.d.ts +1 -0
- package/lib/AuthorizedApiBase.js +10 -1
- package/lib/ignosportal-api.d.ts +742 -9348
- package/lib/ignosportal-api.js +514 -30984
- package/package.json +1 -1
- package/src/AuthorizedApiBase.ts +24 -12
- package/src/ignosportal-api.ts +1518 -39783
package/lib/AuthorizedApiBase.js
CHANGED
|
@@ -3,10 +3,19 @@ export class AuthorizedApiBase {
|
|
|
3
3
|
this.transformOptions = async (options) => {
|
|
4
4
|
options.headers = {
|
|
5
5
|
...options.headers,
|
|
6
|
-
Authorization:
|
|
6
|
+
Authorization: "Bearer " + (await this.config.getAccessToken()),
|
|
7
7
|
};
|
|
8
8
|
return options;
|
|
9
9
|
};
|
|
10
|
+
this.jsonParseReviver = (_, value) => {
|
|
11
|
+
// Matches starts with "2025-12-09T13:19:39"
|
|
12
|
+
// Will also match "2025-12-09T13:19:39.4576289+00:00"
|
|
13
|
+
const regex = /(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/;
|
|
14
|
+
if (typeof value === "string" && regex.exec(value)) {
|
|
15
|
+
return new Date(value);
|
|
16
|
+
}
|
|
17
|
+
return value;
|
|
18
|
+
};
|
|
10
19
|
this.config = config;
|
|
11
20
|
}
|
|
12
21
|
}
|