@apigames/sdk-core 23.3.3 → 23.3.5
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
|
-
|
|
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)) {
|
|
@@ -261,7 +261,7 @@ class ResourceObject {
|
|
|
261
261
|
obj.attributes = this.SerializeAttributesPayload(undefined, this.attributes);
|
|
262
262
|
}
|
|
263
263
|
if ((0, json_1.isDefined)(this.relationships)) {
|
|
264
|
-
obj.
|
|
264
|
+
obj.relationships = this.SerializeRelationshipsPayload(undefined, this.relationships);
|
|
265
265
|
}
|
|
266
266
|
(0, json_1.redactUndefinedValues)(obj);
|
|
267
267
|
return JSON.parse(JSON.stringify(obj));
|
|
@@ -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": "API Games SDK Core",
|
|
15
15
|
"license": "MIT",
|
|
16
|
-
"version": "23.3.
|
|
16
|
+
"version": "23.3.5",
|
|
17
17
|
"main": "lib/index.js",
|
|
18
18
|
"types": "lib/index.d.ts",
|
|
19
19
|
"scripts": {
|
|
@@ -33,20 +33,20 @@
|
|
|
33
33
|
"test:watch": "jest --watch"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@apigames/json": "23.3.
|
|
36
|
+
"@apigames/json": "23.3.3",
|
|
37
37
|
"@apigames/rest-client": "23.3.2",
|
|
38
38
|
"object-hash": "3.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/date-and-time": "0.13.0",
|
|
42
|
-
"@types/jest": "29.5.
|
|
43
|
-
"@types/node": "20.8.
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "6.
|
|
45
|
-
"@typescript-eslint/parser": "6.
|
|
42
|
+
"@types/jest": "29.5.6",
|
|
43
|
+
"@types/node": "20.8.9",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "6.9.0",
|
|
45
|
+
"@typescript-eslint/parser": "6.9.0",
|
|
46
46
|
"date-and-time": "3.0.3",
|
|
47
|
-
"eslint": "8.
|
|
47
|
+
"eslint": "8.52.0",
|
|
48
48
|
"eslint-config-airbnb": "19.0.4",
|
|
49
|
-
"eslint-plugin-import": "2.
|
|
49
|
+
"eslint-plugin-import": "2.29.0",
|
|
50
50
|
"eslint-plugin-jsx-a11y": "6.7.1",
|
|
51
51
|
"eslint-plugin-react": "7.33.2",
|
|
52
52
|
"eslint-plugin-react-hooks": "4.6.0",
|