message: fix(issuer-irec-api-wrapper): fix for failing api calls after tokens refresh
diff: @@ -361,7 +361,11 @@ export class IRECAPIClient {
  await validateOrReject(dev);
  const url = `${deviceManagementUrl}/create`;
  - const response = await this.axiosInstance.post(url, classToPlain(dev), this.config);
  + const response = await this.axiosInstance.post<{ device: Device }>(
  + url,
  + classToPlain(dev),
  + this.config
  + );
  return plainToClass(Device, response.data?.device);
  },
  @@ -374,7 +378,11 @@ export class IRECAPIClient {
  await validateOrReject(dev, { skipMissingProperties: true });
  const url = `${deviceManagementUrl}/${code}/edit`;
  - const response = await this.axiosInstance.put(url, classToPlain(dev), this.config);
  + const response = await this.axiosInstance.put<{ device: Device }>(
  + url,
  + classToPlain(dev),
  + this.config
  + );
  return plainToClass(Device, response.data?.device);
  },
  getAll: async (): Promise<Device[]> => {
  @@ -556,8 +564,6 @@ export class IRECAPIClient {
  );
  await this.onTokensRefreshed(this.accessTokens);
  -
  - return this.accessTokens;
  }
  private async ensureNotExpired() {
  @@ -577,7 +583,7 @@ export class IRECAPIClient {
  this.interceptorId = this.axiosInstance.interceptors.request.use(async (config) => {
  console.log(`${config.method} ${config.url} ${JSON.stringify(config.data) ?? ''}`);
  await this.ensureNotExpired();
  -
  + config.headers = { ...config.headers, ...this.config.headers };
  return config;
  });
  }
  