Skip to content

Instantly share code, notes, and snippets.

@prmichaelsen
Created March 18, 2022 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prmichaelsen/2de7ae87376d823fdaecf80b6a6c434a to your computer and use it in GitHub Desktop.
Save prmichaelsen/2de7ae87376d823fdaecf80b6a6c434a to your computer and use it in GitHub Desktop.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "$id$",
"description": "WidgetGroupConfig_2-15",
"type": "object",
"additionalProperties": false,
"required": [
"widgetGroupId",
"cti",
"configurations"
],
"properties": {
"widgetGroupId": {
"type": "string"
},
"cti": {
"$ref": "#/definitions/cti"
},
"configurations": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/LayoutWidgetGroupProcessingDefinition"
},
{
"$ref": "#/definitions/FlatWidgetGroupProcessingDefinition"
}
]
}
}
},
"definitions": {
"cti": {
"type": "object",
"additionalProperties": false,
"required": [
"category",
"type",
"item"
],
"properties": {
"category": {
"type": "string"
},
"type": {
"type": "string"
},
"item": {
"type": "string"
}
}
},
"FlatWidgetGroupProcessingDefinition": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"widgetGroupTimeoutMillis",
"schemaTemplates",
"widgetGenerators"
],
"properties": {
"type": {
"type": "string",
"enum": [
"2.0"
]
},
"widgetGroupTimeoutMillis": {
"type": "integer"
},
"schemaTemplates": {
"$ref": "#/definitions/stringArrayMap"
},
"customizedParameters": {
"$ref": "#/definitions/customizedParameter"
},
"widgetImpressionMetricWeblabs": {
"$ref": "#/definitions/stringArray"
},
"condition": {
"$ref": "#/definitions/condition"
},
"contextProcessors": {
"type": "array",
"items": {
"$ref": "#/definitions/ContextProcessorDefinition"
}
},
"widgetGenerators": {
"type": "array",
"items": {
"$ref": "#/definitions/WidgetGeneratorDefinition"
}
},
"widgetProcessors": {
"type": "array",
"items": {
"$ref": "#/definitions/WidgetProcessorDefinition"
}
}
},
"patternProperties": {
"^.+$": {
"$ref": "#/definitions/arbitraryDataType"
}
}
},
"LayoutWidgetGroupProcessingDefinition": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"widgetGroupTimeoutMillis",
"schemaTemplates",
"widgetGenerators",
"layoutStrategy"
],
"properties": {
"type": {
"type": "string",
"enum": [
"2.1"
]
},
"widgetGroupTimeoutMillis": {
"type": "integer"
},
"percolateStrategyConfig": {
"$ref": "#/definitions/PercolateStrategyConfigDefinition"
},
"schemaTemplates": {
"$ref": "#/definitions/stringArrayMap"
},
"customizedParameters": {
"$ref": "#/definitions/customizedParameter"
},
"condition": {
"$ref": "#/definitions/condition"
},
"contextProcessors": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/ContextProcessorDefinition"
}
]
}
},
"widgetGenerators": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/WidgetGeneratorDefinition"
}
]
}
},
"widgetProcessors": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/WidgetProcessorDefinition"
}
]
}
},
"layoutStrategy": {
"$ref": "#/definitions/arbitraryObject"
}
},
"patternProperties": {
"^.+$": {
"$ref": "#/definitions/arbitraryDataType"
}
}
},
"WidgetGeneratorDefinition": {
"anyOf": [
{
"$ref": "#/definitions/LegacyWidgetGeneratorDefinition"
},
{
"$ref": "#/definitions/generalWidgetGenerator"
}
]
},
"LegacyWidgetGeneratorDefinition": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"strategyExecutionTimeoutMillis"
],
"properties": {
"type": {
"type": "string",
"const": "defaultPercolateWidgetGenerator"
},
"condition": {
"$ref": "#/definitions/condition"
},
"strategyExecutionTimeoutMillis": {
"anyOf": [
{
"type": "integer"
},
{
"$ref": "#/definitions/arbitraryObject"
}
]
},
"remoteStrategyContextKeys": {
"$ref": "#/definitions/stringArray"
},
"pageTargetingCriteria": {
"$ref": "#/definitions/stringArray"
},
"pageType": {
"type": "string"
},
"pageId": {
"type": "string"
},
"slots": {
"$ref": "#/definitions/stringArray"
},
"rankedSlots": {
"$ref": "#/definitions/stringArray"
},
"isRecsPassthrough": {
"type": "boolean"
}
}
},
"generalWidgetGenerator": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"strategyExecutionTimeoutMillis"
],
"properties": {
"type": {
"type": "string"
},
"condition": {
"$ref": "#/definitions/condition"
},
"strategyExecutionTimeoutMillis": {
"anyOf": [
{
"type": "integer"
},
{
"$ref": "#/definitions/arbitraryObject"
}
]
}
},
"patternProperties": {
"^.+$": {
"$ref": "#/definitions/arbitraryDataType"
}
}
},
"ContextProcessorDefinition": {
"anyOf": [
{
"$ref": "#/definitions/generalContextProcessor"
},
{
"$ref": "#/definitions/localContextProcessor"
},
{
"$ref": "#/definitions/browseNodeContextProcessor"
},
{
"$ref": "#/definitions/productGroupContextProcessor"
}
]
},
"localContextProcessor": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"id"
],
"properties": {
"type": {
"type": "string",
"const": "local"
},
"condition": {
"$ref": "#/definitions/condition"
},
"id": {
"type": "string"
},
"timeout": {
"type": "integer"
}
}
},
"browseNodeContextProcessor": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"browseNodeAnnotation"
],
"properties": {
"type": {
"type": "string",
"const": "browseNode"
},
"condition": {
"$ref": "#/definitions/condition"
},
"browseNodeAnnotation": {
"type": "string"
}
}
},
"productGroupContextProcessor": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"id",
"productGroups"
],
"properties": {
"type": {
"type": "string",
"const": "productGroup"
},
"condition": {
"$ref": "#/definitions/condition"
},
"id": {
"type": "string",
"enum": [
"productGroups",
"sourceProductGroups"
]
},
"productGroups": {
"$ref": "#/definitions/stringArray"
}
}
},
"generalContextProcessor": {
"type": "object",
"additionalProperties": false,
"required": [
"type"
],
"properties": {
"type": {
"type": "string"
},
"condition": {
"$ref": "#/definitions/condition"
}
},
"patternProperties": {
"^.+$": {
"$ref": "#/definitions/arbitraryDataType"
}
}
},
"WidgetProcessorDefinition": {
"anyOf": [
{
"$ref": "#/definitions/generalWidgetProcessor"
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"fallbackGroup"
],
"properties": {
"type": {
"type": "string",
"const": "widgetFallback"
},
"condition": {
"$ref": "#/definitions/condition"
},
"fallbackGroup": {
"$ref": "#/definitions/stringArray"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"const": "widgetDedupeFilter"
},
"condition": {
"$ref": "#/definitions/condition"
},
"firstPageAsinThreshold": {
"type": "integer",
"default": 8
},
"authoritativeWidgetIds": {
"$ref": "#/definitions/stringArray"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"autoOptimizeWidgetConfigs"
],
"properties": {
"type": {
"type": "string",
"const": "autoOptimize"
},
"condition": {
"$ref": "#/definitions/condition"
},
"autoOptimizeWidgetConfigs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"enable": {
"type": "string"
},
"optimizeType": {
"type": "string"
},
"objective": {
"type": "string"
},
"context": {
"type": "string"
},
"contentType": {
"type": "string"
},
"diversifier": {
"type": "string"
},
"metadata": {
"$ref": "#/definitions/stringMap"
},
"condition": {
"$ref": "#/definitions/condition"
},
"joinType": {
"type": "string",
"enum": [
"CUSTOMER",
"SESSION",
"HYBRID",
"NONE"
]
}
}
}
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"id"
],
"properties": {
"type": {
"type": "string",
"const": "local"
},
"condition": {
"$ref": "#/definitions/condition"
},
"id": {
"type": "string"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"minRecsCount"
],
"properties": {
"type": {
"type": "string",
"const": "minRecsFilter"
},
"condition": {
"$ref": "#/definitions/condition"
},
"minRecsCount": {
"type": "integer"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"capability-rule-mappings"
],
"properties": {
"type": {
"type": "string",
"const": "widgetCapabilityRule"
},
"condition": {
"$ref": "#/definitions/condition"
},
"capability-rule-mappings": {
"$ref": "#/definitions/capabilityRules"
},
"experimental": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"capability-rule-overrides": {
"$ref": "#/definitions/capabilityRules"
},
"weblab": {
"type": "string"
},
"gating-weblab": {
"type": "string"
},
"marketplaces": {
"$ref": "#/definitions/integerArray"
}
}
}
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"filters"
],
"properties": {
"type": {
"type": "string",
"const": "selfServiceFilter"
},
"condition": {
"$ref": "#/definitions/condition"
},
"filters": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"excludeStrategies": {
"$ref": "#/definitions/stringArray"
},
"condition": {
"$ref": "#/definitions/condition"
},
"argsProvider": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"keyMapping"
],
"properties": {
"type": {
"type": "string",
"const": "contextCopy"
},
"defaultArgs": {
"$ref": "#/definitions/stringMap"
},
"keyMapping": {
"$ref": "#/definitions/stringMap"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"sourceTypes"
],
"properties": {
"type": {
"type": "string",
"const": "source"
},
"sourceTypes": {
"$ref": "#/definitions/stringArray"
},
"filterSiblings": {
"type": "boolean"
},
"whitelistedGls": {
"$ref": "#/definitions/stringArray"
},
"blacklistedGls": {
"$ref": "#/definitions/stringArray"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"const": "discriminator"
},
"regionAware": {
"type": "boolean"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"args"
],
"properties": {
"type": {
"type": "string",
"const": "static"
},
"args": {
"$ref": "#/definitions/stringArrayMap"
}
}
}
]
}
}
}
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"serviceName",
"authProtocol",
"endpoint",
"processorBatchId",
"timeoutMillis",
"fallbackMode",
"remoteProcessorDefinitions"
],
"properties": {
"type": {
"type": "string",
"const": "remote"
},
"condition": {
"$ref": "#/definitions/condition"
},
"serviceName": {
"type": "string"
},
"authProtocol": {
"type": "string",
"enum": [
"AAA",
"CloudAuth"
]
},
"endpoint": {
"type": "string"
},
"inputContextKeys": {
"$ref": "#/definitions/stringArray"
},
"outputContextKeys": {
"$ref": "#/definitions/stringArray"
},
"processorBatchId": {
"type": "string"
},
"timeoutMillis": {
"type": "integer"
},
"fallbackMode": {
"type": "string",
"enum": [
"IDENTITY",
"RANDOM_SHUFFLE",
"RETURN_EMPTY"
]
},
"remoteProcessorDefinitions": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
},
"metadata": {
"$ref": "#/definitions/stringMap"
},
"condition": {
"$ref": "#/definitions/condition"
}
}
}
}
}
}
]
},
"generalWidgetProcessor": {
"type": "object",
"additionalProperties": false,
"required": [
"type"
],
"properties": {
"type": {
"type": "string"
},
"condition": {
"$ref": "#/definitions/condition"
}
},
"patternProperties": {
"^.+$": {
"$ref": "#/definitions/arbitraryDataType"
}
}
},
"PercolateStrategyConfigDefinition": {
"type": "object",
"additionalProperties": false,
"properties": {
"widgetImpressionMetricWeblabs": {
"$ref": "#/definitions/stringArray"
},
"recordAmabotExposures": {
"type": "boolean"
}
}
},
"customizedParameter": {
"type": "object",
"additionalProperties": false,
"properties": {
"defaultProcessorMinRecsCount": {
"type": "integer"
},
"defaultProcessorFirstPageAsinCount": {
"type": "integer"
},
"defaultProcessorRecsCountToPaginate": {
"type": "integer"
},
"defaultProcessorWidgetCountToPaginate": {
"type": "integer"
},
"defaultProcessorAuthoritativeWidgetIds": {
"$ref": "#/definitions/stringArray"
},
"defaultProcessorDedupeFirstPageFirst": {
"type": "boolean"
}
},
"patternProperties": {
"^.+$": {
"$ref": "#/definitions/arbitraryDataType"
}
}
},
"capabilityRules": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[A-Za-z0-9][A-Za-z0-9-_.]+": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"allowed-strategies": {
"$ref": "#/definitions/stringArray"
},
"treatment": {
"type": "string"
},
"marketplaces": {
"$ref": "#/definitions/integerArray"
}
}
}
}
}
},
"trueFalseCondition": {
"type": "object",
"additionalProperties": false,
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"alwaysFalse",
"alwaysTrue"
]
}
}
},
"operatorCondition": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"conditions"
],
"properties": {
"type": {
"type": "string",
"enum": [
"and",
"or"
]
},
"conditions": {
"type": "array",
"items": {
"$ref": "#/definitions/condition"
}
}
}
},
"negateCondition": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"condition"
],
"properties": {
"type": {
"type": "string",
"const": "not"
},
"condition": {
"$ref": "#/definitions/condition"
}
}
},
"weblabCondition": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"weblabId",
"treatments"
],
"properties": {
"type": {
"type": "string",
"enum": [
"nonRecordingWeblab",
"recordingWeblab"
]
},
"weblabId": {
"type": "string"
},
"treatments": {
"$ref": "#/definitions/stringArray"
}
}
},
"hybridWeblabCondition": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"session",
"customer",
"treatment"
],
"properties": {
"type": {
"type": "string",
"enum": [
"nonRecordingHybridWeblab",
"recordingHybridWeblab"
]
},
"session": {
"type": "string"
},
"customer": {
"type": "string"
},
"treatment": {
"type": "string"
}
}
},
"isTrueCondition": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"key"
],
"properties": {
"type": {
"type": "string",
"const": "isTrue"
},
"key": {
"type": "string"
}
}
},
"contextMetadataCondition": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"contextMetadataKey",
"targetValue"
],
"properties": {
"type": {
"type": "string",
"const": "contextMetadataValue"
},
"contextMetadataKey": {
"type": "string"
},
"targetValue": {
"type": "string"
}
}
},
"marketplaceCondition": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"marketplaceIds"
],
"properties": {
"type": {
"type": "string",
"const": "marketplace"
},
"marketplaceIds": {
"$ref": "#/definitions/integerArray"
}
}
},
"juelCondition": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"expression"
],
"properties": {
"type": {
"type": "string",
"const": "juel"
},
"expression": {
"type": "string"
}
}
},
"generalCondition": {
"type": "object",
"additionalProperties": false,
"required": [
"type"
],
"properties": {
"type": {
"type": "string"
}
},
"patternProperties": {
"^.+$": {
"$ref": "#/definitions/arbitraryDataType"
}
}
},
"condition": {
"anyOf": [
{
"$ref": "#/definitions/trueFalseCondition"
},
{
"$ref": "#/definitions/operatorCondition"
},
{
"$ref": "#/definitions/negateCondition"
},
{
"$ref": "#/definitions/weblabCondition"
},
{
"$ref": "#/definitions/isTrueCondition"
},
{
"$ref": "#/definitions/contextMetadataCondition"
},
{
"$ref": "#/definitions/marketplaceCondition"
},
{
"$ref": "#/definitions/juelCondition"
},
{
"$ref": "#/definitions/hybridWeblabCondition"
},
{
"$ref": "#/definitions/generalCondition"
}
]
},
"arbitraryDataType": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "boolean"
},
{
"$ref": "#/definitions/arbitraryArray"
},
{
"$ref": "#/definitions/arbitraryObject"
}
]
},
"arbitraryArray": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "boolean"
},
{
"$ref": "#/definitions/arbitraryArray"
},
{
"$ref": "#/definitions/arbitraryObject"
}
]
}
},
"arbitraryObject": {
"type": "object",
"patternProperties": {
"^.+$": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "boolean"
},
{
"$ref": "#/definitions/stringMap"
},
{
"$ref": "#/definitions/stringArrayMap"
},
{
"$ref": "#/definitions/arbitraryArray"
},
{
"$ref": "#/definitions/arbitraryObject"
}
]
}
}
},
"stringArray": {
"type": "array",
"items": {
"type": "string"
}
},
"integerArray": {
"type": "array",
"items": {
"type": "integer"
}
},
"stringMap": {
"type": "object",
"patternProperties": {
"^.+$": {
"type": "string"
}
}
},
"stringArrayMap": {
"type": "object",
"patternProperties": {
"^.+$": {
"$ref": "#/definitions/stringArray"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment