|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "https://schemas.trackman.com/app-scripting/1-0-0/activity-performance-center.json", |
| 4 | + "title": "Performance Center Activity", |
| 5 | + "$defs": { |
| 6 | + "PerformanceCenterScriptedConditions": { |
| 7 | + "type": "object", |
| 8 | + "description": "Success/fail condition for Performance Center steps. Same semantics as Range Analysis conditions.", |
| 9 | + "additionalProperties": false, |
| 10 | + "properties": { |
| 11 | + "nodeType": { "const": "PerformanceCenterScriptedConditions", "description": "Discriminator. Must be exactly this value." }, |
| 12 | + "shots": { "type": "integer", "minimum": 1, "description": "Threshold count." }, |
| 13 | + "conditionType": { "$ref": "shared.schema.json#/$defs/ConditionType" }, |
| 14 | + "conditions": { "type": "array", "minItems": 0, "items": { "$ref": "shared.schema.json#/$defs/ConditionClause" }, "default": [] } |
| 15 | + }, |
| 16 | + "required": ["nodeType", "shots"] |
| 17 | + }, |
| 18 | + "PerformanceCenterApproachScriptedSetup": { |
| 19 | + "type": "object", |
| 20 | + "description": "Approach-shot scenario configuration in Performance Center.", |
| 21 | + "additionalProperties": false, |
| 22 | + "properties": { |
| 23 | + "nodeType": { "const": "PerformanceCenterApproachScriptedSetup", "description": "Discriminator. Must be exactly this value." }, |
| 24 | + "hole": { "type": "integer", "minimum": 1, "description": "Hole number (1-based)." }, |
| 25 | + "pin": { "type": "integer", "minimum": 1, "description": "Pin index on the selected hole (1-based)." }, |
| 26 | + "playerCategory": { "type": "string", "enum": ["Handicap", "PGA", "LPGA"], "default": "Handicap", "description": "Baseline cohort for strokes-gained and contours." }, |
| 27 | + "hcp": { "type": "integer", "minimum": 0, "maximum": 15, "description": "Player handicap used for baselines." }, |
| 28 | + "gender": { "type": "string", "enum": ["Male", "Female", "Unspecified"], "default": "Unspecified", "description": "Baseline cohort dimension." }, |
| 29 | + "minDistance": { "type": "number", "minimum": 0, "description": "Minimum approach distance in meters.", "default": 30.0 }, |
| 30 | + "maxDistance": { "type": "number", "minimum": 0, "description": "Maximum approach distance in meters.", "default": 220.0 }, |
| 31 | + "club": { "type": "string", "description": "Club specification for the approach shot.", "default": "Drv" } |
| 32 | + }, |
| 33 | + "required": ["nodeType", "hole", "pin", "playerCategory", "hcp", "gender", "minDistance", "maxDistance"] |
| 34 | + }, |
| 35 | + "PerformanceCenterTeeShotsScriptedSetup": { |
| 36 | + "type": "object", |
| 37 | + "description": "Tee-shot scenario configuration in Performance Center.", |
| 38 | + "additionalProperties": false, |
| 39 | + "properties": { |
| 40 | + "nodeType": { "const": "PerformanceCenterTeeShotsScriptedSetup", "description": "Discriminator. Must be exactly this value." }, |
| 41 | + "hole": { "type": "integer", "minimum": 1, "description": "Hole number (1-based)." }, |
| 42 | + "playerCategory": { "type": "string", "enum": ["Handicap", "PGA", "LPGA"], "default": "Handicap", "description": "Baseline cohort for strokes-gained and contours." }, |
| 43 | + "hcp": { "type": "integer", "minimum": 0, "maximum": 15, "description": "Player handicap used for baselines. Required only when playerCategory is 'Handicap'." }, |
| 44 | + "gender": { "type": "string", "enum": ["Male", "Female", "Unspecified"], "default": "Unspecified", "description": "Baseline cohort dimension." }, |
| 45 | + "courseDistance": { "type": "integer", "minimum": 1000, "maximum": 9000, "description": "Total course distance in meters (context for tee-shot modeling).", "default": 6900 }, |
| 46 | + "club": { "type": "string", "description": "Club specification for the tee shot.", "default": "Drv" } |
| 47 | + }, |
| 48 | + "required": ["nodeType", "hole", "playerCategory", "gender", "courseDistance"], |
| 49 | + "allOf": [ |
| 50 | + { |
| 51 | + "if": { "properties": { "playerCategory": { "const": "Handicap" } } }, |
| 52 | + "then": { "required": ["hcp"] } |
| 53 | + } |
| 54 | + ] |
| 55 | + }, |
| 56 | + "PerformanceCenterScriptedUI": { |
| 57 | + "type": "object", |
| 58 | + "description": "UI hints/overrides for Performance Center. Empty object means defaults.", |
| 59 | + "additionalProperties": false, |
| 60 | + "properties": { |
| 61 | + "nodeType": { "const": "PerformanceCenterScriptedUI" }, |
| 62 | + "targetAvailable": { "type": "boolean", "default": true }, |
| 63 | + "activeDataTiles": { "type": "array", "items": { "$ref": "shared.schema.json#/$defs/ParameterName" }, "maxItems": 8, "default": [] }, |
| 64 | + "shotListParameters": { "type": "array", "items": { "$ref": "shared.schema.json#/$defs/ParameterName" }, "default": ["Total", "Carry", "BallSpeed"] }, |
| 65 | + "defaultShotListParameter": { "$ref": "shared.schema.json#/$defs/ParameterName", "default": "Carry" }, |
| 66 | + "beforeShot": { "$ref": "shared.schema.json#/$defs/UIFrameAction" }, |
| 67 | + "duringShot": { "$ref": "shared.schema.json#/$defs/UIFrameAction" }, |
| 68 | + "afterShot": { "$ref": "shared.schema.json#/$defs/UIFrameAction" } |
| 69 | + }, |
| 70 | + "required": ["nodeType"] |
| 71 | + }, |
| 72 | + "PerformanceCenterScriptedLogic": { |
| 73 | + "type": "object", |
| 74 | + "description": "Evaluation logic for a Performance Center step: setup + success/fail conditions + flow flags.", |
| 75 | + "additionalProperties": false, |
| 76 | + "properties": { |
| 77 | + "nodeType": { "const": "PerformanceCenterScriptedLogic" }, |
| 78 | + "setup": { |
| 79 | + "oneOf": [ |
| 80 | + { "$ref": "#/$defs/PerformanceCenterApproachScriptedSetup" }, |
| 81 | + { "$ref": "#/$defs/PerformanceCenterTeeShotsScriptedSetup" } |
| 82 | + ], |
| 83 | + "description": "Pick exactly one setup variant matching the step scenario." |
| 84 | + }, |
| 85 | + "successCondition": { "$ref": "#/$defs/PerformanceCenterScriptedConditions" }, |
| 86 | + "failCondition": { "$ref": "#/$defs/PerformanceCenterScriptedConditions" }, |
| 87 | + "canRetry": { "type": "boolean", "default": false }, |
| 88 | + "skipOnSuccess": { "type": "boolean", "default": false } |
| 89 | + }, |
| 90 | + "required": ["nodeType", "setup", "successCondition"] |
| 91 | + }, |
| 92 | + "PerformanceCenterScriptedStep": { |
| 93 | + "type": "object", |
| 94 | + "description": "One step in a Performance Center activity.", |
| 95 | + "additionalProperties": false, |
| 96 | + "properties": { |
| 97 | + "nodeType": { "const": "PerformanceCenterScriptedStep" }, |
| 98 | + "id": { "$ref": "shared.schema.json#/$defs/IdString" }, |
| 99 | + "introMessage": { "$ref": "shared.schema.json#/$defs/Message" }, |
| 100 | + "successMessage": { "$ref": "shared.schema.json#/$defs/Message" }, |
| 101 | + "failMessage": { "$ref": "shared.schema.json#/$defs/Message" }, |
| 102 | + "logic": { "$ref": "#/$defs/PerformanceCenterScriptedLogic" }, |
| 103 | + "ui": { "$ref": "#/$defs/PerformanceCenterScriptedUI" } |
| 104 | + }, |
| 105 | + "required": ["nodeType", "id", "introMessage", "successMessage", "failMessage", "logic", "ui"] |
| 106 | + }, |
| 107 | + "PerformanceCenterScriptedActivity": { |
| 108 | + "$anchor": "Activity", |
| 109 | + "type": "object", |
| 110 | + "description": "Activity targeting the Performance Center app. Steps run in order.", |
| 111 | + "additionalProperties": false, |
| 112 | + "properties": { |
| 113 | + "nodeType": { "const": "PerformanceCenterScriptedActivity" }, |
| 114 | + "id": { "$ref": "shared.schema.json#/$defs/IdString" }, |
| 115 | + "introMessage": { "$ref": "shared.schema.json#/$defs/Message" }, |
| 116 | + "endMessage": { "$ref": "shared.schema.json#/$defs/Message" }, |
| 117 | + "steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/PerformanceCenterScriptedStep" } } |
| 118 | + }, |
| 119 | + "required": ["nodeType", "id", "introMessage", "endMessage", "steps"] |
| 120 | + } |
| 121 | + } |
| 122 | +} |
0 commit comments