@marktiderman/genesis-forms 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +121 -17
  2. package/conformance/{after-class-back-after-a-jump.scenario.json → event-feedback-back-after-a-jump.scenario.json} +21 -21
  3. package/conformance/{after-class-contact-yes-completed.scenario.json → event-feedback-contact-yes-completed.scenario.json} +21 -21
  4. package/conformance/{after-class-contact-yes-requires-name-and-email.scenario.json → event-feedback-contact-yes-requires-name-and-email.scenario.json} +19 -19
  5. package/conformance/{after-class-happy-path.scenario.json → event-feedback-happy-path.scenario.json} +24 -24
  6. package/conformance/{after-class-invalid-email-rejected.scenario.json → event-feedback-invalid-email-rejected.scenario.json} +19 -19
  7. package/conformance/{after-class-low-rating-skips-went-well.scenario.json → event-feedback-low-rating-skips-went-well.scenario.json} +21 -21
  8. package/conformance/{after-class-server-drops-unknown-and-hidden-answers.scenario.json → event-feedback-server-drops-unknown-and-hidden-answers.scenario.json} +22 -22
  9. package/conformance/{after-class-server-ignores-a-client-sent-coach.scenario.json → event-feedback-server-ignores-a-client-sent-owner.scenario.json} +24 -24
  10. package/conformance/{monthly-pulse-default-ending.scenario.json → monthly-check-in-default-ending.scenario.json} +6 -6
  11. package/conformance/{monthly-pulse-promoter-ending-via-jump.scenario.json → monthly-check-in-promoter-ending-via-jump.scenario.json} +6 -6
  12. package/dist/destinations.cjs +1211 -0
  13. package/dist/destinations.cjs.map +1 -0
  14. package/dist/destinations.d.cts +465 -0
  15. package/dist/destinations.d.ts +465 -0
  16. package/dist/destinations.js +1169 -0
  17. package/dist/destinations.js.map +1 -0
  18. package/dist/{engine-LsPRTzt3.d.cts → engine-CPLtKVew.d.cts} +7 -6
  19. package/dist/{engine-Cp5t2_Am.d.ts → engine-DOrPgFDw.d.ts} +7 -6
  20. package/dist/index.cjs +410 -24
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +122 -18
  23. package/dist/index.d.ts +122 -18
  24. package/dist/index.js +399 -25
  25. package/dist/index.js.map +1 -1
  26. package/dist/server.cjs +350 -29
  27. package/dist/server.cjs.map +1 -1
  28. package/dist/server.d.cts +13 -12
  29. package/dist/server.d.ts +13 -12
  30. package/dist/server.js +350 -29
  31. package/dist/server.js.map +1 -1
  32. package/dist/testing.cjs +354 -29
  33. package/dist/testing.cjs.map +1 -1
  34. package/dist/testing.d.cts +4 -3
  35. package/dist/testing.d.ts +4 -3
  36. package/dist/testing.js +354 -29
  37. package/dist/testing.js.map +1 -1
  38. package/dist/{validate-j8Z188mF.d.cts → types-BBKBQ8sp.d.cts} +9 -29
  39. package/dist/{validate-j8Z188mF.d.ts → types-BBKBQ8sp.d.ts} +9 -29
  40. package/dist/validate-BXXqi0fq.d.cts +30 -0
  41. package/dist/validate-BjNwF1UE.d.ts +30 -0
  42. package/package.json +14 -2
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "scenarioVersion": 1,
3
- "name": "after-class: happy path",
3
+ "name": "event-feedback: happy path",
4
4
  "description": "Five stars, no follow-up wanted. Name and email stay hidden and are not required.",
5
5
  "tags": [
6
- "after-class",
6
+ "event-feedback",
7
7
  "happy-path"
8
8
  ],
9
9
  "definition": {
10
10
  "schemaVersion": 1,
11
- "id": "after-class",
12
- "title": "How was class?",
11
+ "id": "event-feedback",
12
+ "title": "How was the event?",
13
13
  "blocks": [
14
14
  {
15
15
  "kind": "field",
16
16
  "id": "overall",
17
17
  "key": "overall",
18
18
  "type": "rating",
19
- "label": "How was today's class?",
19
+ "label": "How was today's event?",
20
20
  "required": true,
21
21
  "props": {
22
22
  "max": 5
@@ -31,24 +31,24 @@
31
31
  "props": {
32
32
  "options": [
33
33
  {
34
- "value": "coaching",
35
- "label": "Coaching"
34
+ "value": "hosting",
35
+ "label": "Hosting"
36
36
  },
37
37
  {
38
- "value": "workout",
39
- "label": "The workout"
38
+ "value": "content",
39
+ "label": "The content"
40
40
  },
41
41
  {
42
42
  "value": "community",
43
43
  "label": "Community"
44
44
  },
45
45
  {
46
- "value": "scaling",
47
- "label": "Scaling options"
46
+ "value": "pacing",
47
+ "label": "Pacing"
48
48
  },
49
49
  {
50
- "value": "equipment",
51
- "label": "Equipment"
50
+ "value": "venue",
51
+ "label": "The venue"
52
52
  },
53
53
  {
54
54
  "value": "cleanliness",
@@ -69,7 +69,7 @@
69
69
  "id": "contact_me",
70
70
  "key": "contact_me",
71
71
  "type": "yes-no",
72
- "label": "Want {{hidden:coach|a coach}} to follow up with you?"
72
+ "label": "Want {{hidden:owner|someone}} to follow up with you?"
73
73
  },
74
74
  {
75
75
  "kind": "field",
@@ -93,12 +93,12 @@
93
93
  },
94
94
  "hidden": [
95
95
  {
96
- "name": "class",
96
+ "name": "session",
97
97
  "type": "string",
98
98
  "source": "server"
99
99
  },
100
100
  {
101
- "name": "coach",
101
+ "name": "owner",
102
102
  "type": "string",
103
103
  "source": "server"
104
104
  }
@@ -151,7 +151,7 @@
151
151
  "endings": [
152
152
  {
153
153
  "id": "default",
154
- "title": "Thanks! See you at the next class."
154
+ "title": "Thanks! See you next time."
155
155
  }
156
156
  ],
157
157
  "settings": {
@@ -159,8 +159,8 @@
159
159
  }
160
160
  },
161
161
  "context": {
162
- "class": "6:00 AM CrossFit",
163
- "coach": "Sam"
162
+ "session": "Tuesday 6 PM workshop",
163
+ "owner": "Sam"
164
164
  },
165
165
  "events": [
166
166
  {
@@ -175,7 +175,7 @@
175
175
  "type": "answer",
176
176
  "field": "went_well",
177
177
  "value": [
178
- "coaching",
178
+ "hosting",
179
179
  "community"
180
180
  ]
181
181
  },
@@ -213,7 +213,7 @@
213
213
  "answers": {
214
214
  "overall": 5,
215
215
  "went_well": [
216
- "coaching",
216
+ "hosting",
217
217
  "community"
218
218
  ],
219
219
  "contact_me": false
@@ -223,14 +223,14 @@
223
223
  "answers": {
224
224
  "overall": 5,
225
225
  "went_well": [
226
- "coaching",
226
+ "hosting",
227
227
  "community"
228
228
  ],
229
229
  "contact_me": false
230
230
  },
231
231
  "context": {
232
- "class": "6:00 AM CrossFit",
233
- "coach": "Sam"
232
+ "session": "Tuesday 6 PM workshop",
233
+ "owner": "Sam"
234
234
  }
235
235
  }
236
236
  }
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "scenarioVersion": 1,
3
- "name": "after-class: invalid email rejected",
3
+ "name": "event-feedback: invalid email rejected",
4
4
  "description": "A malformed email blocks submit on the client and is rejected by the server.",
5
5
  "tags": [
6
- "after-class",
6
+ "event-feedback",
7
7
  "validation"
8
8
  ],
9
9
  "definition": {
10
10
  "schemaVersion": 1,
11
- "id": "after-class",
12
- "title": "How was class?",
11
+ "id": "event-feedback",
12
+ "title": "How was the event?",
13
13
  "blocks": [
14
14
  {
15
15
  "kind": "field",
16
16
  "id": "overall",
17
17
  "key": "overall",
18
18
  "type": "rating",
19
- "label": "How was today's class?",
19
+ "label": "How was today's event?",
20
20
  "required": true,
21
21
  "props": {
22
22
  "max": 5
@@ -31,24 +31,24 @@
31
31
  "props": {
32
32
  "options": [
33
33
  {
34
- "value": "coaching",
35
- "label": "Coaching"
34
+ "value": "hosting",
35
+ "label": "Hosting"
36
36
  },
37
37
  {
38
- "value": "workout",
39
- "label": "The workout"
38
+ "value": "content",
39
+ "label": "The content"
40
40
  },
41
41
  {
42
42
  "value": "community",
43
43
  "label": "Community"
44
44
  },
45
45
  {
46
- "value": "scaling",
47
- "label": "Scaling options"
46
+ "value": "pacing",
47
+ "label": "Pacing"
48
48
  },
49
49
  {
50
- "value": "equipment",
51
- "label": "Equipment"
50
+ "value": "venue",
51
+ "label": "The venue"
52
52
  },
53
53
  {
54
54
  "value": "cleanliness",
@@ -69,7 +69,7 @@
69
69
  "id": "contact_me",
70
70
  "key": "contact_me",
71
71
  "type": "yes-no",
72
- "label": "Want {{hidden:coach|a coach}} to follow up with you?"
72
+ "label": "Want {{hidden:owner|someone}} to follow up with you?"
73
73
  },
74
74
  {
75
75
  "kind": "field",
@@ -93,12 +93,12 @@
93
93
  },
94
94
  "hidden": [
95
95
  {
96
- "name": "class",
96
+ "name": "session",
97
97
  "type": "string",
98
98
  "source": "server"
99
99
  },
100
100
  {
101
- "name": "coach",
101
+ "name": "owner",
102
102
  "type": "string",
103
103
  "source": "server"
104
104
  }
@@ -151,7 +151,7 @@
151
151
  "endings": [
152
152
  {
153
153
  "id": "default",
154
- "title": "Thanks! See you at the next class."
154
+ "title": "Thanks! See you next time."
155
155
  }
156
156
  ],
157
157
  "settings": {
@@ -159,8 +159,8 @@
159
159
  }
160
160
  },
161
161
  "context": {
162
- "class": "6:00 AM CrossFit",
163
- "coach": "Sam"
162
+ "session": "Tuesday 6 PM workshop",
163
+ "owner": "Sam"
164
164
  },
165
165
  "events": [
166
166
  {
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "scenarioVersion": 1,
3
- "name": "after-class: low rating skips went_well",
3
+ "name": "event-feedback: low rating skips went_well",
4
4
  "description": "A rating under 4 jumps from overall to improve; went_well is off the path. Keystrokes in improve are compacted.",
5
5
  "tags": [
6
- "after-class",
6
+ "event-feedback",
7
7
  "jump"
8
8
  ],
9
9
  "definition": {
10
10
  "schemaVersion": 1,
11
- "id": "after-class",
12
- "title": "How was class?",
11
+ "id": "event-feedback",
12
+ "title": "How was the event?",
13
13
  "blocks": [
14
14
  {
15
15
  "kind": "field",
16
16
  "id": "overall",
17
17
  "key": "overall",
18
18
  "type": "rating",
19
- "label": "How was today's class?",
19
+ "label": "How was today's event?",
20
20
  "required": true,
21
21
  "props": {
22
22
  "max": 5
@@ -31,24 +31,24 @@
31
31
  "props": {
32
32
  "options": [
33
33
  {
34
- "value": "coaching",
35
- "label": "Coaching"
34
+ "value": "hosting",
35
+ "label": "Hosting"
36
36
  },
37
37
  {
38
- "value": "workout",
39
- "label": "The workout"
38
+ "value": "content",
39
+ "label": "The content"
40
40
  },
41
41
  {
42
42
  "value": "community",
43
43
  "label": "Community"
44
44
  },
45
45
  {
46
- "value": "scaling",
47
- "label": "Scaling options"
46
+ "value": "pacing",
47
+ "label": "Pacing"
48
48
  },
49
49
  {
50
- "value": "equipment",
51
- "label": "Equipment"
50
+ "value": "venue",
51
+ "label": "The venue"
52
52
  },
53
53
  {
54
54
  "value": "cleanliness",
@@ -69,7 +69,7 @@
69
69
  "id": "contact_me",
70
70
  "key": "contact_me",
71
71
  "type": "yes-no",
72
- "label": "Want {{hidden:coach|a coach}} to follow up with you?"
72
+ "label": "Want {{hidden:owner|someone}} to follow up with you?"
73
73
  },
74
74
  {
75
75
  "kind": "field",
@@ -93,12 +93,12 @@
93
93
  },
94
94
  "hidden": [
95
95
  {
96
- "name": "class",
96
+ "name": "session",
97
97
  "type": "string",
98
98
  "source": "server"
99
99
  },
100
100
  {
101
- "name": "coach",
101
+ "name": "owner",
102
102
  "type": "string",
103
103
  "source": "server"
104
104
  }
@@ -151,7 +151,7 @@
151
151
  "endings": [
152
152
  {
153
153
  "id": "default",
154
- "title": "Thanks! See you at the next class."
154
+ "title": "Thanks! See you next time."
155
155
  }
156
156
  ],
157
157
  "settings": {
@@ -159,8 +159,8 @@
159
159
  }
160
160
  },
161
161
  "context": {
162
- "class": "6:00 AM CrossFit",
163
- "coach": "Sam"
162
+ "session": "Tuesday 6 PM workshop",
163
+ "owner": "Sam"
164
164
  },
165
165
  "events": [
166
166
  {
@@ -215,8 +215,8 @@
215
215
  "contact_me": false
216
216
  },
217
217
  "context": {
218
- "class": "6:00 AM CrossFit",
219
- "coach": "Sam"
218
+ "session": "Tuesday 6 PM workshop",
219
+ "owner": "Sam"
220
220
  }
221
221
  }
222
222
  }
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "scenarioVersion": 1,
3
- "name": "after-class: server drops unknown and hidden answers",
3
+ "name": "event-feedback: server drops unknown and hidden answers",
4
4
  "description": "The server replays the log: unknown fields are ignored, and answers to fields jumped over or hidden by logic are not stored.",
5
5
  "tags": [
6
- "after-class",
6
+ "event-feedback",
7
7
  "server",
8
8
  "security"
9
9
  ],
10
10
  "definition": {
11
11
  "schemaVersion": 1,
12
- "id": "after-class",
13
- "title": "How was class?",
12
+ "id": "event-feedback",
13
+ "title": "How was the event?",
14
14
  "blocks": [
15
15
  {
16
16
  "kind": "field",
17
17
  "id": "overall",
18
18
  "key": "overall",
19
19
  "type": "rating",
20
- "label": "How was today's class?",
20
+ "label": "How was today's event?",
21
21
  "required": true,
22
22
  "props": {
23
23
  "max": 5
@@ -32,24 +32,24 @@
32
32
  "props": {
33
33
  "options": [
34
34
  {
35
- "value": "coaching",
36
- "label": "Coaching"
35
+ "value": "hosting",
36
+ "label": "Hosting"
37
37
  },
38
38
  {
39
- "value": "workout",
40
- "label": "The workout"
39
+ "value": "content",
40
+ "label": "The content"
41
41
  },
42
42
  {
43
43
  "value": "community",
44
44
  "label": "Community"
45
45
  },
46
46
  {
47
- "value": "scaling",
48
- "label": "Scaling options"
47
+ "value": "pacing",
48
+ "label": "Pacing"
49
49
  },
50
50
  {
51
- "value": "equipment",
52
- "label": "Equipment"
51
+ "value": "venue",
52
+ "label": "The venue"
53
53
  },
54
54
  {
55
55
  "value": "cleanliness",
@@ -70,7 +70,7 @@
70
70
  "id": "contact_me",
71
71
  "key": "contact_me",
72
72
  "type": "yes-no",
73
- "label": "Want {{hidden:coach|a coach}} to follow up with you?"
73
+ "label": "Want {{hidden:owner|someone}} to follow up with you?"
74
74
  },
75
75
  {
76
76
  "kind": "field",
@@ -94,12 +94,12 @@
94
94
  },
95
95
  "hidden": [
96
96
  {
97
- "name": "class",
97
+ "name": "session",
98
98
  "type": "string",
99
99
  "source": "server"
100
100
  },
101
101
  {
102
- "name": "coach",
102
+ "name": "owner",
103
103
  "type": "string",
104
104
  "source": "server"
105
105
  }
@@ -152,7 +152,7 @@
152
152
  "endings": [
153
153
  {
154
154
  "id": "default",
155
- "title": "Thanks! See you at the next class."
155
+ "title": "Thanks! See you next time."
156
156
  }
157
157
  ],
158
158
  "settings": {
@@ -160,8 +160,8 @@
160
160
  }
161
161
  },
162
162
  "context": {
163
- "class": "6:00 AM CrossFit",
164
- "coach": "Sam"
163
+ "session": "Tuesday 6 PM workshop",
164
+ "owner": "Sam"
165
165
  },
166
166
  "events": [
167
167
  {
@@ -173,7 +173,7 @@
173
173
  "type": "answer",
174
174
  "field": "went_well",
175
175
  "value": [
176
- "workout"
176
+ "content"
177
177
  ]
178
178
  },
179
179
  {
@@ -225,8 +225,8 @@
225
225
  "contact_me": false
226
226
  },
227
227
  "context": {
228
- "class": "6:00 AM CrossFit",
229
- "coach": "Sam"
228
+ "session": "Tuesday 6 PM workshop",
229
+ "owner": "Sam"
230
230
  },
231
231
  "ignored": [
232
232
  "bogus"
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "scenarioVersion": 1,
3
- "name": "after-class: server ignores a client-sent coach",
4
- "description": "coach is a server input. A value sent by the client is dropped and reported in ignored; the server's own value is stored.",
3
+ "name": "event-feedback: server ignores a client-sent owner",
4
+ "description": "owner is a server input. A value sent by the client is dropped and reported in ignored; the server's own value is stored.",
5
5
  "tags": [
6
- "after-class",
6
+ "event-feedback",
7
7
  "server",
8
8
  "security"
9
9
  ],
10
10
  "definition": {
11
11
  "schemaVersion": 1,
12
- "id": "after-class",
13
- "title": "How was class?",
12
+ "id": "event-feedback",
13
+ "title": "How was the event?",
14
14
  "blocks": [
15
15
  {
16
16
  "kind": "field",
17
17
  "id": "overall",
18
18
  "key": "overall",
19
19
  "type": "rating",
20
- "label": "How was today's class?",
20
+ "label": "How was today's event?",
21
21
  "required": true,
22
22
  "props": {
23
23
  "max": 5
@@ -32,24 +32,24 @@
32
32
  "props": {
33
33
  "options": [
34
34
  {
35
- "value": "coaching",
36
- "label": "Coaching"
35
+ "value": "hosting",
36
+ "label": "Hosting"
37
37
  },
38
38
  {
39
- "value": "workout",
40
- "label": "The workout"
39
+ "value": "content",
40
+ "label": "The content"
41
41
  },
42
42
  {
43
43
  "value": "community",
44
44
  "label": "Community"
45
45
  },
46
46
  {
47
- "value": "scaling",
48
- "label": "Scaling options"
47
+ "value": "pacing",
48
+ "label": "Pacing"
49
49
  },
50
50
  {
51
- "value": "equipment",
52
- "label": "Equipment"
51
+ "value": "venue",
52
+ "label": "The venue"
53
53
  },
54
54
  {
55
55
  "value": "cleanliness",
@@ -70,7 +70,7 @@
70
70
  "id": "contact_me",
71
71
  "key": "contact_me",
72
72
  "type": "yes-no",
73
- "label": "Want {{hidden:coach|a coach}} to follow up with you?"
73
+ "label": "Want {{hidden:owner|someone}} to follow up with you?"
74
74
  },
75
75
  {
76
76
  "kind": "field",
@@ -94,12 +94,12 @@
94
94
  },
95
95
  "hidden": [
96
96
  {
97
- "name": "class",
97
+ "name": "session",
98
98
  "type": "string",
99
99
  "source": "server"
100
100
  },
101
101
  {
102
- "name": "coach",
102
+ "name": "owner",
103
103
  "type": "string",
104
104
  "source": "server"
105
105
  }
@@ -152,7 +152,7 @@
152
152
  "endings": [
153
153
  {
154
154
  "id": "default",
155
- "title": "Thanks! See you at the next class."
155
+ "title": "Thanks! See you next time."
156
156
  }
157
157
  ],
158
158
  "settings": {
@@ -160,11 +160,11 @@
160
160
  }
161
161
  },
162
162
  "hidden": {
163
- "coach": "Mallory"
163
+ "owner": "Mallory"
164
164
  },
165
165
  "context": {
166
- "class": "6:00 AM CrossFit",
167
- "coach": "Sam"
166
+ "session": "Tuesday 6 PM workshop",
167
+ "owner": "Sam"
168
168
  },
169
169
  "events": [
170
170
  {
@@ -208,11 +208,11 @@
208
208
  "contact_me": false
209
209
  },
210
210
  "context": {
211
- "class": "6:00 AM CrossFit",
212
- "coach": "Sam"
211
+ "session": "Tuesday 6 PM workshop",
212
+ "owner": "Sam"
213
213
  },
214
214
  "ignored": [
215
- "hidden.coach"
215
+ "hidden.owner"
216
216
  ]
217
217
  }
218
218
  }
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "scenarioVersion": 1,
3
- "name": "monthly-pulse: default ending",
3
+ "name": "monthly-check-in: default ending",
4
4
  "description": "NPS 8 is one under the jump's boundary: every question is asked and the default ending is reached.",
5
5
  "tags": [
6
- "monthly-pulse",
6
+ "monthly-check-in",
7
7
  "ending"
8
8
  ],
9
9
  "definition": {
10
10
  "schemaVersion": 1,
11
- "id": "monthly-pulse",
11
+ "id": "monthly-check-in",
12
12
  "title": "Monthly check-in",
13
13
  "blocks": [
14
14
  {
@@ -16,7 +16,7 @@
16
16
  "id": "recommend",
17
17
  "key": "recommend",
18
18
  "type": "nps",
19
- "label": "How likely are you to recommend CrossFit Fairfield to a friend?",
19
+ "label": "How likely are you to recommend us to a friend?",
20
20
  "required": true
21
21
  },
22
22
  {
@@ -31,7 +31,7 @@
31
31
  "id": "frequency",
32
32
  "key": "frequency",
33
33
  "type": "single-choice",
34
- "label": "How often did you train with us this month?",
34
+ "label": "How often did you use the service this month?",
35
35
  "props": {
36
36
  "options": [
37
37
  {
@@ -83,7 +83,7 @@
83
83
  },
84
84
  {
85
85
  "id": "promoter",
86
- "title": "Thank you! Bring a friend to a free class anytime."
86
+ "title": "Thank you! Tell a friend about us anytime."
87
87
  }
88
88
  ],
89
89
  "settings": {