@murphai/contracts 0.1.1

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 (89) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +24 -0
  3. package/dist/bank-entities.d.ts +35 -0
  4. package/dist/bank-entities.d.ts.map +1 -0
  5. package/dist/bank-entities.js +164 -0
  6. package/dist/bank-entities.js.map +1 -0
  7. package/dist/command-capabilities.d.ts +50 -0
  8. package/dist/command-capabilities.d.ts.map +1 -0
  9. package/dist/command-capabilities.js +149 -0
  10. package/dist/command-capabilities.js.map +1 -0
  11. package/dist/constants.d.ts +149 -0
  12. package/dist/constants.d.ts.map +1 -0
  13. package/dist/constants.js +232 -0
  14. package/dist/constants.js.map +1 -0
  15. package/dist/examples.d.ts +31 -0
  16. package/dist/examples.d.ts.map +1 -0
  17. package/dist/examples.js +943 -0
  18. package/dist/examples.js.map +1 -0
  19. package/dist/frontmatter.d.ts +28 -0
  20. package/dist/frontmatter.d.ts.map +1 -0
  21. package/dist/frontmatter.js +272 -0
  22. package/dist/frontmatter.js.map +1 -0
  23. package/dist/health-entities.d.ts +87 -0
  24. package/dist/health-entities.d.ts.map +1 -0
  25. package/dist/health-entities.js +349 -0
  26. package/dist/health-entities.js.map +1 -0
  27. package/dist/ids.d.ts +10 -0
  28. package/dist/ids.d.ts.map +1 -0
  29. package/dist/ids.js +27 -0
  30. package/dist/ids.js.map +1 -0
  31. package/dist/index.d.ts +16 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +16 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/registry-helpers.d.ts +31 -0
  36. package/dist/registry-helpers.d.ts.map +1 -0
  37. package/dist/registry-helpers.js +53 -0
  38. package/dist/registry-helpers.js.map +1 -0
  39. package/dist/schemas.d.ts +47 -0
  40. package/dist/schemas.d.ts.map +1 -0
  41. package/dist/schemas.js +50 -0
  42. package/dist/schemas.js.map +1 -0
  43. package/dist/scripts/generate-json-schema.js +13 -0
  44. package/dist/scripts/generate-json-schema.js.map +1 -0
  45. package/dist/scripts/verify.js +230 -0
  46. package/dist/scripts/verify.js.map +1 -0
  47. package/dist/shares.d.ts +715 -0
  48. package/dist/shares.d.ts.map +1 -0
  49. package/dist/shares.js +469 -0
  50. package/dist/shares.js.map +1 -0
  51. package/dist/time.d.ts +25 -0
  52. package/dist/time.d.ts.map +1 -0
  53. package/dist/time.js +241 -0
  54. package/dist/time.js.map +1 -0
  55. package/dist/tsconfig.build.tsbuildinfo +1 -0
  56. package/dist/types.d.ts +34 -0
  57. package/dist/types.d.ts.map +1 -0
  58. package/dist/types.js +2 -0
  59. package/dist/types.js.map +1 -0
  60. package/dist/validate.d.ts +18 -0
  61. package/dist/validate.d.ts.map +1 -0
  62. package/dist/validate.js +129 -0
  63. package/dist/validate.js.map +1 -0
  64. package/dist/zod.d.ts +1626 -0
  65. package/dist/zod.d.ts.map +1 -0
  66. package/dist/zod.js +834 -0
  67. package/dist/zod.js.map +1 -0
  68. package/generated/assessment-response.schema.json +101 -0
  69. package/generated/audit-record.schema.json +141 -0
  70. package/generated/event-record.schema.json +2708 -0
  71. package/generated/frontmatter-allergy.schema.json +82 -0
  72. package/generated/frontmatter-condition.schema.json +101 -0
  73. package/generated/frontmatter-core.schema.json +51 -0
  74. package/generated/frontmatter-experiment.schema.json +70 -0
  75. package/generated/frontmatter-family-member.schema.json +68 -0
  76. package/generated/frontmatter-food.schema.json +128 -0
  77. package/generated/frontmatter-genetic-variant.schema.json +81 -0
  78. package/generated/frontmatter-goal.schema.json +116 -0
  79. package/generated/frontmatter-journal-day.schema.json +52 -0
  80. package/generated/frontmatter-profile-current.schema.json +55 -0
  81. package/generated/frontmatter-protocol.schema.json +153 -0
  82. package/generated/frontmatter-provider.schema.json +81 -0
  83. package/generated/frontmatter-recipe.schema.json +124 -0
  84. package/generated/frontmatter-workout-format.schema.json +163 -0
  85. package/generated/inbox-capture-record.schema.json +332 -0
  86. package/generated/profile-snapshot.schema.json +131 -0
  87. package/generated/sample-record.schema.json +726 -0
  88. package/generated/vault-metadata.schema.json +324 -0
  89. package/package.json +69 -0
@@ -0,0 +1,726 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "oneOf": [
4
+ {
5
+ "type": "object",
6
+ "properties": {
7
+ "schemaVersion": {
8
+ "type": "string",
9
+ "const": "murph.sample.v1"
10
+ },
11
+ "id": {
12
+ "type": "string",
13
+ "pattern": "^smp_[0-9A-HJKMNP-TV-Z]{26}$"
14
+ },
15
+ "recordedAt": {
16
+ "type": "string",
17
+ "format": "date-time"
18
+ },
19
+ "dayKey": {
20
+ "type": "string",
21
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
22
+ },
23
+ "source": {
24
+ "type": "string",
25
+ "enum": [
26
+ "device",
27
+ "import",
28
+ "manual",
29
+ "derived"
30
+ ]
31
+ },
32
+ "quality": {
33
+ "type": "string",
34
+ "enum": [
35
+ "raw",
36
+ "normalized",
37
+ "derived"
38
+ ]
39
+ },
40
+ "stream": {
41
+ "type": "string",
42
+ "const": "heart_rate"
43
+ },
44
+ "externalRef": {
45
+ "type": "object",
46
+ "properties": {
47
+ "system": {
48
+ "type": "string",
49
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
50
+ },
51
+ "resourceType": {
52
+ "type": "string",
53
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
54
+ },
55
+ "resourceId": {
56
+ "type": "string",
57
+ "minLength": 1,
58
+ "maxLength": 200
59
+ },
60
+ "version": {
61
+ "type": "string",
62
+ "minLength": 1,
63
+ "maxLength": 200
64
+ },
65
+ "facet": {
66
+ "type": "string",
67
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
68
+ }
69
+ },
70
+ "required": [
71
+ "system",
72
+ "resourceType",
73
+ "resourceId"
74
+ ],
75
+ "additionalProperties": false
76
+ },
77
+ "timeZone": {
78
+ "type": "string",
79
+ "minLength": 3,
80
+ "maxLength": 64
81
+ },
82
+ "value": {
83
+ "type": "integer",
84
+ "minimum": 0
85
+ },
86
+ "unit": {
87
+ "type": "string",
88
+ "const": "bpm"
89
+ }
90
+ },
91
+ "required": [
92
+ "schemaVersion",
93
+ "id",
94
+ "recordedAt",
95
+ "dayKey",
96
+ "source",
97
+ "quality",
98
+ "stream",
99
+ "value",
100
+ "unit"
101
+ ],
102
+ "additionalProperties": false
103
+ },
104
+ {
105
+ "type": "object",
106
+ "properties": {
107
+ "schemaVersion": {
108
+ "type": "string",
109
+ "const": "murph.sample.v1"
110
+ },
111
+ "id": {
112
+ "type": "string",
113
+ "pattern": "^smp_[0-9A-HJKMNP-TV-Z]{26}$"
114
+ },
115
+ "recordedAt": {
116
+ "type": "string",
117
+ "format": "date-time"
118
+ },
119
+ "dayKey": {
120
+ "type": "string",
121
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
122
+ },
123
+ "source": {
124
+ "type": "string",
125
+ "enum": [
126
+ "device",
127
+ "import",
128
+ "manual",
129
+ "derived"
130
+ ]
131
+ },
132
+ "quality": {
133
+ "type": "string",
134
+ "enum": [
135
+ "raw",
136
+ "normalized",
137
+ "derived"
138
+ ]
139
+ },
140
+ "stream": {
141
+ "type": "string",
142
+ "const": "hrv"
143
+ },
144
+ "externalRef": {
145
+ "type": "object",
146
+ "properties": {
147
+ "system": {
148
+ "type": "string",
149
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
150
+ },
151
+ "resourceType": {
152
+ "type": "string",
153
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
154
+ },
155
+ "resourceId": {
156
+ "type": "string",
157
+ "minLength": 1,
158
+ "maxLength": 200
159
+ },
160
+ "version": {
161
+ "type": "string",
162
+ "minLength": 1,
163
+ "maxLength": 200
164
+ },
165
+ "facet": {
166
+ "type": "string",
167
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
168
+ }
169
+ },
170
+ "required": [
171
+ "system",
172
+ "resourceType",
173
+ "resourceId"
174
+ ],
175
+ "additionalProperties": false
176
+ },
177
+ "timeZone": {
178
+ "type": "string",
179
+ "minLength": 3,
180
+ "maxLength": 64
181
+ },
182
+ "value": {
183
+ "type": "number",
184
+ "minimum": 0
185
+ },
186
+ "unit": {
187
+ "type": "string",
188
+ "const": "ms"
189
+ }
190
+ },
191
+ "required": [
192
+ "schemaVersion",
193
+ "id",
194
+ "recordedAt",
195
+ "dayKey",
196
+ "source",
197
+ "quality",
198
+ "stream",
199
+ "value",
200
+ "unit"
201
+ ],
202
+ "additionalProperties": false
203
+ },
204
+ {
205
+ "type": "object",
206
+ "properties": {
207
+ "schemaVersion": {
208
+ "type": "string",
209
+ "const": "murph.sample.v1"
210
+ },
211
+ "id": {
212
+ "type": "string",
213
+ "pattern": "^smp_[0-9A-HJKMNP-TV-Z]{26}$"
214
+ },
215
+ "recordedAt": {
216
+ "type": "string",
217
+ "format": "date-time"
218
+ },
219
+ "dayKey": {
220
+ "type": "string",
221
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
222
+ },
223
+ "source": {
224
+ "type": "string",
225
+ "enum": [
226
+ "device",
227
+ "import",
228
+ "manual",
229
+ "derived"
230
+ ]
231
+ },
232
+ "quality": {
233
+ "type": "string",
234
+ "enum": [
235
+ "raw",
236
+ "normalized",
237
+ "derived"
238
+ ]
239
+ },
240
+ "stream": {
241
+ "type": "string",
242
+ "const": "steps"
243
+ },
244
+ "externalRef": {
245
+ "type": "object",
246
+ "properties": {
247
+ "system": {
248
+ "type": "string",
249
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
250
+ },
251
+ "resourceType": {
252
+ "type": "string",
253
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
254
+ },
255
+ "resourceId": {
256
+ "type": "string",
257
+ "minLength": 1,
258
+ "maxLength": 200
259
+ },
260
+ "version": {
261
+ "type": "string",
262
+ "minLength": 1,
263
+ "maxLength": 200
264
+ },
265
+ "facet": {
266
+ "type": "string",
267
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
268
+ }
269
+ },
270
+ "required": [
271
+ "system",
272
+ "resourceType",
273
+ "resourceId"
274
+ ],
275
+ "additionalProperties": false
276
+ },
277
+ "timeZone": {
278
+ "type": "string",
279
+ "minLength": 3,
280
+ "maxLength": 64
281
+ },
282
+ "value": {
283
+ "type": "integer",
284
+ "minimum": 0
285
+ },
286
+ "unit": {
287
+ "type": "string",
288
+ "const": "count"
289
+ }
290
+ },
291
+ "required": [
292
+ "schemaVersion",
293
+ "id",
294
+ "recordedAt",
295
+ "dayKey",
296
+ "source",
297
+ "quality",
298
+ "stream",
299
+ "value",
300
+ "unit"
301
+ ],
302
+ "additionalProperties": false
303
+ },
304
+ {
305
+ "type": "object",
306
+ "properties": {
307
+ "schemaVersion": {
308
+ "type": "string",
309
+ "const": "murph.sample.v1"
310
+ },
311
+ "id": {
312
+ "type": "string",
313
+ "pattern": "^smp_[0-9A-HJKMNP-TV-Z]{26}$"
314
+ },
315
+ "recordedAt": {
316
+ "type": "string",
317
+ "format": "date-time"
318
+ },
319
+ "dayKey": {
320
+ "type": "string",
321
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
322
+ },
323
+ "source": {
324
+ "type": "string",
325
+ "enum": [
326
+ "device",
327
+ "import",
328
+ "manual",
329
+ "derived"
330
+ ]
331
+ },
332
+ "quality": {
333
+ "type": "string",
334
+ "enum": [
335
+ "raw",
336
+ "normalized",
337
+ "derived"
338
+ ]
339
+ },
340
+ "stream": {
341
+ "type": "string",
342
+ "const": "sleep_stage"
343
+ },
344
+ "externalRef": {
345
+ "type": "object",
346
+ "properties": {
347
+ "system": {
348
+ "type": "string",
349
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
350
+ },
351
+ "resourceType": {
352
+ "type": "string",
353
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
354
+ },
355
+ "resourceId": {
356
+ "type": "string",
357
+ "minLength": 1,
358
+ "maxLength": 200
359
+ },
360
+ "version": {
361
+ "type": "string",
362
+ "minLength": 1,
363
+ "maxLength": 200
364
+ },
365
+ "facet": {
366
+ "type": "string",
367
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
368
+ }
369
+ },
370
+ "required": [
371
+ "system",
372
+ "resourceType",
373
+ "resourceId"
374
+ ],
375
+ "additionalProperties": false
376
+ },
377
+ "timeZone": {
378
+ "type": "string",
379
+ "minLength": 3,
380
+ "maxLength": 64
381
+ },
382
+ "stage": {
383
+ "type": "string",
384
+ "enum": [
385
+ "awake",
386
+ "light",
387
+ "deep",
388
+ "rem"
389
+ ]
390
+ },
391
+ "startAt": {
392
+ "type": "string",
393
+ "format": "date-time"
394
+ },
395
+ "endAt": {
396
+ "type": "string",
397
+ "format": "date-time"
398
+ },
399
+ "durationMinutes": {
400
+ "type": "integer",
401
+ "minimum": 1
402
+ },
403
+ "unit": {
404
+ "type": "string",
405
+ "const": "stage"
406
+ }
407
+ },
408
+ "required": [
409
+ "schemaVersion",
410
+ "id",
411
+ "recordedAt",
412
+ "dayKey",
413
+ "source",
414
+ "quality",
415
+ "stream",
416
+ "stage",
417
+ "startAt",
418
+ "endAt",
419
+ "durationMinutes",
420
+ "unit"
421
+ ],
422
+ "additionalProperties": false
423
+ },
424
+ {
425
+ "type": "object",
426
+ "properties": {
427
+ "schemaVersion": {
428
+ "type": "string",
429
+ "const": "murph.sample.v1"
430
+ },
431
+ "id": {
432
+ "type": "string",
433
+ "pattern": "^smp_[0-9A-HJKMNP-TV-Z]{26}$"
434
+ },
435
+ "recordedAt": {
436
+ "type": "string",
437
+ "format": "date-time"
438
+ },
439
+ "dayKey": {
440
+ "type": "string",
441
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
442
+ },
443
+ "source": {
444
+ "type": "string",
445
+ "enum": [
446
+ "device",
447
+ "import",
448
+ "manual",
449
+ "derived"
450
+ ]
451
+ },
452
+ "quality": {
453
+ "type": "string",
454
+ "enum": [
455
+ "raw",
456
+ "normalized",
457
+ "derived"
458
+ ]
459
+ },
460
+ "stream": {
461
+ "type": "string",
462
+ "const": "respiratory_rate"
463
+ },
464
+ "externalRef": {
465
+ "type": "object",
466
+ "properties": {
467
+ "system": {
468
+ "type": "string",
469
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
470
+ },
471
+ "resourceType": {
472
+ "type": "string",
473
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
474
+ },
475
+ "resourceId": {
476
+ "type": "string",
477
+ "minLength": 1,
478
+ "maxLength": 200
479
+ },
480
+ "version": {
481
+ "type": "string",
482
+ "minLength": 1,
483
+ "maxLength": 200
484
+ },
485
+ "facet": {
486
+ "type": "string",
487
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
488
+ }
489
+ },
490
+ "required": [
491
+ "system",
492
+ "resourceType",
493
+ "resourceId"
494
+ ],
495
+ "additionalProperties": false
496
+ },
497
+ "timeZone": {
498
+ "type": "string",
499
+ "minLength": 3,
500
+ "maxLength": 64
501
+ },
502
+ "value": {
503
+ "type": "number",
504
+ "minimum": 0
505
+ },
506
+ "unit": {
507
+ "type": "string",
508
+ "const": "breaths_per_minute"
509
+ }
510
+ },
511
+ "required": [
512
+ "schemaVersion",
513
+ "id",
514
+ "recordedAt",
515
+ "dayKey",
516
+ "source",
517
+ "quality",
518
+ "stream",
519
+ "value",
520
+ "unit"
521
+ ],
522
+ "additionalProperties": false
523
+ },
524
+ {
525
+ "type": "object",
526
+ "properties": {
527
+ "schemaVersion": {
528
+ "type": "string",
529
+ "const": "murph.sample.v1"
530
+ },
531
+ "id": {
532
+ "type": "string",
533
+ "pattern": "^smp_[0-9A-HJKMNP-TV-Z]{26}$"
534
+ },
535
+ "recordedAt": {
536
+ "type": "string",
537
+ "format": "date-time"
538
+ },
539
+ "dayKey": {
540
+ "type": "string",
541
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
542
+ },
543
+ "source": {
544
+ "type": "string",
545
+ "enum": [
546
+ "device",
547
+ "import",
548
+ "manual",
549
+ "derived"
550
+ ]
551
+ },
552
+ "quality": {
553
+ "type": "string",
554
+ "enum": [
555
+ "raw",
556
+ "normalized",
557
+ "derived"
558
+ ]
559
+ },
560
+ "stream": {
561
+ "type": "string",
562
+ "const": "temperature"
563
+ },
564
+ "externalRef": {
565
+ "type": "object",
566
+ "properties": {
567
+ "system": {
568
+ "type": "string",
569
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
570
+ },
571
+ "resourceType": {
572
+ "type": "string",
573
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
574
+ },
575
+ "resourceId": {
576
+ "type": "string",
577
+ "minLength": 1,
578
+ "maxLength": 200
579
+ },
580
+ "version": {
581
+ "type": "string",
582
+ "minLength": 1,
583
+ "maxLength": 200
584
+ },
585
+ "facet": {
586
+ "type": "string",
587
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
588
+ }
589
+ },
590
+ "required": [
591
+ "system",
592
+ "resourceType",
593
+ "resourceId"
594
+ ],
595
+ "additionalProperties": false
596
+ },
597
+ "timeZone": {
598
+ "type": "string",
599
+ "minLength": 3,
600
+ "maxLength": 64
601
+ },
602
+ "value": {
603
+ "type": "number"
604
+ },
605
+ "unit": {
606
+ "type": "string",
607
+ "const": "celsius"
608
+ }
609
+ },
610
+ "required": [
611
+ "schemaVersion",
612
+ "id",
613
+ "recordedAt",
614
+ "dayKey",
615
+ "source",
616
+ "quality",
617
+ "stream",
618
+ "value",
619
+ "unit"
620
+ ],
621
+ "additionalProperties": false
622
+ },
623
+ {
624
+ "type": "object",
625
+ "properties": {
626
+ "schemaVersion": {
627
+ "type": "string",
628
+ "const": "murph.sample.v1"
629
+ },
630
+ "id": {
631
+ "type": "string",
632
+ "pattern": "^smp_[0-9A-HJKMNP-TV-Z]{26}$"
633
+ },
634
+ "recordedAt": {
635
+ "type": "string",
636
+ "format": "date-time"
637
+ },
638
+ "dayKey": {
639
+ "type": "string",
640
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
641
+ },
642
+ "source": {
643
+ "type": "string",
644
+ "enum": [
645
+ "device",
646
+ "import",
647
+ "manual",
648
+ "derived"
649
+ ]
650
+ },
651
+ "quality": {
652
+ "type": "string",
653
+ "enum": [
654
+ "raw",
655
+ "normalized",
656
+ "derived"
657
+ ]
658
+ },
659
+ "stream": {
660
+ "type": "string",
661
+ "const": "glucose"
662
+ },
663
+ "externalRef": {
664
+ "type": "object",
665
+ "properties": {
666
+ "system": {
667
+ "type": "string",
668
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
669
+ },
670
+ "resourceType": {
671
+ "type": "string",
672
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
673
+ },
674
+ "resourceId": {
675
+ "type": "string",
676
+ "minLength": 1,
677
+ "maxLength": 200
678
+ },
679
+ "version": {
680
+ "type": "string",
681
+ "minLength": 1,
682
+ "maxLength": 200
683
+ },
684
+ "facet": {
685
+ "type": "string",
686
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
687
+ }
688
+ },
689
+ "required": [
690
+ "system",
691
+ "resourceType",
692
+ "resourceId"
693
+ ],
694
+ "additionalProperties": false
695
+ },
696
+ "timeZone": {
697
+ "type": "string",
698
+ "minLength": 3,
699
+ "maxLength": 64
700
+ },
701
+ "value": {
702
+ "type": "number",
703
+ "minimum": 0
704
+ },
705
+ "unit": {
706
+ "type": "string",
707
+ "const": "mg_dL"
708
+ }
709
+ },
710
+ "required": [
711
+ "schemaVersion",
712
+ "id",
713
+ "recordedAt",
714
+ "dayKey",
715
+ "source",
716
+ "quality",
717
+ "stream",
718
+ "value",
719
+ "unit"
720
+ ],
721
+ "additionalProperties": false
722
+ }
723
+ ],
724
+ "$id": "@murphai/contracts/sample-record.schema.json",
725
+ "title": "Murph Sample Record"
726
+ }