@logicsrc/schemas 0.1.0 → 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 (38) hide show
  1. package/README.md +8 -1
  2. package/fixtures/openfleet/mixed.json +86 -0
  3. package/fixtures/openprd/conformance.json +14 -3
  4. package/fixtures/openprd/invalid/bad-filename.md +10 -1
  5. package/fixtures/openprd/invalid/bad-id-format.md +10 -1
  6. package/fixtures/openprd/invalid/bad-status.md +10 -1
  7. package/fixtures/openprd/invalid/dates-backwards.md +10 -1
  8. package/fixtures/openprd/invalid/duplicate-requirement.md +10 -1
  9. package/fixtures/openprd/invalid/id-mismatch.md +10 -1
  10. package/fixtures/openprd/invalid/missing-monetization.md +45 -0
  11. package/fixtures/openprd/invalid/missing-section.md +10 -1
  12. package/fixtures/openprd/invalid/missing-title.md +10 -1
  13. package/fixtures/openprd/invalid/no-front-matter.md +9 -0
  14. package/fixtures/openprd/invalid/out-of-order.md +10 -1
  15. package/fixtures/openprd/invalid/superseded-without-replacement.md +10 -1
  16. package/fixtures/openprd/invalid/unknown-key.md +10 -1
  17. package/fixtures/openprd/valid/bold-requirements.md +10 -1
  18. package/fixtures/openprd/valid/full.md +10 -1
  19. package/fixtures/openprd/valid/legacy-0-2.md +41 -0
  20. package/fixtures/openprd/valid/minimal.md +9 -1
  21. package/fixtures/openprd/valid/none-sections.md +9 -1
  22. package/fixtures/openprd/valid/subsections.md +10 -1
  23. package/fixtures/openprd/valid/superseded.md +10 -1
  24. package/fixtures/openwall/announcement.json +16 -0
  25. package/fixtures/openwall/broadcast.json +27 -0
  26. package/fixtures/openwall/direct.json +17 -0
  27. package/fixtures/openwall/receipt-accepted.json +13 -0
  28. package/fixtures/openwall/receipt-retrying.json +14 -0
  29. package/package.json +16 -3
  30. package/schemas/logicsrc-opencreds-audit-event.schema.json +54 -0
  31. package/schemas/logicsrc-opencreds-database.schema.json +94 -0
  32. package/schemas/logicsrc-opencreds-envelope.schema.json +38 -0
  33. package/schemas/logicsrc-opencreds-item.schema.json +240 -0
  34. package/schemas/logicsrc-opencreds-manifest.schema.json +31 -0
  35. package/schemas/logicsrc-opencreds-vault-meta.schema.json +70 -0
  36. package/schemas/logicsrc-openfleet.schema.json +323 -0
  37. package/schemas/logicsrc-openwall-message.schema.json +246 -0
  38. package/schemas/logicsrc-openwall-receipt.schema.json +229 -0
@@ -0,0 +1,229 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.logicsrc.com/logicsrc-openwall-receipt.schema.json",
4
+ "title": "OpenWall Receipt (0.1 draft)",
5
+ "description": "Private coordinator event. Authenticity, event ordering and valid state transitions require runtime checks.",
6
+ "type": "object",
7
+ "required": [
8
+ "openwall",
9
+ "id",
10
+ "messageId",
11
+ "deliveryId",
12
+ "recipient",
13
+ "sequence",
14
+ "state",
15
+ "at",
16
+ "attempt"
17
+ ],
18
+ "additionalProperties": false,
19
+ "properties": {
20
+ "openwall": {
21
+ "const": "0.1-draft"
22
+ },
23
+ "id": {
24
+ "type": "string",
25
+ "format": "uri",
26
+ "pattern": "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
27
+ },
28
+ "messageId": {
29
+ "type": "string",
30
+ "format": "uri",
31
+ "pattern": "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
32
+ },
33
+ "recipient": {
34
+ "type": "string",
35
+ "format": "uri",
36
+ "pattern": "^(did:|https://)",
37
+ "maxLength": 2048
38
+ },
39
+ "sequence": {
40
+ "type": "integer",
41
+ "minimum": 1
42
+ },
43
+ "state": {
44
+ "enum": [
45
+ "queued",
46
+ "sending",
47
+ "retrying",
48
+ "accepted",
49
+ "delivered",
50
+ "read",
51
+ "unknown",
52
+ "failed",
53
+ "expired",
54
+ "cancelled"
55
+ ]
56
+ },
57
+ "at": {
58
+ "type": "string",
59
+ "format": "date-time"
60
+ },
61
+ "attempt": {
62
+ "type": "integer",
63
+ "minimum": 0,
64
+ "maximum": 8
65
+ },
66
+ "route": {
67
+ "type": "string",
68
+ "format": "uri",
69
+ "pattern": "^https://",
70
+ "maxLength": 2048
71
+ },
72
+ "providerMessageId": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "maxLength": 2048
76
+ },
77
+ "reason": {
78
+ "enum": [
79
+ "not-permitted",
80
+ "identity-unverified",
81
+ "unsupported",
82
+ "rate-limited",
83
+ "provider-failure",
84
+ "acceptance-unknown",
85
+ "retry-exhausted",
86
+ "deadline-passed",
87
+ "sender-cancelled"
88
+ ]
89
+ },
90
+ "nextAttemptAt": {
91
+ "type": "string",
92
+ "format": "date-time"
93
+ },
94
+ "deliveryId": {
95
+ "type": "string",
96
+ "format": "uri",
97
+ "pattern": "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
98
+ }
99
+ },
100
+ "allOf": [
101
+ {
102
+ "if": {
103
+ "properties": {
104
+ "state": {
105
+ "const": "retrying"
106
+ }
107
+ }
108
+ },
109
+ "then": {
110
+ "required": [
111
+ "nextAttemptAt",
112
+ "reason"
113
+ ],
114
+ "properties": {
115
+ "nextAttemptAt": {},
116
+ "reason": {}
117
+ }
118
+ },
119
+ "else": {
120
+ "not": {
121
+ "required": [
122
+ "nextAttemptAt"
123
+ ],
124
+ "properties": {
125
+ "nextAttemptAt": {}
126
+ }
127
+ }
128
+ }
129
+ },
130
+ {
131
+ "if": {
132
+ "properties": {
133
+ "state": {
134
+ "enum": [
135
+ "failed",
136
+ "unknown",
137
+ "expired",
138
+ "cancelled"
139
+ ]
140
+ }
141
+ }
142
+ },
143
+ "then": {
144
+ "required": [
145
+ "reason"
146
+ ],
147
+ "properties": {
148
+ "reason": {}
149
+ }
150
+ }
151
+ },
152
+ {
153
+ "if": {
154
+ "properties": {
155
+ "state": {
156
+ "enum": [
157
+ "sending",
158
+ "retrying",
159
+ "accepted",
160
+ "delivered",
161
+ "read",
162
+ "unknown"
163
+ ]
164
+ }
165
+ }
166
+ },
167
+ "then": {
168
+ "required": [
169
+ "route"
170
+ ],
171
+ "properties": {
172
+ "attempt": {
173
+ "minimum": 1,
174
+ "type": "integer"
175
+ },
176
+ "route": {}
177
+ }
178
+ }
179
+ },
180
+ {
181
+ "if": {
182
+ "properties": {
183
+ "state": {
184
+ "const": "unknown"
185
+ }
186
+ }
187
+ },
188
+ "then": {
189
+ "properties": {
190
+ "reason": {
191
+ "const": "acceptance-unknown"
192
+ }
193
+ }
194
+ }
195
+ },
196
+ {
197
+ "if": {
198
+ "properties": {
199
+ "state": {
200
+ "const": "expired"
201
+ }
202
+ }
203
+ },
204
+ "then": {
205
+ "properties": {
206
+ "reason": {
207
+ "const": "deadline-passed"
208
+ }
209
+ }
210
+ }
211
+ },
212
+ {
213
+ "if": {
214
+ "properties": {
215
+ "state": {
216
+ "const": "cancelled"
217
+ }
218
+ }
219
+ },
220
+ "then": {
221
+ "properties": {
222
+ "reason": {
223
+ "const": "sender-cancelled"
224
+ }
225
+ }
226
+ }
227
+ }
228
+ ]
229
+ }