@ixo/topic-protocol 0.5.0 → 0.7.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/README.md +6 -2
- package/dist/profiles/job-card/profile.json +29 -0
- package/dist/schemas/approval-decision.schema.json +30 -0
- package/dist/schemas/claim-record.schema.json +30 -0
- package/dist/schemas/delivery-decision.schema.json +28 -0
- package/dist/schemas/delivery-packet.schema.json +58 -0
- package/dist/schemas/evaluation-assertion.schema.json +37 -0
- package/dist/schemas/external-work-binding.schema.json +83 -0
- package/dist/schemas/external-work-state-map.schema.json +29 -0
- package/dist/schemas/job-card.schema.json +46 -0
- package/dist/schemas/settlement-receipt.schema.json +53 -0
- package/dist/schemas/topic-contract-state.schema.json +26 -0
- package/dist/schemas/topic-kind-profile.schema.json +82 -0
- package/dist/schemas/topic-operation.schema.json +2 -2
- package/dist/schemas/topic-state.schema.json +14 -0
- package/dist/schemas/work-item-snapshot.schema.json +73 -0
- package/dist/src/contracts/schemas.d.ts +1656 -29
- package/dist/src/contracts/schemas.js +22 -0
- package/dist/src/contracts/schemas.js.map +1 -1
- package/dist/src/contracts/topic-contract.d.ts +3 -0
- package/dist/src/contracts/topic-contract.js.map +1 -1
- package/dist/src/contracts/topic-kind-profile.d.ts +81 -0
- package/dist/src/contracts/topic-kind-profile.js +76 -0
- package/dist/src/contracts/topic-kind-profile.js.map +1 -0
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/errors.js.map +1 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/projector/payload.d.ts +29 -0
- package/dist/src/projector/payload.js +83 -1
- package/dist/src/projector/payload.js.map +1 -1
- package/dist/src/projector/state.js +6 -0
- package/dist/src/projector/state.js.map +1 -1
- package/dist/src/projector/types.d.ts +3 -1
- package/dist/src/projector/types.js.map +1 -1
- package/dist/src/work-bridge/mapping.d.ts +2 -0
- package/dist/src/work-bridge/mapping.js +17 -0
- package/dist/src/work-bridge/mapping.js.map +1 -0
- package/dist/src/work-bridge/project.d.ts +7 -0
- package/dist/src/work-bridge/project.js +262 -0
- package/dist/src/work-bridge/project.js.map +1 -0
- package/dist/src/work-bridge/types.d.ts +232 -0
- package/dist/src/work-bridge/types.js +26 -0
- package/dist/src/work-bridge/types.js.map +1 -0
- package/package.json +4 -2
- package/profiles/job-card/README.md +11 -0
- package/profiles/job-card/profile.json +29 -0
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"version": { "enum": [1, 2] },
|
|
9
9
|
"operationId": { "type": "string", "minLength": 1 },
|
|
10
10
|
"topicId": { "type": "string", "pattern": "^ixo:topic:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
|
|
11
|
-
"type": { "type": "string", "enum": ["rename", "change-status", "update-overview", "link-context", "unlink-context", "attach-files", "detach-files", "record-decision", "propose-contract", "update-contract", "accept-contract", "supersede-contract", "bind-automation", "update-automation", "pause-automation", "remove-automation", "redirect", "branch", "merge", "resolve-conflict"] },
|
|
11
|
+
"type": { "type": "string", "enum": ["rename", "change-status", "update-overview", "link-context", "unlink-context", "attach-files", "detach-files", "record-decision", "propose-contract", "update-contract", "accept-contract", "supersede-contract", "bind-automation", "update-automation", "pause-automation", "remove-automation", "bind-external-work", "sync-external-work", "unlink-external-work", "submit-delivery", "record-delivery-decision", "record-evaluation", "record-approval", "record-claim", "record-settlement", "redirect", "branch", "merge", "resolve-conflict"] },
|
|
12
12
|
"previousRevision": { "type": "string", "minLength": 1 },
|
|
13
13
|
"actor": { "type": "string", "minLength": 1 },
|
|
14
14
|
"createdAt": { "type": "string", "format": "date-time" },
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
{
|
|
21
21
|
"if": {
|
|
22
22
|
"properties": {
|
|
23
|
-
"type": { "enum": ["propose-contract", "update-contract", "accept-contract", "supersede-contract", "bind-automation", "update-automation", "pause-automation", "remove-automation"] }
|
|
23
|
+
"type": { "enum": ["propose-contract", "update-contract", "accept-contract", "supersede-contract", "bind-automation", "update-automation", "pause-automation", "remove-automation", "bind-external-work", "sync-external-work", "unlink-external-work", "submit-delivery", "record-delivery-decision", "record-evaluation", "record-approval", "record-claim", "record-settlement"] }
|
|
24
24
|
},
|
|
25
25
|
"required": ["type"]
|
|
26
26
|
},
|
|
@@ -33,6 +33,20 @@
|
|
|
33
33
|
]
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
+
"workBridge": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"required": ["bindings", "deliveryPackets", "deliveryDecisions", "evaluations", "approvals", "claims", "settlements"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"bindings": { "type": "array", "items": { "type": "object", "required": ["bindingId", "topicId", "workState", "health", "lastOperationId"], "properties": { "bindingId": { "type": "string" }, "topicId": { "type": "string" }, "workState": { "type": "string" }, "health": { "type": "string" }, "lastOperationId": { "type": "string" } } } },
|
|
41
|
+
"deliveryPackets": { "type": "array", "items": { "$ref": "https://topic-protocol.ixo.world/schemas/delivery-packet.schema.json" } },
|
|
42
|
+
"deliveryDecisions": { "type": "array", "items": { "$ref": "https://topic-protocol.ixo.world/schemas/delivery-decision.schema.json" } },
|
|
43
|
+
"evaluations": { "type": "array", "items": { "$ref": "https://topic-protocol.ixo.world/schemas/evaluation-assertion.schema.json" } },
|
|
44
|
+
"approvals": { "type": "array", "items": { "$ref": "https://topic-protocol.ixo.world/schemas/approval-decision.schema.json" } },
|
|
45
|
+
"claims": { "type": "array", "items": { "$ref": "https://topic-protocol.ixo.world/schemas/claim-record.schema.json" } },
|
|
46
|
+
"settlements": { "type": "array", "items": { "$ref": "https://topic-protocol.ixo.world/schemas/settlement-receipt.schema.json" } }
|
|
47
|
+
},
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
},
|
|
36
50
|
"basedOnEvents": { "type": "array", "items": { "type": "string", "pattern": "^\\$" } },
|
|
37
51
|
"conflicts": { "type": "array", "items": { "type": "string" } }
|
|
38
52
|
},
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://topic-protocol.ixo.world/schemas/work-item-snapshot.schema.json",
|
|
4
|
+
"title": "External work item snapshot v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["version", "snapshotId", "bindingId", "topicId", "source", "title", "workflowState", "planning", "relations", "attachments", "promotedComments", "sourceCreatedAt", "sourceUpdatedAt", "retrievedAt", "digest"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"version": { "const": 1 },
|
|
9
|
+
"snapshotId": { "$ref": "#/$defs/uuidV7" },
|
|
10
|
+
"bindingId": { "$ref": "#/$defs/uuidV7" },
|
|
11
|
+
"topicId": { "$ref": "#/$defs/topicId" },
|
|
12
|
+
"source": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"required": ["provider", "organizationId", "resourceId", "identifier", "url"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"provider": { "type": "string", "pattern": "^[a-z][a-z0-9.-]{0,63}$" },
|
|
17
|
+
"organizationId": { "type": "string", "minLength": 1 },
|
|
18
|
+
"teamId": { "type": "string", "minLength": 1 },
|
|
19
|
+
"resourceId": { "type": "string", "minLength": 1 },
|
|
20
|
+
"identifier": { "type": "string", "minLength": 1 },
|
|
21
|
+
"url": { "type": "string", "format": "uri" }
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": false
|
|
24
|
+
},
|
|
25
|
+
"title": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
26
|
+
"descriptionMarkdown": { "type": "string", "maxLength": 200000 },
|
|
27
|
+
"workflowState": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"required": ["id", "name", "category", "mappedWorkState", "mappingProfileId", "mappingVersion"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"id": { "type": "string", "minLength": 1 },
|
|
32
|
+
"name": { "type": "string", "minLength": 1 },
|
|
33
|
+
"category": { "enum": ["triage", "backlog", "unstarted", "started", "completed", "canceled"] },
|
|
34
|
+
"mappedWorkState": { "enum": ["planned", "ready", "in_progress", "blocked", "handoff_ready", "handed_off", "cancelled"] },
|
|
35
|
+
"mappingProfileId": { "type": "string", "format": "uri" },
|
|
36
|
+
"mappingVersion": { "type": "integer", "minimum": 1 }
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": false
|
|
39
|
+
},
|
|
40
|
+
"assignee": { "$ref": "#/$defs/externalActor" },
|
|
41
|
+
"delegate": { "$ref": "#/$defs/externalActor" },
|
|
42
|
+
"planning": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"required": ["labels"],
|
|
45
|
+
"properties": {
|
|
46
|
+
"priority": { "type": "integer", "minimum": 0 },
|
|
47
|
+
"estimate": { "type": "number", "minimum": 0 },
|
|
48
|
+
"projectId": { "type": "string", "minLength": 1 },
|
|
49
|
+
"cycleId": { "type": "string", "minLength": 1 },
|
|
50
|
+
"dueDate": { "type": "string", "format": "date" },
|
|
51
|
+
"labels": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
|
|
52
|
+
},
|
|
53
|
+
"additionalProperties": false
|
|
54
|
+
},
|
|
55
|
+
"relations": { "type": "array", "items": { "type": "object", "required": ["type", "resourceId"], "properties": { "type": { "type": "string", "minLength": 1 }, "resourceId": { "type": "string", "minLength": 1 }, "url": { "type": "string", "format": "uri" } }, "additionalProperties": false } },
|
|
56
|
+
"attachments": { "type": "array", "items": { "$ref": "#/$defs/sourceReference" } },
|
|
57
|
+
"promotedComments": { "type": "array", "items": { "$ref": "#/$defs/sourceReference" } },
|
|
58
|
+
"sourceCreatedAt": { "type": "string", "format": "date-time" },
|
|
59
|
+
"sourceUpdatedAt": { "type": "string", "format": "date-time" },
|
|
60
|
+
"retrievedAt": { "type": "string", "format": "date-time" },
|
|
61
|
+
"sourceEventId": { "type": "string", "minLength": 1 },
|
|
62
|
+
"digest": { "$ref": "#/$defs/digest" },
|
|
63
|
+
"extensions": { "type": "object" }
|
|
64
|
+
},
|
|
65
|
+
"$defs": {
|
|
66
|
+
"uuidV7": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
|
|
67
|
+
"topicId": { "type": "string", "pattern": "^ixo:topic:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
|
|
68
|
+
"digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
|
|
69
|
+
"externalActor": { "type": "object", "required": ["id"], "properties": { "id": { "type": "string", "minLength": 1 }, "displayName": { "type": "string", "minLength": 1 }, "did": { "type": "string", "pattern": "^did:[a-z0-9]+:.+" } }, "additionalProperties": false },
|
|
70
|
+
"sourceReference": { "type": "object", "required": ["id", "url", "digest"], "properties": { "id": { "type": "string", "minLength": 1 }, "url": { "type": "string", "format": "uri" }, "digest": { "$ref": "#/$defs/digest" } }, "additionalProperties": false }
|
|
71
|
+
},
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
}
|