Service - Delivery Method Standard: Difference between revisions
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"> | ||
{ | { | ||
nodeLabel: "{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}" | |||
schema: { | |||
{ | identifier: true, | ||
restrictProperties: true, | |||
} | restrictRelationships: true, | ||
properties: { | |||
deliveryMethodId: { | |||
identifier: true, | |||
}, | |||
}, | |||
} | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* | * [[Service - Translations Graph]] | ||
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]] | #* [[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 | ||
* | * 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",
}
- see DataSchemaLib
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",
}
- see DataSchemaLib
Basic node schemas
{
nodeLabel: "{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}"
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
deliveryMethodId: {
identifier: true,
},
},
}
}
Schema comes from BasicNodeSchemaLib
- deliveryMethodPropertyLabel
- 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