Service - Contact Method Email
Jump to navigation
Jump to search
email
Overview
Manages email contact methods for users, details are not part of the public transparency followed across the majority of the project in order to protect against emails being scraped.
Repository
https://bitbucket.org/stb_working/contact-method-email/src/master/
DynamoDB tables
EmailAddress
Fields
- userId
- (partition key)
- string
- uniqueId
- (sort key)
- eg a UUID generated when creating the email record, or sent by Service - User Contact Manager
- string
Object Schemas
objType
{
objectType: "email",
extendObjType: { // core object that this object extends
objectType: "userContact",
serviceTag: "UserContactManager",
},
complexFilterServiceTag: "complexFilter",
fieldNames: { // see Per Service Schemas
contactTag: {
type: "string",
requiredOnCreate: true,
canUpdate: true,
validation: {
pattern: pattern
},
storageResourceTags: ['myGraph']
}
}
}
fieldNames
- contactTag
- string name created by user to publicly identify this email contact
emailAddress
{
objectType: "emailAddress",
canDelete: false,
complexFilterServiceTag: "complexFilter",
overWriteHandlers: { // optional, if not set will create default handlers, if empty will not create handler and main function
create: ['hdrSqs'], // default: ['hdrApi', 'hdrSqs']
update: [], // default: ['hdrApi', 'hdrSqs']
get: [], // default: ['hdrApi', 'hdrInv']
delete: [], // default: ['hdrApi', 'hdrSqs']
},
// overwriteGeneratedMainFunction: ["create"],
storageResources: {
dynamoDB: {
storageType: "dynamoDB",
tableName: "EmailAdress"
}
},
fieldNames: { // see Per Service Schemas
userId: {
type: "string",
storageResourceTags: ['dynamoDB'],
fromServiceNameTag: "UserContactManager",
fromObjectType: "userContact"
},
uniqueId: {
type: "string",
storageResourceTags: ['dynamoDB'],
fromServiceNameTag: "UserContactManager",
fromObjectType: "userContact"
},
email: {
type: "string",
requiredOnCreate: true,
canUpdate: false,
validation: {
pattern: pattern
},
storageResourceTags: ['dynamoDB']
}
},
identifiers: [
{
type: "partitionKey",
fieldName: "userId"
},
{
type: "sortKey",
fieldName: "uniqueId"
}
]
}
fieldNames
- userId
- string
- uniqueId
- eg a UUID generated when creating the email record, or sent by Service - User Contact Manager
- string
Notes
- Service - User Contact Manager sets the notification group's uniqueID to be {emailUniqueId}_{uuid}, we could split the notificationGroupUniqueId to pull out the emailUniqueId, alternative is we also add the emailID to notification group's additionalData which is what we will do because it is more strongly defined