@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,164 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.19.0/enterprise-project-page.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "enterprise-project-page",
6
+ "version": "1.19.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kind": {
12
+ "const": "openplanr-enterprise-project-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
+ "actorId": {
29
+ "type": "string",
30
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
31
+ },
32
+ "scope": {
33
+ "const": "projects"
34
+ },
35
+ "filter": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "properties": {
39
+ "status": {
40
+ "enum": [
41
+ "all",
42
+ "active",
43
+ "archived"
44
+ ]
45
+ },
46
+ "search": {
47
+ "type": "string",
48
+ "maxLength": 240
49
+ }
50
+ },
51
+ "required": [
52
+ "status",
53
+ "search"
54
+ ]
55
+ }
56
+ },
57
+ "required": [
58
+ "organizationId",
59
+ "actorId",
60
+ "scope",
61
+ "filter"
62
+ ]
63
+ },
64
+ "items": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "properties": {
70
+ "organizationId": {
71
+ "type": "string",
72
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
73
+ },
74
+ "projectId": {
75
+ "type": "string",
76
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
77
+ },
78
+ "slug": {
79
+ "type": "string",
80
+ "pattern": "^[A-Za-z0-9_-]{1,150}(?![\\s\\S])"
81
+ },
82
+ "name": {
83
+ "type": "string",
84
+ "minLength": 1,
85
+ "maxLength": 240
86
+ },
87
+ "status": {
88
+ "enum": [
89
+ "active",
90
+ "archiving",
91
+ "archived",
92
+ "restoring"
93
+ ]
94
+ },
95
+ "capabilities": {
96
+ "type": "array",
97
+ "items": {
98
+ "enum": [
99
+ "organization.manage",
100
+ "ownership.transfer",
101
+ "billing.manage",
102
+ "audit.read",
103
+ "project.create",
104
+ "project.manage",
105
+ "artifact.read",
106
+ "artifact.author",
107
+ "artifact.export",
108
+ "review.write",
109
+ "review.resolve"
110
+ ]
111
+ },
112
+ "maxItems": 11,
113
+ "minItems": 0,
114
+ "uniqueItems": true
115
+ }
116
+ },
117
+ "required": [
118
+ "organizationId",
119
+ "projectId",
120
+ "slug",
121
+ "name",
122
+ "status",
123
+ "capabilities"
124
+ ]
125
+ },
126
+ "maxItems": 100,
127
+ "minItems": 0
128
+ },
129
+ "nextCursor": {
130
+ "oneOf": [
131
+ {
132
+ "type": "object",
133
+ "additionalProperties": false,
134
+ "properties": {
135
+ "token": {
136
+ "type": "string",
137
+ "minLength": 1,
138
+ "maxLength": 2048
139
+ },
140
+ "queryDigest": {
141
+ "type": "string",
142
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
143
+ }
144
+ },
145
+ "required": [
146
+ "token",
147
+ "queryDigest"
148
+ ]
149
+ },
150
+ {
151
+ "type": "null"
152
+ }
153
+ ]
154
+ }
155
+ },
156
+ "required": [
157
+ "kind",
158
+ "schemaVersion",
159
+ "protocolVersion",
160
+ "query",
161
+ "items",
162
+ "nextCursor"
163
+ ]
164
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.19.0/enterprise-project-transition.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "enterprise-project-transition",
6
+ "version": "1.19.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kind": {
12
+ "const": "openplanr-enterprise-project-transition"
13
+ },
14
+ "schemaVersion": {
15
+ "const": "1.0.0"
16
+ },
17
+ "protocolVersion": {
18
+ "const": "1.19.0"
19
+ },
20
+ "organizationId": {
21
+ "type": "string",
22
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
23
+ },
24
+ "projectId": {
25
+ "type": "string",
26
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
27
+ },
28
+ "operationId": {
29
+ "type": "string",
30
+ "pattern": "^[A-Za-z0-9_-]{22,64}(?![\\s\\S])"
31
+ },
32
+ "actorId": {
33
+ "type": "string",
34
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
35
+ },
36
+ "action": {
37
+ "enum": [
38
+ "archive",
39
+ "restore"
40
+ ]
41
+ },
42
+ "expectedVersion": {
43
+ "type": "integer",
44
+ "minimum": 0,
45
+ "maximum": 9007199254740991
46
+ },
47
+ "expectedEpoch": {
48
+ "type": "integer",
49
+ "minimum": 1,
50
+ "maximum": 9007199254740991
51
+ }
52
+ },
53
+ "required": [
54
+ "kind",
55
+ "schemaVersion",
56
+ "protocolVersion",
57
+ "organizationId",
58
+ "projectId",
59
+ "operationId",
60
+ "actorId",
61
+ "action",
62
+ "expectedVersion",
63
+ "expectedEpoch"
64
+ ]
65
+ }
@@ -0,0 +1,178 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.19.0/enterprise-review-mention.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "enterprise-review-mention",
6
+ "version": "1.19.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kind": {
12
+ "const": "openplanr-enterprise-review-mention"
13
+ },
14
+ "schemaVersion": {
15
+ "const": "1.0.0"
16
+ },
17
+ "protocolVersion": {
18
+ "const": "1.19.0"
19
+ },
20
+ "organizationId": {
21
+ "type": "string",
22
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
23
+ },
24
+ "projectId": {
25
+ "type": "string",
26
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
27
+ },
28
+ "artifactId": {
29
+ "type": "string",
30
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
31
+ },
32
+ "operationId": {
33
+ "type": "string",
34
+ "pattern": "^[A-Za-z0-9_-]{22,64}(?![\\s\\S])"
35
+ },
36
+ "actorId": {
37
+ "type": "string",
38
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
39
+ },
40
+ "threadId": {
41
+ "type": "string",
42
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
43
+ },
44
+ "anchor": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "properties": {
48
+ "revisionId": {
49
+ "anyOf": [
50
+ {
51
+ "type": "string",
52
+ "pattern": "^[A-Za-z0-9_-]{22,64}$"
53
+ },
54
+ {
55
+ "type": "string",
56
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}(?![\\s\\S])"
57
+ }
58
+ ]
59
+ },
60
+ "elementId": {
61
+ "type": "string",
62
+ "minLength": 1,
63
+ "maxLength": 512,
64
+ "pattern": "^[^\\s\\u0000-\\u001f\\u007f]+$"
65
+ },
66
+ "screenId": {
67
+ "type": "string",
68
+ "minLength": 1,
69
+ "maxLength": 512,
70
+ "pattern": "^[^\\s\\u0000-\\u001f\\u007f]+$"
71
+ },
72
+ "frameId": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "maxLength": 512,
76
+ "pattern": "^[^\\s\\u0000-\\u001f\\u007f]+$"
77
+ },
78
+ "x": {
79
+ "type": "number",
80
+ "minimum": 0,
81
+ "maximum": 1
82
+ },
83
+ "y": {
84
+ "type": "number",
85
+ "minimum": 0,
86
+ "maximum": 1
87
+ }
88
+ },
89
+ "required": [
90
+ "revisionId"
91
+ ],
92
+ "anyOf": [
93
+ {
94
+ "required": [
95
+ "elementId"
96
+ ]
97
+ },
98
+ {
99
+ "required": [
100
+ "screenId",
101
+ "frameId"
102
+ ]
103
+ },
104
+ {
105
+ "required": [
106
+ "x",
107
+ "y"
108
+ ]
109
+ }
110
+ ],
111
+ "allOf": [
112
+ {
113
+ "if": {
114
+ "required": [
115
+ "x"
116
+ ]
117
+ },
118
+ "then": {
119
+ "required": [
120
+ "y"
121
+ ]
122
+ }
123
+ },
124
+ {
125
+ "if": {
126
+ "required": [
127
+ "y"
128
+ ]
129
+ },
130
+ "then": {
131
+ "required": [
132
+ "x"
133
+ ]
134
+ }
135
+ },
136
+ {
137
+ "if": {
138
+ "required": [
139
+ "frameId"
140
+ ]
141
+ },
142
+ "then": {
143
+ "required": [
144
+ "screenId"
145
+ ]
146
+ }
147
+ }
148
+ ]
149
+ },
150
+ "recipients": {
151
+ "type": "array",
152
+ "items": {
153
+ "type": "string",
154
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
155
+ },
156
+ "maxItems": 50,
157
+ "minItems": 1,
158
+ "uniqueItems": true
159
+ },
160
+ "authority": {
161
+ "const": "notification-only"
162
+ }
163
+ },
164
+ "required": [
165
+ "kind",
166
+ "schemaVersion",
167
+ "protocolVersion",
168
+ "organizationId",
169
+ "projectId",
170
+ "artifactId",
171
+ "operationId",
172
+ "actorId",
173
+ "threadId",
174
+ "anchor",
175
+ "recipients",
176
+ "authority"
177
+ ]
178
+ }
@@ -0,0 +1,278 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.19.0/enterprise-review-projection.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "enterprise-review-projection",
6
+ "version": "1.19.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kind": {
12
+ "const": "openplanr-enterprise-review-projection"
13
+ },
14
+ "schemaVersion": {
15
+ "const": "1.0.0"
16
+ },
17
+ "protocolVersion": {
18
+ "const": "1.19.0"
19
+ },
20
+ "query": {
21
+ "oneOf": [
22
+ {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "properties": {
26
+ "organizationId": {
27
+ "type": "string",
28
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
29
+ },
30
+ "actorId": {
31
+ "type": "string",
32
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
33
+ },
34
+ "scope": {
35
+ "const": "organization-reviews"
36
+ },
37
+ "filter": {
38
+ "type": "object",
39
+ "additionalProperties": false,
40
+ "properties": {
41
+ "kind": {
42
+ "enum": [
43
+ "all",
44
+ "diagram",
45
+ "design",
46
+ "artifact"
47
+ ]
48
+ },
49
+ "contentFormat": {
50
+ "enum": [
51
+ "all",
52
+ "diagram-authoring",
53
+ "design-review",
54
+ "planning-document",
55
+ "generic-artifact"
56
+ ]
57
+ },
58
+ "status": {
59
+ "enum": [
60
+ "all",
61
+ "active",
62
+ "archived"
63
+ ]
64
+ },
65
+ "search": {
66
+ "type": "string",
67
+ "maxLength": 240
68
+ }
69
+ },
70
+ "required": [
71
+ "kind",
72
+ "status",
73
+ "search"
74
+ ]
75
+ }
76
+ },
77
+ "required": [
78
+ "organizationId",
79
+ "actorId",
80
+ "scope",
81
+ "filter"
82
+ ]
83
+ },
84
+ {
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "properties": {
88
+ "organizationId": {
89
+ "type": "string",
90
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
91
+ },
92
+ "projectId": {
93
+ "type": "string",
94
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
95
+ },
96
+ "actorId": {
97
+ "type": "string",
98
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
99
+ },
100
+ "scope": {
101
+ "const": "project-reviews"
102
+ },
103
+ "filter": {
104
+ "type": "object",
105
+ "additionalProperties": false,
106
+ "properties": {
107
+ "kind": {
108
+ "enum": [
109
+ "all",
110
+ "diagram",
111
+ "design",
112
+ "artifact"
113
+ ]
114
+ },
115
+ "contentFormat": {
116
+ "enum": [
117
+ "all",
118
+ "diagram-authoring",
119
+ "design-review",
120
+ "planning-document",
121
+ "generic-artifact"
122
+ ]
123
+ },
124
+ "status": {
125
+ "enum": [
126
+ "all",
127
+ "active",
128
+ "archived"
129
+ ]
130
+ },
131
+ "search": {
132
+ "type": "string",
133
+ "maxLength": 240
134
+ }
135
+ },
136
+ "required": [
137
+ "kind",
138
+ "status",
139
+ "search"
140
+ ]
141
+ }
142
+ },
143
+ "required": [
144
+ "organizationId",
145
+ "projectId",
146
+ "actorId",
147
+ "scope",
148
+ "filter"
149
+ ]
150
+ }
151
+ ]
152
+ },
153
+ "items": {
154
+ "type": "array",
155
+ "items": {
156
+ "type": "object",
157
+ "additionalProperties": false,
158
+ "properties": {
159
+ "organizationId": {
160
+ "type": "string",
161
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
162
+ },
163
+ "projectId": {
164
+ "type": "string",
165
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
166
+ },
167
+ "artifactId": {
168
+ "type": "string",
169
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
170
+ },
171
+ "threadId": {
172
+ "type": "string",
173
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
174
+ },
175
+ "revisionId": {
176
+ "type": "string",
177
+ "pattern": "^[A-Za-z0-9_-]{1,128}(?![\\s\\S])"
178
+ },
179
+ "publicationId": {
180
+ "type": "string",
181
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
182
+ },
183
+ "category": {
184
+ "enum": [
185
+ "question",
186
+ "suggestion",
187
+ "change-request",
188
+ "blocker"
189
+ ]
190
+ },
191
+ "status": {
192
+ "enum": [
193
+ "open",
194
+ "addressed",
195
+ "resolved"
196
+ ]
197
+ },
198
+ "updatedAt": {
199
+ "type": "string",
200
+ "format": "date-time",
201
+ "maxLength": 40,
202
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z(?![\\s\\S])"
203
+ }
204
+ },
205
+ "required": [
206
+ "organizationId",
207
+ "projectId",
208
+ "artifactId",
209
+ "threadId",
210
+ "revisionId",
211
+ "publicationId",
212
+ "category",
213
+ "status",
214
+ "updatedAt"
215
+ ]
216
+ },
217
+ "maxItems": 100,
218
+ "minItems": 0
219
+ },
220
+ "nextCursor": {
221
+ "oneOf": [
222
+ {
223
+ "type": "object",
224
+ "additionalProperties": false,
225
+ "properties": {
226
+ "token": {
227
+ "type": "string",
228
+ "minLength": 1,
229
+ "maxLength": 2048
230
+ },
231
+ "queryDigest": {
232
+ "type": "string",
233
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
234
+ }
235
+ },
236
+ "required": [
237
+ "token",
238
+ "queryDigest"
239
+ ]
240
+ },
241
+ {
242
+ "type": "null"
243
+ }
244
+ ]
245
+ },
246
+ "index": {
247
+ "type": "object",
248
+ "additionalProperties": false,
249
+ "properties": {
250
+ "status": {
251
+ "enum": [
252
+ "current",
253
+ "lagging"
254
+ ]
255
+ },
256
+ "watermark": {
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
+ },
263
+ "required": [
264
+ "status",
265
+ "watermark"
266
+ ]
267
+ }
268
+ },
269
+ "required": [
270
+ "kind",
271
+ "schemaVersion",
272
+ "protocolVersion",
273
+ "query",
274
+ "items",
275
+ "nextCursor",
276
+ "index"
277
+ ]
278
+ }
@@ -30,3 +30,9 @@ export declare function validateDiagramReviewArtifact(
30
30
  export declare const PROTOCOL_V116_CONTRACTS: Readonly<Record<string, string>>;
31
31
 
32
32
  export declare const PROTOCOL_V117_CONTRACTS: Readonly<Record<string, string>>;
33
+
34
+ export declare const PROTOCOL_V119_CONTRACTS: Readonly<Record<string, string>>;
35
+ export declare function validateEnterpriseJourneyArtifact(
36
+ kind: string,
37
+ value: unknown,
38
+ ): { path: string; rule: string; detail: string }[];