@openshift-migration-advisor/planner-sdk 0.28.0-f239eb1e78fa → 0.29.0

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @openshift-migration-advisor/planner-sdk@0.28.0-f239eb1e78fa
1
+ # @openshift-migration-advisor/planner-sdk@0.29.0
2
2
 
3
3
  A TypeScript SDK client for the raw.githubusercontent.com API.
4
4
 
@@ -217,7 +217,7 @@ and is automatically generated by the
217
217
  [OpenAPI Generator](https://openapi-generator.tech) project:
218
218
 
219
219
  - API version: `v1alpha1`
220
- - Package version: `0.28.0-f239eb1e78fa`
220
+ - Package version: `0.29.0`
221
221
  - Generator version: `7.27.0-SNAPSHOT`
222
222
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
223
223
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openshift-migration-advisor/planner-sdk",
3
- "version": "0.28.0-f239eb1e78fa",
3
+ "version": "0.29.0",
4
4
  "description": "OpenAPI client for @openshift-migration-advisor/planner-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
package/src/runtime.ts CHANGED
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
- export const BASE_PATH = "https://raw.githubusercontent.com".replace(/\/+$/, "");
15
+ export const BASE_PATH: string = "https://raw.githubusercontent.com".replace(/\/+$/, "");
16
16
 
17
17
  export interface ConfigurationParameters {
18
18
  basePath?: string; // override base path
@@ -83,7 +83,7 @@ export class Configuration {
83
83
  }
84
84
  }
85
85
 
86
- export const DefaultConfig = new Configuration();
86
+ export const DefaultConfig: Configuration = new Configuration();
87
87
 
88
88
  /**
89
89
  * This is the base class for all generated API classes.
@@ -93,22 +93,22 @@ export class BaseAPI {
93
93
  private static readonly jsonRegex = /^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$/i;
94
94
  private middleware: Middleware[];
95
95
 
96
- constructor(protected configuration = DefaultConfig) {
96
+ constructor(protected configuration: Configuration = DefaultConfig) {
97
97
  this.middleware = configuration.middleware;
98
98
  }
99
99
 
100
- withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
100
+ withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T {
101
101
  const next = this.clone<T>();
102
102
  next.middleware = next.middleware.concat(...middlewares);
103
103
  return next;
104
104
  }
105
105
 
106
- withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>) {
106
+ withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T {
107
107
  const middlewares = preMiddlewares.map((pre) => ({ pre }));
108
108
  return this.withMiddleware<T>(...middlewares);
109
109
  }
110
110
 
111
- withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>) {
111
+ withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T {
112
112
  const middlewares = postMiddlewares.map((post) => ({ post }));
113
113
  return this.withMiddleware<T>(...middlewares);
114
114
  }
@@ -354,7 +354,7 @@ function querystringSingleKey(key: string, value: string | number | null | undef
354
354
  return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
355
355
  }
356
356
 
357
- export function exists(json: any, key: string) {
357
+ export function exists(json: any, key: string): boolean {
358
358
  const value = json[key];
359
359
  return value !== null && value !== undefined;
360
360
  }
@@ -410,7 +410,7 @@ export function parseDateTime(value: any): Date {
410
410
  return new Date(value);
411
411
  }
412
412
 
413
- export function mapValues(data: any, fn: (item: any) => any) {
413
+ export function mapValues(data: any, fn: (item: any) => any): { [key: string]: any } {
414
414
  const result: { [key: string]: any } = {};
415
415
  for (const key of Object.keys(data)) {
416
416
  result[key] = fn(data[key]);