Skip to content

Commit

Permalink
#1088: remove additional fields from retrieve to increase readability
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Aug 23, 2023
1 parent 9af8def commit c970fdf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 308 deletions.
14 changes: 12 additions & 2 deletions lib/metadataTypes/definitions/AttributeSet.definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,10 @@ module.exports = {
template: null,
},
'valueDefinitions[].definitionID': {
// likely the main ID of the value definition. No use for simple checks on git though as long as we cannot update it
isCreateable: null,
isUpdateable: null,
retrieving: true,
retrieving: false,
template: null,
},
'valueDefinitions[].definitionKey': {
Expand Down Expand Up @@ -858,22 +859,31 @@ module.exports = {
retrieving: false,
template: null,
},
'valueDefinitions[].storageFieldReferenceID': {
isCreateable: null,
isUpdateable: null,
retrieving: false,
template: null,
},
'valueDefinitions[].storageFieldReferenceID.type': {
// always "guid"
isCreateable: null,
isUpdateable: null,
retrieving: true,
template: null,
},
'valueDefinitions[].storageFieldReferenceID.value': {
// unknown GUID
isCreateable: null,
isUpdateable: null,
retrieving: true,
template: null,
},
'valueDefinitions[].storageName': {
// always equal valueDefinitions[].definitionKey, except for when that is CustomObjectKey - then this will be _CustomObjectKey (with an underscore)
isCreateable: null,
isUpdateable: null,
retrieving: true,
retrieving: false,
template: null,
},
'valueDefinitions[].valueDefinitionID': {
Expand Down
36 changes: 5 additions & 31 deletions test/resources/9999999/attributeSet/retrieve-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
"valueDefinitions": [
{
"dataType": "LongNumber",
"definitionID": "548b787a-5238-ee11-b85a-48df37d1de8a",
"definitionKey": "CustomObjectKey",
"description": "",
"isHidden": true,
Expand All @@ -82,12 +81,10 @@
"isReadOnly": true,
"isSystemDefined": true,
"isUpdateable": true,
"name": "Custom Object Key",
"storageName": "_CustomObjectKey"
"name": "Custom Object Key"
},
{
"dataType": "Text",
"definitionID": "588b787a-5238-ee11-b85a-48df37d1de8a",
"definitionKey": "FirstName",
"description": "",
"isHidden": false,
Expand All @@ -98,16 +95,10 @@
"isSystemDefined": false,
"isUpdateable": true,
"length": 50,
"name": "FirstName",
"storageFieldReferenceID": {
"type": "guid",
"value": "391bfc9e-ea85-4610-a24b-d8400a36cdfc"
},
"storageName": "FirstName"
"name": "FirstName"
},
{
"dataType": "Text",
"definitionID": "578b787a-5238-ee11-b85a-48df37d1de8a",
"definitionKey": "LastName",
"description": "",
"isHidden": false,
Expand All @@ -118,16 +109,10 @@
"isSystemDefined": false,
"isUpdateable": true,
"length": 55,
"name": "LastName",
"storageFieldReferenceID": {
"type": "guid",
"value": "3f80ba1f-f957-400f-88cb-a9303491026d"
},
"storageName": "LastName"
"name": "LastName"
},
{
"dataType": "EmailAddress",
"definitionID": "568b787a-5238-ee11-b85a-48df37d1de8a",
"definitionKey": "EmailAddress",
"description": "",
"isHidden": false,
Expand All @@ -138,16 +123,10 @@
"isSystemDefined": false,
"isUpdateable": true,
"length": 254,
"name": "EmailAddress",
"storageFieldReferenceID": {
"type": "guid",
"value": "41b9575b-da06-41ed-8551-f76868451a51"
},
"storageName": "EmailAddress"
"name": "EmailAddress"
},
{
"dataType": "Text",
"definitionID": "558b787a-5238-ee11-b85a-48df37d1de8a",
"definitionKey": "ContactKey",
"description": "",
"isHidden": false,
Expand All @@ -158,12 +137,7 @@
"isSystemDefined": false,
"isUpdateable": true,
"length": 50,
"name": "ContactKey",
"storageFieldReferenceID": {
"type": "guid",
"value": "49d0db37-dff0-49d9-9d82-eb29b345f238"
},
"storageName": "ContactKey"
"name": "ContactKey"
}
]
}
Loading

0 comments on commit c970fdf

Please sign in to comment.