Service - Delivery Method Standard: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
(Created page with "= Overview = Handler service for basic delivery methods that use Service - Delivery Method Rate Table for pricing. = Repository = https://bitbucket.org/izara-market-pro...")
 
No edit summary
Line 65: Line 65:
immutable: true,
immutable: true,
},
},
defaultValueType: {},
defaultValueId: {},
},
},
}
}
Line 98: Line 100:
{
{
relationshipType: "{DeliveryMethodStandardLib.createHasDeliveryMethodRateTableGraphRelationshipType()}", // "has_deliveryMethodRateTable"
relationshipType: "{DeliveryMethodStandardLib.createHasDeliveryMethodRateTableGraphRelationshipType()}", // "has_deliveryMethodRateTable"
schema: {
elementCanBeRemoved: true,
allPropertiesImmutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
},
}
}
</syntaxhighlight>
<syntaxhighlight lang="JavaScript">
{
relationshipType: "{DeliveryMethodStandardLib.createDisabledDeliveryMethodRateTableGraphRelationshipType()}", // "disabled_deliveryMethodRateTable"
schema: {
schema: {
elementCanBeRemoved: true,
elementCanBeRemoved: true,
Line 120: Line 135:
}
}
</syntaxhighlight>
</syntaxhighlight>
* see [[NPM module - Izara Core - Property Node|DataSchemaLib]]
== Basic node schemas ==
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "has_{DeliveryMethodStandardLib.DELIVERYMETHOD_SALE_PROPERTIES_GRAPH_TAG}Property",
nodeLabel: "{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}"
}
schema: {
{
identifier: true,
relationshipType: "disabled_{DeliveryMethodStandardLib.DELIVERYMETHOD_SALE_PROPERTIES_GRAPH_TAG}Property",
restrictProperties: true,
}
restrictRelationships: true,
{
properties: {
relationshipType: "is_{DeliveryMethodStandardLib.DELIVERYMETHOD_SALE_PROPERTIES_GRAPH_TAG}PropertyLabel",
deliveryMethodId: {
identifier: true,
},
},
}
}
}
</syntaxhighlight>
</syntaxhighlight>
* see [[NPM module - Izara Core - Property Node|DataSchemaLib]]
* [[Service - Translations Graph]]
 
== Basic node schemas ==


Schema comes from [[NPM module - Izara Core - Property Node|BasicNodeSchemaLib]]
Schema comes from [[NPM module - Izara Core - Property Node|BasicNodeSchemaLib]]
Line 140: Line 161:
#* [[Service - Translations Graph]]
#* [[Service - Translations Graph]]
# deliveryMethodProperty
# deliveryMethodProperty
#* [[Service - Translations Graph]]
# deliveryMethodSalePropertyLabel
#* [[Service - Translations Graph]]
# deliveryMethodSaleProperty
#* [[Service - Translations Graph]]
#* [[Service - Translations Graph]]


Line 149: Line 166:


* Users can create new deliveryMethods which are uniquely identified by their translation
* Users can create new deliveryMethods which are uniquely identified by their translation
* Users can create userPaymentMethod nodes for their account which connect to deliveryMethods, one user can have multiple userPaymentMethod links to the same deliveryMethod, eg different Bank Transfer nodes for different bank accounts, which can be applied to sell offers in any combination
* deliveryMethods have RBAC structure, default to creator having admin permissions, but admin can add other roles etc..
* Any user can attach any deliveryMethod to a SellOfferPlan


= Working documents =
= Working documents =

Revision as of 14:25, 21 October 2021

Overview

Handler service for basic delivery methods that use Service - Delivery Method Rate Table for pricing.

Repository

https://bitbucket.org/izara-market-products/izara-market-products-delivery-method-standard

DynamoDB tables

Standard Config Table Per Service

Configuration tags

{
	configTag: "DeliveryMethodHandlerServiceNameTag"
	configKey: "DeliveryMethodHandlerServiceNameTag"
	configValue: xxx // this own services ServiceNameTag, eg "DeliveryMethodStandard"
}
{
	configTag: "ProductGraphServiceName"
	configKey: "ProductGraphServiceName"
	configValue: xxx // eg: "ProductGraph"
}
{
	configTag: "DeliveryMethodManagerServiceName"
	configKey: "DeliveryMethodManagerServiceName"
	configValue: xxx // eg: "DeliveryMethodManager"
}
{
	configTag: "DeliveryMethodRateTableServiceName"
	configKey: "DeliveryMethodRateTableServiceName"
	configValue: xxx // eg: "DeliveryMethodRateTable"
}

Graph database

Service - Products Graph

Nodes

{
	nodeLabel: "{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}", // "deliveryMethod"
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			deliveryMethodId: {
				identifier: true, // create unique id from translation
			},
			deliveryMethodHandlerServiceNameTag: {
				immutable: true,
			},
			defaultValueType: {},
			defaultValueId: {},
		},
	}
}
{
	nodeLabel: "{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}PropertyLabel",
}
{
	nodeLabel: "{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}Property",
}

Relationships

{
	relationshipType: "{DeliveryMethodStandardLib.createfromLocationNodeRelationshipType()}", // "from_LocationNode"
	schema: {
		elementCanBeRemoved: false,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
{
	relationshipType: "{DeliveryMethodStandardLib.createHasDeliveryMethodRateTableGraphRelationshipType()}", // "has_deliveryMethodRateTable"
	schema: {
		elementCanBeRemoved: true,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
{
	relationshipType: "{DeliveryMethodStandardLib.createDisabledDeliveryMethodRateTableGraphRelationshipType()}", // "disabled_deliveryMethodRateTable"
	schema: {
		elementCanBeRemoved: true,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
{
	relationshipType: "has_{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}Property",
}
{
	relationshipType: "disabled_{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}Property",
}
{
	relationshipType: "is_{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}PropertyLabel",
}

Basic node schemas

{
	nodeLabel: "{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}"
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			deliveryMethodId: {
				identifier: true,
			},
		},
	}
}

Schema comes from BasicNodeSchemaLib

  1. deliveryMethodPropertyLabel
  2. deliveryMethodProperty

Data structure notes

  • Users can create new deliveryMethods which are uniquely identified by their translation
  • deliveryMethods have RBAC structure, default to creator having admin permissions, but admin can add other roles etc..
  • Any user can attach any deliveryMethod to a SellOfferPlan

Working documents

Delivery Method Standard