@openplanr/protocol 0.11.0 → 0.13.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.
@@ -0,0 +1,303 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.19.0/company-resource-upload-status.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "company-resource-upload-status",
6
+ "version": "1.19.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "schemaVersion": {
12
+ "const": "2.1.0"
13
+ },
14
+ "operationId": {
15
+ "type": "string",
16
+ "pattern": "^[A-Za-z0-9_-]{22,64}$"
17
+ },
18
+ "status": {
19
+ "enum": [
20
+ "prepared",
21
+ "committed",
22
+ "cancelled",
23
+ "expired"
24
+ ]
25
+ },
26
+ "receivedChunks": {
27
+ "type": "array",
28
+ "maxItems": 128,
29
+ "items": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "properties": {
33
+ "index": {
34
+ "type": "integer",
35
+ "minimum": 0,
36
+ "maximum": 127
37
+ },
38
+ "sha256": {
39
+ "type": "string",
40
+ "pattern": "^[a-f0-9]{64}$"
41
+ },
42
+ "byteLength": {
43
+ "type": "integer",
44
+ "minimum": 1,
45
+ "maximum": 1048576
46
+ }
47
+ },
48
+ "required": [
49
+ "index",
50
+ "sha256",
51
+ "byteLength"
52
+ ]
53
+ }
54
+ },
55
+ "receipt": {
56
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
57
+ "$id": "https://openplanr.dev/schemas/v1.19.0/company-resource-upload-receipt.schema.json",
58
+ "x-openplanr-contract": {
59
+ "id": "company-resource-upload-receipt",
60
+ "version": "1.19.0"
61
+ },
62
+ "type": "object",
63
+ "additionalProperties": false,
64
+ "properties": {
65
+ "schemaVersion": {
66
+ "const": "2.1.0"
67
+ },
68
+ "organizationId": {
69
+ "type": "string",
70
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
71
+ },
72
+ "projectId": {
73
+ "type": "string",
74
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
75
+ },
76
+ "artifactId": {
77
+ "type": "string",
78
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
79
+ },
80
+ "operationId": {
81
+ "type": "string",
82
+ "pattern": "^[A-Za-z0-9_-]{22,64}$"
83
+ },
84
+ "revisionId": {
85
+ "type": "string",
86
+ "pattern": "^[A-Za-z0-9_-]{22,64}$"
87
+ },
88
+ "manifestSha256": {
89
+ "type": "string",
90
+ "pattern": "^[a-f0-9]{64}$"
91
+ },
92
+ "contentDigest": {
93
+ "type": "string",
94
+ "pattern": "^sha256:[a-f0-9]{64}$"
95
+ },
96
+ "status": {
97
+ "const": "committed"
98
+ },
99
+ "committedAt": {
100
+ "type": "string",
101
+ "format": "date-time",
102
+ "maxLength": 40
103
+ },
104
+ "protocolVersion": {
105
+ "const": "1.19.0"
106
+ },
107
+ "intent": {
108
+ "enum": [
109
+ "draft",
110
+ "publish"
111
+ ]
112
+ },
113
+ "baseRevisionId": {
114
+ "oneOf": [
115
+ {
116
+ "type": "string",
117
+ "pattern": "^[A-Za-z0-9_-]{22,64}$"
118
+ },
119
+ {
120
+ "type": "null"
121
+ }
122
+ ]
123
+ },
124
+ "version": {
125
+ "type": "integer",
126
+ "minimum": 1,
127
+ "maximum": 9007199254740991
128
+ },
129
+ "lifecycleEpoch": {
130
+ "type": "integer",
131
+ "minimum": 1,
132
+ "maximum": 9007199254740991
133
+ },
134
+ "effect": {
135
+ "oneOf": [
136
+ {
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "properties": {
140
+ "kind": {
141
+ "const": "draft"
142
+ },
143
+ "authorHeadRevisionId": {
144
+ "type": "string",
145
+ "pattern": "^[A-Za-z0-9_-]{1,128}(?![\\s\\S])"
146
+ },
147
+ "publicationHeadUnchanged": {
148
+ "const": true
149
+ }
150
+ },
151
+ "required": [
152
+ "kind",
153
+ "authorHeadRevisionId",
154
+ "publicationHeadUnchanged"
155
+ ]
156
+ },
157
+ {
158
+ "type": "object",
159
+ "additionalProperties": false,
160
+ "properties": {
161
+ "kind": {
162
+ "const": "publication"
163
+ },
164
+ "authorHeadRevisionId": {
165
+ "type": "string",
166
+ "pattern": "^[A-Za-z0-9_-]{1,128}(?![\\s\\S])"
167
+ },
168
+ "publicationId": {
169
+ "type": "string",
170
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
171
+ },
172
+ "publicationRevisionId": {
173
+ "type": "string",
174
+ "pattern": "^[A-Za-z0-9_-]{1,128}(?![\\s\\S])"
175
+ }
176
+ },
177
+ "required": [
178
+ "kind",
179
+ "authorHeadRevisionId",
180
+ "publicationId",
181
+ "publicationRevisionId"
182
+ ]
183
+ }
184
+ ]
185
+ }
186
+ },
187
+ "required": [
188
+ "schemaVersion",
189
+ "organizationId",
190
+ "projectId",
191
+ "artifactId",
192
+ "operationId",
193
+ "revisionId",
194
+ "manifestSha256",
195
+ "contentDigest",
196
+ "status",
197
+ "committedAt",
198
+ "protocolVersion",
199
+ "intent",
200
+ "baseRevisionId",
201
+ "version",
202
+ "lifecycleEpoch",
203
+ "effect"
204
+ ],
205
+ "allOf": [
206
+ {
207
+ "if": {
208
+ "properties": {
209
+ "intent": {
210
+ "const": "draft"
211
+ }
212
+ }
213
+ },
214
+ "then": {
215
+ "properties": {
216
+ "effect": {
217
+ "properties": {
218
+ "kind": {
219
+ "const": "draft"
220
+ }
221
+ }
222
+ }
223
+ }
224
+ },
225
+ "else": {
226
+ "properties": {
227
+ "effect": {
228
+ "properties": {
229
+ "kind": {
230
+ "const": "publication"
231
+ }
232
+ }
233
+ }
234
+ }
235
+ }
236
+ }
237
+ ]
238
+ },
239
+ "protocolVersion": {
240
+ "const": "1.19.0"
241
+ },
242
+ "intent": {
243
+ "enum": [
244
+ "draft",
245
+ "publish"
246
+ ]
247
+ },
248
+ "revisionId": {
249
+ "type": "string",
250
+ "pattern": "^[A-Za-z0-9_-]{22,64}(?![\\s\\S])"
251
+ },
252
+ "manifestSha256": {
253
+ "type": "string",
254
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
255
+ },
256
+ "expiresAt": {
257
+ "type": "string",
258
+ "format": "date-time",
259
+ "maxLength": 40,
260
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z(?![\\s\\S])"
261
+ },
262
+ "lifecycleEpoch": {
263
+ "type": "integer",
264
+ "minimum": 1,
265
+ "maximum": 9007199254740991
266
+ }
267
+ },
268
+ "required": [
269
+ "schemaVersion",
270
+ "operationId",
271
+ "status",
272
+ "receivedChunks",
273
+ "protocolVersion",
274
+ "intent",
275
+ "revisionId",
276
+ "manifestSha256",
277
+ "expiresAt",
278
+ "lifecycleEpoch"
279
+ ],
280
+ "allOf": [
281
+ {
282
+ "if": {
283
+ "properties": {
284
+ "status": {
285
+ "const": "committed"
286
+ }
287
+ }
288
+ },
289
+ "then": {
290
+ "required": [
291
+ "receipt"
292
+ ]
293
+ },
294
+ "else": {
295
+ "not": {
296
+ "required": [
297
+ "receipt"
298
+ ]
299
+ }
300
+ }
301
+ }
302
+ ]
303
+ }
@@ -0,0 +1,267 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.19.0/enterprise-artifact-page.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "enterprise-artifact-page",
6
+ "version": "1.19.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kind": {
12
+ "const": "openplanr-enterprise-artifact-page"
13
+ },
14
+ "schemaVersion": {
15
+ "const": "1.0.0"
16
+ },
17
+ "protocolVersion": {
18
+ "const": "1.19.0"
19
+ },
20
+ "query": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "properties": {
24
+ "organizationId": {
25
+ "type": "string",
26
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
27
+ },
28
+ "projectId": {
29
+ "type": "string",
30
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
31
+ },
32
+ "actorId": {
33
+ "type": "string",
34
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
35
+ },
36
+ "scope": {
37
+ "const": "artifacts"
38
+ },
39
+ "filter": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "properties": {
43
+ "kind": {
44
+ "enum": [
45
+ "all",
46
+ "diagram",
47
+ "design",
48
+ "artifact"
49
+ ]
50
+ },
51
+ "contentFormat": {
52
+ "enum": [
53
+ "all",
54
+ "diagram-authoring",
55
+ "design-review",
56
+ "planning-document",
57
+ "generic-artifact"
58
+ ]
59
+ },
60
+ "status": {
61
+ "enum": [
62
+ "all",
63
+ "active",
64
+ "archived"
65
+ ]
66
+ },
67
+ "search": {
68
+ "type": "string",
69
+ "maxLength": 240
70
+ }
71
+ },
72
+ "required": [
73
+ "kind",
74
+ "status",
75
+ "search"
76
+ ]
77
+ }
78
+ },
79
+ "required": [
80
+ "organizationId",
81
+ "projectId",
82
+ "actorId",
83
+ "scope",
84
+ "filter"
85
+ ]
86
+ },
87
+ "items": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "object",
91
+ "additionalProperties": false,
92
+ "properties": {
93
+ "organizationId": {
94
+ "type": "string",
95
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
96
+ },
97
+ "projectId": {
98
+ "type": "string",
99
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
100
+ },
101
+ "artifactId": {
102
+ "type": "string",
103
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
104
+ },
105
+ "kind": {
106
+ "enum": [
107
+ "diagram",
108
+ "design",
109
+ "artifact"
110
+ ]
111
+ },
112
+ "contentFormat": {
113
+ "enum": [
114
+ "diagram-authoring",
115
+ "design-review",
116
+ "planning-document",
117
+ "generic-artifact"
118
+ ]
119
+ },
120
+ "title": {
121
+ "type": "string",
122
+ "minLength": 1,
123
+ "maxLength": 240
124
+ },
125
+ "revisionId": {
126
+ "oneOf": [
127
+ {
128
+ "type": "string",
129
+ "pattern": "^[A-Za-z0-9_-]{1,128}(?![\\s\\S])"
130
+ },
131
+ {
132
+ "type": "null"
133
+ }
134
+ ]
135
+ },
136
+ "status": {
137
+ "enum": [
138
+ "active",
139
+ "archived"
140
+ ]
141
+ },
142
+ "capabilities": {
143
+ "type": "array",
144
+ "items": {
145
+ "enum": [
146
+ "organization.manage",
147
+ "ownership.transfer",
148
+ "billing.manage",
149
+ "audit.read",
150
+ "project.create",
151
+ "project.manage",
152
+ "artifact.read",
153
+ "artifact.author",
154
+ "artifact.export",
155
+ "review.write",
156
+ "review.resolve"
157
+ ]
158
+ },
159
+ "maxItems": 11,
160
+ "minItems": 0,
161
+ "uniqueItems": true
162
+ }
163
+ },
164
+ "required": [
165
+ "organizationId",
166
+ "projectId",
167
+ "artifactId",
168
+ "kind",
169
+ "contentFormat",
170
+ "title",
171
+ "revisionId",
172
+ "status",
173
+ "capabilities"
174
+ ],
175
+ "allOf": [
176
+ {
177
+ "if": {
178
+ "properties": {
179
+ "kind": {
180
+ "const": "diagram"
181
+ }
182
+ }
183
+ },
184
+ "then": {
185
+ "properties": {
186
+ "contentFormat": {
187
+ "const": "diagram-authoring"
188
+ }
189
+ }
190
+ }
191
+ },
192
+ {
193
+ "if": {
194
+ "properties": {
195
+ "kind": {
196
+ "const": "design"
197
+ }
198
+ }
199
+ },
200
+ "then": {
201
+ "properties": {
202
+ "contentFormat": {
203
+ "const": "design-review"
204
+ }
205
+ }
206
+ }
207
+ },
208
+ {
209
+ "if": {
210
+ "properties": {
211
+ "kind": {
212
+ "const": "artifact"
213
+ }
214
+ }
215
+ },
216
+ "then": {
217
+ "properties": {
218
+ "contentFormat": {
219
+ "enum": [
220
+ "planning-document",
221
+ "generic-artifact"
222
+ ]
223
+ }
224
+ }
225
+ }
226
+ }
227
+ ]
228
+ },
229
+ "maxItems": 100,
230
+ "minItems": 0
231
+ },
232
+ "nextCursor": {
233
+ "oneOf": [
234
+ {
235
+ "type": "object",
236
+ "additionalProperties": false,
237
+ "properties": {
238
+ "token": {
239
+ "type": "string",
240
+ "minLength": 1,
241
+ "maxLength": 2048
242
+ },
243
+ "queryDigest": {
244
+ "type": "string",
245
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
246
+ }
247
+ },
248
+ "required": [
249
+ "token",
250
+ "queryDigest"
251
+ ]
252
+ },
253
+ {
254
+ "type": "null"
255
+ }
256
+ ]
257
+ }
258
+ },
259
+ "required": [
260
+ "kind",
261
+ "schemaVersion",
262
+ "protocolVersion",
263
+ "query",
264
+ "items",
265
+ "nextCursor"
266
+ ]
267
+ }