@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.
@@ -5,4 +5,5 @@ export declare class AuthorizedApiBase {
5
5
  private readonly config;
6
6
  protected constructor(config: IAccessTokenProvider);
7
7
  protected transformOptions: (options: any) => Promise<any>;
8
+ protected jsonParseReviver: (_: any, value: any) => any;
8
9
  }
@@ -3,10 +3,19 @@ export class AuthorizedApiBase {
3
3
  this.transformOptions = async (options) => {
4
4
  options.headers = {
5
5
  ...options.headers,
6
- Authorization: 'Bearer ' + (await this.config.getAccessToken()),
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
  }