Service - Contact Method Email: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 13: Line 13:
=== Fields ===
=== Fields ===


; userId
; userContactId
: (partition key)
: (partition key)
: string
: string
; uniqueId
: a UUID generated when creating the email record, or sent by [[Service - User Contact Manager]]
: (sort key)
: eg a UUID generated when creating the email record, or sent by [[Service - User Contact Manager]]
; email
; email
: string  
: string  
Line 35: Line 33:
       serviceTag: "UserContactManager",
       serviceTag: "UserContactManager",
     },
     },
     complexFilterServiceTag: "complexFilter",
     storageResources: {},
     fieldNames: { // see Per Service Schemas
     fieldNames: {}
contactTag: {
type: "string",
requiredOnCreate: true,
canUpdate: true,
validation: {
pattern: pattern
},
storageResourceTags: ['myGraph']
}
    }
}
}
</syntaxhighlight>
</syntaxhighlight>


==== fieldNames ====
; contactTag
: string name created by user to publicly identify this email contact


=== emailAddress ===
=== emailAddress ===
Line 68: Line 52:
delete: [], // default: ['hdrApi', 'hdrSqs']
delete: [], // default: ['hdrApi', 'hdrSqs']
},
},
     // overwriteGeneratedMainFunction: ["create"],
     overwriteGeneratedMainFunction: ["update", "get", "delete"],
     storageResources: {
     storageResources: {
dynamoDB: {
dynamoDB: {
storageType: "dynamoDB",
storageType: "dynamoDB",
tableName: "EmailAdress"
tableName: "EmailAddress"
}
}
     },
     },
     fieldNames: { // see Per Service Schemas
     fieldNames: { // see Per Service Schemas
userId: {
userContactId: {
type: "string",
type: "string",
storageResourceTags: ['dynamoDB'],
optionalOnCreate: true,
fromServiceNameTag: "UserContactManager",
canUpdate: false,
fromObjectType: "userContact"
validation: {
},
pattern: pattern
uniqueId: {
},
type: "string",
storageResourceTags: ['dynamoDB']
storageResourceTags: ['dynamoDB'],
fromServiceNameTag: "UserContactManager",
fromObjectType: "userContact"
},
},
email: {
email: {
Line 101: Line 82:
{
{
type: "partitionKey",
type: "partitionKey",
fieldName: "userId"
fieldName: "userContactId"
},
{
type: "sortKey",
fieldName: "uniqueId"
}
}
     ]
     ]
Line 113: Line 90:
==== fieldNames ====
==== fieldNames ====


; userId
; userContactId
: string
: a UUID generated when creating the email record, or sent by [[Service - User Contact Manager]]
; uniqueId
: eg a UUID generated when creating the email record, or sent by [[Service - User Contact Manager]]
; email
; email
: string
: string

Revision as of 07:02, 6 March 2025

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

userContactId
(partition key)
string
a UUID generated when creating the email record, or sent by Service - User Contact Manager
email
string

Object Schemas

objType

email

{
	objectType: "email",
    extendObjType: { // core object that this object extends
      objectType: "userContact",
      serviceTag: "UserContactManager",
    },
    storageResources: {},
    fieldNames: {}
}


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: ["update", "get", "delete"],
    storageResources: {
		dynamoDB: {
			storageType: "dynamoDB",
			tableName: "EmailAddress"
		}
    },
    fieldNames: { // see Per Service Schemas
		userContactId: {
			type: "string",
			optionalOnCreate: true,
			canUpdate: false,
			validation: {
				pattern: pattern
			},
			storageResourceTags: ['dynamoDB']
		},
		email: {
			type: "string",
			requiredOnCreate: true,
			canUpdate: false,
			validation: {
				pattern: pattern
			},
			storageResourceTags: ['dynamoDB']
		}
    },
    identifiers: [
		{
			type: "partitionKey",
			fieldName: "userContactId"
		}
    ]
}

fieldNames

userContactId
a UUID generated when creating the email record, or sent by Service - User Contact Manager
email
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

Working documents

Contact Method Email