@apigames/sdk-core 25.1.6 → 25.1.8

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.
@@ -192,10 +192,16 @@ class ResourceObject {
192
192
  if ((0, json_1.isDefined)(this.id))
193
193
  payload.data.id = this.id;
194
194
  if ((0, json_1.isDefined)(this.attributes)) {
195
- payload.data.attributes = this.SerializeAttributesPayload(this.shadowAttributes, this.attributes);
195
+ const serializedAttributes = this.SerializeAttributesPayload(this.shadowAttributes, this.attributes);
196
+ if ((0, json_1.isDefinedAndNotNull)(serializedAttributes) && (0, json_1.isFalse)((0, json_1.isEmpty)(serializedAttributes))) {
197
+ payload.data.attributes = serializedAttributes;
198
+ }
196
199
  }
197
200
  if ((0, json_1.isDefined)(this.relationships)) {
198
- payload.data.relationships = this.SerializeRelationshipsPayload(this.shadowRelationships, this.relationships);
201
+ const serializedRelationships = this.SerializeRelationshipsPayload(this.shadowRelationships, this.relationships);
202
+ if ((0, json_1.isDefinedAndNotNull)(serializedRelationships) && (0, json_1.isFalse)((0, json_1.isEmpty)(serializedRelationships))) {
203
+ payload.data.relationships = serializedRelationships;
204
+ }
199
205
  }
200
206
  (0, json_1.redactUndefinedValues)(payload);
201
207
  return payload;
@@ -208,10 +214,16 @@ class ResourceObject {
208
214
  },
209
215
  };
210
216
  if ((0, json_1.isDefined)(this.attributes)) {
211
- payload.data.attributes = this.SerializeAttributesPayload(this.shadowAttributes, this.attributes);
217
+ const serializedAttributes = this.SerializeAttributesPayload(this.shadowAttributes, this.attributes);
218
+ if ((0, json_1.isDefinedAndNotNull)(serializedAttributes) && (0, json_1.isFalse)((0, json_1.isEmpty)(serializedAttributes))) {
219
+ payload.data.attributes = serializedAttributes;
220
+ }
212
221
  }
213
222
  if ((0, json_1.isDefined)(this.relationships)) {
214
- payload.data.relationships = this.SerializeRelationshipsPayload(this.shadowRelationships, this.relationships);
223
+ const serializedRelationships = this.SerializeRelationshipsPayload(this.shadowRelationships, this.relationships);
224
+ if ((0, json_1.isDefinedAndNotNull)(serializedRelationships) && (0, json_1.isFalse)((0, json_1.isEmpty)(serializedRelationships))) {
225
+ payload.data.relationships = serializedRelationships;
226
+ }
215
227
  }
216
228
  (0, json_1.redactUndefinedValues)(payload);
217
229
  return payload;
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "description": "API Games SDK Core",
15
15
  "license": "MIT",
16
- "version": "25.1.6",
16
+ "version": "25.1.8",
17
17
  "main": "lib/index.js",
18
18
  "types": "lib/index.d.ts",
19
19
  "scripts": {
@@ -39,15 +39,15 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/jest": "^30.0.0",
42
- "@types/node": "^24.10.13",
43
- "@typescript-eslint/eslint-plugin": "^8.56.1",
44
- "@typescript-eslint/parser": "^8.56.1",
42
+ "@types/node": "^24.12.0",
43
+ "@typescript-eslint/eslint-plugin": "^8.57.0",
44
+ "@typescript-eslint/parser": "^8.57.0",
45
45
  "date-and-time": "^3.6.0",
46
46
  "eslint": "^8.57.1",
47
47
  "eslint-config-airbnb-base": "^15.0.0",
48
48
  "eslint-plugin-import": "^2.32.0",
49
49
  "eslint-plugin-jsx-a11y": "^6.10.2",
50
- "jest": "^30.2.0",
50
+ "jest": "^30.3.0",
51
51
  "ts-jest": "^29.4.6",
52
52
  "typescript": "^5.9.3"
53
53
  },