actions.flow.schema.json
145 lines
| 1 | { |
| 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | "type": "array", |
| 4 | "items": { |
| 5 | "type": "object", |
| 6 | "properties": { |
| 7 | "type": { |
| 8 | "type": "string" |
| 9 | }, |
| 10 | "settings": { |
| 11 | "type": "object" |
| 12 | }, |
| 13 | "conditions": { |
| 14 | "type": "array" |
| 15 | }, |
| 16 | "events": { |
| 17 | "type": "array" |
| 18 | } |
| 19 | }, |
| 20 | "required": [ |
| 21 | "type" |
| 22 | ], |
| 23 | "allOf": [ |
| 24 | { |
| 25 | "if": { |
| 26 | "properties": { |
| 27 | "type": { |
| 28 | "const": "send_email" |
| 29 | } |
| 30 | } |
| 31 | }, |
| 32 | "then": { |
| 33 | "properties": { |
| 34 | "settings": { |
| 35 | "$ref": "#/definitions/send_email" |
| 36 | } |
| 37 | } |
| 38 | } |
| 39 | }, |
| 40 | { |
| 41 | "if": { |
| 42 | "properties": { |
| 43 | "type": { |
| 44 | "const": "reset_password" |
| 45 | } |
| 46 | } |
| 47 | }, |
| 48 | "then": { |
| 49 | "properties": { |
| 50 | "settings": { |
| 51 | "$ref": "#/definitions/reset_password" |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | } |
| 56 | ] |
| 57 | }, |
| 58 | "definitions": { |
| 59 | "send_email": { |
| 60 | "type": "object", |
| 61 | "properties": { |
| 62 | "mail_to": { |
| 63 | "type": "string", |
| 64 | "enum": [ |
| 65 | "admin", |
| 66 | "form", |
| 67 | "custom" |
| 68 | ] |
| 69 | }, |
| 70 | "subject": { |
| 71 | "type": "string" |
| 72 | }, |
| 73 | "content": { |
| 74 | "type": "string" |
| 75 | } |
| 76 | }, |
| 77 | "required": [ |
| 78 | "content", |
| 79 | "mail_to" |
| 80 | ], |
| 81 | "anyOf": [ |
| 82 | { |
| 83 | "if": { |
| 84 | "properties": { |
| 85 | "mail_to": { |
| 86 | "const": "custom" |
| 87 | } |
| 88 | } |
| 89 | }, |
| 90 | "then": { |
| 91 | "properties": { |
| 92 | "custom_email": { |
| 93 | "type": "string" |
| 94 | } |
| 95 | }, |
| 96 | "required": [ |
| 97 | "custom_email" |
| 98 | ] |
| 99 | } |
| 100 | }, |
| 101 | { |
| 102 | "if": { |
| 103 | "properties": { |
| 104 | "mail_to": { |
| 105 | "const": "form" |
| 106 | } |
| 107 | } |
| 108 | }, |
| 109 | "then": { |
| 110 | "properties": { |
| 111 | "from_field": { |
| 112 | "type": "string" |
| 113 | } |
| 114 | }, |
| 115 | "required": [ |
| 116 | "from_field" |
| 117 | ] |
| 118 | } |
| 119 | } |
| 120 | ] |
| 121 | }, |
| 122 | "reset_password": { |
| 123 | "type": "object", |
| 124 | "properties": { |
| 125 | "user_field": { |
| 126 | "type": "string" |
| 127 | }, |
| 128 | "password_field": { |
| 129 | "type": "string" |
| 130 | }, |
| 131 | "confirm_password_field": { |
| 132 | "type": "string" |
| 133 | }, |
| 134 | "email": { |
| 135 | "type": "boolean" |
| 136 | } |
| 137 | }, |
| 138 | "required": [ |
| 139 | "user_field", |
| 140 | "password_field", |
| 141 | "confirm_password_field" |
| 142 | ] |
| 143 | } |
| 144 | } |
| 145 | } |