@substrat-run/engine-protocol 0.8.0 → 0.9.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.
- package/dist/index.d.ts +18 -290
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -255
- package/dist/index.js.map +1 -1
- package/dist/inputs.d.ts +322 -0
- package/dist/inputs.d.ts.map +1 -0
- package/dist/inputs.js +285 -0
- package/dist/inputs.js.map +1 -0
- package/dist/operations.d.ts +795 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +176 -0
- package/dist/operations.js.map +1 -0
- package/dist/schemas.d.ts +299 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +63 -0
- package/dist/schemas.js.map +1 -1
- package/package.json +12 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAoB,CAAC,EAAE,MAAM,yBAAyB,CAAC;AAqB9D,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB,YAC/B,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,4BAA4B,EAC5B,2BAA2B,EAC3B,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,eAAe,CACP,CAAC;AAKX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyG7B;;;;;;;;;;;;;;OAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUH,CAAC"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The protocol engine's declared operation surface (#707/#738).
|
|
3
|
+
*
|
|
4
|
+
* An engine declaring its operations is what lets a VERTICAL bind them to its
|
|
5
|
+
* own URLs without restating them. Before this, a vertical mounting
|
|
6
|
+
* `protocol/get` wrote its own `z.object({ instanceId })` — a second
|
|
7
|
+
* description of a shape this engine already owned — and the operation NAME was
|
|
8
|
+
* an unchecked string, because `ModuleRegistration` erases its keys.
|
|
9
|
+
*
|
|
10
|
+
* What is deliberately NOT here:
|
|
11
|
+
*
|
|
12
|
+
* - **`http`.** This engine is entity-agnostic and owns no URL shape: Callout
|
|
13
|
+
* hangs protocols off work orders and Handlebar off bikes, and both are right.
|
|
14
|
+
* The path is the composing vertical's decision, declared with
|
|
15
|
+
* `defineEngineRoutes` against these names.
|
|
16
|
+
* - **`emits`.** The manifest still declares the nine event types by hand, as
|
|
17
|
+
* engine-workorder's does. Deriving them needs `entityIdFrom` to name an
|
|
18
|
+
* OUTPUT field carrying the protocol's id, and three of these operations
|
|
19
|
+
* answer with a composite whose instance sits one level down
|
|
20
|
+
* (`{ instance, signature }`). Declaring the events would mean either
|
|
21
|
+
* flattening returns to suit the declaration or guessing the id — and #695's
|
|
22
|
+
* eighteen `entityId: undefined` events are what guessing that field looks
|
|
23
|
+
* like. It stays hand-declared until the model can say `instance.id`.
|
|
24
|
+
* - **The in-scope functions.** `defineTemplate`, `instantiateProtocol`,
|
|
25
|
+
* `fillProtocol` and the rest are composed by call, inside a vertical's own
|
|
26
|
+
* transaction. These fourteen names are their default HTTP-reachable
|
|
27
|
+
* bindings, not a second way in.
|
|
28
|
+
*
|
|
29
|
+
* ## Inputs are the handler's own schemas, with three deliberate exceptions
|
|
30
|
+
*
|
|
31
|
+
* Every `input` below is the same Zod object the in-scope function parses —
|
|
32
|
+
* that identity is the reason the model is TypeScript, and it is what makes a
|
|
33
|
+
* transcribed argument name impossible. The exceptions are the operations whose
|
|
34
|
+
* REGISTERED shape has always differed from the function's: `instantiate`
|
|
35
|
+
* takes a flattened `entityType`/`entityId` pair where `instantiateProtocol`
|
|
36
|
+
* takes an `EntityRef`, and `sign`/`countersign`/`get`/`void` take an id where
|
|
37
|
+
* the functions take richer arguments. Those shapes are declared here because
|
|
38
|
+
* here is where they are true.
|
|
39
|
+
*/
|
|
40
|
+
import { defineOperations, z } from '@substrat-run/contracts';
|
|
41
|
+
import { protocolEntities, protocolInstanceRow } from './entities.js';
|
|
42
|
+
import { bindDocumentInput, cancelSignatureRequestsInput, declineSignatureInput, defineTemplateInput, fillProtocolInput, recordSignatureInput, requestSignaturesInput, } from './inputs.js';
|
|
43
|
+
import { protocolDetail, protocolResponseRow, protocolSignatureRequestRow, protocolSummary, protocolTemplateRow, requestSignaturesResult, signResult, } from './schemas.js';
|
|
44
|
+
/** The keys these operations check. Mirrors `PROTOCOL_PERM` in index.ts. */
|
|
45
|
+
export const PROTOCOL_PERMISSIONS = [
|
|
46
|
+
'protocol:create',
|
|
47
|
+
'protocol:fill',
|
|
48
|
+
'protocol:bind',
|
|
49
|
+
'protocol:request-signature',
|
|
50
|
+
'protocol:record-signature',
|
|
51
|
+
'protocol:sign',
|
|
52
|
+
'protocol:countersign',
|
|
53
|
+
'protocol:read',
|
|
54
|
+
'protocol:attach',
|
|
55
|
+
'protocol:void',
|
|
56
|
+
];
|
|
57
|
+
/** The registered operations address an instance by id and nothing else. */
|
|
58
|
+
const instanceId = z.object({ instanceId: z.string().min(1) });
|
|
59
|
+
export const protocolOperations = defineOperations(protocolEntities, PROTOCOL_PERMISSIONS)({
|
|
60
|
+
'protocol/define-template': {
|
|
61
|
+
summary: 'Define a protocol template, or version an existing one',
|
|
62
|
+
// A node check: a template belongs to the scope, not to any one instance.
|
|
63
|
+
permission: 'protocol:create',
|
|
64
|
+
input: defineTemplateInput,
|
|
65
|
+
output: protocolTemplateRow,
|
|
66
|
+
},
|
|
67
|
+
'protocol/list-templates': {
|
|
68
|
+
summary: 'The latest version of every template — the instantiation picker',
|
|
69
|
+
permission: 'protocol:read',
|
|
70
|
+
output: z.array(protocolTemplateRow),
|
|
71
|
+
},
|
|
72
|
+
'protocol/instantiate': {
|
|
73
|
+
summary: 'Start a protocol instance on an entity, pinning the template version',
|
|
74
|
+
// Also a node check, and deliberately: the entity named here belongs to the
|
|
75
|
+
// VERTICAL, so whether this principal may protocol *that* work order is a
|
|
76
|
+
// question only the vertical can ask. It asks it by composing
|
|
77
|
+
// `instantiateProtocol` behind its own check.
|
|
78
|
+
permission: 'protocol:create',
|
|
79
|
+
input: z.object({
|
|
80
|
+
templateKey: z.string().min(1),
|
|
81
|
+
entityType: z.string().min(1),
|
|
82
|
+
entityId: z.string().min(1),
|
|
83
|
+
}),
|
|
84
|
+
output: protocolInstanceRow,
|
|
85
|
+
},
|
|
86
|
+
'protocol/fill': {
|
|
87
|
+
summary: 'Record a response on an open checklist protocol (append-only)',
|
|
88
|
+
permission: { key: 'protocol:fill', entity: 'protocol', idFrom: 'instanceId' },
|
|
89
|
+
input: fillProtocolInput,
|
|
90
|
+
output: protocolResponseRow,
|
|
91
|
+
},
|
|
92
|
+
'protocol/bind-document': {
|
|
93
|
+
summary: 'Bind vertical-owned document content and its hash to an open document protocol',
|
|
94
|
+
permission: { key: 'protocol:bind', entity: 'protocol', idFrom: 'instanceId' },
|
|
95
|
+
input: bindDocumentInput,
|
|
96
|
+
output: protocolInstanceRow,
|
|
97
|
+
},
|
|
98
|
+
'protocol/request-signatures': {
|
|
99
|
+
summary: 'Freeze the content and request signatures from named parties',
|
|
100
|
+
permission: { key: 'protocol:request-signature', entity: 'protocol', idFrom: 'instanceId' },
|
|
101
|
+
input: requestSignaturesInput,
|
|
102
|
+
output: requestSignaturesResult,
|
|
103
|
+
},
|
|
104
|
+
'protocol/cancel-signatures': {
|
|
105
|
+
summary: 'Withdraw an outstanding request set and thaw the instance',
|
|
106
|
+
permission: { key: 'protocol:request-signature', entity: 'protocol', idFrom: 'instanceId' },
|
|
107
|
+
input: cancelSignatureRequestsInput,
|
|
108
|
+
output: protocolInstanceRow,
|
|
109
|
+
},
|
|
110
|
+
'protocol/record-signature': {
|
|
111
|
+
// The ingress-facing pair. Both check a NODE, and both check a connector's
|
|
112
|
+
// key rather than a person's: the caller speaks for an external signing
|
|
113
|
+
// provider and arrives with a request id, not with an instance it was
|
|
114
|
+
// granted. The permission diff is where a deployment declares it trusts
|
|
115
|
+
// something to do that.
|
|
116
|
+
summary: 'Record a signature reported by an external signing provider',
|
|
117
|
+
permission: 'protocol:record-signature',
|
|
118
|
+
input: recordSignatureInput,
|
|
119
|
+
output: signResult,
|
|
120
|
+
},
|
|
121
|
+
'protocol/decline-signature': {
|
|
122
|
+
summary: 'Record that a party declined, or that the provider’s window expired',
|
|
123
|
+
permission: 'protocol:record-signature',
|
|
124
|
+
input: declineSignatureInput,
|
|
125
|
+
output: protocolSignatureRequestRow,
|
|
126
|
+
},
|
|
127
|
+
'protocol/sign': {
|
|
128
|
+
summary: 'Sign a protocol in-app — freezes its content forever',
|
|
129
|
+
permission: { key: 'protocol:sign', entity: 'protocol', idFrom: 'instanceId' },
|
|
130
|
+
input: instanceId,
|
|
131
|
+
output: signResult,
|
|
132
|
+
},
|
|
133
|
+
'protocol/countersign': {
|
|
134
|
+
summary: 'Counter-sign an already-signed protocol, on the same frozen content',
|
|
135
|
+
permission: { key: 'protocol:countersign', entity: 'protocol', idFrom: 'instanceId' },
|
|
136
|
+
input: instanceId,
|
|
137
|
+
output: signResult,
|
|
138
|
+
},
|
|
139
|
+
'protocol/void': {
|
|
140
|
+
summary: 'Void (supersede) a protocol — never deletes',
|
|
141
|
+
permission: { key: 'protocol:void', entity: 'protocol', idFrom: 'instanceId' },
|
|
142
|
+
input: instanceId.extend({ reason: z.string().min(1) }),
|
|
143
|
+
output: protocolInstanceRow,
|
|
144
|
+
},
|
|
145
|
+
'protocol/get': {
|
|
146
|
+
summary: 'One protocol with its template, responses, signatures and requests',
|
|
147
|
+
permission: { key: 'protocol:read', entity: 'protocol', idFrom: 'instanceId' },
|
|
148
|
+
input: instanceId,
|
|
149
|
+
output: protocolDetail,
|
|
150
|
+
},
|
|
151
|
+
/**
|
|
152
|
+
* The one operation here whose authority cannot be stated as a leading
|
|
153
|
+
* `permission`, and the reason is this engine's defining property.
|
|
154
|
+
*
|
|
155
|
+
* The check is `protocol:read` against the entity the protocols hang on — a
|
|
156
|
+
* work order in Callout, a bike in Handlebar — so the entity's TYPE arrives as
|
|
157
|
+
* data. `PermissionCheck.entity` must name a type known at declaration time,
|
|
158
|
+
* and there is no honest value to put there: `'protocol'` would be false,
|
|
159
|
+
* because what is checked is the PARENT, not any protocol.
|
|
160
|
+
*
|
|
161
|
+
* So it declares `narrows` instead, which records the fact that actually
|
|
162
|
+
* protects anything — this is not a node check — and names the key the walk
|
|
163
|
+
* evaluates, so `protocol:read` still reaches the permission review. What is
|
|
164
|
+
* lost is the entity type, which was never available to lose.
|
|
165
|
+
*/
|
|
166
|
+
'protocol/list-for-entity': {
|
|
167
|
+
summary: 'Every protocol on one entity, with its progress and signatures',
|
|
168
|
+
narrows: {
|
|
169
|
+
reason: 'checked against the entity the protocols hang on, whose type is the caller’s',
|
|
170
|
+
checks: ['protocol:read'],
|
|
171
|
+
},
|
|
172
|
+
input: z.object({ entityType: z.string().min(1), entityId: z.string().min(1) }),
|
|
173
|
+
output: z.array(protocolSummary),
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAE,gBAAgB,EAAE,CAAC,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EACL,iBAAiB,EACjB,4BAA4B,EAC5B,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,2BAA2B,EAC3B,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,UAAU,GACX,MAAM,cAAc,CAAC;AAEtB,4EAA4E;AAC5E,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,4BAA4B;IAC5B,2BAA2B;IAC3B,eAAe;IACf,sBAAsB;IACtB,eAAe;IACf,iBAAiB;IACjB,eAAe;CACP,CAAC;AAEX,4EAA4E;AAC5E,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAE/D,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAg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QAC9E,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,MAAM,EAAE,mBAAmB;KAC5B;IAED,cAAc,EAAE;QACd,OAAO,EAAE,oEAAoE;QAC7E,UAAU,EAAE,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE;QAC9E,KAAK,EAAE,UAAU;QACjB,MAAM,EAAE,cAAc;KACvB;IAED;;;;;;;;;;;;;;OAcG;IACH,0BAA0B,EAAE;QAC1B,OAAO,EAAE,gEAAgE;QACzE,OAAO,EAAE;YACP,MAAM,EAAE,8EAA8E;YACtF,MAAM,EAAE,CAAC,eAAe,CAAC;SAC1B;QACD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/E,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;KACjC;CACF,CAAC,CAAC"}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -83,4 +83,303 @@ export declare const protocolSignatureRequestRow: z.ZodObject<{
|
|
|
83
83
|
requested_at: z.ZodString;
|
|
84
84
|
resolved_at: z.ZodNullable<z.ZodString>;
|
|
85
85
|
}, z.core.$strip>;
|
|
86
|
+
/**
|
|
87
|
+
* The COMPOSITE returns — what the operations answer with, as opposed to the
|
|
88
|
+
* rows above.
|
|
89
|
+
*
|
|
90
|
+
* These existed only as interfaces, and an interface is exactly as much as an
|
|
91
|
+
* operation cannot be declared against. `output` on a declared operation is a
|
|
92
|
+
* Zod schema, so without these four `protocol/get` and `protocol/sign` had
|
|
93
|
+
* nothing to point at and the engine could declare only the half of its surface
|
|
94
|
+
* that happens to return one row.
|
|
95
|
+
*
|
|
96
|
+
* They are assembled from the row schemas rather than restating their fields,
|
|
97
|
+
* so a column added to a row reaches every projection that carries it.
|
|
98
|
+
*/
|
|
99
|
+
export declare const signResult: z.ZodObject<{
|
|
100
|
+
instance: z.ZodObject<{
|
|
101
|
+
id: z.ZodString;
|
|
102
|
+
template_key: z.ZodString;
|
|
103
|
+
template_version: z.ZodNumber;
|
|
104
|
+
entity_type: z.ZodString;
|
|
105
|
+
entity_id: z.ZodString;
|
|
106
|
+
status: z.ZodEnum<{
|
|
107
|
+
open: "open";
|
|
108
|
+
pending_signature: "pending_signature";
|
|
109
|
+
signed: "signed";
|
|
110
|
+
voided: "voided";
|
|
111
|
+
}>;
|
|
112
|
+
created_by: z.ZodString;
|
|
113
|
+
created_at: z.ZodString;
|
|
114
|
+
voided_by: z.ZodNullable<z.ZodString>;
|
|
115
|
+
voided_reason: z.ZodNullable<z.ZodString>;
|
|
116
|
+
voided_at: z.ZodNullable<z.ZodString>;
|
|
117
|
+
content_ref_type: z.ZodNullable<z.ZodString>;
|
|
118
|
+
content_ref_id: z.ZodNullable<z.ZodString>;
|
|
119
|
+
bound_hash: z.ZodNullable<z.ZodString>;
|
|
120
|
+
document_attachment_id: z.ZodNullable<z.ZodString>;
|
|
121
|
+
frozen_hash: z.ZodNullable<z.ZodString>;
|
|
122
|
+
frozen_at: z.ZodNullable<z.ZodString>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
signature: z.ZodObject<{
|
|
125
|
+
id: z.ZodString;
|
|
126
|
+
instance_id: z.ZodString;
|
|
127
|
+
signed_by: z.ZodString;
|
|
128
|
+
kind: z.ZodEnum<{
|
|
129
|
+
counter: "counter";
|
|
130
|
+
primary: "primary";
|
|
131
|
+
}>;
|
|
132
|
+
method: z.ZodString;
|
|
133
|
+
content_hash: z.ZodString;
|
|
134
|
+
evidence_ref: z.ZodNullable<z.ZodString>;
|
|
135
|
+
signed_at: z.ZodString;
|
|
136
|
+
request_id: z.ZodNullable<z.ZodString>;
|
|
137
|
+
signatory_kind: z.ZodEnum<{
|
|
138
|
+
external: "external";
|
|
139
|
+
principal: "principal";
|
|
140
|
+
}>;
|
|
141
|
+
signatory_label: z.ZodNullable<z.ZodString>;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
export declare const requestSignaturesResult: z.ZodObject<{
|
|
145
|
+
instance: z.ZodObject<{
|
|
146
|
+
id: z.ZodString;
|
|
147
|
+
template_key: z.ZodString;
|
|
148
|
+
template_version: z.ZodNumber;
|
|
149
|
+
entity_type: z.ZodString;
|
|
150
|
+
entity_id: z.ZodString;
|
|
151
|
+
status: z.ZodEnum<{
|
|
152
|
+
open: "open";
|
|
153
|
+
pending_signature: "pending_signature";
|
|
154
|
+
signed: "signed";
|
|
155
|
+
voided: "voided";
|
|
156
|
+
}>;
|
|
157
|
+
created_by: z.ZodString;
|
|
158
|
+
created_at: z.ZodString;
|
|
159
|
+
voided_by: z.ZodNullable<z.ZodString>;
|
|
160
|
+
voided_reason: z.ZodNullable<z.ZodString>;
|
|
161
|
+
voided_at: z.ZodNullable<z.ZodString>;
|
|
162
|
+
content_ref_type: z.ZodNullable<z.ZodString>;
|
|
163
|
+
content_ref_id: z.ZodNullable<z.ZodString>;
|
|
164
|
+
bound_hash: z.ZodNullable<z.ZodString>;
|
|
165
|
+
document_attachment_id: z.ZodNullable<z.ZodString>;
|
|
166
|
+
frozen_hash: z.ZodNullable<z.ZodString>;
|
|
167
|
+
frozen_at: z.ZodNullable<z.ZodString>;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
contentHash: z.ZodString;
|
|
170
|
+
requests: z.ZodArray<z.ZodObject<{
|
|
171
|
+
id: z.ZodString;
|
|
172
|
+
instance_id: z.ZodString;
|
|
173
|
+
party_label: z.ZodString;
|
|
174
|
+
party_kind: z.ZodEnum<{
|
|
175
|
+
external: "external";
|
|
176
|
+
principal: "principal";
|
|
177
|
+
}>;
|
|
178
|
+
party_ref: z.ZodNullable<z.ZodString>;
|
|
179
|
+
signature_kind: z.ZodEnum<{
|
|
180
|
+
counter: "counter";
|
|
181
|
+
primary: "primary";
|
|
182
|
+
}>;
|
|
183
|
+
method: z.ZodString;
|
|
184
|
+
auth_level: z.ZodNullable<z.ZodEnum<{
|
|
185
|
+
basic: "basic";
|
|
186
|
+
strong: "strong";
|
|
187
|
+
}>>;
|
|
188
|
+
contact_key_id: z.ZodNullable<z.ZodString>;
|
|
189
|
+
contact_ciphertext: z.ZodNullable<z.ZodString>;
|
|
190
|
+
status: z.ZodEnum<{
|
|
191
|
+
cancelled: "cancelled";
|
|
192
|
+
declined: "declined";
|
|
193
|
+
expired: "expired";
|
|
194
|
+
pending: "pending";
|
|
195
|
+
signed: "signed";
|
|
196
|
+
}>;
|
|
197
|
+
content_hash: z.ZodString;
|
|
198
|
+
external_ref: z.ZodNullable<z.ZodString>;
|
|
199
|
+
resolved_note: z.ZodNullable<z.ZodString>;
|
|
200
|
+
requested_by: z.ZodString;
|
|
201
|
+
requested_at: z.ZodString;
|
|
202
|
+
resolved_at: z.ZodNullable<z.ZodString>;
|
|
203
|
+
}, z.core.$strip>>;
|
|
204
|
+
}, z.core.$strip>;
|
|
205
|
+
export declare const protocolDetail: z.ZodObject<{
|
|
206
|
+
instance: z.ZodObject<{
|
|
207
|
+
id: z.ZodString;
|
|
208
|
+
template_key: z.ZodString;
|
|
209
|
+
template_version: z.ZodNumber;
|
|
210
|
+
entity_type: z.ZodString;
|
|
211
|
+
entity_id: z.ZodString;
|
|
212
|
+
status: z.ZodEnum<{
|
|
213
|
+
open: "open";
|
|
214
|
+
pending_signature: "pending_signature";
|
|
215
|
+
signed: "signed";
|
|
216
|
+
voided: "voided";
|
|
217
|
+
}>;
|
|
218
|
+
created_by: z.ZodString;
|
|
219
|
+
created_at: z.ZodString;
|
|
220
|
+
voided_by: z.ZodNullable<z.ZodString>;
|
|
221
|
+
voided_reason: z.ZodNullable<z.ZodString>;
|
|
222
|
+
voided_at: z.ZodNullable<z.ZodString>;
|
|
223
|
+
content_ref_type: z.ZodNullable<z.ZodString>;
|
|
224
|
+
content_ref_id: z.ZodNullable<z.ZodString>;
|
|
225
|
+
bound_hash: z.ZodNullable<z.ZodString>;
|
|
226
|
+
document_attachment_id: z.ZodNullable<z.ZodString>;
|
|
227
|
+
frozen_hash: z.ZodNullable<z.ZodString>;
|
|
228
|
+
frozen_at: z.ZodNullable<z.ZodString>;
|
|
229
|
+
}, z.core.$strip>;
|
|
230
|
+
template: z.ZodObject<{
|
|
231
|
+
key: z.ZodString;
|
|
232
|
+
version: z.ZodNumber;
|
|
233
|
+
title: z.ZodString;
|
|
234
|
+
content: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
235
|
+
kind: z.ZodLiteral<"checklist">;
|
|
236
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
237
|
+
title: z.ZodString;
|
|
238
|
+
items: z.ZodArray<z.ZodObject<{
|
|
239
|
+
key: z.ZodString;
|
|
240
|
+
label: z.ZodString;
|
|
241
|
+
type: z.ZodEnum<{
|
|
242
|
+
check: "check";
|
|
243
|
+
text: "text";
|
|
244
|
+
value: "value";
|
|
245
|
+
}>;
|
|
246
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
247
|
+
}, z.core.$strip>>;
|
|
248
|
+
}, z.core.$strip>>;
|
|
249
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
250
|
+
kind: z.ZodLiteral<"document">;
|
|
251
|
+
documentType: z.ZodString;
|
|
252
|
+
hashRecipe: z.ZodString;
|
|
253
|
+
description: z.ZodOptional<z.ZodString>;
|
|
254
|
+
}, z.core.$strip>], "kind">;
|
|
255
|
+
}, z.core.$strip>;
|
|
256
|
+
responses: z.ZodArray<z.ZodObject<{
|
|
257
|
+
id: z.ZodString;
|
|
258
|
+
instance_id: z.ZodString;
|
|
259
|
+
item_key: z.ZodString;
|
|
260
|
+
value_json: z.ZodString;
|
|
261
|
+
note: z.ZodNullable<z.ZodString>;
|
|
262
|
+
responded_by: z.ZodString;
|
|
263
|
+
responded_at: z.ZodString;
|
|
264
|
+
}, z.core.$strip>>;
|
|
265
|
+
latest: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
266
|
+
id: z.ZodString;
|
|
267
|
+
instance_id: z.ZodString;
|
|
268
|
+
item_key: z.ZodString;
|
|
269
|
+
value_json: z.ZodString;
|
|
270
|
+
note: z.ZodNullable<z.ZodString>;
|
|
271
|
+
responded_by: z.ZodString;
|
|
272
|
+
responded_at: z.ZodString;
|
|
273
|
+
}, z.core.$strip>>;
|
|
274
|
+
signature: z.ZodNullable<z.ZodObject<{
|
|
275
|
+
id: z.ZodString;
|
|
276
|
+
instance_id: z.ZodString;
|
|
277
|
+
signed_by: z.ZodString;
|
|
278
|
+
kind: z.ZodEnum<{
|
|
279
|
+
counter: "counter";
|
|
280
|
+
primary: "primary";
|
|
281
|
+
}>;
|
|
282
|
+
method: z.ZodString;
|
|
283
|
+
content_hash: z.ZodString;
|
|
284
|
+
evidence_ref: z.ZodNullable<z.ZodString>;
|
|
285
|
+
signed_at: z.ZodString;
|
|
286
|
+
request_id: z.ZodNullable<z.ZodString>;
|
|
287
|
+
signatory_kind: z.ZodEnum<{
|
|
288
|
+
external: "external";
|
|
289
|
+
principal: "principal";
|
|
290
|
+
}>;
|
|
291
|
+
signatory_label: z.ZodNullable<z.ZodString>;
|
|
292
|
+
}, z.core.$strip>>;
|
|
293
|
+
signatures: z.ZodArray<z.ZodObject<{
|
|
294
|
+
id: z.ZodString;
|
|
295
|
+
instance_id: z.ZodString;
|
|
296
|
+
signed_by: z.ZodString;
|
|
297
|
+
kind: z.ZodEnum<{
|
|
298
|
+
counter: "counter";
|
|
299
|
+
primary: "primary";
|
|
300
|
+
}>;
|
|
301
|
+
method: z.ZodString;
|
|
302
|
+
content_hash: z.ZodString;
|
|
303
|
+
evidence_ref: z.ZodNullable<z.ZodString>;
|
|
304
|
+
signed_at: z.ZodString;
|
|
305
|
+
request_id: z.ZodNullable<z.ZodString>;
|
|
306
|
+
signatory_kind: z.ZodEnum<{
|
|
307
|
+
external: "external";
|
|
308
|
+
principal: "principal";
|
|
309
|
+
}>;
|
|
310
|
+
signatory_label: z.ZodNullable<z.ZodString>;
|
|
311
|
+
}, z.core.$strip>>;
|
|
312
|
+
requests: z.ZodArray<z.ZodObject<{
|
|
313
|
+
id: z.ZodString;
|
|
314
|
+
instance_id: z.ZodString;
|
|
315
|
+
party_label: z.ZodString;
|
|
316
|
+
party_kind: z.ZodEnum<{
|
|
317
|
+
external: "external";
|
|
318
|
+
principal: "principal";
|
|
319
|
+
}>;
|
|
320
|
+
party_ref: z.ZodNullable<z.ZodString>;
|
|
321
|
+
signature_kind: z.ZodEnum<{
|
|
322
|
+
counter: "counter";
|
|
323
|
+
primary: "primary";
|
|
324
|
+
}>;
|
|
325
|
+
method: z.ZodString;
|
|
326
|
+
auth_level: z.ZodNullable<z.ZodEnum<{
|
|
327
|
+
basic: "basic";
|
|
328
|
+
strong: "strong";
|
|
329
|
+
}>>;
|
|
330
|
+
contact_key_id: z.ZodNullable<z.ZodString>;
|
|
331
|
+
contact_ciphertext: z.ZodNullable<z.ZodString>;
|
|
332
|
+
status: z.ZodEnum<{
|
|
333
|
+
cancelled: "cancelled";
|
|
334
|
+
declined: "declined";
|
|
335
|
+
expired: "expired";
|
|
336
|
+
pending: "pending";
|
|
337
|
+
signed: "signed";
|
|
338
|
+
}>;
|
|
339
|
+
content_hash: z.ZodString;
|
|
340
|
+
external_ref: z.ZodNullable<z.ZodString>;
|
|
341
|
+
resolved_note: z.ZodNullable<z.ZodString>;
|
|
342
|
+
requested_by: z.ZodString;
|
|
343
|
+
requested_at: z.ZodString;
|
|
344
|
+
resolved_at: z.ZodNullable<z.ZodString>;
|
|
345
|
+
}, z.core.$strip>>;
|
|
346
|
+
}, z.core.$strip>;
|
|
347
|
+
export declare const protocolSummary: z.ZodObject<{
|
|
348
|
+
instance: z.ZodObject<{
|
|
349
|
+
id: z.ZodString;
|
|
350
|
+
template_key: z.ZodString;
|
|
351
|
+
template_version: z.ZodNumber;
|
|
352
|
+
entity_type: z.ZodString;
|
|
353
|
+
entity_id: z.ZodString;
|
|
354
|
+
status: z.ZodEnum<{
|
|
355
|
+
open: "open";
|
|
356
|
+
pending_signature: "pending_signature";
|
|
357
|
+
signed: "signed";
|
|
358
|
+
voided: "voided";
|
|
359
|
+
}>;
|
|
360
|
+
created_by: z.ZodString;
|
|
361
|
+
created_at: z.ZodString;
|
|
362
|
+
voided_by: z.ZodNullable<z.ZodString>;
|
|
363
|
+
voided_reason: z.ZodNullable<z.ZodString>;
|
|
364
|
+
voided_at: z.ZodNullable<z.ZodString>;
|
|
365
|
+
content_ref_type: z.ZodNullable<z.ZodString>;
|
|
366
|
+
content_ref_id: z.ZodNullable<z.ZodString>;
|
|
367
|
+
bound_hash: z.ZodNullable<z.ZodString>;
|
|
368
|
+
document_attachment_id: z.ZodNullable<z.ZodString>;
|
|
369
|
+
frozen_hash: z.ZodNullable<z.ZodString>;
|
|
370
|
+
frozen_at: z.ZodNullable<z.ZodString>;
|
|
371
|
+
}, z.core.$strip>;
|
|
372
|
+
title: z.ZodString;
|
|
373
|
+
contentKind: z.ZodEnum<{
|
|
374
|
+
checklist: "checklist";
|
|
375
|
+
document: "document";
|
|
376
|
+
}>;
|
|
377
|
+
answered: z.ZodNumber;
|
|
378
|
+
total: z.ZodNumber;
|
|
379
|
+
signedBy: z.ZodNullable<z.ZodString>;
|
|
380
|
+
signedAt: z.ZodNullable<z.ZodString>;
|
|
381
|
+
countersignedBy: z.ZodNullable<z.ZodString>;
|
|
382
|
+
countersignedAt: z.ZodNullable<z.ZodString>;
|
|
383
|
+
pendingSignatures: z.ZodNumber;
|
|
384
|
+
}, z.core.$strip>;
|
|
86
385
|
//# sourceMappingURL=schemas.d.ts.map
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,yBAAyB,CAAC;AAc5C,eAAO,MAAM,mBAAmB;;;;;;;iBAO9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;iBAQ9B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;iBAY/B,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBtC,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGrB,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIlC,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiBzB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAY1B,CAAC"}
|
package/dist/schemas.js
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
* gains, loses or retypes a field.
|
|
14
14
|
*/
|
|
15
15
|
import { z } from '@substrat-run/contracts';
|
|
16
|
+
import { protocolInstanceRow } from './entities.js';
|
|
17
|
+
import { contentUnion } from './inputs.js';
|
|
16
18
|
export const protocolTemplateRow = z.object({
|
|
17
19
|
id: z.string(),
|
|
18
20
|
key: z.string(),
|
|
@@ -62,12 +64,73 @@ export const protocolSignatureRequestRow = z.object({
|
|
|
62
64
|
requested_at: z.string(),
|
|
63
65
|
resolved_at: z.string().nullable(),
|
|
64
66
|
});
|
|
67
|
+
/**
|
|
68
|
+
* The COMPOSITE returns — what the operations answer with, as opposed to the
|
|
69
|
+
* rows above.
|
|
70
|
+
*
|
|
71
|
+
* These existed only as interfaces, and an interface is exactly as much as an
|
|
72
|
+
* operation cannot be declared against. `output` on a declared operation is a
|
|
73
|
+
* Zod schema, so without these four `protocol/get` and `protocol/sign` had
|
|
74
|
+
* nothing to point at and the engine could declare only the half of its surface
|
|
75
|
+
* that happens to return one row.
|
|
76
|
+
*
|
|
77
|
+
* They are assembled from the row schemas rather than restating their fields,
|
|
78
|
+
* so a column added to a row reaches every projection that carries it.
|
|
79
|
+
*/
|
|
80
|
+
export const signResult = z.object({
|
|
81
|
+
instance: protocolInstanceRow,
|
|
82
|
+
signature: protocolSignatureRow,
|
|
83
|
+
});
|
|
84
|
+
export const requestSignaturesResult = z.object({
|
|
85
|
+
instance: protocolInstanceRow,
|
|
86
|
+
contentHash: z.string(),
|
|
87
|
+
requests: z.array(protocolSignatureRequestRow),
|
|
88
|
+
});
|
|
89
|
+
export const protocolDetail = z.object({
|
|
90
|
+
instance: protocolInstanceRow,
|
|
91
|
+
template: z.object({
|
|
92
|
+
key: z.string(),
|
|
93
|
+
version: z.number(),
|
|
94
|
+
title: z.string(),
|
|
95
|
+
content: contentUnion,
|
|
96
|
+
}),
|
|
97
|
+
/** The full append-only history — every edit, in order. */
|
|
98
|
+
responses: z.array(protocolResponseRow),
|
|
99
|
+
/** Per item, last append wins — the current answers. */
|
|
100
|
+
latest: z.record(z.string(), protocolResponseRow),
|
|
101
|
+
/** The primary (issuing) signature, or null while unsigned. */
|
|
102
|
+
signature: protocolSignatureRow.nullable(),
|
|
103
|
+
/** Every row: the primary plus any counter-signatures. */
|
|
104
|
+
signatures: z.array(protocolSignatureRow),
|
|
105
|
+
requests: z.array(protocolSignatureRequestRow),
|
|
106
|
+
});
|
|
107
|
+
export const protocolSummary = z.object({
|
|
108
|
+
instance: protocolInstanceRow,
|
|
109
|
+
title: z.string(),
|
|
110
|
+
contentKind: z.enum(['checklist', 'document']),
|
|
111
|
+
answered: z.number(),
|
|
112
|
+
total: z.number(),
|
|
113
|
+
signedBy: z.string().nullable(),
|
|
114
|
+
signedAt: z.string().nullable(),
|
|
115
|
+
countersignedBy: z.string().nullable(),
|
|
116
|
+
countersignedAt: z.string().nullable(),
|
|
117
|
+
/** How many requested signatures are still outstanding. */
|
|
118
|
+
pendingSignatures: z.number(),
|
|
119
|
+
});
|
|
65
120
|
const _templateRow = true;
|
|
66
121
|
const _responseRow = true;
|
|
67
122
|
const _signatureRow = true;
|
|
68
123
|
const _requestRow = true;
|
|
124
|
+
const _signResult = true;
|
|
125
|
+
const _requestResult = true;
|
|
126
|
+
const _detail = true;
|
|
127
|
+
const _summary = true;
|
|
69
128
|
void _templateRow;
|
|
70
129
|
void _responseRow;
|
|
71
130
|
void _signatureRow;
|
|
72
131
|
void _requestRow;
|
|
132
|
+
void _signResult;
|
|
133
|
+
void _requestResult;
|
|
134
|
+
void _detail;
|
|
135
|
+
void _summary;
|
|
73
136
|
//# sourceMappingURL=schemas.js.map
|
package/dist/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,yBAAyB,CAAC;AAC5C,OAAO,EAAE,mBAAmB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, checklists and signed documents with the freeze → immutable invariant — versioned templates, append-only responses, verifiable content hash, counter-signatures on frozen content, and asynchronous multi-party signatures by external (non-principal) signatories",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -25,16 +25,20 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"
|
|
29
|
-
"@substrat-run/
|
|
30
|
-
"@substrat-run/kernel": "^0.72.0"
|
|
28
|
+
"@substrat-run/contracts": "^0.74.0",
|
|
29
|
+
"@substrat-run/kernel": "^0.74.0"
|
|
31
30
|
},
|
|
32
31
|
"devDependencies": {
|
|
33
32
|
"typescript": "^7.0.0",
|
|
34
|
-
"vitest": "^3.
|
|
35
|
-
"
|
|
36
|
-
"@substrat-run/
|
|
37
|
-
"@substrat-run/
|
|
33
|
+
"vitest": "^3.2.7",
|
|
34
|
+
"zod": "^4.4.3",
|
|
35
|
+
"@substrat-run/adapter-sqlite": "^0.74.0",
|
|
36
|
+
"@substrat-run/contract-tests": "^0.74.0",
|
|
37
|
+
"@substrat-run/engine-test-kit": "^0.3.1",
|
|
38
|
+
"@substrat-run/model-emit": "0.3.1"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"zod": "^4.4.0"
|
|
38
42
|
},
|
|
39
43
|
"scripts": {
|
|
40
44
|
"build": "tsc -p tsconfig.json",
|