@disclosureos/scoring 2.0.0-beta.3 → 2.0.0-beta.4

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.
@@ -0,0 +1,307 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "kind": {
6
+ "type": "string",
7
+ "const": "provider_score_policy"
8
+ },
9
+ "schemaVersion": {
10
+ "type": "string",
11
+ "const": "0.1.0"
12
+ },
13
+ "id": {
14
+ "type": "string",
15
+ "minLength": 1,
16
+ "pattern": "\\S"
17
+ },
18
+ "version": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "pattern": "\\S"
22
+ },
23
+ "title": {
24
+ "type": "string",
25
+ "minLength": 1,
26
+ "pattern": "\\S"
27
+ },
28
+ "metric": {
29
+ "type": "object",
30
+ "properties": {
31
+ "id": {
32
+ "type": "string",
33
+ "minLength": 1,
34
+ "pattern": "\\S"
35
+ },
36
+ "label": {
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "pattern": "\\S"
40
+ },
41
+ "question": {
42
+ "type": "string",
43
+ "minLength": 1,
44
+ "pattern": "\\S"
45
+ }
46
+ },
47
+ "required": [
48
+ "id",
49
+ "label",
50
+ "question"
51
+ ],
52
+ "additionalProperties": false
53
+ },
54
+ "subjectKinds": {
55
+ "minItems": 1,
56
+ "type": "array",
57
+ "items": {
58
+ "type": "string",
59
+ "enum": [
60
+ "case",
61
+ "record",
62
+ "claim",
63
+ "measurement",
64
+ "product",
65
+ "source",
66
+ "collection"
67
+ ]
68
+ }
69
+ },
70
+ "method": {
71
+ "type": "object",
72
+ "properties": {
73
+ "description": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "pattern": "\\S"
77
+ },
78
+ "artifacts": {
79
+ "minItems": 1,
80
+ "type": "array",
81
+ "items": {
82
+ "type": "object",
83
+ "properties": {
84
+ "ref": {
85
+ "type": "string",
86
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
87
+ },
88
+ "id": {
89
+ "type": "string",
90
+ "minLength": 1,
91
+ "pattern": "\\S"
92
+ },
93
+ "version": {
94
+ "type": "string",
95
+ "minLength": 1,
96
+ "pattern": "\\S"
97
+ },
98
+ "mediaType": {
99
+ "type": "string",
100
+ "minLength": 1,
101
+ "pattern": "\\S"
102
+ },
103
+ "sha256": {
104
+ "type": "string",
105
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
106
+ },
107
+ "byteLength": {
108
+ "type": "integer",
109
+ "minimum": 1,
110
+ "maximum": 9007199254740991
111
+ }
112
+ },
113
+ "required": [
114
+ "ref",
115
+ "id",
116
+ "version",
117
+ "mediaType",
118
+ "sha256",
119
+ "byteLength"
120
+ ],
121
+ "additionalProperties": false
122
+ }
123
+ }
124
+ },
125
+ "required": [
126
+ "description",
127
+ "artifacts"
128
+ ],
129
+ "additionalProperties": false
130
+ },
131
+ "applicability": {
132
+ "type": "string",
133
+ "minLength": 1,
134
+ "pattern": "\\S"
135
+ },
136
+ "missingData": {
137
+ "type": "object",
138
+ "properties": {
139
+ "handling": {
140
+ "type": "string",
141
+ "enum": [
142
+ "withhold",
143
+ "allow_partial"
144
+ ]
145
+ },
146
+ "description": {
147
+ "type": "string",
148
+ "minLength": 1,
149
+ "pattern": "\\S"
150
+ }
151
+ },
152
+ "required": [
153
+ "handling",
154
+ "description"
155
+ ],
156
+ "additionalProperties": false
157
+ },
158
+ "limitations": {
159
+ "minItems": 1,
160
+ "type": "array",
161
+ "items": {
162
+ "type": "string",
163
+ "minLength": 1,
164
+ "pattern": "\\S"
165
+ }
166
+ },
167
+ "scale": {
168
+ "oneOf": [
169
+ {
170
+ "type": "object",
171
+ "properties": {
172
+ "kind": {
173
+ "type": "string",
174
+ "const": "numeric"
175
+ },
176
+ "min": {
177
+ "type": "number"
178
+ },
179
+ "max": {
180
+ "type": "number"
181
+ },
182
+ "direction": {
183
+ "type": "string",
184
+ "enum": [
185
+ "higher",
186
+ "lower",
187
+ "none"
188
+ ]
189
+ },
190
+ "unit": {
191
+ "type": "string",
192
+ "minLength": 1,
193
+ "pattern": "\\S"
194
+ },
195
+ "grades": {
196
+ "type": "array",
197
+ "items": {
198
+ "type": "object",
199
+ "properties": {
200
+ "id": {
201
+ "type": "string",
202
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
203
+ },
204
+ "label": {
205
+ "type": "string",
206
+ "minLength": 1,
207
+ "pattern": "\\S"
208
+ },
209
+ "min": {
210
+ "type": "number"
211
+ },
212
+ "max": {
213
+ "type": "number"
214
+ }
215
+ },
216
+ "required": [
217
+ "id",
218
+ "label",
219
+ "min",
220
+ "max"
221
+ ],
222
+ "additionalProperties": false
223
+ }
224
+ }
225
+ },
226
+ "required": [
227
+ "kind",
228
+ "min",
229
+ "max",
230
+ "direction",
231
+ "unit",
232
+ "grades"
233
+ ],
234
+ "additionalProperties": false
235
+ },
236
+ {
237
+ "type": "object",
238
+ "properties": {
239
+ "kind": {
240
+ "type": "string",
241
+ "const": "ordinal"
242
+ },
243
+ "direction": {
244
+ "type": "string",
245
+ "enum": [
246
+ "higher",
247
+ "lower",
248
+ "none"
249
+ ]
250
+ },
251
+ "levels": {
252
+ "minItems": 2,
253
+ "type": "array",
254
+ "items": {
255
+ "type": "object",
256
+ "properties": {
257
+ "id": {
258
+ "type": "string",
259
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
260
+ },
261
+ "label": {
262
+ "type": "string",
263
+ "minLength": 1,
264
+ "pattern": "\\S"
265
+ },
266
+ "description": {
267
+ "type": "string",
268
+ "minLength": 1,
269
+ "pattern": "\\S"
270
+ }
271
+ },
272
+ "required": [
273
+ "id",
274
+ "label",
275
+ "description"
276
+ ],
277
+ "additionalProperties": false
278
+ }
279
+ }
280
+ },
281
+ "required": [
282
+ "kind",
283
+ "direction",
284
+ "levels"
285
+ ],
286
+ "additionalProperties": false
287
+ }
288
+ ]
289
+ }
290
+ },
291
+ "required": [
292
+ "kind",
293
+ "schemaVersion",
294
+ "id",
295
+ "version",
296
+ "title",
297
+ "metric",
298
+ "subjectKinds",
299
+ "method",
300
+ "applicability",
301
+ "missingData",
302
+ "limitations",
303
+ "scale"
304
+ ],
305
+ "additionalProperties": false,
306
+ "$id": "urn:disclosureos:experimental:provider-score-policy:0.1.0"
307
+ }
@@ -0,0 +1,343 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "kind": {
6
+ "type": "string",
7
+ "const": "provider_score_result"
8
+ },
9
+ "schemaVersion": {
10
+ "type": "string",
11
+ "const": "0.1.0"
12
+ },
13
+ "id": {
14
+ "type": "string",
15
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
16
+ },
17
+ "provider": {
18
+ "type": "object",
19
+ "properties": {
20
+ "id": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "pattern": "\\S"
24
+ },
25
+ "name": {
26
+ "type": "string",
27
+ "minLength": 1,
28
+ "pattern": "\\S"
29
+ },
30
+ "url": {
31
+ "type": "string",
32
+ "pattern": "^https?:\\/\\/"
33
+ }
34
+ },
35
+ "required": [
36
+ "id",
37
+ "name"
38
+ ],
39
+ "additionalProperties": false
40
+ },
41
+ "producedAt": {
42
+ "type": "string",
43
+ "format": "date-time",
44
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
45
+ },
46
+ "policy": {
47
+ "type": "object",
48
+ "properties": {
49
+ "id": {
50
+ "type": "string",
51
+ "minLength": 1,
52
+ "pattern": "\\S"
53
+ },
54
+ "version": {
55
+ "type": "string",
56
+ "minLength": 1,
57
+ "pattern": "\\S"
58
+ },
59
+ "sha256": {
60
+ "type": "string",
61
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
62
+ },
63
+ "byteLength": {
64
+ "type": "integer",
65
+ "minimum": 1,
66
+ "maximum": 9007199254740991
67
+ }
68
+ },
69
+ "required": [
70
+ "id",
71
+ "version",
72
+ "sha256",
73
+ "byteLength"
74
+ ],
75
+ "additionalProperties": false
76
+ },
77
+ "subject": {
78
+ "type": "object",
79
+ "properties": {
80
+ "kind": {
81
+ "type": "string",
82
+ "enum": [
83
+ "case",
84
+ "record",
85
+ "claim",
86
+ "measurement",
87
+ "product",
88
+ "source",
89
+ "collection"
90
+ ]
91
+ },
92
+ "id": {
93
+ "type": "string",
94
+ "minLength": 1,
95
+ "pattern": "\\S"
96
+ }
97
+ },
98
+ "required": [
99
+ "kind",
100
+ "id"
101
+ ],
102
+ "additionalProperties": false
103
+ },
104
+ "inputScope": {
105
+ "type": "object",
106
+ "properties": {
107
+ "id": {
108
+ "type": "string",
109
+ "minLength": 1,
110
+ "pattern": "\\S"
111
+ },
112
+ "description": {
113
+ "type": "string",
114
+ "minLength": 1,
115
+ "pattern": "\\S"
116
+ }
117
+ },
118
+ "required": [
119
+ "id",
120
+ "description"
121
+ ],
122
+ "additionalProperties": false
123
+ },
124
+ "inputs": {
125
+ "minItems": 1,
126
+ "type": "array",
127
+ "items": {
128
+ "type": "object",
129
+ "properties": {
130
+ "ref": {
131
+ "type": "string",
132
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
133
+ },
134
+ "title": {
135
+ "type": "string",
136
+ "minLength": 1,
137
+ "pattern": "\\S"
138
+ },
139
+ "mediaType": {
140
+ "type": "string",
141
+ "minLength": 1,
142
+ "pattern": "\\S"
143
+ },
144
+ "sha256": {
145
+ "type": "string",
146
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
147
+ },
148
+ "byteLength": {
149
+ "type": "integer",
150
+ "minimum": 1,
151
+ "maximum": 9007199254740991
152
+ }
153
+ },
154
+ "required": [
155
+ "ref",
156
+ "title",
157
+ "mediaType",
158
+ "sha256",
159
+ "byteLength"
160
+ ],
161
+ "additionalProperties": false
162
+ }
163
+ },
164
+ "derivation": {
165
+ "type": "array",
166
+ "items": {
167
+ "type": "object",
168
+ "properties": {
169
+ "ref": {
170
+ "type": "string",
171
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
172
+ },
173
+ "title": {
174
+ "type": "string",
175
+ "minLength": 1,
176
+ "pattern": "\\S"
177
+ },
178
+ "mediaType": {
179
+ "type": "string",
180
+ "minLength": 1,
181
+ "pattern": "\\S"
182
+ },
183
+ "sha256": {
184
+ "type": "string",
185
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
186
+ },
187
+ "byteLength": {
188
+ "type": "integer",
189
+ "minimum": 1,
190
+ "maximum": 9007199254740991
191
+ }
192
+ },
193
+ "required": [
194
+ "ref",
195
+ "title",
196
+ "mediaType",
197
+ "sha256",
198
+ "byteLength"
199
+ ],
200
+ "additionalProperties": false
201
+ }
202
+ },
203
+ "applicability": {
204
+ "type": "object",
205
+ "properties": {
206
+ "status": {
207
+ "type": "string",
208
+ "enum": [
209
+ "applicable",
210
+ "not_applicable",
211
+ "undetermined"
212
+ ]
213
+ },
214
+ "reason": {
215
+ "type": "string",
216
+ "minLength": 1,
217
+ "pattern": "\\S"
218
+ }
219
+ },
220
+ "required": [
221
+ "status",
222
+ "reason"
223
+ ],
224
+ "additionalProperties": false
225
+ },
226
+ "missingInputs": {
227
+ "type": "array",
228
+ "items": {
229
+ "type": "object",
230
+ "properties": {
231
+ "ref": {
232
+ "type": "string",
233
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
234
+ },
235
+ "description": {
236
+ "type": "string",
237
+ "minLength": 1,
238
+ "pattern": "\\S"
239
+ }
240
+ },
241
+ "required": [
242
+ "ref",
243
+ "description"
244
+ ],
245
+ "additionalProperties": false
246
+ }
247
+ },
248
+ "limitations": {
249
+ "type": "array",
250
+ "items": {
251
+ "type": "string",
252
+ "minLength": 1,
253
+ "pattern": "\\S"
254
+ }
255
+ },
256
+ "outcome": {
257
+ "oneOf": [
258
+ {
259
+ "type": "object",
260
+ "properties": {
261
+ "status": {
262
+ "type": "string",
263
+ "const": "scored"
264
+ },
265
+ "value": {
266
+ "anyOf": [
267
+ {
268
+ "type": "number"
269
+ },
270
+ {
271
+ "type": "string",
272
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
273
+ }
274
+ ]
275
+ },
276
+ "gradeId": {
277
+ "type": "string",
278
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
279
+ },
280
+ "explanation": {
281
+ "type": "string",
282
+ "minLength": 1,
283
+ "pattern": "\\S"
284
+ }
285
+ },
286
+ "required": [
287
+ "status",
288
+ "value",
289
+ "explanation"
290
+ ],
291
+ "additionalProperties": false
292
+ },
293
+ {
294
+ "type": "object",
295
+ "properties": {
296
+ "status": {
297
+ "type": "string",
298
+ "const": "unavailable"
299
+ },
300
+ "reasonCode": {
301
+ "type": "string",
302
+ "enum": [
303
+ "missing_inputs",
304
+ "not_applicable",
305
+ "undetermined",
306
+ "not_calculated"
307
+ ]
308
+ },
309
+ "explanation": {
310
+ "type": "string",
311
+ "minLength": 1,
312
+ "pattern": "\\S"
313
+ }
314
+ },
315
+ "required": [
316
+ "status",
317
+ "reasonCode",
318
+ "explanation"
319
+ ],
320
+ "additionalProperties": false
321
+ }
322
+ ]
323
+ }
324
+ },
325
+ "required": [
326
+ "kind",
327
+ "schemaVersion",
328
+ "id",
329
+ "provider",
330
+ "producedAt",
331
+ "policy",
332
+ "subject",
333
+ "inputScope",
334
+ "inputs",
335
+ "derivation",
336
+ "applicability",
337
+ "missingInputs",
338
+ "limitations",
339
+ "outcome"
340
+ ],
341
+ "additionalProperties": false,
342
+ "$id": "urn:disclosureos:experimental:provider-score-result:0.1.0"
343
+ }