@cloudize/sdk-core 23.3.3 → 23.3.4

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.
@@ -319,7 +319,9 @@ class ResourceContainer {
319
319
  return this;
320
320
  }
321
321
  RewriteUri(uri) {
322
- return this.sdkConfig.RewriteUri(uri);
322
+ if ((0, json_1.isDefined)(this.sdkConfig.uriRewriter))
323
+ return this.sdkConfig.uriRewriter(uri);
324
+ return uri;
323
325
  }
324
326
  toJSON() {
325
327
  if ((0, json_1.isDefined)(this.data)) {
@@ -13,12 +13,13 @@ export declare class SDKConfiguration {
13
13
  RegisterResourceClass(type: string, resourceClass: ResourceObjectClass): void;
14
14
  ResourceClass(type: string): ResourceObjectClass;
15
15
  FormatURL(path: string): string;
16
- RewriteUri(uri: string): string;
17
16
  get accessToken(): string;
18
17
  set accessToken(value: string);
19
18
  get apiKey(): string;
20
19
  set apiKey(value: string);
21
20
  get hostName(): string;
22
21
  set hostName(value: string);
22
+ get uriRewriter(): UriRewriter;
23
+ set uriRewriter(value: UriRewriter);
23
24
  }
24
25
  export declare function SDKConfig(): SDKConfiguration;
@@ -17,11 +17,6 @@ class SDKConfiguration {
17
17
  url = url.endsWith('/') ? url.slice(0, -1) : url;
18
18
  return path.startsWith('/') ? `${url}${path}` : `${url}/${path}`;
19
19
  }
20
- RewriteUri(uri) {
21
- if ((0, json_1.isDefined)(this._uriRewriter))
22
- return this._uriRewriter(uri);
23
- return uri;
24
- }
25
20
  get accessToken() {
26
21
  return this._accessToken;
27
22
  }
@@ -40,6 +35,12 @@ class SDKConfiguration {
40
35
  set hostName(value) {
41
36
  this._hostName = value;
42
37
  }
38
+ get uriRewriter() {
39
+ return this._uriRewriter;
40
+ }
41
+ set uriRewriter(value) {
42
+ this._uriRewriter = value;
43
+ }
43
44
  }
44
45
  exports.SDKConfiguration = SDKConfiguration;
45
46
  let configInstance;
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "description": "Cloudize SDK Core",
15
15
  "license": "MIT",
16
- "version": "23.3.3",
16
+ "version": "23.3.4",
17
17
  "main": "lib/index.js",
18
18
  "types": "lib/index.d.ts",
19
19
  "scripts": {