@apigames/sdk-core 25.1.7 → 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.
|
@@ -191,11 +191,17 @@ class ResourceObject {
|
|
|
191
191
|
};
|
|
192
192
|
if ((0, json_1.isDefined)(this.id))
|
|
193
193
|
payload.data.id = this.id;
|
|
194
|
-
if ((0, json_1.isDefined)(this.attributes)
|
|
195
|
-
|
|
194
|
+
if ((0, json_1.isDefined)(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
|
-
if ((0, json_1.isDefined)(this.relationships)
|
|
198
|
-
|
|
200
|
+
if ((0, json_1.isDefined)(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;
|
|
@@ -207,11 +213,17 @@ class ResourceObject {
|
|
|
207
213
|
id: this.id,
|
|
208
214
|
},
|
|
209
215
|
};
|
|
210
|
-
if ((0, json_1.isDefined)(this.attributes)
|
|
211
|
-
|
|
216
|
+
if ((0, json_1.isDefined)(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
|
-
if ((0, json_1.isDefined)(this.relationships)
|
|
214
|
-
|
|
222
|
+
if ((0, json_1.isDefined)(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;
|