Service - Contact Method Email: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 9: Line 9:
= DynamoDB tables =
= DynamoDB tables =


== [[Standard Config Table Per Service]] ==
== EmailAddress==
 
=== Configuration tags ===
 
* ...
 
== Emails ==


=== Fields ===
=== Fields ===
Line 21: Line 15:
; userId
; userId
: (partition key)
: (partition key)
: string
; uniqueId
; uniqueId
: (sort key)
: (sort key)
Line 26: Line 21:
; email
; email
: string  
: string  
= Object Schemas =
== objType ==
=== email ===
<syntaxhighlight lang="JavaScript">
{
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']
}
    }
}
</syntaxhighlight>
==== fieldNames ====
; contactTag
; contactTag
: string name created by user to publicly identify this email contact
: string name created by user to publicly identify this email contact
; enabled
 
: true|false
=== emailAddress ===
 
<syntaxhighlight lang="JavaScript">
{
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"
}
    ]
}
</syntaxhighlight>
 
==== fieldNames ====
 
; userId
: string
; uniqueId
: eg a UUID generated when creating the email record, or sent by [[Service - User Contact Manager]]
; email
: string


= Notes =
= 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 specific
* [[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 =
= Working documents =

Latest revision as of 09:19, 8 August 2024

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
email
string

Object Schemas

objType

email

{
	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
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