Service - Sell Offer Terms: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 93: Line 93:
# sellOfferTermProperty
# sellOfferTermProperty
#* [[Service - Translations Graph]]
#* [[Service - Translations Graph]]
= Complex Filter requests =
<syntaxhighlight lang="JavaScript">
{
filterType: "sellOfferTermLink" //unique id is sellOfferTermLinkId
type: "group",
elements:
[
{
// find all sellOfferTermLinks that link to a specific sellOfferTermId
type: "logical",
logicalTag: "sellOfferTermId",
comparison: "equals",
value: "lksdflkfldfgldfkgjldfg"
},
{
type: "complexFilter",
complexFilter: {
filterType: "sellOfferTerm",  //unique id is sellOfferTermId
type: "group",
elements:
[
{
type: "complexFilter",
complexFilter: {
filterType: "sellOfferTermProperty",  //unique id is propertyId
type: "group",
elements:
[
{
// find all propertyIds that link to a specific propertyLabelId
type: "logical",
logicalTag: "propertyLabelId",
comparison: "equals",
value: "lksdflkfldfgldfkgjldfg"
},
]
}
},
{
type: "complexFilter",
complexFilter: {
filterType: "sellOfferTermPropertyTranslation" //unique id is propertyId
type: "group",
elements:
[
{
// find all propertyIds that have current translation that matches text
type: "logical",
logicalTag: "textTag_languageId_text",
resultType: "sellOfferTermProperty",
textTag: "sellOfferTermPropertyValue",
languageId: "en",
text: "Is a great term",
subjectIdentifierPropertyName: "propertyId",
caseSensitive: true
},
]
}
},
]
}
},
{
type: "complexFilter",
complexFilter: {
filterType: "sellOfferTermTranslation" //unique id is sellOfferTermId
type: "group",
elements:
[
{
// find all sellOfferTermIds that have current translation that matches text
type: "logical",
logicalTag: "textTag_languageId_text",
resultType: "sellOfferTerm",
textTag: "sellOfferTermValue",
languageId: "en",
text: "Accepts",
subjectIdentifierPropertyName: "sellOfferTermId", // finds an identifier property on the subjects node and stores in LogicalResults for the request
caseSensitive: true
},
]
}
},
...
]
}
</syntaxhighlight>


= Working documents =
= Working documents =

Revision as of 15:40, 4 September 2021

Overview

Manages SellOffer Terms and SellOfferTermLinks. SellOffer Terms can be shared by many Sell Offers, SellOfferTermLinks are used to create an attribute tree for one Sell Offer.

Repository

https://bitbucket.org/izara-market-products/izara-market-products-sell-offer-terms/src/master/

DynamoDB tables

Standard Config Table Per Service

Configuration tags

..

LogicalResults

Stores results for any requests to perform logical searches on media links

{
	resultId: xxx // eg: filterMainId for a single logical element
	dataId: xxx // one sellOfferTermLinkId
}
  • partition key: resultId
  • sort key: dataId

Graph database

Service - Products Graph

Nodes

{
	nodeLabel: "sellOfferTermLabel",
}
{
	nodeLabel: "sellOfferTerm",
}
{
	nodeLabel: "sellOfferTermLink",
}
{
	nodeLabel: "sellOfferTermPropertyLabel",
}
{
	nodeLabel: "sellOfferTermProperty",
}

Relationships

{
	relationshipType: "has_sellOfferTermLink",
}
{
	relationshipType: "disabled_sellOfferTermLink",
}
{
	relationshipType: "is_sellOfferTerm",
}
{
	relationshipType: "is_sellOfferTermLabel",
}
{
	relationshipType: "has_sellOfferTermProperty",
}
{
	relationshipType: "disabled_sellOfferTermProperty",
}
{
	relationshipType: "is_sellOfferTermPropertyLabel",
}

Basic node schemas

Schema comes from BasicNodeSchemaLib

  1. sellOfferTermLabel
  2. sellOfferTerm
  3. sellOfferTermPropertyLabel
  4. sellOfferTermProperty

Complex Filter requests

{
	filterType: "sellOfferTermLink" //unique id is sellOfferTermLinkId
	type: "group",
	elements:
	[
			{
				// find all sellOfferTermLinks that link to a specific sellOfferTermId
				type: "logical",
				logicalTag: "sellOfferTermId",
				comparison: "equals",
				value: "lksdflkfldfgldfkgjldfg"
			},
			{
			type: "complexFilter",
			complexFilter: {
				filterType: "sellOfferTerm",  //unique id is sellOfferTermId
				type: "group",
				elements: 
				[
					{
						type: "complexFilter",
						complexFilter: {
							filterType: "sellOfferTermProperty",  //unique id is propertyId
							type: "group",
							elements: 
							[
								{
									// find all propertyIds that link to a specific propertyLabelId
									type: "logical",
									logicalTag: "propertyLabelId",
									comparison: "equals",
									value: "lksdflkfldfgldfkgjldfg"
								},
							]
						}
					},
					{
						type: "complexFilter",
						complexFilter: {
							filterType: "sellOfferTermPropertyTranslation" //unique id is propertyId
							type: "group",
							elements: 
							[
								{
									// find all propertyIds that have current translation that matches text
									type: "logical",
									logicalTag: "textTag_languageId_text",
									resultType: "sellOfferTermProperty",
									textTag: "sellOfferTermPropertyValue",
									languageId: "en",
									text: "Is a great term",
									subjectIdentifierPropertyName: "propertyId",
									caseSensitive: true
								},
							]
						}
					},
				]
			}
		},
		{
			type: "complexFilter",
			complexFilter: {
				filterType: "sellOfferTermTranslation" //unique id is sellOfferTermId
				type: "group",
				elements: 
				[
					{
						// find all sellOfferTermIds that have current translation that matches text
						type: "logical",
						logicalTag: "textTag_languageId_text",
						resultType: "sellOfferTerm",
						textTag: "sellOfferTermValue",
						languageId: "en",
						text: "Accepts",
						subjectIdentifierPropertyName: "sellOfferTermId", // finds an identifier property on the subjects node and stores in LogicalResults for the request
						caseSensitive: true
					},
				]
			}
		},
		...
		
	]
}

Working documents

Sell Offer Terms