@openplanr/protocol 0.11.0 → 0.12.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openplanr/protocol",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "description": "Canonical OpenPlanr schemas, registries, typed errors, and portable contract validation",
6
6
  "license": "MIT",
@@ -115,6 +115,10 @@
115
115
  "./sharing-security-contracts": {
116
116
  "types": "./src/sharing-security-contracts.d.mts",
117
117
  "import": "./src/sharing-security-contracts.mjs"
118
+ },
119
+ "./enterprise-journey-contracts": {
120
+ "types": "./src/enterprise-journey-contracts.d.mts",
121
+ "import": "./src/enterprise-journey-contracts.mjs"
118
122
  }
119
123
  },
120
124
  "files": [
@@ -965,7 +965,7 @@
965
965
  "ownerPackage": "openplanr",
966
966
  "source": {
967
967
  "path": "packages/cli/src/cli/commands/upgrade.ts",
968
- "digest": "sha256:755b7908e57d39215ba13a26727691ef95d40f9078c066902962f2d58151c382"
968
+ "digest": "sha256:9ea7a2085f100e9221a1e266633369340904a669497801a63adc943a338c7868"
969
969
  },
970
970
  "authorityClass": "workflow",
971
971
  "machineJson": false,
@@ -1948,5 +1948,5 @@
1948
1948
  ]
1949
1949
  }
1950
1950
  ],
1951
- "documentDigest": "sha256:d459cc3eccf1f0772dae75b1366b254e5542cd26b44f108301d146ba9c3d3577"
1951
+ "documentDigest": "sha256:735f3c5f9f5e3b1a14ea614361083192768652bd993ea0e47cda9384f1c85da1"
1952
1952
  }
@@ -0,0 +1,187 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.19.0/company-resource-upload-prepare.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "company-resource-upload-prepare",
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
+ "baseRevisionId": {
19
+ "oneOf": [
20
+ {
21
+ "type": "string",
22
+ "pattern": "^[A-Za-z0-9_-]{22,64}$"
23
+ },
24
+ {
25
+ "type": "null"
26
+ }
27
+ ]
28
+ },
29
+ "manifest": {
30
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
31
+ "$id": "https://openplanr.dev/schemas/v1.17.0/company-resource-manifest.schema.json",
32
+ "x-openplanr-contract": {
33
+ "id": "company-resource-manifest",
34
+ "version": "1.17.0"
35
+ },
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "properties": {
39
+ "schemaVersion": {
40
+ "const": "2.0.0"
41
+ },
42
+ "kind": {
43
+ "const": "openplanr-company-resource-manifest"
44
+ },
45
+ "organizationId": {
46
+ "type": "string",
47
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
48
+ },
49
+ "projectId": {
50
+ "type": "string",
51
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
52
+ },
53
+ "artifactId": {
54
+ "type": "string",
55
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
56
+ },
57
+ "revisionId": {
58
+ "type": "string",
59
+ "pattern": "^[A-Za-z0-9_-]{22,64}$"
60
+ },
61
+ "contentDigest": {
62
+ "type": "string",
63
+ "pattern": "^sha256:[a-f0-9]{64}$"
64
+ },
65
+ "contentType": {
66
+ "const": "application/json"
67
+ },
68
+ "byteLength": {
69
+ "type": "integer",
70
+ "minimum": 1,
71
+ "maximum": 134217728
72
+ },
73
+ "decodedBytes": {
74
+ "type": "integer",
75
+ "minimum": 1,
76
+ "maximum": 134217728
77
+ },
78
+ "catalog": {
79
+ "type": "object",
80
+ "additionalProperties": false,
81
+ "properties": {
82
+ "offset": {
83
+ "type": "integer",
84
+ "minimum": 0,
85
+ "maximum": 134217728
86
+ },
87
+ "encodedBytes": {
88
+ "type": "integer",
89
+ "minimum": 1,
90
+ "maximum": 8388608
91
+ },
92
+ "decodedBytes": {
93
+ "type": "integer",
94
+ "minimum": 1,
95
+ "maximum": 8388608
96
+ },
97
+ "codec": {
98
+ "enum": [
99
+ "identity",
100
+ "deflate-raw"
101
+ ]
102
+ }
103
+ },
104
+ "required": [
105
+ "offset",
106
+ "encodedBytes",
107
+ "decodedBytes",
108
+ "codec"
109
+ ]
110
+ },
111
+ "chunks": {
112
+ "type": "array",
113
+ "minItems": 1,
114
+ "maxItems": 128,
115
+ "items": {
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "properties": {
119
+ "index": {
120
+ "type": "integer",
121
+ "minimum": 0,
122
+ "maximum": 127
123
+ },
124
+ "byteLength": {
125
+ "type": "integer",
126
+ "minimum": 1,
127
+ "maximum": 1048576
128
+ },
129
+ "sha256": {
130
+ "type": "string",
131
+ "pattern": "^[a-f0-9]{64}$"
132
+ }
133
+ },
134
+ "required": [
135
+ "index",
136
+ "byteLength",
137
+ "sha256"
138
+ ]
139
+ }
140
+ }
141
+ },
142
+ "required": [
143
+ "schemaVersion",
144
+ "kind",
145
+ "organizationId",
146
+ "projectId",
147
+ "artifactId",
148
+ "revisionId",
149
+ "contentDigest",
150
+ "contentType",
151
+ "byteLength",
152
+ "decodedBytes",
153
+ "catalog",
154
+ "chunks"
155
+ ]
156
+ },
157
+ "protocolVersion": {
158
+ "const": "1.19.0"
159
+ },
160
+ "intent": {
161
+ "enum": [
162
+ "draft",
163
+ "publish"
164
+ ]
165
+ },
166
+ "expectedVersion": {
167
+ "type": "integer",
168
+ "minimum": 0,
169
+ "maximum": 9007199254740991
170
+ },
171
+ "lifecycleEpoch": {
172
+ "type": "integer",
173
+ "minimum": 1,
174
+ "maximum": 9007199254740991
175
+ }
176
+ },
177
+ "required": [
178
+ "schemaVersion",
179
+ "operationId",
180
+ "baseRevisionId",
181
+ "manifest",
182
+ "protocolVersion",
183
+ "intent",
184
+ "expectedVersion",
185
+ "lifecycleEpoch"
186
+ ]
187
+ }
@@ -0,0 +1,184 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.19.0/company-resource-upload-receipt.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "company-resource-upload-receipt",
6
+ "version": "1.19.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "schemaVersion": {
12
+ "const": "2.1.0"
13
+ },
14
+ "organizationId": {
15
+ "type": "string",
16
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
17
+ },
18
+ "projectId": {
19
+ "type": "string",
20
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
21
+ },
22
+ "artifactId": {
23
+ "type": "string",
24
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
25
+ },
26
+ "operationId": {
27
+ "type": "string",
28
+ "pattern": "^[A-Za-z0-9_-]{22,64}$"
29
+ },
30
+ "revisionId": {
31
+ "type": "string",
32
+ "pattern": "^[A-Za-z0-9_-]{22,64}$"
33
+ },
34
+ "manifestSha256": {
35
+ "type": "string",
36
+ "pattern": "^[a-f0-9]{64}$"
37
+ },
38
+ "contentDigest": {
39
+ "type": "string",
40
+ "pattern": "^sha256:[a-f0-9]{64}$"
41
+ },
42
+ "status": {
43
+ "const": "committed"
44
+ },
45
+ "committedAt": {
46
+ "type": "string",
47
+ "format": "date-time",
48
+ "maxLength": 40
49
+ },
50
+ "protocolVersion": {
51
+ "const": "1.19.0"
52
+ },
53
+ "intent": {
54
+ "enum": [
55
+ "draft",
56
+ "publish"
57
+ ]
58
+ },
59
+ "baseRevisionId": {
60
+ "oneOf": [
61
+ {
62
+ "type": "string",
63
+ "pattern": "^[A-Za-z0-9_-]{22,64}$"
64
+ },
65
+ {
66
+ "type": "null"
67
+ }
68
+ ]
69
+ },
70
+ "version": {
71
+ "type": "integer",
72
+ "minimum": 1,
73
+ "maximum": 9007199254740991
74
+ },
75
+ "lifecycleEpoch": {
76
+ "type": "integer",
77
+ "minimum": 1,
78
+ "maximum": 9007199254740991
79
+ },
80
+ "effect": {
81
+ "oneOf": [
82
+ {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "properties": {
86
+ "kind": {
87
+ "const": "draft"
88
+ },
89
+ "authorHeadRevisionId": {
90
+ "type": "string",
91
+ "pattern": "^[A-Za-z0-9_-]{1,128}(?![\\s\\S])"
92
+ },
93
+ "publicationHeadUnchanged": {
94
+ "const": true
95
+ }
96
+ },
97
+ "required": [
98
+ "kind",
99
+ "authorHeadRevisionId",
100
+ "publicationHeadUnchanged"
101
+ ]
102
+ },
103
+ {
104
+ "type": "object",
105
+ "additionalProperties": false,
106
+ "properties": {
107
+ "kind": {
108
+ "const": "publication"
109
+ },
110
+ "authorHeadRevisionId": {
111
+ "type": "string",
112
+ "pattern": "^[A-Za-z0-9_-]{1,128}(?![\\s\\S])"
113
+ },
114
+ "publicationId": {
115
+ "type": "string",
116
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}(?![\\s\\S])"
117
+ },
118
+ "publicationRevisionId": {
119
+ "type": "string",
120
+ "pattern": "^[A-Za-z0-9_-]{1,128}(?![\\s\\S])"
121
+ }
122
+ },
123
+ "required": [
124
+ "kind",
125
+ "authorHeadRevisionId",
126
+ "publicationId",
127
+ "publicationRevisionId"
128
+ ]
129
+ }
130
+ ]
131
+ }
132
+ },
133
+ "required": [
134
+ "schemaVersion",
135
+ "organizationId",
136
+ "projectId",
137
+ "artifactId",
138
+ "operationId",
139
+ "revisionId",
140
+ "manifestSha256",
141
+ "contentDigest",
142
+ "status",
143
+ "committedAt",
144
+ "protocolVersion",
145
+ "intent",
146
+ "baseRevisionId",
147
+ "version",
148
+ "lifecycleEpoch",
149
+ "effect"
150
+ ],
151
+ "allOf": [
152
+ {
153
+ "if": {
154
+ "properties": {
155
+ "intent": {
156
+ "const": "draft"
157
+ }
158
+ }
159
+ },
160
+ "then": {
161
+ "properties": {
162
+ "effect": {
163
+ "properties": {
164
+ "kind": {
165
+ "const": "draft"
166
+ }
167
+ }
168
+ }
169
+ }
170
+ },
171
+ "else": {
172
+ "properties": {
173
+ "effect": {
174
+ "properties": {
175
+ "kind": {
176
+ "const": "publication"
177
+ }
178
+ }
179
+ }
180
+ }
181
+ }
182
+ }
183
+ ]
184
+ }
@@ -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
+ }