@spotify/backstage-plugin-pulse-common 0.6.3 → 0.8.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.
- package/CHANGELOG.md +21 -0
- package/dist/index.cjs.js +12 -12
- package/dist/index.d.ts +130 -81
- package/dist/index.esm.js +12 -12
- package/package.json +4 -4
- package/src/templates/schema/survey-template-schema.json +64 -58
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
},
|
|
80
80
|
"macros": {
|
|
81
81
|
"type": "object",
|
|
82
|
-
"description": "Expression shortcuts. Macros are referred to elsewhere in the survey using the ${
|
|
82
|
+
"description": "Expression shortcuts. Macros are referred to elsewhere in the survey using the ${m:<name>} construct (similar to parameters) and will get lazily in-place replaced. Macros can be recursive and contain references to parameters or answers in the survey.",
|
|
83
83
|
"additionalProperties": {
|
|
84
84
|
"type": "string"
|
|
85
85
|
}
|
|
@@ -88,65 +88,71 @@
|
|
|
88
88
|
"type": "array",
|
|
89
89
|
"description": "The survey sections, in the order they will appear in the survey",
|
|
90
90
|
"items": {
|
|
91
|
-
"
|
|
92
|
-
"description": "A survey section.",
|
|
93
|
-
"properties": {
|
|
94
|
-
"id": {
|
|
95
|
-
"type": "string",
|
|
96
|
-
"description": "The id of this section",
|
|
97
|
-
"format": "regex",
|
|
98
|
-
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]*[a-zA-Z0-9]$"
|
|
99
|
-
},
|
|
100
|
-
"name": {
|
|
101
|
-
"type": "string",
|
|
102
|
-
"description": "The name of this section"
|
|
103
|
-
},
|
|
104
|
-
"display_logic": {
|
|
105
|
-
"type": "string",
|
|
106
|
-
"description": "An optional boolean expression that decides if the surveyee should see the questions in this section."
|
|
107
|
-
},
|
|
108
|
-
"questions": {
|
|
109
|
-
"type": "array",
|
|
110
|
-
"description": "The questions in the section (all in one page)",
|
|
111
|
-
"items": {
|
|
112
|
-
"$ref": "#/$defs/question"
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
"pages": {
|
|
116
|
-
"type": "array",
|
|
117
|
-
"description": "The questions in the section, split into pages",
|
|
118
|
-
"items": {
|
|
119
|
-
"type": "object",
|
|
120
|
-
"properties": {
|
|
121
|
-
"questions": {
|
|
122
|
-
"type": "array",
|
|
123
|
-
"description": "The questions on the page",
|
|
124
|
-
"items": {
|
|
125
|
-
"$ref": "#/$defs/question"
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"required": ["questions"],
|
|
130
|
-
"additionalProperties": false
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
"additionalProperties": false,
|
|
135
|
-
"required": ["id", "name"],
|
|
136
|
-
"oneOf": [
|
|
137
|
-
{
|
|
138
|
-
"required": ["questions"]
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
"required": ["pages"]
|
|
142
|
-
}
|
|
143
|
-
]
|
|
91
|
+
"$ref": "#/$defs/section"
|
|
144
92
|
}
|
|
145
93
|
}
|
|
146
94
|
},
|
|
147
95
|
"additionalProperties": false,
|
|
148
96
|
"required": ["template", "parameters", "sections"],
|
|
149
97
|
"$defs": {
|
|
98
|
+
"section": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"description": "A survey section.",
|
|
101
|
+
"properties": {
|
|
102
|
+
"id": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"description": "The id of this section",
|
|
105
|
+
"format": "regex",
|
|
106
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]*[a-zA-Z0-9]$"
|
|
107
|
+
},
|
|
108
|
+
"name": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"description": "The name of this section"
|
|
111
|
+
},
|
|
112
|
+
"display_logic": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "An optional boolean expression that decides if the surveyee should see the questions in this section."
|
|
115
|
+
},
|
|
116
|
+
"questions": {
|
|
117
|
+
"type": "array",
|
|
118
|
+
"description": "The questions in the section (all in one page)",
|
|
119
|
+
"items": {
|
|
120
|
+
"$ref": "#/$defs/question"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"pages": {
|
|
124
|
+
"type": "array",
|
|
125
|
+
"description": "The questions in the section, split into pages",
|
|
126
|
+
"items": {
|
|
127
|
+
"$ref": "#/$defs/page"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"required": ["id", "name"],
|
|
133
|
+
"oneOf": [
|
|
134
|
+
{
|
|
135
|
+
"required": ["questions"]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"required": ["pages"]
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
"page": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"properties": {
|
|
145
|
+
"questions": {
|
|
146
|
+
"type": "array",
|
|
147
|
+
"description": "The questions on the page",
|
|
148
|
+
"items": {
|
|
149
|
+
"$ref": "#/$defs/question"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"required": ["questions"],
|
|
154
|
+
"additionalProperties": false
|
|
155
|
+
},
|
|
150
156
|
"question": {
|
|
151
157
|
"type": "object",
|
|
152
158
|
"properties": {
|
|
@@ -233,7 +239,7 @@
|
|
|
233
239
|
},
|
|
234
240
|
"id": {
|
|
235
241
|
"type": "string",
|
|
236
|
-
"description": "The id of the group.
|
|
242
|
+
"description": "The id of the group."
|
|
237
243
|
},
|
|
238
244
|
"display": {
|
|
239
245
|
"type": "string",
|
|
@@ -247,7 +253,7 @@
|
|
|
247
253
|
"$ref": "#/$defs/randomization"
|
|
248
254
|
}
|
|
249
255
|
},
|
|
250
|
-
"required": ["statements", "display"],
|
|
256
|
+
"required": ["statements", "id", "display"],
|
|
251
257
|
"additionalProperties": false
|
|
252
258
|
}
|
|
253
259
|
},
|
|
@@ -275,7 +281,7 @@
|
|
|
275
281
|
},
|
|
276
282
|
"id": {
|
|
277
283
|
"type": "string",
|
|
278
|
-
"description": "The id of the group.
|
|
284
|
+
"description": "The id of the group."
|
|
279
285
|
},
|
|
280
286
|
"display": {
|
|
281
287
|
"type": "string",
|
|
@@ -289,7 +295,7 @@
|
|
|
289
295
|
"$ref": "#/$defs/randomization"
|
|
290
296
|
}
|
|
291
297
|
},
|
|
292
|
-
"required": ["choices", "display"],
|
|
298
|
+
"required": ["choices", "id", "display"],
|
|
293
299
|
"additionalProperties": false
|
|
294
300
|
}
|
|
295
301
|
},
|