wisp-schema 0.14.3 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/lib/wisp-schema.rb +1 -1
  3. data/nouns.json +25 -155
  4. data/wisp.json +29 -157
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 04eca3cd9e43edf231824204d2827f2f294168c2bcfc64158bdfe7215474556d
4
- data.tar.gz: 0acc6697a575f9522df28d941adc677b5300f7fb537b4e532e6e7ae59036ff51
3
+ metadata.gz: 02d2eae8b8c7aa8471d3ed86c0ead60570429e800a5a9ddd68e2b20481ad9f96
4
+ data.tar.gz: fa62b5cf42863e517450624668f215c78b06ff4e981edf0902a8be62f567ee54
5
5
  SHA512:
6
- metadata.gz: e20a44f9450b1919896f0da1e22626c3557a0cc1eeacc94b3604f69aa15b7f96d2ea7d158a383abb9188be5e4b28deba53e87a230f42ba4c75f580936f6c1cb8
7
- data.tar.gz: 6dc7f888bd920a66d8916c362a51eaa0cad9d276053d0292a91c267d408415983fe30005544d3395b585f6aa843eee59b9d1873a78366e24b860ac06d7933752
6
+ metadata.gz: aa77b6aca7500622d746b461f9d6d7036fff7446c21ffc77c3a83fa02da5b2109ad53514f1b6110116100b74f84640b49c74f9e382ab7277b15c562de71329d0
7
+ data.tar.gz: 5c48ac49c077578671e249462eccb9a3b613eff93b4e276c66f40dc879c252cb7436ca68b43f1c504b742b19e366c84943a048067d31088a35a5c107dfdd0f54
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wisp
4
- VERSION = '0.14.3'
4
+ VERSION = '0.18.0'
5
5
 
6
6
  SCHEMA_PATH = File.expand_path('../wisp.json', __dir__)
7
7
  NOUNS_PATH = File.expand_path('../nouns.json', __dir__)
data/nouns.json CHANGED
@@ -1,149 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "definitions": {
4
- "button": {
5
- "type": "object",
6
- "title": "Button",
7
- "description": "Button",
8
- "properties": {
9
- "type": {
10
- "enum": ["button"]
11
- },
12
- "label": {"title": "Label", "type": "string"}
13
- },
14
- "additionalProperties": false,
15
- "required": ["type", "label"]
16
- },
17
- "text_field": {
18
- "type": "object",
19
- "title": "Text Field",
20
- "description": "Text Field",
21
- "properties": {
22
- "type": {
23
- "enum": ["text_field"]
24
- },
25
- "label": {"title": "Label", "type": "string"}
26
- },
27
- "additionalProperties": false,
28
- "required": ["type", "label"]
29
- },
30
- "dropdown": {
31
- "type": "object",
32
- "title": "Dropdown",
33
- "description": "Dropdown",
34
- "properties": {
35
- "type": {
36
- "enum": ["dropdown"]
37
- },
38
- "label": {"title": "Label", "type": "string"}
39
- },
40
- "additionalProperties": false,
41
- "required": ["type", "label"]
42
- },
43
- "dropdown_option": {
44
- "type": "object",
45
- "title": "Dropdown Option",
46
- "description": "Option in open dropdown",
47
- "properties": {
48
- "type": {
49
- "enum": ["dropdown_option"]
50
- },
51
- "label": {"title": "Label", "type": "string"}
52
- },
53
- "additionalProperties": false,
54
- "required": ["type", "label"]
55
- },
56
- "link": {
57
- "type": "object",
58
- "title": "Link",
59
- "description": "Link",
60
- "properties": {
61
- "type": {
62
- "enum": ["link"]
63
- },
64
- "text": {"title": "Text", "type": "string"}
65
- },
66
- "additionalProperties": false,
67
- "required": ["type", "text"]
68
- },
69
- "icon": {
70
- "type": "object",
71
- "title": "Icon",
72
- "description": "Icon",
73
- "properties": {
74
- "type": {
75
- "enum": ["icon"]
76
- },
77
- "description": {"title": "Description", "type": "string"}
78
- },
79
- "additionalProperties": false,
80
- "required": ["type", "description"]
81
- },
82
- "checkbox": {
83
- "type": "object",
84
- "title": "Checkbox",
85
- "description": "Checkbox",
86
- "properties": {
87
- "type": {
88
- "enum": ["checkbox"]
89
- },
90
- "label": {"title": "Label", "type": "string"}
91
- },
92
- "additionalProperties": false,
93
- "required": ["type", "label"]
94
- },
95
- "header": {
96
- "type": "object",
97
- "title": "Header",
98
- "description": "Page Header",
99
- "properties": {
100
- "type": {
101
- "enum": ["header"]
102
- },
103
- "text": {"title": "Text", "type": "string"}
104
- },
105
- "additionalProperties": false,
106
- "required": ["type", "text"]
107
- },
108
- "window": {
109
- "type": "object",
110
- "title": "Window",
111
- "description": "Any pop-up window",
112
- "properties": {
113
- "type": {
114
- "enum": ["window"]
115
- },
116
- "description": {"title": "Description", "type": "string"}
117
- },
118
- "additionalProperties": false,
119
- "required": ["type", "description"]
120
- },
121
- "modal": {
122
- "type": "object",
123
- "title": "Modal",
124
- "description": "In page modal",
125
- "properties": {
126
- "type": {
127
- "enum": ["modal"]
128
- },
129
- "description": {"title": "Description", "type": "string"}
130
- },
131
- "additionalProperties": false,
132
- "required": ["type", "description"]
133
- },
134
- "text": {
135
- "type": "object",
136
- "title": "Text",
137
- "description": "Exactly matched text",
138
- "properties": {
139
- "type": {
140
- "enum": ["text"]
141
- },
142
- "text": {"title": "Text", "type": "string"}
143
- },
144
- "additionalProperties": false,
145
- "required": ["type", "text"]
146
- },
147
4
  "ui_element": {
148
5
  "type": "object",
149
6
  "title": "UI Element",
@@ -152,7 +9,31 @@
152
9
  "type": {
153
10
  "enum": ["ui_element"]
154
11
  },
155
- "element": {"title": "Element", "type": "string"}
12
+ "element": {"title": "Element", "type": "string"},
13
+ "focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
14
+ "focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}},
15
+ "match_mode": {
16
+ "enum": ["pixel", "pixel_and_ocr"]
17
+ },
18
+ "ocr_expression": {
19
+ "title": "Expression to use for text matching",
20
+ "type": "string",
21
+ "maxLength": 999
22
+ },
23
+ "ocr_status": {
24
+ "title": "OCR result description",
25
+ "enum": ["SUCCESS", "TOO_MUCH_TEXT", "NO_TEXT"],
26
+ },
27
+ "ocr_box": {
28
+ "title": "Text content bounding box",
29
+ "type": "object",
30
+ "properties": {
31
+ "x": {"type": "integer"},
32
+ "y": {"type": "integer"},
33
+ "w": {"type": "integer"},
34
+ "h": {"type": "integer"}
35
+ }
36
+ }
156
37
  },
157
38
  "additionalProperties": false,
158
39
  "required": ["type", "element"]
@@ -180,17 +61,6 @@
180
61
  },
181
62
  "noun": {
182
63
  "oneOf": [
183
- {"$ref": "#/definitions/button"},
184
- {"$ref": "#/definitions/text_field"},
185
- {"$ref": "#/definitions/dropdown"},
186
- {"$ref": "#/definitions/dropdown_option"},
187
- {"$ref": "#/definitions/link"},
188
- {"$ref": "#/definitions/icon"},
189
- {"$ref": "#/definitions/checkbox"},
190
- {"$ref": "#/definitions/header"},
191
- {"$ref": "#/definitions/window"},
192
- {"$ref": "#/definitions/modal"},
193
- {"$ref": "#/definitions/text"},
194
64
  {"$ref": "#/definitions/ui_element"},
195
65
  {"$ref": "#/definitions/ui_element_reference"}
196
66
  ]
data/wisp.json CHANGED
@@ -4,164 +4,10 @@
4
4
  "noun": {
5
5
  "title": "Wisp Noun",
6
6
  "oneOf": [
7
- {"$ref": "#/definitions/button"},
8
- {"$ref": "#/definitions/text_field"},
9
- {"$ref": "#/definitions/dropdown"},
10
- {"$ref": "#/definitions/dropdown_option"},
11
- {"$ref": "#/definitions/link"},
12
- {"$ref": "#/definitions/icon"},
13
- {"$ref": "#/definitions/checkbox"},
14
- {"$ref": "#/definitions/header"},
15
- {"$ref": "#/definitions/window"},
16
- {"$ref": "#/definitions/modal"},
17
- {"$ref": "#/definitions/text"},
18
7
  {"$ref": "#/definitions/ui_element"},
19
8
  {"$ref": "#/definitions/ui_element_reference"}
20
9
  ]
21
10
  },
22
- "button": {
23
- "type": "object",
24
- "title": "Button",
25
- "description": "Button",
26
- "properties": {
27
- "type": {
28
- "enum": ["button"]
29
- },
30
- "label": {"title": "Label", "type": "string"}
31
- },
32
- "additionalProperties": false,
33
- "required": ["type", "label"]
34
- },
35
- "text_field": {
36
- "type": "object",
37
- "title": "Text Field",
38
- "description": "Text Field",
39
- "properties": {
40
- "type": {
41
- "enum": ["text_field"]
42
- },
43
- "label": {"title": "Label", "type": "string"}
44
- },
45
- "additionalProperties": false,
46
- "required": ["type", "label"]
47
- },
48
- "dropdown": {
49
- "type": "object",
50
- "title": "Dropdown",
51
- "description": "Dropdown",
52
- "properties": {
53
- "type": {
54
- "enum": ["dropdown"]
55
- },
56
- "label": {"title": "Label", "type": "string"}
57
- },
58
- "additionalProperties": false,
59
- "required": ["type", "label"]
60
- },
61
- "dropdown_option": {
62
- "type": "object",
63
- "title": "Dropdown Option",
64
- "description": "Option in open dropdown",
65
- "properties": {
66
- "type": {
67
- "enum": ["dropdown_option"]
68
- },
69
- "label": {"title": "Label", "type": "string"}
70
- },
71
- "additionalProperties": false,
72
- "required": ["type", "label"]
73
- },
74
- "link": {
75
- "type": "object",
76
- "title": "Link",
77
- "description": "Link",
78
- "properties": {
79
- "type": {
80
- "enum": ["link"]
81
- },
82
- "text": {"title": "Text", "type": "string"}
83
- },
84
- "additionalProperties": false,
85
- "required": ["type", "text"]
86
- },
87
- "icon": {
88
- "type": "object",
89
- "title": "Icon",
90
- "description": "Icon",
91
- "properties": {
92
- "type": {
93
- "enum": ["icon"]
94
- },
95
- "description": {"title": "Description", "type": "string"}
96
- },
97
- "additionalProperties": false,
98
- "required": ["type", "description"]
99
- },
100
- "checkbox": {
101
- "type": "object",
102
- "title": "Checkbox",
103
- "description": "Checkbox",
104
- "properties": {
105
- "type": {
106
- "enum": ["checkbox"]
107
- },
108
- "label": {"title": "Label", "type": "string"}
109
- },
110
- "additionalProperties": false,
111
- "required": ["type", "label"]
112
- },
113
- "header": {
114
- "type": "object",
115
- "title": "Header",
116
- "description": "Page Header",
117
- "properties": {
118
- "type": {
119
- "enum": ["header"]
120
- },
121
- "text": {"title": "Text", "type": "string"}
122
- },
123
- "additionalProperties": false,
124
- "required": ["type", "text"]
125
- },
126
- "window": {
127
- "type": "object",
128
- "title": "Window",
129
- "description": "Any pop-up window",
130
- "properties": {
131
- "type": {
132
- "enum": ["window"]
133
- },
134
- "description": {"title": "Description", "type": "string"}
135
- },
136
- "additionalProperties": false,
137
- "required": ["type", "description"]
138
- },
139
- "modal": {
140
- "type": "object",
141
- "title": "Modal",
142
- "description": "In page modal",
143
- "properties": {
144
- "type": {
145
- "enum": ["modal"]
146
- },
147
- "description": {"title": "Description", "type": "string"}
148
- },
149
- "additionalProperties": false,
150
- "required": ["type", "description"]
151
- },
152
- "text": {
153
- "type": "object",
154
- "title": "Text",
155
- "description": "Exactly matched text",
156
- "properties": {
157
- "type": {
158
- "enum": ["text"]
159
- },
160
- "text": {"title": "Text", "type": "string"}
161
- },
162
- "additionalProperties": false,
163
- "required": ["type", "text"]
164
- },
165
11
  "ui_element": {
166
12
  "type": "object",
167
13
  "title": "UI Element",
@@ -170,7 +16,31 @@
170
16
  "type": {
171
17
  "enum": ["ui_element"]
172
18
  },
173
- "element": {"title": "Element", "type": "string"}
19
+ "element": {"title": "Element", "type": "string"},
20
+ "focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
21
+ "focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}},
22
+ "match_mode": {
23
+ "enum": ["pixel", "pixel_and_ocr"]
24
+ },
25
+ "ocr_expression": {
26
+ "title": "Expression to use for text matching",
27
+ "type": "string",
28
+ "maxLength": 999
29
+ },
30
+ "ocr_status": {
31
+ "title": "OCR result description",
32
+ "enum": ["SUCCESS", "TOO_MUCH_TEXT", "NO_TEXT"],
33
+ },
34
+ "ocr_box": {
35
+ "title": "Text content bounding box",
36
+ "type": "object",
37
+ "properties": {
38
+ "x": {"type": "integer"},
39
+ "y": {"type": "integer"},
40
+ "w": {"type": "integer"},
41
+ "h": {"type": "integer"}
42
+ }
43
+ }
174
44
  },
175
45
  "additionalProperties": false,
176
46
  "required": ["type", "element"]
@@ -265,7 +135,8 @@
265
135
  "title": "Target",
266
136
  "$ref": "#/definitions/noun"
267
137
  },
268
- "text": {"title": "Text", "type": "string"}
138
+ "text": {"title": "Text", "type": "string"},
139
+ "method": { "title": "Text entry method", "type": "string", "enum": ["pasting", "typing"] }
269
140
  },
270
141
  "additionalProperties": false,
271
142
  "required": ["action", "target", "text"]
@@ -279,7 +150,8 @@
279
150
  "enum": ["type"]
280
151
  },
281
152
  "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
282
- "text": {"title": "Text", "type": "string"}
153
+ "text": {"title": "Text", "type": "string"},
154
+ "method": { "title": "Text entry method", "type": "string", "enum": ["pasting", "typing"] }
283
155
  },
284
156
  "additionalProperties": false,
285
157
  "required": ["action", "text"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wisp-schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.3
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Grodowski