Skip to content

Commit

Permalink
#1088: clean up field list of attributeSet
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Aug 23, 2023
1 parent 17a00e0 commit f363b65
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 146 deletions.
52 changes: 37 additions & 15 deletions lib/metadataTypes/definitions/AttributeSet.definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ module.exports = {
template: false,
},
'definitionName.value': {
// equal to 'name'; auto-populated by preDeployTasks
// equal to 'name'
isCreateable: true,
isUpdateable: true,
retrieving: false,
template: false,
},
fullyQualifiedName: {
// equal to 'name'; auto-populated by preDeployTasks
// equal to 'name'
isCreateable: true,
isUpdateable: true,
retrieving: false,
Expand Down Expand Up @@ -617,9 +617,10 @@ module.exports = {
template: null,
},
'valueDefinitions[].baseType': {
// "Numeric", "Text", ... valueDefinitions[].dataType is more relevant
isCreateable: null,
isUpdateable: null,
retrieving: true,
retrieving: false,
template: null,
},
'valueDefinitions[].customerDataID': {
Expand All @@ -628,6 +629,12 @@ module.exports = {
retrieving: true,
template: null,
},
'valueDefinitions[].connectingID': {
isCreateable: null,
isUpdateable: null,
retrieving: false,
template: null,
},
'valueDefinitions[].dataSourceID': {
isCreateable: null,
isUpdateable: null,
Expand All @@ -637,7 +644,7 @@ module.exports = {
'valueDefinitions[].dataSourceName': {
isCreateable: null,
isUpdateable: null,
retrieving: true,
retrieving: false,
template: null,
},
'valueDefinitions[].dataType': {
Expand All @@ -664,10 +671,11 @@ module.exports = {
retrieving: true,
template: null,
},
'valueDefinitions[].definitionName.value': {
'valueDefinitions[].definitionName': {
// equal to valueDefinitions[].name
isCreateable: null,
isUpdateable: null,
retrieving: true,
retrieving: false,
template: null,
},
'valueDefinitions[].description': {
Expand All @@ -677,15 +685,17 @@ module.exports = {
template: null,
},
'valueDefinitions[].displayOrder': {
// merely a numeric counter; equal to valueDefinitions[].ordinal; not given for isHidden:true entries
isCreateable: null,
isUpdateable: null,
retrieving: true,
retrieving: false,
template: null,
},
'valueDefinitions[].fullyQualifiedName': {
// dataExtension name + field name
isCreateable: null,
isUpdateable: null,
retrieving: true,
retrieving: false,
template: null,
},
'valueDefinitions[].identifierType': {
Expand Down Expand Up @@ -742,10 +752,11 @@ module.exports = {
retrieving: true,
template: null,
},
'valueDefinitions[].localizedDescription.value': {
'valueDefinitions[].localizedDescription': {
// always equal to { value: "" }
isCreateable: null,
isUpdateable: null,
retrieving: true,
retrieving: false,
template: null,
},
'valueDefinitions[].name': {
Expand All @@ -754,6 +765,13 @@ module.exports = {
retrieving: true,
template: null,
},
'valueDefinitions[].obfuscationProperties': {
// might become relevant when fields are encrypted but for most cases we should simply skip it
isCreateable: null,
isUpdateable: null,
retrieving: false,
template: null,
},
'valueDefinitions[].obfuscationProperties.maskType': {
isCreateable: null,
isUpdateable: null,
Expand Down Expand Up @@ -785,9 +803,10 @@ module.exports = {
template: null,
},
'valueDefinitions[].ordinal': {
// merely a numeric counter; equal to valueDefinitions[].displayOrder; not given for isHidden:true entries
isCreateable: null,
isUpdateable: null,
retrieving: true,
retrieving: false,
template: null,
},
'valueDefinitions[].parentDefinition': {
Expand All @@ -803,9 +822,10 @@ module.exports = {
template: null,
},
'valueDefinitions[].parentType': {
// always "Set"
isCreateable: null,
isUpdateable: null,
retrieving: true,
retrieving: false,
template: null,
},
'valueDefinitions[].restrictionLookupListID': {
Expand All @@ -832,7 +852,7 @@ module.exports = {
retrieving: false,
template: null,
},
'valueDefinitions[].setDefinitionName.value': {
'valueDefinitions[].setDefinitionName': {
isCreateable: null,
isUpdateable: null,
retrieving: false,
Expand All @@ -857,15 +877,17 @@ module.exports = {
template: null,
},
'valueDefinitions[].valueDefinitionID': {
// equal to valueDefinitions[].definitionID
isCreateable: null,
isUpdateable: null,
retrieving: true,
retrieving: false,
template: null,
},
'valueDefinitions[].valueDefinitionKey': {
// equal to valueDefinitions[].definitionKey
isCreateable: null,
isUpdateable: null,
retrieving: true,
retrieving: false,
template: null,
},
r__folder_Path: {
Expand Down
136 changes: 5 additions & 131 deletions test/resources/9999999/attributeSet/retrieve-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,53 +74,25 @@
"storageObjectIDs": ["5b8b787a-5238-ee11-b85a-48df37d1de8a"],
"valueDefinitions": [
{
"baseType": "Numeric",
"connectingID": {
"identifierType": "FullyQualifiedName"
},
"dataSourceName": {},
"dataType": "LongNumber",
"definitionID": "548b787a-5238-ee11-b85a-48df37d1de8a",
"definitionKey": "CustomObjectKey",
"definitionName": {
"value": "Custom Object Key"
},
"description": "",
"fullyQualifiedName": "testExisting_dataExtensionShared.Custom Object Key",
"isHidden": true,
"isIdentityValue": true,
"isNullable": false,
"isPrimaryKey": false,
"isReadOnly": true,
"isSystemDefined": true,
"isUpdateable": true,
"localizedDescription": {
"value": ""
},
"name": "Custom Object Key",
"parentType": "Set",
"setDefinitionName": {
"value": "testExisting_dataExtensionShared"
},
"storageName": "_CustomObjectKey",
"valueDefinitionID": "548b787a-5238-ee11-b85a-48df37d1de8a",
"valueDefinitionKey": "CustomObjectKey"
"storageName": "_CustomObjectKey"
},
{
"baseType": "Text",
"connectingID": {
"identifierType": "FullyQualifiedName"
},
"dataSourceName": {},
"dataType": "Text",
"definitionID": "588b787a-5238-ee11-b85a-48df37d1de8a",
"definitionKey": "FirstName",
"definitionName": {
"value": "FirstName"
},
"description": "",
"displayOrder": 0,
"fullyQualifiedName": "testExisting_dataExtensionShared.FirstName",
"isHidden": false,
"isIdentityValue": false,
"isNullable": true,
Expand All @@ -129,45 +101,18 @@
"isSystemDefined": false,
"isUpdateable": true,
"length": 50,
"localizedDescription": {
"value": ""
},
"name": "FirstName",
"obfuscationProperties": {
"maskType": "None",
"maskTypeID": 0,
"storageType": "Plain",
"storageTypeID": 1,
"valueDefinitionID": "588b787a-5238-ee11-b85a-48df37d1de8a"
},
"ordinal": 0,
"parentType": "Set",
"setDefinitionName": {
"value": "testExisting_dataExtensionShared"
},
"storageFieldReferenceID": {
"type": "guid",
"value": "391bfc9e-ea85-4610-a24b-d8400a36cdfc"
},
"storageName": "FirstName",
"valueDefinitionID": "588b787a-5238-ee11-b85a-48df37d1de8a",
"valueDefinitionKey": "FirstName"
"storageName": "FirstName"
},
{
"baseType": "Text",
"connectingID": {
"identifierType": "FullyQualifiedName"
},
"dataSourceName": {},
"dataType": "Text",
"definitionID": "578b787a-5238-ee11-b85a-48df37d1de8a",
"definitionKey": "LastName",
"definitionName": {
"value": "LastName"
},
"description": "",
"displayOrder": 1,
"fullyQualifiedName": "testExisting_dataExtensionShared.LastName",
"isHidden": false,
"isIdentityValue": false,
"isNullable": true,
Expand All @@ -176,45 +121,18 @@
"isSystemDefined": false,
"isUpdateable": true,
"length": 55,
"localizedDescription": {
"value": ""
},
"name": "LastName",
"obfuscationProperties": {
"maskType": "None",
"maskTypeID": 0,
"storageType": "Plain",
"storageTypeID": 1,
"valueDefinitionID": "578b787a-5238-ee11-b85a-48df37d1de8a"
},
"ordinal": 1,
"parentType": "Set",
"setDefinitionName": {
"value": "testExisting_dataExtensionShared"
},
"storageFieldReferenceID": {
"type": "guid",
"value": "3f80ba1f-f957-400f-88cb-a9303491026d"
},
"storageName": "LastName",
"valueDefinitionID": "578b787a-5238-ee11-b85a-48df37d1de8a",
"valueDefinitionKey": "LastName"
"storageName": "LastName"
},
{
"baseType": "Text",
"connectingID": {
"identifierType": "FullyQualifiedName"
},
"dataSourceName": {},
"dataType": "EmailAddress",
"definitionID": "568b787a-5238-ee11-b85a-48df37d1de8a",
"definitionKey": "EmailAddress",
"definitionName": {
"value": "EmailAddress"
},
"description": "",
"displayOrder": 2,
"fullyQualifiedName": "testExisting_dataExtensionShared.EmailAddress",
"isHidden": false,
"isIdentityValue": false,
"isNullable": false,
Expand All @@ -223,45 +141,18 @@
"isSystemDefined": false,
"isUpdateable": true,
"length": 254,
"localizedDescription": {
"value": ""
},
"name": "EmailAddress",
"obfuscationProperties": {
"maskType": "None",
"maskTypeID": 0,
"storageType": "Plain",
"storageTypeID": 1,
"valueDefinitionID": "568b787a-5238-ee11-b85a-48df37d1de8a"
},
"ordinal": 2,
"parentType": "Set",
"setDefinitionName": {
"value": "testExisting_dataExtensionShared"
},
"storageFieldReferenceID": {
"type": "guid",
"value": "41b9575b-da06-41ed-8551-f76868451a51"
},
"storageName": "EmailAddress",
"valueDefinitionID": "568b787a-5238-ee11-b85a-48df37d1de8a",
"valueDefinitionKey": "EmailAddress"
"storageName": "EmailAddress"
},
{
"baseType": "Text",
"connectingID": {
"identifierType": "FullyQualifiedName"
},
"dataSourceName": {},
"dataType": "Text",
"definitionID": "558b787a-5238-ee11-b85a-48df37d1de8a",
"definitionKey": "ContactKey",
"definitionName": {
"value": "ContactKey"
},
"description": "",
"displayOrder": 4,
"fullyQualifiedName": "testExisting_dataExtensionShared.ContactKey",
"isHidden": false,
"isIdentityValue": false,
"isNullable": false,
Expand All @@ -270,29 +161,12 @@
"isSystemDefined": false,
"isUpdateable": true,
"length": 50,
"localizedDescription": {
"value": ""
},
"name": "ContactKey",
"obfuscationProperties": {
"maskType": "None",
"maskTypeID": 0,
"storageType": "Plain",
"storageTypeID": 1,
"valueDefinitionID": "558b787a-5238-ee11-b85a-48df37d1de8a"
},
"ordinal": 4,
"parentType": "Set",
"setDefinitionName": {
"value": "testExisting_dataExtensionShared"
},
"storageFieldReferenceID": {
"type": "guid",
"value": "49d0db37-dff0-49d9-9d82-eb29b345f238"
},
"storageName": "ContactKey",
"valueDefinitionID": "558b787a-5238-ee11-b85a-48df37d1de8a",
"valueDefinitionKey": "ContactKey"
"storageName": "ContactKey"
}
]
}

0 comments on commit f363b65

Please sign in to comment.